Internal: Component constructor
type of the component. Ex. "TransformComponent"
Owning entity. Entity only passed when wrapping existing entity.
(Contents: vec4[]) Per-instance colors, either empty or size matching the other array attributes.
If set, instances are dynamically scaled s.t. they appear fixed sized on screen regardles of distance from camera, the instance size is expected to be dpi-scaled pixels.
Culling camera-distance when fixedSize is enabled. Disable by setting it to zero or negative value.
Internal flag set if component is a Cogs Core component.
(Contents: vec3[]) Per-instance positions, either empty or size matching the other array attributes.
Per-instance rotations, either empty or size matching the other array attributes.
(Contents: vec3[]) Per-instance scale factors, either empty or size matching the other array attributes.
Gets the optional owning entity
Component name == type. For compatibility
Gets the type of the component. Ex. "TransformComponent", "SceneComponent" etc.
StaticcreateInternal: 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.
Staticwrap
Builds instance matrices from position, rotation and scale, and can dynamically scale instances to appear fixed sized on screen. Manages the instance mesh of the InstancedMeshRenderComponent of the same entity. Enables/disables relevant material instance variants.