Skip to main content

Interface: ShaderMobjectOptions

Defined in: src/mobjects/shader/ShaderMobject.ts:24

Options for a ShaderMobject.

Properties​

blending?​

optional blending: Blending

Defined in: src/mobjects/shader/ShaderMobject.ts:38

Blending mode. Default: THREE.NormalBlending


fragmentShader​

fragmentShader: string

Defined in: src/mobjects/shader/ShaderMobject.ts:26

The GLSL fragment shader source. Required.


height?​

optional height: number

Defined in: src/mobjects/shader/ShaderMobject.ts:32

Plane height in world units. Default: 4.5


mouse?​

optional mouse: boolean

Defined in: src/mobjects/shader/ShaderMobject.ts:36

Expose the Shadertoy-style iMouse (vec4) uniform. Default: false


opacity?​

optional opacity: number

Defined in: src/mobjects/shader/ShaderMobject.ts:42

Opacity, stored on the mobject. Default: 1


transparent?​

optional transparent: boolean

Defined in: src/mobjects/shader/ShaderMobject.ts:40

Enable transparency. Default: true


uniforms?​

optional uniforms: Record<string, ShaderUniformValue>

Defined in: src/mobjects/shader/ShaderMobject.ts:34

User-defined uniforms, keyed by GLSL name.


vertexShader?​

optional vertexShader: string

Defined in: src/mobjects/shader/ShaderMobject.ts:28

The GLSL vertex shader source. Default: a pass-through that exposes vUv.


width?​

optional width: number

Defined in: src/mobjects/shader/ShaderMobject.ts:30

Plane width in world units. Default: 8