Skip to content
🎉 Angular Three v4 is here! Read the announcement

NgtpGrid

The grid effect overlays a grid pattern on the scene, useful for technical visualizations, retro aesthetics, or debugging.

import { NgtpEffectComposer, NgtpGrid } from 'angular-three-postprocessing';
@Component({
template: `
<ngtp-effect-composer>
<ngtp-grid [options]="{
scale: 1.0,
lineWidth: 0.5
}" />
</ngtp-effect-composer>
`,
imports: [NgtpEffectComposer, NgtpGrid],
})
export class SceneGraph {}
PropertyTypeDefaultDescription
scalenumber1.0Scale of the grid pattern
lineWidthnumber0.0Width of grid lines
@Component({
template: `
<ngt-mesh>
<ngt-torus-knot-geometry *args="[1, 0.3, 128, 32]" />
<ngt-mesh-standard-material color="#ff00ff" [emissive]="'#ff00ff'" [emissiveIntensity]="0.5" />
</ngt-mesh>
<ngtp-effect-composer>
<ngtp-grid [options]="{
scale: 0.5,
lineWidth: 0.3
}" />
<ngtp-bloom [options]="{ intensity: 0.5 }" />
</ngtp-effect-composer>
`,
imports: [NgtpEffectComposer, NgtpGrid, NgtpBloom, NgtArgs],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class SceneGraph {}
  • Smaller scale values create a finer grid
  • Combine with bloom for a glowing grid effect
  • Works well with neon/cyberpunk color schemes
  • Can be used for technical or scientific visualizations