tomaspietravallo / sparkar-volts

An extensive Typescript framework that eases the development experience in Meta Spark AR
https://tomaspietravallo.gitbook.io/sparkar-volts/how-to-use-volts
MIT License
22 stars 1 forks source link

Dynamic snapshots #7

Closed tomaspietravallo closed 3 years ago

tomaspietravallo commented 3 years ago

Switch away from the current Time.ms.monitor to a recursive setTimeoutWithSnapshot. The benefit would be being able to add/remove signals from the snapshot, instead of having it fixed from beginning to end.

Will need to evaluate the precision and tradeoffs of using setTimeoutWithSnapshot instead of monitor. I only previously tested this with the MultipeerAPI & 200ms+ delays, so I don't know how suitable this might be when it needs to run on every frame

tomaspietravallo commented 3 years ago

Now pushed as part of sparkar-volts@beta 1.0.0. These changes may break previous versions

Some changes had to be made in order to accommodate setTimeoutWithSnapshot, see ac4d3165e6d1e6873f52c1684eed9eeb0b8766ec, line 252

tomaspietravallo commented 3 years ago

World.addToSnapshot & World.removeFromSnapshot are now part of the beta branch, and have been pushed out as part of sparkar-volts@beta (1.1.0).

Commits: