ReflectorNode

THREE.ReflectorNode
See theReflectorNode companion object
class ReflectorNode(options: UndefOr[ReflectorNodeOptions] = ...) extends Object

A node-based reflector for use with WebGPURenderer.

This is the node-based version of Reflector that works with the node material system and WebGPURenderer. Unlike the regular Reflector, this uses the modern node-based rendering pipeline.

Note: This class can only be used with WebGPURenderer. For WebGLRenderer, use the regular Reflector class.

Example:

// Create a reflector node with modern API (r180+)
val reflectorNode = new ReflectorNode(
 js.Dynamic.literal(
   resolutionScale = 1.0, // Note: resolutionScale, not resolution (changed in r180)
   color = 0xc1cbcb,
   distortion = 0.1
 )
)

Value parameters

options

Configuration options for the reflector node

Attributes

Companion
object
Graph
Supertypes
class Object
trait Any
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def dispose(): Unit

Disposes of GPU resources used by this reflector node. Call this when the reflector is no longer needed.

Disposes of GPU resources used by this reflector node. Call this when the reflector is no longer needed.

Attributes

def update(): Unit

Updates the reflector node. Should be called before rendering.

Updates the reflector node. Should be called before rendering.

Attributes

Inherited methods

def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def toLocaleString(): String

Attributes

Inherited from:
Object
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

The reflector's virtual camera used for rendering the reflection.

The reflector's virtual camera used for rendering the reflection.

Attributes

var color: Int | String | Color

The color of the reflector. Can be a hex color, CSS color string, or Color object.

The color of the reflector. Can be a hex color, CSS color string, or Color object.

Attributes

var distortion: Double

The amount of distortion applied to the reflection. Default is 0 (no distortion).

The amount of distortion applied to the reflection. Default is 0 (no distortion).

Attributes

var resolutionScale: Double

The resolution scale of the reflector's internal render target. This replaces the old 'resolution' property that was deprecated in r180.

The resolution scale of the reflector's internal render target. This replaces the old 'resolution' property that was deprecated in r180.

Default is 1.0. Higher values increase quality but reduce performance.

Attributes

val texture: Object

The texture containing the reflection.

The texture containing the reflection.

Attributes