Skip to content

AxesLayer ​

A layer that draws the world coordinate axes as colored lines.

Three lines start at the world origin: x in red, y in green, and z in blue, each with the given length and width. The layer is static and ready as soon as it is constructed.

ts
viewport.addLayer(new AxesLayer({ length: 100, width: 2 }));

Extends Layer and inherits all public properties and methods.

Constructor ​

Creates an axes layer with the given dimensions.

ts
new AxesLayer(props): AxesLayer;
ParameterDescription
props: AxesLayerPropsInitialization properties.

Types ​

AxesLayerProps ​

Initialization properties for constructing an axes layer.

PropertyDescription
length: numberAxis length in world units.
width: numberLine width in pixels.

Properties ​

type overrides ​

Identifies the layer type as AxesLayer.

ts
readonly type: "AxesLayer" = "AxesLayer";

Methods ​

update() void overrides ​

Performs no per-frame work. The axes are built at construction.

ts
update(): void;

Released under the MIT License