UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

39 lines (38 loc) 1.2 kB
import { Color, ColorRepresentation } from "three"; import { Behaviour } from "./Component.js"; /** * The [GridHelper](https://engine.needle.tools/docs/api/GridHelper) displays a flat grid in the scene for visual reference. * Useful for debugging, level design, or providing spatial context. * * ![](https://cloud.needle.tools/-/media/prWArU8xTbgBKWQOvhTOag.gif) * * **Properties:** * - `color0` / `color1` - Alternating grid line colors * - `isGizmo` - When true, only shows when gizmos are enabled * * @example Add a grid to the scene * ```ts * const grid = myObject.addComponent(GridHelper); * grid.color0 = new Color(0.3, 0.3, 0.3); * grid.color1 = new Color(0.5, 0.5, 0.5); * ``` * * @category Helpers * @group Components * @see {@link Gizmos} for debug visualization * * ![](https://cloud.needle.tools/-/media/i5KGKBUQ3iAX9h6o_9EY2w.jpg) */ export declare class GridHelper extends Behaviour { isGizmo: boolean; color0: Color | ColorRepresentation; color1: Color | ColorRepresentation; private gridHelper; private size; private divisions; private offset; /** @internal */ onEnable(): void; /** @internal */ onDisable(): void; }