8th Wall tap to place example 不显示模型替换

8th Wall tap to place example not showing model replacement

我已经替换了 ThreeJS placeground 示例 (https://github.com/8thwall/web/tree/master/examples/threejs/placeground) 中的 tree.glb 模型,但它没有显示。使用 tree.glb 时效果很好。 为了进行调试,我还尝试将其替换为示例中可用的 jellyfish-model.glb,但在地板平面上敲击时它也不会显示。 我的代码有什么问题,或者我用 tree.gbl 替换的 .glb 模型有问题吗?

  const modelFile = 'tree.glb' // 3D model to spawn at tap

  const modelFile = 'jellyfish-model.glb' // 3D model to spawn at tap

github 上的文件结构:8thwall-3js-test-github

理想情况下,我想在这个示例中复制我使用 Unity+Vuforia 所做的事情(基本上是将 .png 放置在地板平面上):https://www.youtube.com/watch?v=poWvXVB4044

我将从查看 3d 模型的比例开始。您提供的 link 中的树模型非常大,因此正在按比例缩小。参见 https://github.com/8thwall/web/blob/master/examples/threejs/placeground/index.js#L7-L8

通过在 animateIn() 中添加 console.log('model added!') 类型语句向自己证明模型正在加载(因为这是模型加载的处理程序)

我猜你的水母-model.glb就在那里,只是很小。尝试将 startScaleendScale 调整为更大的值,看看是否有帮助。