Internal: Component constructor
type of the component. Ex. "TransformComponent"
Owning entity. Entity only passed when wrapping existing entity.
Internal flag set if component is a Cogs Core component.
If the entity this component is a member of should be pickable. Setting this field affects the entity this component is attached to, in addition to all child entities in the children member.
If the entity this component is a member of should be visible. Setting this field affects the entity this component is attached to, in addition to all child entities in the children member. Setting visible to false will result in all entities in the subgraph formed by children being invisible. Setting the value to true results in all entities in the same graph being visible as long as no other component modifies any visibilities to false.
Contains all child entities owned by this component. All child entities are affected by the state of visible and pickable. This field is used by internal code to enumerate children whenever necessary. Clearing this collection will lead to the destruction of all child entities and components in these entities if no other owning shared pointers exist.
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
Contains information on how the entity behaves in the scene. The scene component is used to represent an entity as a member of the scene, with behavior similar to that of a scene graph in terms of handling child visibility and picking. Using the scene component, an entity can store owning references to child entities in the children field, which are automatically cleaned up when the entity itself is removed from the scene. The scene component has interactions with several of the core systems, for example the LodSystem uses the children field to enumerate children when switching LoD is enabled.