Key to identify and store the StorageProperty
Use StorageTypes
OptionalsmoothingOptions: SnapshotBufferOptions<TStorageType>Options for automatically applied smoothing
The most recently changed local value, whether that's current or pending.
In most cases when you want a very up-to-date local value, this is what you want to read from.
The current value that we believe to be synced across the network. In most simple cases, this is what you want to read from.
The function used to check for a change in the property value. It should return true if two values are equal, or reasonably close to equal.
If defined, this function is called to automatically update the property value each frame.
Key used to identify and store the property. This key matches defines how the property is accessed in a RealtimeStore. It can also be used to identify the property in a StoragePropertySet.
Can be used to manually mark the property dirty and skip equals check
If true, we have a value change that needs to be sent at the next opportunity.
Event triggered when the currentValue is changed by any user (either local or remote).
Event triggered when the currentValue is changed by the local user.
Event triggered when the pending value changes.
Event triggered when the currentValue is changed by a remote user.
The local value that can potentially be sent to the network at the next available chance. It may be the same as currentValue, but may not be.
used - by the property.
If greater than or equal to zero, this limits how often the property sends updates to the network about its value changing.
This is useful to avoid rate limiting when a value updates very frequently, for example if a position is changing every frame.
When using this feature, currentValue will only be updated when the value is actually sent to the network.
To get the most recent local version of a value, you can always check currentOrPendingValue.
If defined, this function is called to automatically apply the property value.
New value to apply
If true, events will not be triggered
Information about the update
StaticautoCreates an automatically updated StorageProperty based on getter and setter functions.
Key to identify the property
the type of value
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<TPropertyType> | SnapshotBufferOptionsObj<TPropertyType>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated boolean property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
Newly created StorageProperty
StaticautoCreates an automatically updated boolean[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<boolArray> | SnapshotBufferOptionsObj<boolArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated double property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<double> | SnapshotBufferOptionsObj<double>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated double[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<doubleArray> | SnapshotBufferOptionsObj<doubleArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated float property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<float> | SnapshotBufferOptionsObj<float>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated float[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<floatArray> | SnapshotBufferOptionsObj<floatArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated int property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
Newly created StorageProperty
StaticautoCreates an automatically updated int[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<intArray> | SnapshotBufferOptionsObj<intArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated mat2 property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat2> | SnapshotBufferOptionsObj<mat2>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated mat2[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat2Array> | SnapshotBufferOptionsObj<mat2Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated mat3 property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat3> | SnapshotBufferOptionsObj<mat3>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated mat3[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat3Array> | SnapshotBufferOptionsObj<mat3Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated mat4 property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat4> | SnapshotBufferOptionsObj<mat4>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated mat4[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat4Array> | SnapshotBufferOptionsObj<mat4Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated quat property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<quat> | SnapshotBufferOptionsObj<quat>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated quat[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<quatArray> | SnapshotBufferOptionsObj<quatArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated string property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
Newly created StorageProperty
StaticautoCreates an automatically updated string[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<stringArray> | SnapshotBufferOptionsObj<stringArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated vec2 property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec2> | SnapshotBufferOptionsObj<vec2>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated vec2[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec2Array> | SnapshotBufferOptionsObj<vec2Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated vec3 property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec3> | SnapshotBufferOptionsObj<vec3>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated vec3[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec3Array> | SnapshotBufferOptionsObj<vec3Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated vec4 property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec4> | SnapshotBufferOptionsObj<vec4>Options for automatically applied smoothing
Newly created StorageProperty
StaticautoCreates an automatically updated vec4[] property based on getter and setter functions.
Key to identify the property
Function that returns the current local value for the property
Function that applies incoming new values for the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec4Array> | SnapshotBufferOptionsObj<vec4Array>Options for automatically applied smoothing
Newly created StorageProperty
True if the value was changed
Returns true if we are allowed to send updated values to the network based on the sendsPerSecondLimit and timestamp.
Time in seconds
True if we are allowed to send updated values to the network
StaticforCreates an automatically updated property that mirrors a value on a Material's mainPass.
Material to watch
Name of a property on the material
the type of value
Newly created StorageProperty
StaticforCreates an automatically updated property that mirrors the baseColor of a MaterialMeshVisual.
Visual to watch
Optionalclone: booleanIf true, the material will be cloned and applied back to the visual. Useful if multiple objects use the same material
Newly created StorageProperty
StaticforCreates an automatically updated property that mirrors a value on a MaterialMeshVisual's mainMaterial.
There is also an option to clone the material in-place.
Visual to watch
Name of a property on the visual
the type of value
Optionalclone: booleanIf true, the material will be cloned and applied back to the visual. Useful if multiple objects use the same material
Newly created StorageProperty
StaticforOptionalsmoothingOptions: SnapshotBufferOptions<vec3> | SnapshotBufferOptionsObj<vec3>Options for automatically applied smoothing
Newly created StorageProperty
StaticforOptionalsmoothingOptions: SnapshotBufferOptions<quat> | SnapshotBufferOptionsObj<quat>Options for automatically applied smoothing
Newly created StorageProperty
StaticforOptionalsmoothingOptions: SnapshotBufferOptions<vec3> | SnapshotBufferOptionsObj<vec3>Options for automatically applied smoothing
Newly created StorageProperty
StaticforCreates an automatically updated property that mirrors a Text's text property.
Newly created StorageProperty
StaticforCreates an automatically updated property that mirrors a Transform position/rotation/scale.
OptionalsmoothingOptions: Options for automatically applied smoothing
Newly created StorageProperty
StaticgetHelper function that reads a value from a store, given a key and StorageType | StorageType
Store to read value from
Key identifying the value
Value - found (or default value if none found)
True if the property has a snapshot buffer and is currently smoothing
StaticmanualCreates a simple StorageProperty that should be updated manually.
Key to identify the property
the type of value
OptionalstartingValue: TStartingValueOptional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<TPropertyType> | SnapshotBufferOptionsObj<TPropertyType>Options for automatically applied smoothing
Newly created manual StorageProperty
StaticmanualCreates a simple boolean property that should be updated manually.
Key to identify the property
OptionalstartingValue: booleanOptional starting value to assign to the property
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: boolean[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<boolArray> | SnapshotBufferOptionsObj<boolArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple double property that should be updated manually.
Key to identify the property
OptionalstartingValue: numberOptional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<double> | SnapshotBufferOptionsObj<double>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: number[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<doubleArray> | SnapshotBufferOptionsObj<doubleArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple float property that should be updated manually.
Key to identify the property
OptionalstartingValue: numberOptional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<float> | SnapshotBufferOptionsObj<float>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: number[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<floatArray> | SnapshotBufferOptionsObj<floatArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple integer property that should be updated manually.
Key to identify the property
OptionalstartingValue: numberOptional starting value to assign to the property
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: number[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<intArray> | SnapshotBufferOptionsObj<intArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: mat2Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat2> | SnapshotBufferOptionsObj<mat2>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: mat2[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat2Array> | SnapshotBufferOptionsObj<mat2Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: mat3Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat3> | SnapshotBufferOptionsObj<mat3>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: mat3[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat3Array> | SnapshotBufferOptionsObj<mat3Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: mat4Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat4> | SnapshotBufferOptionsObj<mat4>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: mat4[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<mat4Array> | SnapshotBufferOptionsObj<mat4Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: quatOptional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<quat> | SnapshotBufferOptionsObj<quat>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: quat[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<quatArray> | SnapshotBufferOptionsObj<quatArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple string property that should be updated manually.
Key to identify the property
OptionalstartingValue: stringOptional starting value to assign to the property
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: string[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<stringArray> | SnapshotBufferOptionsObj<stringArray>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: vec2Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec2> | SnapshotBufferOptionsObj<vec2>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: vec2[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec2Array> | SnapshotBufferOptionsObj<vec2Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: vec3Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec3> | SnapshotBufferOptionsObj<vec3>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: vec3[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec3Array> | SnapshotBufferOptionsObj<vec3Array>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: vec4Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec4> | SnapshotBufferOptionsObj<vec4>Options for automatically applied smoothing
Newly created StorageProperty
StaticmanualCreates a simple property that should be updated manually.
Key to identify the property
OptionalstartingValue: vec4[]Optional starting value to assign to the property
OptionalsmoothingOptions: SnapshotBufferOptions<vec4Array> | SnapshotBufferOptionsObj<vec4Array>Options for automatically applied smoothing
Newly created StorageProperty
Store to write value to
OptionaltimeStamp: numberTime in seconds
Sets the pending value to newValue. This value will be sent to the network at the end of the frame,
as soon as it's allowed to do so (we have permission to modify the SyncEntity, and sendsPerSecondLimit hasn't been reached).
New pending value to set
Immediately set the current value. Only use this if you are sure that we have permission to modify the store.
Store to write value to
New value to set
True if the value was changed
New value to set
StaticwrapCreates an automatically updated property based on a target object and property name.
The propName should be the name of a property on the target object.
Key to identify the property
Target object to watch
Name of a property on target that should be watched
the type of value
OptionalsmoothingOptions: SnapshotBufferOptions<TPropertyType>Options for automatically applied smoothing
Newly created StorageProperty
Provides classes and helper functions used for storing data in RealtimeStores.