TextureBlock

Block used to read a texture from a sampler

Hierarchy

Index

Constructors

constructor

Find examples in Playground

Properties

a

Find examples in Playground

Gets the a output component

b

Find examples in Playground

Gets the b output component

buildId

Find examples in Playground
buildId: number

Gets or sets the build Id

g

Find examples in Playground

Gets the g output component

inputs

Find examples in Playground

Gets the list of input points

isFinalMerger

Find examples in Playground
isFinalMerger: boolean

Gets a boolean indicating that this block is an end block (e.g. it is generating a system value)

isInput

Find examples in Playground
isInput: boolean

Gets a boolean indicating that this block is an input (e.g. it sends data to the shader)

name

Find examples in Playground
name: string

Gets or sets the name of the block

outputs

Find examples in Playground

Gets the list of output points

r

Find examples in Playground

Gets the r output component

rgb

Find examples in Playground

Gets the rgb output component

rgba

Find examples in Playground

Gets the rgba output component

target

Find examples in Playground

texture

Find examples in Playground
texture: Nullable<Texture>

Gets or sets the texture associated with the node

uniqueId

Find examples in Playground
uniqueId: number

Gets or sets the unique id of the node

uv

Find examples in Playground

Gets the uv input component

Methods

_deserialize

Find examples in Playground
  • _deserialize(serializationObject: any, scene: Scene, rootUrl: string): void
  • Parameters

    • serializationObject: any
    • scene: Scene
    • rootUrl: string

    Returns void

autoConfigure

Find examples in Playground

bind

Find examples in Playground

build

Find examples in Playground
  • Compile the current node and generate the shader code

    Parameters

    • state: NodeMaterialBuildState

      defines the current compilation state (uniforms, samplers, current string)

    • activeBlocks: NodeMaterialBlock[]

      defines the list of active blocks (i.e. blocks to compile)

    Returns boolean

    true if already built

clone

Find examples in Playground
  • Clone the current block to a new identical block

    Parameters

    • scene: Scene

      defines the hosting scene

    • Optional rootUrl: string

      defines the root URL to use to load textures and relative dependencies

    Returns Nullable<NodeMaterialBlock>

    a copy of the current block

connectTo

Find examples in Playground
  • Connect current block with another block

    Parameters

    • other: NodeMaterialBlock

      defines the block to connect with

    • Optional options: object

      define the various options to help pick the right connections

      • Optional input?: string
      • Optional output?: string
      • Optional outputSwizzle?: string

    Returns this | undefined

    the current block

getClassName

Find examples in Playground
  • getClassName(): string

getFirstAvailableInput

Find examples in Playground

getFirstAvailableOutput

Find examples in Playground

getInputByName

Find examples in Playground

getOutputByName

Find examples in Playground

getSiblingOutput

Find examples in Playground

initialize

Find examples in Playground

initializeDefines

Find examples in Playground
  • initializeDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines, useInstances?: boolean): void

isReady

Find examples in Playground
  • isReady(): boolean

prepareDefines

Find examples in Playground

provideFallbacks

Find examples in Playground

registerInput

Find examples in Playground
  • Register a new input. Must be called inside a block constructor

    Parameters

    • name: string

      defines the connection point name

    • type: NodeMaterialBlockConnectionPointTypes

      defines the connection point type

    • Optional isOptional: boolean

      defines a boolean indicating that this input can be omitted

    • Optional target: NodeMaterialBlockTargets

      defines the target to use to limit the connection point (will be VertexAndFragment by default)

    Returns this

    the current block

registerOutput

Find examples in Playground

replaceRepeatableContent

Find examples in Playground

serialize

Find examples in Playground
  • serialize(): any

updateUniformsAndSamples

Find examples in Playground

Generated using TypeDoc