kalwalt / kalwalt-interactivity-AR

Some various experiments with Ar.js and Three.js
https://kalwalt.github.io/kalwalt-interactivity-AR/
GNU Lesser General Public License v3.0
78 stars 11 forks source link

From where it is putting 3d object. #7

Open HardikPurohit opened 4 years ago

HardikPurohit commented 4 years ago

I need the place from where NFT marker detected first time and 3D animation is being put first time?

kalwalt commented 4 years ago

I need the place from where NFT marker detected first time and 3D animation is being put first time?

I think you are refering to jsartoolkit5 and NFT but in specific what do you mean within the place from where NFT marker detected first time can you elaborate a bit more your question?

HardikPurohit commented 4 years ago

My requirement is when it detects the nft marker it displays the object, but when I move the nft marker that object should not move it will be at the same position where first marker found.

So, if i get the code from where marker detected and putting the object first time I can freeze the position of object.

kalwalt commented 4 years ago

Ok @HardikPurohit , it depends which code are you using in this repo for NFT, i suggest to you that has the Worker like these:

https://github.com/kalwalt/kalwalt-interactivity-AR/blob/master/nft/nft_pinball_image.html https://github.com/kalwalt/kalwalt-interactivity-AR/blob/master/nft/nft_pinball_video.html https://github.com/kalwalt/kalwalt-interactivity-AR/blob/master/nft/nft_cubist_dragon.html

the others don't use WebWorker or are with threading that i don't recommend ( only for testing )

you can make visible the object simply adding a check as in this part of the code:

https://github.com/kalwalt/kalwalt-interactivity-AR/blob/f1910861be376a7b81c2b308aaa9a2e30008ffac/nft/threejs_worker_pinball_image.js#L179-L182

if you want to diplay a model instead look at the code in the jsartoolkit5 repo: https://github.com/kalwalt/jsartoolkit5/blob/master/examples/nft_improved_worker/threejs_worker_gltf.html javascript code of the gltf example: https://github.com/kalwalt/jsartoolkit5/blob/master/examples/nft_improved_worker/threejs_worker_gltf.js example to test on the web: https://kalwalt.github.io/jsartoolkit5/examples/nft_improved_worker/threejs_worker_gltf.html

HardikPurohit commented 4 years ago

I am using https://github.com/kalwalt/kalwalt-interactivity-AR/blob/master/nft/nft_threads_cesium.html I just track the nft image and displays the 3D animation.