Class MeshUVSpaceRendererSince
Constructors
constructor
-
new MeshUVSpaceRenderer(
mesh: AbstractMesh,
scene: Scene,
options?: IMeshUVSpaceRendererOptions,
): MeshUVSpaceRendererCreates a new MeshUVSpaceRenderer
Parameters
- mesh: AbstractMesh
The mesh used for the source UV space
- scene: Scene
The scene the mesh belongs to
Optionaloptions: IMeshUVSpaceRendererOptionsThe options to use when creating the texture
Returns MeshUVSpaceRenderer
- mesh: AbstractMesh
Properties
clear Color
Clear color of the texture
texture
Target texture used for rendering If you don't set the property, a RenderTargetTexture will be created internally given the options provided to the constructor. If you provide a RenderTargetTexture, it will be used directly.
Accessors
shader Language
-
get shaderLanguage(): ShaderLanguage
Gets the shader language used in this material.
Returns ShaderLanguage
Methods
clear
-
Clears the texture map
Returns void
dispose
-
Disposes of the resources
Returns void
is Ready
-
Checks if the texture is ready to be used
Returns boolean
true if the texture is ready to be used
render Texture
-
renderTexture(
texture: BaseTexture,
position: Vector3,
normal: Vector3,
size: Vector3,
angle?: number,
checkIsReady?: boolean,
): voidProjects and renders a texture in the mesh UV space
Parameters
- texture: BaseTexture
The texture
- position: Vector3
The position of the center of projection (world space coordinates)
- normal: Vector3
The direction of the projection (world space coordinates)
- size: Vector3
The size of the projection
- angle: number = 0
The rotation angle around the direction of the projection (default: 0)
- checkIsReady: boolean = true
If true, it will check if the texture is ready before rendering (default: true). If the texture is not ready, a new attempt will be scheduled in 16ms
Returns void
- texture: BaseTexture
Class used to render in the mesh UV space 5.49.1