Editor.Components.CameraClearColor
ClassThe same entity as in Lens Scripting.
Index
Properties
Methods
Example
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const scene = model.project.scene;
// Get the main camera and configure its clear color
const cam = scene.mainCamera;
if (Editor.isNull(cam)) return;
const cc = cam.clearColor;
// Set to clear with a solid color (sky blue)
cc.mode = Editor.Components.CameraClearColor.Mode.Color;
cc.color = new vec4(0.5, 0.7, 1.0, 1.0);
console.log(`ClearColor: mode=Color, rgba=(${cc.color.x}, ${cc.color.y}, ${cc.color.z}, ${cc.color.w})`);
// Switch to no clearing
cc.mode = Editor.Components.CameraClearColor.Mode.None;
console.log(`ClearColor: mode=None (${cc.mode})`);
Extends
Properties
color
color:
vec4
Clear color as a vec4 RGBA value.
id
readonlyid:Uuid
The unique id of the entity.
Inherited from
input
input:
Texture
Texture to use when mode is set to Texture.
meta
readonlymeta:Meta
Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.
Inherited from
mode
mode:
Mode
How the camera background is cleared.
type
readonlytype:string
The entity's type.
Inherited from
Methods
getDirectlyReferencedEntities()
getDirectlyReferencedEntities():
Entity[]
A list of entities which this entity has a reference to.
Returns
Entity[]
Inherited from
EntityStructure.getDirectlyReferencedEntities
getMeta()
staticgetMeta():Meta
Returns metadata about this type.
Returns
Inherited from
getOwnedEntities()
getOwnedEntities():
Entity[]
A list of entities which has a reference to this entity.
Returns
Entity[]
Inherited from
EntityStructure.getOwnedEntities
getTypeName()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object refers to the same instance as the given object.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
staticMeta()
staticstaticMeta():Meta
Return metadata for CameraClearColor.
Returns
See also
Nested types
Enumerations
| Enumeration | Description |
|---|---|
| Mode | The same entity as in Lens Scripting. |