State & Data Blocks

Published Updated
Manage global session variables, reactive key-value stores, local database files, and preset object loaders.

State & Data Blocks operators handle data persistence, state synchronizations, and structural dataset mappings throughout the scene runtime.

Data Block Operator for Structured JSON State#

Operator<DocsSdkOperatorsDataStateDataBlock>: Creates and parses compound, structured JSON data blocks, enabling local storage save/load logic and spreadsheet interactions.

1. Functional Overview

The Data Block operator coordinates structured, tabular, or nested JSON collections inside Aircada. It handles structured payloads via its Data Input @Input, saving them or loading them from disk/offline store, and dispatches the compiled record out of its Data Output @Output, firing success or failure event hooks accordingly.

3. SDK Runtime Initialization

When initializing a Data Block operator programmatically via the SDK at runtime, pass a default object containing both the storage configurations (such as dataStoreType, tableName, etc.) and the schema for the custom data properties. This instantiates the operator with the correct storage settings and pre-populates the list of custom runtime properties that it will hold, modify, and persist when triggered.

4. Studio Configuration

Inside the Aircada Studio, designers can place a Data Block operator into the scene and define its custom key-value property schema directly using the interactive Operator UI panel, without writing setup code.

Data Block

DATA_BLOCK.DATA_BLOCK
Operator
Operator Type
DATA_BLOCK
Operator Group
DATA_BLOCK
No configurable properties.

@Input

@Input & TypeDisplay Name@Input TypeGroup
dataInput: (payload: DataBlock[]) => void
Data Input
DATA_BLOCKDATA_BLOCK
save: () => void
Save
OPERATOROPERATOR
load: () => void
Load
OPERATOROPERATOR

@Output

@Output & TypeDisplay Name@Output TypeGroup
dataOutput: AirEvent<DataBlock[]>
Data Output
DATA_BLOCKDATA_BLOCK
savedData: AirEvent<DataBlock[]>
Saved Data
DATA_BLOCKDATA_BLOCK
loadedData: AirEvent<DataBlock[]>
Loaded Data
DATA_BLOCKDATA_BLOCK
onSuccess: AirEvent<void>
On Success
OPERATOROPERATOR
onFailure: AirEvent<void>
On Failure
OPERATOROPERATOR

Metadata Stamp Operator for Session Records#

Operator<DocsSdkOperatorsDataStateMetadataStamp>: Attaches current system time and session metadata directly onto an outgoing data record.

1. Functional Overview

The Data Stamp operator records historical timelines. It intercepts data block payloads, embeds the active system UTC timestamp, session ID, and user info parameters, and dispatches the stamped record downstream to ensure reliable transaction audit logging.

Data Stamp

DATA_BLOCK.DATA_STAMP
Operator
Operator Type
DATA_STAMP
Operator Group
DATA_BLOCK

Data Stamp Properties Details

Property & TypeDisplay NameSystem TypeDefault
dataBlocks: any
dataBlocks
NONE
NONE
undefined

@Input

@Input & TypeDisplay Name@Input TypeGroup
loadData: (payload: any) => void
Load Data
UNIT_COMMONUNIT

@Output

@Output & TypeDisplay Name@Output TypeGroup
dataOutput: AirEvent<DataBlock[]>
Data Output
DATA_BLOCKDATA_BLOCK

Data Store Properties Reference in Aircada#

Detailed reference for variables managing data store storage configurations, save behaviors, and query keys.

Data stores in Aircada are configured dynamically using the following set of storage reference properties:

  • dataStoreType: Determines the underlying storage driver and persistence environment. Options include TEMPORARY (in-memory runtime storage), LOCAL_STORAGE (IndexedDB browser caching), SNAPSHOT (read-only automated transaction records), DATASET (read-only lookup from Datasets), and REMOTE_BLOCK (Azure Blob containers for long-term searchable customizations).
  • dataStoreId: Specifies the unique identifier of the preconfigured storage container generated through the Aircada admin panel (required for REMOTE_BLOCK storage).
  • tableName: A database-like namespace used to partition and separate distinct data lists within a data store (does not apply to DATASET or SNAPSHOT types).
  • saveType: Configures the key assignment strategy during writes. Set to NEW_ID to generate a random unique key for every entry, or KEY to write to a specific record key defined in the definedKey property.
  • loadType: Configures the query retrieval strategy during reads. Set to load the latest record in the table automatically, or use the key specified in the definedKey property to load a specific record.

Data Store Properties Details

Property & TypeDisplay NameSystem TypeDefault
dataStoreType: "TEMPORARY" | "LOCAL_STORAGE" | "SNAPSHOT" | "DATASET" | "REMOTE_BLOCK"
Storage Type
ENUM
DROPDOWN
"TEMPORARY"
dataStoreId: string
Data Store
STRING
DROPDOWN
""
datasetId: IMediaItem
Dataset
MEDIA_ITEM
ELEMENT SELECTOR
""
tableName: string
Table Name
STRING
TEXT INPUT
""
saveType: "NEW_ID" | "KEY"
Store By
ENUM
OPTION SELECTOR
"NEW_ID"
loadType: "LATEST" | "KEY"
Load By
ENUM
OPTION SELECTOR
"LATEST"
definedKey: string
Defined Key
STRING
TEXT INPUT
""

Global Variables Operator for Shared Scene State#

Operator<DocsSdkOperatorsDataStateGlobalVariables>: Declares and manages globally accessible key-value state values accessible by all runtime systems.

1. Functional Overview

The Global Variables operator acts as the central registry for cross-operator state sharing. It holds and broadcasts reactive values that any component or React UI panel can query, modify, or bind to, keeping variables in sync across isolated runtime subsystems.

Global Variables

GLOBAL_VARIABLES.GLOBAL_VARIABLES
Operator
Operator Type
GLOBAL_VARIABLES
Operator Group
GLOBAL_VARIABLES
No configurable properties.

Loader Operator for Dynamic 3D Asset Spawning#

Operator<DocsSdkOperatorsDataStateLoader>: Procedurally instantiates 3D model assets or loads external data rows during active sessions.

1. Functional Overview

The Loader operator is used to load data blocks from the specified storage location, and output the resulting data list as a Record<string, any>[] array, or send an instantiation signal to a LayerSceneObject to instantiate a preset or existing SceneObject.

Once the data is successfully loaded from the specified storage system, it is sent via the Data List trigger for other systems to listen for.

2. Properties & Filtering

The loader operator has a list of properties for filtering and sorting the data list, as well as pagination control.

3. Data Storage Integration

Its data storage mechanism properties mirror the Data Block Operator's properties. For a detailed reference on all available storage options, refer directly to the Data Store Properties reference guide.

Loader

INSTANTIATION.DATA_LOADER
Operator
Operator Type
DATA_LOADER
Operator Group
INSTANTIATION

Loader Properties Details

Property & TypeDisplay NameSystem TypeDefault
instantiateExistingUnit: boolean
Create From Scene Object
BOOL
TOGGLE
false
unitIdsToCopy: any
Copy Object
STRING_ARRAY
UNIT SELECTOR
[]
presetId: any
Preset
NONE
ELEMENT SELECTOR
""
loadFromDataStore: boolean
Load From Data Store
BOOL
TOGGLE
false
dataStoreType: "TEMPORARY" | "LOCAL_STORAGE" | "SNAPSHOT" | "DATASET" | "REMOTE_BLOCK"
Storage Type
ENUM
DROPDOWN
"LOCAL_STORAGE"
dataStoreId: string
Data Store
STRING
DROPDOWN
""
datasetId: IMediaItem
Dataset
MEDIA_ITEM
ELEMENT SELECTOR
""
tableName: string
Table Name
STRING
TEXT INPUT
""
getAll: boolean
Return All Records
BOOL
TOGGLE
false
getMultiple: boolean
Return Multiple (paged)
BOOL
TOGGLE
true
useSearch: boolean
Enable Search
BOOL
TOGGLE
false
searchKey: string
Search Key
STRING
TEXT INPUT
""
searchText: string
Search Text
STRING
TEXT INPUT
""
useTagFilter: boolean
Enable Tag Filter
BOOL
TOGGLE
false
tagsInclude: string
Tags (Include)
ENUM
DROPDOWN
[]
tagsExclude: string
Tags (Exclude)
ENUM
DROPDOWN
[]
replaceOnReload: boolean
Replace On Reload
BOOL
TOGGLE
true
sortBy: "TIME" | "ALPHABETICAL" | "CUSTOM"
Sort By
ENUM
OPTION SELECTOR
"TIME"
sortByKey: string
Sort By Key
STRING
TEXT INPUT
""
sortDirection: "ASCENDING" | "DESCENDING"
Sort Direction
ENUM
OPTION SELECTOR
"ASCENDING"
pageSize: int
Page Size
INT
TEXT INPUT
20
page: int
Page #
INT
TEXT INPUT
1
instantiatePageButtons: boolean
Instantiate Page Buttons
BOOL
TOGGLE
false
pageButtonUnitId: any
Page Button Object
STRING_ARRAY
UNIT SELECTOR
[]

@Input

@Input & TypeDisplay Name@Input TypeGroup
load: () => void
Load
OPERATOROPERATOR
nextPage: () => void
Next Page
OPERATOROPERATOR
previousPage: () => void
Previous Page
OPERATOROPERATOR
setPage: () => void
Set Page
OPERATOROPERATOR

@Output

@Output & TypeDisplay Name@Output TypeGroup
dataList: AirEvent<DataBlock[]>
Data List
DATA_BLOCKDATA_BLOCK
instantiate: AirEvent<any>
Instantiate
INSTANTIATION_SIGNALINSTANTIATION
pageButtons: AirEvent<any>
Page Buttons
INSTANTIATION_SIGNALINSTANTIATION
totalRows: AirEvent<int>
Total Rows
DATA_INTAIR_PROPERTY
totalPages: AirEvent<int>
Total Pages
DATA_INTAIR_PROPERTY
pageNumber: AirEvent<int>
Page Number
DATA_INTAIR_PROPERTY
pageSize: AirEvent<int>
Page Size
DATA_INTAIR_PROPERTY
pageStart: AirEvent<int>
Page Start
DATA_INTAIR_PROPERTY
pageEnd: AirEvent<int>
Page End
DATA_INTAIR_PROPERTY
onStart: AirEvent<void>
On Start
OPERATOROPERATOR
onSuccess: AirEvent<void>
On Success
OPERATOROPERATOR
onFailure: AirEvent<void>
On Failure
OPERATOROPERATOR

Option Group Operator for Configurator Choices#

Operator<DocsSdkOperatorsDataStateOptionGroup>: Organizes multiple design choices or parameter configurations into selectable, grouped lists.

1. Functional Overview

The Option Group operator manages lists of selectable values. It allows developers to bundle text or numeric configuration states into named option rows. Triggering selections switches the activeOptionIndex and outputs the corresponding state payload to customize scene elements.

Option Group

DATA_BLOCK.DATA_BLOCK_OPTION_GROUP
Operator
Operator Type
DATA_BLOCK_OPTION_GROUP
Operator Group
DATA_BLOCK

Option Group Properties Details

Property & TypeDisplay NameSystem TypeDefault
dataValue: string
Data Value
STRING
TEXT INPUT
""
dataId: string
Data ID
STRING
TEXT INPUT
""
label: string
Label
STRING
TEXT INPUT
""
metadata: string
Metadata
STRING
TEXT INPUT
"{}"
fireOnStartup: boolean
Fire On Startup
BOOL
TOGGLE
false
dataSourceType: "MANUAL" | "DATASET"
Data Source
ENUM
DROPDOWN
"MANUAL"
datasetId: IMediaItem
Dataset
MEDIA_ITEM
ELEMENT SELECTOR
""
currentDefinitionId: string
Definitions
ENUM
DROPDOWN
""
atLeastOne: boolean
At Least One
BOOL
TOGGLE
true
allowMultiple: boolean
Allow Select Multiple
BOOL
TOGGLE
false
definedDataBlocks: any
definedDataBlocks
NONE
NONE
undefined
unitIdsToCopy: any
Copy Object
STRING_ARRAY
UNIT SELECTOR
[]

@Input

@Input & TypeDisplay Name@Input TypeGroup
dataInput: (payload: DataBlock[]) => void
Data Input
DATA_BLOCKDATA_BLOCK
activeStyle: (payload: IStyle) => void
Active Style
DATA_STYLEAIR_PROPERTY
selectAll: () => void
Select All
OPERATOROPERATOR
deselectAll: () => void
Deselect All
OPERATOROPERATOR

@Output

@Output & TypeDisplay Name@Output TypeGroup
dataOutput: AirEvent<DataBlock[]>
Data Output
DATA_BLOCKDATA_BLOCK
onChange: AirEvent<void>
On Change
OPERATOROPERATOR

URL Parameters Operator for Query String Sync#

Operator<DocsSdkOperatorsDataStateUrlParameters>: Reads custom search query parameters directly from the browser's active URL bar.

1. Functional Overview

The URL Parameters operator simplifies deep linking integrations. It scans the page's current address bar (e.g. ?product_id=982&color=blue), parses the keys, and outputs matching query variables to initialize personalized configurators dynamically.

URL Parameters

DATA_BLOCK.URL_PARAMETERS
Operator
Operator Type
URL_PARAMETERS
Operator Group
DATA_BLOCK
No configurable properties.

@Input

@Input & TypeDisplay Name@Input TypeGroup
dataInput: (payload: DataBlock[]) => void
Data Input
DATA_BLOCKDATA_BLOCK

@Output

@Output & TypeDisplay Name@Output TypeGroup
dataOutput: AirEvent<DataBlock[]>
Data Output
DATA_BLOCKDATA_BLOCK