Internal: Component constructor
type of the component. Ex. "TransformComponent"
Owning entity. Entity only passed when wrapping existing entity.
Angle to rotate the shape around the trajectory by.
If the shape should be displayed closed.
Crease angle to use when smoothing normals. Any angle above the given will create a crease.
(Contents: vec3[]) Cross section shape.
Offset amount applied to the given profile depths before calculating the trajectory.
Depth values for the profile.
If rotation should be enabled.
Internal flag set if component is a Cogs Core component.
Morph factors applied per segment controlling the amount of regular/morph cross section to use.
(Contents: vec3[]) Morph target cross section.
(Contents: vec2[]) Extrusion profile in two component (radial, length).
Radius scale applied to the entire shape perpendicular to the direction of the trajectory.
Number of segments per cross section.
Offset in units to apply to generated texture coordinates.
Scale factor to multiply generated texture coordinates by.
The trajectory this component is connected to.
Twist factors given by segment.
If morphing factors should be applied.
If offsets are applied.
If rotation should be applied uniformly to the entire shape (instead of per segment).
If twist factors should be applied.
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
class defining a Cogs component. Defines basic properties of the component - readonly for clients 'type' and 'entity'. All component shares same class definition. The properties for accessing the fields of the component type will be filled in at runtime, e.g. for TransformComponent: getter+setter for: coordinates, position, rotation etc.