Component constructor
Type-name of the component, e.g. name of sub-class implementing the component. "MyComponent", etc.
Color to use when no color map has been set.
Bias to use when elevationMapNormalized is false.
If true, assume elevationmap values are in [0,1] and stretch to elevationMin/elevationMax
Maximum elevation for the terrain.
Minimum elevation for the terrain.
Scale to use when elevationMapNormalized is false.
Internal flag set if component is a Cogs Core component.
Enable discarding of areas with nodata values.
No-data value.
How and if to handle transparency, see notes on enum.
Increase or decrease color saturation.
Gets the optional owning entity
Component name == type. For compatibility
Gets the type of the component. Ex. "TransformComponent", "SceneComponent" etc.
Static
createInternal: Creates a new component of the given type (name). Component is wrapped when adding to an entity.
Type of the component. Ex. "TransformComponent"
Created Cogs.js component.
Static
wrap
Base class for components implementing dynamic behavior.
Consider using Cogs Control Event "preRender" instead. Any updates to Cogs called from custom Dynamic Component will cause a second rendering. If called from Event "preRender" callback the update is in place Before the frame is rendered.
Inherit this class to create JavaScript custom components that are added to a Cogs Entity. The dynamic component acts as a non-virtual base for components not designed to be managed by a component system, but implementing behavior in member functions callable by the DynamicComponentSystem that owns all dynamic component instances. Member names assumed to handle Cogs messages: "initialize", "update", "postUpdate", "cleanup", "gpuPicking(number,vec3)".
See documentation for Dynamic components methods details.
Example