new CreditDisplay(container, delimiter)
The credit display is responsible for displaying credits on screen.
Name | Type | Default | Description |
---|---|---|---|
container |
HTMLElement | The HTML element where credits will be displayed | |
delimiter |
String |
' • '
|
optional The string to separate text credits |
Example:
var creditDisplay = new Cesium.CreditDisplay(creditContainer);
Source:
Scene/CreditDisplay.js, line 151
Methods
-
addCredit(credit)
-
Adds a credit to the list of current credits to be displayed in the credit container
Name Type Description credit
Credit The credit to display Source: Scene/CreditDisplay.js, line 187 -
addDefaultCredit(credit)
-
Adds credits that will persist until they are removed
Name Type Description credit
Credit The credit to added to defaults Source: Scene/CreditDisplay.js, line 212 -
beginFrame(credit)
-
Resets the credit display to a beginning of frame state, clearing out current credits.
Name Type Description credit
Credit The credit to display Source: Scene/CreditDisplay.js, line 263 -
destroy() → undefined
-
Destroys the resources held by this object. Destroying an object allows for deterministic release of resources, instead of relying on the garbage collector to destroy this object.
Once an object is destroyed, it should not be used; calling any function other thanisDestroyed
will result in aDeveloperError
exception. Therefore, assign the return value (undefined
) to the object as done in the example.Returns:
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
Source: Scene/CreditDisplay.js, line 296 -
-
endFrame(credit)
-
Sets the credit display to the end of frame state, displaying current credits in the credit container
Name Type Description credit
Credit The credit to display Source: Scene/CreditDisplay.js, line 273 -
isDestroyed() → Boolean
-
Returns true if this object was destroyed; otherwise, false.
Returns:
true
if this object was destroyed; otherwise,false
.Source: Scene/CreditDisplay.js, line 309 -
removeDefaultCredit(credit)
-
Removes a default credit
Name Type Description credit
Credit The credit to be removed from defaults Source: Scene/CreditDisplay.js, line 237