DeepReadonly
DeepReadonly<
T> =TextendsEntity?T:Textendsstring|number|boolean|bigint|symbol?T: typeofliveObjectBrandextends keyofT?T:TextendsObject3D?T:TextendsVector3?ReadonlyVector3:TextendsQuaternion?ReadonlyQuaternion:TextendsVector2?ReadonlyVector2:TextendsEuler?ReadonlyEuler:TextendsColor?ReadonlyColor:TextendsMatrix4?ReadonlyMatrix4: … extends … ? … : …
T with no field a reader can change, at any depth, and three’s
vectors and quaternions as their read-only views. A mapped type leaves
a class’s own methods callable, so another class’s methods that write,
such as a Color’s set, stay callable: the type does not cover them.
A scene object, such as the Object3D a view holds in RefTrait, is
the view’s own to move, and stays as it is, and so does a field typed
LiveObject, for a handle a game keeps, such as an AnimationMixer.
An entity keeps its brand, such as a PlayerEntity, and so does a
branded id, such as a PlayerId.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |