Component constructor
Type-name of the component, e.g. name of sub-class implementing the component. "MyComponent", etc.
A margin applied to the bounding box of the encased Entity, this property only works alongside autoNodes.
If the auto adjustment should make the box equal in size along all axes.
Entities(Nodes) that are to be encased by this AxisCube.
Titles for the x,y,z-axises.
Internal flag set if component is a Cogs Core component.
The maximum number of axis annotation values to use.
Maximum corner of the cube.
Minimum corner of the cube.
Color of text, to be forwarded to children.
Name of the x,y,z-axis units.
Size of unit coordinate axis in unitname-units.
If the axis cube should create axis annotation text.
Amount to scale the z-axis.
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
A cube with grids on the side faces. Coordinate systems Local coordinate system is the coordinate system used by the rendering system, and minCorner and maxCorner are specified using this system. The unit coordinate system is the coordinate system used for grid lines and annotations. Local and unit coords are linked through zScale and unitScales, unit.x = local.xunitScales.x, unit.y = local.yunitScales.y, and unit.z = (local.z/zScale)*unitScales.z. Thus, zScale is the amount of exaggeration that has been applied to the underlying data before rendering (a zScale of 10 means that local coord z is 10 times larger than an un-exaggerated local coord z would have been). Further, unitScales specifies the number of unit-units there is in a local scale unit. That is, if local coords are in meters, and we want to the grid to use feet, we set unitScales to 1.0/0.3048=3.2808.
Tick sizes First, the distance between min and max in unit coordinates is divided by maxAxisValues. We allow this distance to grow until we get a distance that is a nice round number (i.e., a power of 10), by rounding the 10-logarithm of up of the distance and raising 10 to this number, that is, distance = 10^( ceil( log10( (max-min)/maxAxisValues ) ) ). This expression yields the smallest distance that is a power of 10 and results in no more than maxAxisValues grid-lines along that axis.