Re: [sensors] Don't allocate response objects to avoid triggering GC

> Although, this pattern will only work for singleton sensor types - 
there is only one gyro, and one accelerometer ever?
Does Sensors API assumes that there might be multiple sensors of the 
same type?
Lets say there are two controllers, like HTC Vive Controller, so you 
can have multiple attached. Does Sensors API covers this types of 
sensors too?

Yes, via [identifying 
which are sensor type specific, e.g. (completely made-up identifying 

let gyro = new Gyroscope({
    frequency: 240,
    external: true, // identifying parameter
    hand: "right"   // identifying parameter
> One slight concern, with sensors that have frequency that affects 
the "accumulated" data. For example accelerometer would not just get 
current state, but accumulated between pulls data? If that is the 
case, then with sync use cases, pulling could be sync too.

I've punted on dealing with accumulate date for now, tbh. I wan't to 
make sure we don't design something that makes this impossible in the 
future, however, so suggestions are welcome.

GitHub Notification of comment by tobie
Please view or discuss this issue at using
 your GitHub account

Received on Tuesday, 6 December 2016 15:41:56 UTC