readViewTrait
readViewTrait<
S>(source,entity,handle,rewind):DeepReadonly<TraitRecord<S>> |undefined
trait on entity as the player’s screen held it at the moment
rewind names: the newer of the two sends round it, as the player’s
page takes each send’s traits as it lands and draws toward it. Where
it is read now, as on the player’s page, for the player’s own entity
or in a game played alone, the value it holds now, which is the newer
send’s whenever the moment lies between the last two. Undefined where
the entity did not hold it, and where readViewPosition reads no
place. The trait is one defined with history: true, which every send
keeps. Read-only, and shared until the send leaves the history.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
S extends Schema |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
source |
QuerySource |
entity |
Entity |
handle |
Trait<S> | PredictedTrait<S> |
rewind |
Rewind |
Returns
Section titled “Returns”DeepReadonly<TraitRecord<S>> | undefined
Example
Section titled “Example”const zones = readViewTrait(step, target, HitZonesTrait, command);