king2088 / vue-3d-loader

VueJS and threeJS 3d viewer plugin
https://king2088.github.io/vue-3d-loader-docs
MIT License
242 stars 40 forks source link

请问为什么线上的点击事件获取不到intersects,本地可以获取到,版本号是1.2.7 #39

Closed 254840130 closed 1 year ago

king2088 commented 1 year ago

请贴出相关代码

254840130 commented 1 year ago

<vue3dLoader :width="screenWidth" :height="screenHeight" :filePath="filePaths" backgroundColor="black" @click="onclick"

king2088 commented 1 year ago

<vue3dLoader :width="screenWidth" :height="screenHeight" :filePath="filePaths" backgroundColor="black" @click="onclick"

如果是你打包成了生产环境的JS发布到线上,那么生产代码会把你的console.log代码移除,因此你在生产环境下是无法看到控制台输出的内容。

254840130 commented 1 year ago

控制台是可以看到console.log的,event有数据,intersected是null

king2088 commented 1 year ago

控制台是可以看到console.log的,event有数据,intersected是null

请仔细查看API文档中关于intersectRecursive参数的说明

king2088 commented 1 year ago

并且,将vue-3d-loader 1.2.7 版本升级到最新版本 1.2.13,方可支持intersectRecursive参数

254840130 commented 1 year ago

解决了,谢谢你

JaneYork commented 1 year ago

怎么在大数据界面,点击模型弹窗显示详情,详情页能用动态数据 @254840130