Skip to content

Documentation / scene / ConstantTextureCubeNode

Class: ConstantTextureCubeNode ​

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:688

Cubemap texture constant node

Remarks ​

Represents a cubemap texture resource in the material node graph. A cubemap consists of 6 square textures representing the faces of a cube, sampled using a 3D direction vector.

Used for:

  • Environment maps (skyboxes)
  • Reflections (environment reflections on shiny surfaces)
  • Image-based lighting (IBL)
  • Irradiance maps for ambient lighting
  • Prefiltered environment maps for specular reflections

Cubemap faces (standard ordering):

  • +X (right), -X (left)
  • +Y (top), -Y (bottom)
  • +Z (front), -Z (back)

Note: Only DDS format supports cubemap textures.

Output:

  • Output 1: Cubemap sampler (texCube type)

Example ​

typescript
const envMap = new ConstantTextureCubeNode();
envMap.paramName = 'environmentMap';
envMap.filterMin = 'linear';
envMap.filterMag = 'linear';
envMap.filterMip = 'linear';

// Sample environment for reflection
const normal = new VertexNormalNode();
const viewDir = new ViewDirectionNode();

const reflectDir = new ReflectNode();
reflectDir.connectInput(1, viewDir, 1);
reflectDir.connectInput(2, normal, 1);

const sample = new TextureSampleNode();
sample.connectInput(1, envMap, 1);
sample.connectInput(2, reflectDir, 1); // vec3 direction

// Use for reflections
output.connectInput(1, sample, 1);

Extends ​

Constructors ​

Constructor ​

new ConstantTextureCubeNode(): ConstantTextureCubeNode

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:698

Creates a new cubemap texture node

Returns ​

ConstantTextureCubeNode

Remarks ​

Initializes with:

  • One output slot for the cubemap sampler
  • Default 1x1 white cubemap (all faces white)
  • No inputs (texture resource only)

Overrides ​

BaseTextureNode.constructor

Properties ​

sRGB ​

sRGB: boolean

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:301

Whether this texture should be loaded in sRGB color space

Inherited from ​

BaseTextureNode.sRGB


addressU ​

addressU: TextureAddressMode

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:303

Horizontal texture coordinate wrapping mode

Inherited from ​

BaseTextureNode.addressU


addressV ​

addressV: TextureAddressMode

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:305

Vertical texture coordinate wrapping mode

Inherited from ​

BaseTextureNode.addressV


filterMin ​

filterMin: TextureFilterMode

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:307

Minification filter mode

Inherited from ​

BaseTextureNode.filterMin


filterMag ​

filterMag: TextureFilterMode

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:309

Magnification filter mode

Inherited from ​

BaseTextureNode.filterMag


filterMip ​

filterMip: TextureFilterMode

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:311

Mipmap filter mode

Inherited from ​

BaseTextureNode.filterMip


textureId ​

textureId: string

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:313

Asset ID for the texture (for serialization)

Inherited from ​

BaseTextureNode.textureId


_inputs ​

protected _inputs: GraphNodeInput[]

Defined in: libs/scene/src/utility/blueprint/node.ts:336

Internal storage for input slot definitions

Inherited from ​

BaseTextureNode._inputs


_outputs ​

protected _outputs: GraphNodeOutput[]

Defined in: libs/scene/src/utility/blueprint/node.ts:338

Internal storage for output slot definitions

Inherited from ​

BaseTextureNode._outputs


_error ​

protected _error: string

Defined in: libs/scene/src/utility/blueprint/node.ts:340

Internal storage for error message

Inherited from ​

BaseTextureNode._error

Accessors ​

paramName ​

Get Signature ​

get paramName(): string

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:342

Gets the shader parameter name

Returns ​

string

The uniform name used in generated shader code

Set Signature ​

set paramName(val): void

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:345

Uniform parameter name

Parameters ​
val ​

string

Returns ​

void

Uniform parameter name

Inherited from ​

BaseTextureNode.paramName


expose ​

Get Signature ​

get expose(): boolean

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:354

Whether this texture parameter should be exposed to material instances.

Returns ​

boolean

Set Signature ​

set expose(val): void

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:357

Parameters ​
val ​

boolean

Returns ​

void

Inherited from ​

BaseTextureNode.expose


isUniform ​

Get Signature ​

get isUniform(): boolean

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:372

Indicates this node represents a shader uniform

Remarks ​

Texture nodes create uniform declarations in the generated shader code.

Returns ​

boolean

Always true for texture nodes

Whether this node has uniform value

Inherited from ​

BaseTextureNode.isUniform


inputs ​

Get Signature ​

get inputs(): GraphNodeInput[]

Defined in: libs/scene/src/utility/blueprint/node.ts:380

Gets the input slot definitions array

Returns ​

GraphNodeInput[]

Array of input slot definitions

Inherited from ​

BaseTextureNode.inputs


outputs ​

Get Signature ​

get outputs(): GraphNodeOutput[]

Defined in: libs/scene/src/utility/blueprint/node.ts:384

Gets the output slot definitions array

Returns ​

GraphNodeOutput[]

Array of output slot definitions

Inherited from ​

BaseTextureNode.outputs


error ​

Get Signature ​

get error(): string

Defined in: libs/scene/src/utility/blueprint/node.ts:388

Gets the current error message

Returns ​

string

Set Signature ​

set error(str): void

Defined in: libs/scene/src/utility/blueprint/node.ts:391

Current error message, empty string if no error

Parameters ​
str ​

string

Returns ​

void

Current error message, empty string if no error

Inherited from ​

BaseTextureNode.error

Methods ​

on() ​

on<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:630

IEventTarget.on

Type Parameters ​

K ​

K extends "changed"

Parameters ​

type ​

K

listener ​

EventListener<{ changed: []; }, K>

context? ​

unknown

Returns ​

void

Inherited from ​

BaseTextureNode.on


once() ​

once<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:634

IEventTarget.once

Type Parameters ​

K ​

K extends "changed"

Parameters ​

type ​

K

listener ​

EventListener<{ changed: []; }, K>

context? ​

unknown

Returns ​

void

Inherited from ​

BaseTextureNode.once


off() ​

off<K>(type, listener?, context?): void

Defined in: libs/base/dist/index.d.ts:638

IEventTarget.off

Type Parameters ​

K ​

K extends "changed"

Parameters ​

type ​

K

listener? ​

EventListener<{ changed: []; }>

context? ​

unknown

Returns ​

void

Inherited from ​

BaseTextureNode.off


dispatchEvent() ​

dispatchEvent<K>(type, ...args): void

Defined in: libs/base/dist/index.d.ts:642

IEventTarget.dispatchEvent

Type Parameters ​

K ​

K extends "changed"

Parameters ​

type ​

K

args ​

...object[K]

Returns ​

void

Inherited from ​

BaseTextureNode.dispatchEvent


toString() ​

toString(): string

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:380

Generates a string representation of this node

Returns ​

string

The parameter name

Inherited from ​

BaseTextureNode.toString


validate() ​

protected validate(): string

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:392

Validates the node state

Returns ​

string

Empty string (always valid)

Remarks ​

Texture nodes are always valid as they have no required inputs and always have a valid texture (default if none assigned).

Inherited from ​

BaseTextureNode.validate


getSerializationCls() ​

static getSerializationCls(): SerializableClass

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:718

Gets the serialization descriptor for this node type

Returns ​

SerializableClass

Serialization class descriptor

Remarks ​

Only accepts DDS format, which is the standard format for cubemaps. Includes validation to ensure the loaded texture is actually a cubemap.


getType() ​

protected getType(): string

Defined in: libs/scene/src/utility/blueprint/material/texture.ts:753

Gets the output type

Returns ​

string

'texCube'

Overrides ​

BaseTextureNode.getType


getOutputType() ​

getOutputType(id): string

Defined in: libs/scene/src/utility/blueprint/node.ts:376

Gets the output type for a specific output slot

Parameters ​

id ​

number

The output slot ID

Returns ​

string

The type name of the output

Remarks ​

Default implementation delegates to the abstract getType() method. Can be overridden for more complex type logic.

Inherited from ​

BaseTextureNode.getOutputType


check() ​

check(): void

Defined in: libs/scene/src/utility/blueprint/node.ts:413

Validates the node and updates error state

Returns ​

void

Remarks ​

Calls the validate() method and stores the result in _error. Emits a 'changed' event if the error state changes.

Inherited from ​

BaseTextureNode.check


reset() ​

reset(): void

Defined in: libs/scene/src/utility/blueprint/node.ts:422

Clears the error state

Returns ​

void

Remarks ​

Sets _error to an empty string.

Inherited from ​

BaseTextureNode.reset


setInput() ​

setInput(id, node, inputId): void

Defined in: libs/scene/src/utility/blueprint/node.ts:443

Connects an input slot to another node's output

Parameters ​

id ​

number

The input slot ID to connect

node ​

BaseGraphNode

The source node to connect from

inputId ​

number

The output slot ID of the source node

Returns ​

void

Throws ​

Error if the input slot with the given ID doesn't exist

Example ​

typescript
const addNode = new AddNode();
const constantNode = new ConstantNode(5.0);

// Connect constantNode's output 0 to addNode's input 0
addNode.setInput(0, constantNode, 0);

Inherited from ​

BaseTextureNode.setInput

Released under the MIT License.