Internal: Component constructor
type of the component. Ex. "TransformComponent"
Owning entity. Entity only passed when wrapping existing entity.
Compass direction of the current at each position. Assumed to be in degrees, clockwise and with 0=north
Ignore priorities and draw all arrows.
Internal flag set if component is a Cogs Core component.
(Contents: vec2[]) Position of each arrow in this component in world coordinates.
Priority of each arrow. Used to hide arrows to prevent overcrowding.
Hide arrows with priority greater than this.
Fixed scale applied to every arrow, in addition to any scaling for speed. For gridded data setting this equal to the grid resolution should give a reasonable result
How the arrows scale with the speed of the currents.
Speed in knots of the current at each position. (This will define the colour and the size of each arrow.)
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
Component for displaying surface currents based on the IHO S111 standard. The extension api has functions for reading S111 HDF5 data from file or memory. The values can also be set directly on the component using the component properties if S111 files are unavailable or impractical. As the S111 standard is made for 2D map clients and is assuming a top down orthographic projection, there have been compromises. A fixed screen size for the arrows does not work when perspective projection is used, so this component is using a fixed world size instead. What a reasonable world size for the arrows should be is left to the applications, but for gridded datasets, setting the scale equal to the grid resolution is a reasonable starting point