ebeaufay / threedtiles

3DTiles viewer for three.js
MIT License
262 stars 31 forks source link

this will cause “Maximum call stack size exceeded” #27

Closed tangerren closed 2 weeks ago

tangerren commented 2 months ago

https://github.com/ebeaufay/threedtiles/blob/4058ff536c31d7b039482803ef9ba20a245a55c9/src/tileset/OGC3DTile.js#L89 image

ebeaufay commented 2 months ago

Any more info? Do you have a tileset that causes the issue you can share? What's your build environment?

tangerren commented 2 months ago

with VUE3+vite。 use this demo's tileset
image

ebeaufay commented 2 months ago

Hmmh but this tileset works fine with vanilla JS as well as with the vite+r3f demo.

Must be something to do with vue3 or the way you call the OGC3DTile.update function.

Perhaps in debug, you can check that update is called only once per frame.

Also, do you know why the stack reports calls to

OGC3DTILE.r3.update instead of just OGC3DTILE.update? Are you wrapping the library with custom code or is the build doing that automatically..

tangerren commented 2 months ago

is there an completable、independent、source code demo?

ebeaufay commented 2 months ago

This is the vanilla Js demo project : https://drive.google.com/file/d/14lipb5eUqfad-n7EUgXuXul-drPdLifV/view?usp=sharing

And the demo project with R3F : https://drive.google.com/file/d/1C102qriCsnra9EUbb8WzO4jZStp-eEah/view?usp=sharing

That's the only 2 I have