Skip to main content

SimpleGrid

An infinite grid. Created by fyrestar and translated to typescript by dkaraush.

Implements

Properties

components

components: Components

The components instance to which this grid belongs.


config

config: SimpleGridConfigManager

Configurable.config

Implementation of

Configurable . config


isSetup

isSetup: boolean = false

Configurable.isSetup

Implementation of

Configurable . isSetup


onDisposed

readonly onDisposed: Event<unknown>

Disposable.onDisposed

Implementation of

Disposable . onDisposed


onSetup

readonly onSetup: Event<unknown>

Configurable.onSetup

Implementation of

Configurable . onSetup


three

readonly three: Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>

The Three.js mesh that contains the infinite grid.


world

world: World

The world instance to which this Raycaster belongs.

Accessors

fade

get fade(): boolean

Whether the grid should fade away with distance. Recommended to be true for perspective cameras and false for orthographic cameras.

set fade(active): void

Whether the grid should fade away with distance. Recommended to be true for perspective cameras and false for orthographic cameras.

Parameters

ParameterType
activeboolean

Returns

boolean


material

get material(): ShaderMaterial

The material of the grid.

Returns

ShaderMaterial


visible

get visible(): boolean

Hideable.visible

set visible(visible): void

Hideable.visible

Parameters

ParameterType
visibleboolean

Returns

boolean

Methods

dispose()

dispose(): void

Disposable.dispose

Returns

void

Implementation of

Disposable . dispose


setup()

setup(config?): void

Configurable.setup

Parameters

ParameterType
config?Partial <SimpleGridConfig>

Returns

void

Implementation of

Configurable . setup