Optional
onFieldChanged: string | FieldChangedCallbackFnname of a callback function that will be called when the field is changed.
You can also pass in a function like so: syncField(myClass.prototype.myFunctionToBeCalled)
This function may return false to prevent notifyChanged from being called
(for example a networked color is sent as a number and may be converted to a color in the receiver again)
Parameters: (newValue, previousValue)
Generated using TypeDoc
Decorate a field to be automatically networked synced
Primitive values are all automatically synced (like string, boolean, number).
For arrays or objects make sure to re-assign them (e.g.
this.mySyncField = this.mySyncField
) to trigger an update