BlocksModule Overview
BlocksModule Overview
BlocksModule Overview

BlocksModule

The BlocksModule class provides methods for interacting with the Blocks in your effect.

Properties

PropertyDescription
assets
(get) assets: BlockAssets
(set) (Not Available)


Get an object that allows access to the Block Assets.

Methods

MethodDescription
instantiate
instantiate(blockAssetOrName: string | BlockAsset, initialState: {[key: string]: any}): Promise<BlockSceneRoot>


Instantiate a Block asynchronously, given a Block Asset or its name.
When instantiating blocks, keep the following in mind:
- Creation of Blocks is bound to the same set of guidelines as Scene.create().
- New blocks always get assigned a globally unique identifier.`
- initialState is optional, but encouraged to be used.
- initialState can contain any key: value pair for any settable property of a Block class (e.g. hidden).
- name in initialState is being used, unless it's not provided - then dynamicBlock is used.
- Block's inputs and outputs are not accessible until SceneObjectBase.addChild() call finishes

Classes

ClassDescription
BlockAssetThis class represents a single Block Asset.
BlockAssetsThis class allows access to the Block Assets.

Was this article helpful?