webarkit / ARnft

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

getMatrixGL_RH- event does not work for me #288

Closed Parisa-DolphinSoft closed 1 year ago

Parisa-DolphinSoft commented 2 years ago

Hi I created a js project with react and three.js and arnft (jsartoolkit). I see some problem in arnft performance (or maybe I did not understand How to use correctly) I hope whenever you find the answer help me. This is my email also : vira4.company@gmail.com

I checked this complete example also : https://github.com/webarkit/ARnft

Problems: 4) getMatrixGL_RH- event does not work for me document.addEventListener('getMatrixGL_RH-' + nft.uuid + '-pinball', function() { console.log('this is pinball!!'); })

snmabaur commented 2 years ago

window.addEventListener works, had the same problem

kalwalt commented 1 year ago

@Parisa-DolphinSoft Thank you for reporting this, as @snmabaur commented you should use addEventListener attached to the window object. I think you are referring to this example. I will fix this when i have a bit of time.

kalwalt commented 1 year ago

I fixed the example tell me if it works now.

Parisa-DolphinSoft commented 1 year ago

Thanks by windows it is worked