Skip to content

NgtsGrid

NgtsGrid is a port of Drei’s Grid which is a y-up oriented; shader-based grid implementation.

Options

options input accepts any properties from THREE.Mesh in addition to the following:

Properties

name type description
planeArgs ConstructorArguments<THREE.PlaneGeometry> Arguments for the plane geometry. Default []
cellThickness number Cell thickness, default: 0.5
cellColor THREE.ColorRepresentation Cell color, default: black
sectionSize number Section size, default: 1
sectionThickness number Section thickness, default: 0.1
sectionColor THREE.ColorRepresentation Section color, default: black
followCamera boolean Whether to follow the camera, default: true
infiniteGrid boolean Whether to make the grid infinite, default: false
fadeDistance number Fade distance, default: 100
fadeStrength number Fade strength, default: 10
fadeFrom number Fade from camera (1) or origin (0), or somewhere in between, default: camera
side THREE.Side Material side, default: THREE.BackSide