Hierarchy
-
IObservable<Sensor.ISensor>
- ISensor
Index
Properties
forward
The world-space "forward" direction describing which direction the sensor is facing.
origin
The world-space position of the sensor.
readings
An observable used to get information about assocated ISources
added with ISensor.addSource
Type declaration
-
subscribe: function
-
Start receiving updates about the current set of sources added to this sensor.
Parameters
-
observer: Sensor.ISensorObserver
Returns ISubscription
-
-
Methods
addSource
-
Add a source, to add its readings to the set of readings provided by
.subscribe
.Parameters
-
Rest ...sources: Sensor.ISource[]
Returns void
-
dispose
-
Teardown and cleanup the sensor, and stop receiving updates.
Returns void
showDebug
-
Show debug visuals for this sensor. Existing visuals are disposed.
Parameters
-
show: boolean
Returns void
-
subscribe
-
Start receiving updates when properties of this sensor change, e.g.
origin
orforward
, not itsreadings
.
Subscribe toreadings
to receive updates about associatedISources
Type parameters
-
DataT
Parameters
-
observer: IObserver<DataT> | ObserverCallback<DataT>
Returns ISubscription
-
waitUntil
-
Wait for a specific condition on this object to be met. When this observable detects a change, the
condition
provided will be called. When thecondition
returns true, the returned Promise will be resolved.Parameters
-
condition: ICondition<Sensor.ISensor> | ConditionCallback<Sensor.ISensor>
Returns Promise<Sensor.ISensor>
A promise that is resolved when
condition
returns true. -
A Sensor that detects Sources and provides information about the reading of each.