BlockSceneRoot

The BlockSceneRoot class describes the root scene object of a block.

Example

//==============================================================================
// The following example demonstrates how to set/get boolean value to/from Block instance
//
// Project setup:
// - Insert a plane
// - Add a Block and instantiate an instance
// - Edit the Block
//   - Insert a plane in the Block
//   - Add a boolean input and a boolean output
//   - Connect the input patch to visible patch of the plane
//==============================================================================

// Load in the required modules
const Scene = require('Scene');

// Locate the plane and block in the Scene
const plane = Scene.root.find('plane0');
const block = Scene.root.find('block0');

//==============================================================================
// Switch plane's visibility by setting/getting boolean value of Block
//==============================================================================

// Observed plane in the Block switches its visibility by setting the input value between true and false
block0.setBooleanInput('input', true);
block0.setBooleanInput('input', false);

// Observed plane0 switches its visibility when change value of Block output
plane.hidden = block.getBooleanOutput('output');

Properties

This module exposes no properties.

Methods

MethodDescription

getBooleanOutput

getBooleanOutput(name: String): BoolSignal

Returns a BoolSignal for a named Block output.

getColorOutput

getColorOutput(name: String): ColorSignal

Returns a ColorSignal for a named Block output.

getPixelPointOutput

getPixelPointOutput(name: String): PixelPointSignal

Returns a PixelPointSignal for a named Block output.

getPointOutput

getPointOutput(name: String): PointSignal

Returns a PointSignal for a named Block output.

getScalarOutput

getScalarOutput(name: String): ScalarSignal

Returns a ScalarSignal for a named Block output.

getShaderOutput

getShaderOutput(name: String): ShaderSignal

Returns a ShaderSignal for a named Block output.

getStringOutput

getStringOutput(name: String): StringSignal

Returns a StringSignal for a named Block output.

getVectorOutput

getVectorOutput(name: String): VectorSignal

Returns a VectorSignal for a named Block output.

setBooleanInput

setBooleanInput(name: String, signal: BoolSignal): void

Binds a BoolSignal to a named Block input.

setColorInput

setColorInput(name: String, signal: ColorSignal): void

Binds a ColorSignal to a named Block input.

setPixelPointInput

setPixelPointInput(name: String, signal: PixelPointSignal): void

Binds a PixelPointSignal to a named Block input.

setPointInput

setPointInput(name: String, signal: PointSignal): void

Binds a PointSignal to a named Block input.

setScalarInput

setScalarInput(name: String, signal: ScalarSignal): void

Binds a ScalarSignal to a named Block input.

setShaderInput

setShaderInput(name: String, signal: ShaderSignal): void

Binds a ShaderSignal to a named Block input.

setStringInput

setStringInput(name: String, signal: StringSignal): void

Binds a StringSignal to a named Block input.

setVectorInput

setVectorInput(name: String, signal: VectorSignal): void

Binds a VectorSignal to a named Block input.