Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

PredictedTolerance

PredictedTolerance<Record> = { readonly [Key in keyof Record & string as Record[Key] extends Entity ? never : Record[Key] extends number | Vector2 | Vector3 | Quaternion ? Key : never]?: number }

How far each field of a predicted trait may differ between the room and her page and still count as the same: a number by its difference, a vector by the distance between the two, a quaternion by the angle between them in radians. Infinity turns a field’s comparison off and keeps it restored on every correction. A tolerance absorbs rounding, such as the last digits of Math.sin on two machines, and stays far below any threshold a system branches on: keep a branch’s outcome in a flag or an enum beside the number, which compares exactly. A field left out takes the engine’s default, 0.0001 for a number or a vector and 0.0002 radians for a quaternion.

Type Parameter
Record