Can be used to create a flat, refractive surface like for special windows or water effects.
Note that this class can only be used with WebGLRenderer. When using WebGPURenderer, use viewportSharedTexture.
Example:
val geometry = PlaneGeometry(100, 100)
val refractor = new Refractor(
geometry,
js.Dynamic.literal(
color = 0xcbcbcb,
textureWidth = 1024,
textureHeight = 1024
)
)
scene.add(refractor)
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
Attributes
Returns the refractor's internal render target.
Returns the refractor's internal render target.
Attributes
Inherited methods
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Returns the local-space position of the vertex at the given index, taking into account the current animation state of both morph targets and skinning.
Returns the local-space position of the vertex at the given index, taking into account the current animation state of both morph targets and skinning.
Value parameters
- index
-
The vertex index
- target
-
The target object that is used to store the method's result
Attributes
- Returns
-
The vertex position in local space
- Inherited from:
- Mesh
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Sets the values of morphTargetDictionary and morphTargetInfluences to make sure existing morph targets can influence this 3D object.
Sets the values of morphTargetDictionary and morphTargetInfluences to make sure existing morph targets can influence this 3D object.
Attributes
- Inherited from:
- Mesh
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object3D
Concrete fields
The refractor's virtual camera. This is used to render the scene from the refractor's point of view.
The refractor's virtual camera. This is used to render the scene from the refractor's point of view.
Attributes
This flag can be used for type testing.
This flag can be used for type testing.
Attributes
Inherited fields
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
This flag can be used for type testing.
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
A dictionary representing the morph targets in the geometry. The key is the morph targets name, the value its attribute index. This member is undefined by default and only set when morph targets are detected in the geometry.
A dictionary representing the morph targets in the geometry. The key is the morph targets name, the value its attribute index. This member is undefined by default and only set when morph targets are detected in the geometry.
Attributes
- Inherited from:
- Mesh
An array of weights typically in the range [0,1] that specify how much of the morph is applied. This member is undefined by default and only set when morph targets are detected in the geometry.
An array of weights typically in the range [0,1] that specify how much of the morph is applied. This member is undefined by default and only set when morph targets are detected in the geometry.
Attributes
- Inherited from:
- Mesh
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D
Attributes
- Inherited from:
- Object3D