Class: CreditDisplay

CreditDisplay

new CreditDisplay(container, delimiter)

字幕显示屏负责在屏幕上显示字幕。

Name Type Default Description
container HTMLElement

显示字幕的 HTML 元素。

delimiter String ' • ' 可选

用于分隔文本字幕的字符串。

Example
var creditDisplay = new SuperMap3D.CreditDisplay(creditContainer);

Members

static creditCredit

Gets or sets the SuperMap3D logo credit.

containerHTMLElement

The HTML element where credits will be displayed.

Methods

addCredit(credit)

在当前版权声明列表中添加一个版权声明,并显示在版权声明容器中。

Name Type Description
credit Credit

显示的版权声明。

addDefaultCredit(credit)

添加版权声明点数,这些版权声明点数将持续存在,直至被删除。

Name Type Description
credit Credit

增加违约的版权声明。

beginFrame()

将版权声明显示重置为帧开始状态,清除当前版权声明。

destroy(){undefined}

销毁该对象持有的资源。销毁对象允许确定地释放资源,而不是依赖于垃圾收集器来销毁该对象。

对象一旦被销毁,就不应该再使用;调用任何函数,除了isDestroyed将导致DeveloperError异常。因此,如示例中所示,将返回值undefined赋值给对象。

Throws:

该对象被销毁,即调用destroy()。

Type
DeveloperError
Returns:
Type Description
undefined

endFrame()

将版权声明显示设置为帧结束状态,在版权声明容器中显示当前版权声明。

isDestroyed(){Boolean}

如果此对象被销毁则返回true,否则返回false。

Returns:
Type Description
Boolean 如果该对象已被销毁,则为 true;否则为 false。

removeDefaultCredit(credit)

移除默认版权声明。

Name Type Description
credit Credit

从违约中删除的版权声明。

update()

在新的一帧渲染前更新版权声明 Updates the credit display before a new frame is rendered.