webarkit / ARnft

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

add targetFrameRate in CameraViewRenderer #237

Closed stevensyzygy closed 3 years ago

stevensyzygy commented 3 years ago

Add some changes to try to improve CameraViewRenderer.

kalwalt commented 3 years ago

Have you tested the code? Do you see an improvement?

kalwalt commented 3 years ago

I think you should pull latest changes from the dev branch and solve the conflicts. I would make some tests and see if it improve the performance or not.

kalwalt commented 3 years ago

Thank you @stevensyzygy, i saw your last changes. I will review when i m back from holiday, but they look interesting. 🙂🔝

kalwalt commented 3 years ago

Testing your code, i got this error while running the multi nft example:

NFTWorker.ts:108 Uncaught DOMException: Failed to execute 'postMessage' on 'Worker': ArrayBuffer at index 0 is already detached.
    at s.process (http://localhost:5500/dist/ARnft.js:1:746766)
    at http://localhost:5500/dist/ARnft.js:1:753920
    at Array.forEach (<anonymous>)
    at D (http://localhost:5500/dist/ARnft.js:1:753906)

And non of the NFT markers can be tracked. i think that is caused by recent changes, in this PR or some other place. Would be nice to fix this and after i can merge this PR.

kalwalt commented 3 years ago

I think that the bug mentioned here and in issue #242 is not related to changes introduced in this PR. So i think we can merge and make a fix for that issue in another PR.