The SignalHistory
class encapsulates methods for accessing values of a signal from previous frames.
Property | Description |
---|---|
length | (get) length: number Returns how many frames are being tracked by this history object. |
Method | Description |
---|---|
at | at(index: number): undefined Returns a Signal for the history value at given index.For example, SignalHistory.at(0) returns value of signal at previous frame, whileSignalHistory.at(1) returns value of signal at two frames ago.Note: See also SignalHistory.frame method which uses more intuitive negative indexing.Note: You can use SignalHistory[0] to achieve same effect as calling SignalHistory.at(0) |
frame | frame(frame: number): undefined Returns a Signal for the history value at given frame relative to current one.For example, SignalHistory.frame(-1) returns value of signal at previous frame, whileSignalHistory.frame(-2) returns value of signal at two frames ago.Note: See also SignalHistory.at method for approach which is index based.Note: You can use SignalHistory[-1] to achieve same effect as calling SignalHistory.frame(-1) |