Skip to content

AxesHelperDesc

AxesHelperDesc is a helper Descriptor for adding a Three.js AxesHelper to the scene. It visualizes the 3 axes as X (red) / Y (green) / Z (blue), which is useful for verifying coordinate systems and debugging.

In addition to the properties below, the common properties from the base class (position, rotation, scale, matrix, matrixWorld, visible) are available. See MeshDesc for details.

Type: object | undefined

Description: Configuration for the helper.

Type: number | undefined

Description: Specifies the length of the axes.

Default: 5

Note: Size is only applied at creation time. To change it, recreate the Descriptor.

import ThreeView from "@navaramap/three";
import { AxesHelperDesc } from "@navaramap/three_default_descs";
const view = new ThreeView();
view.registerMesh("axesHelper", AxesHelperDesc);
await view.init();
// Add a 3-axis helper
const axes = view.addMesh<AxesHelperDesc>({
axesHelper: {
size: 10,
},
position: { x: 0, y: 0, z: 0 },
});
// Toggle visibility
axes.update({ visible: false });
  • You can place it at any position by specifying position, not just near the origin.
  • If it overlaps with other meshes, adjust the camera or position for better visibility.