webarkit / ARnft

A small javascript library for WebAR with NFT
GNU Lesser General Public License v3.0
219 stars 53 forks source link

Jttering of the model #2

Closed kalwalt closed 4 years ago

kalwalt commented 4 years ago

In the example the red cube jitter a lot, it seems that the interpolation matrix have no effect, maybe is not injected with values?

kalwalt commented 4 years ago

The problem seems to be in this for loop:

https://github.com/kalwalt/ARnft/blob/9ec064d7421d83c537cdc2c6db4a148fbb2d67a6/src/utils/Utils.js#L329-L335

In the ES5 version worked fine but with ES6 it's like the loop doing any calculation... Articles on this subject (for loop with ES6):

https://hacks.mozilla.org/2015/04/es6-in-depth-iterators-and-the-for-of-loop/ https://stackoverflow.com/questions/30452263/is-there-a-mechanism-to-loop-x-times-in-es6-ecmascript-6-without-mutable-varia

kalwalt commented 4 years ago

Fixed with https://github.com/webarkit/ARnft/pull/5