aframe-extras
aframe-extras copied to clipboard
aframe 1.2.0 and navmesh
when using a simple navigation mesh
-
Using aframe 1.0.4 with aframe-extras works
-
Using aframe 1.2.0 with aframe-extras does not, with the following
Uncaught TypeError: THREE.Geometry is not a constructor
When I then used a local non-min copy of aframe-extras the additional info indicates the error is
Uncaught TypeError: THREE.Geometry is not a constructor at i.loadNavMesh (aframe-extras.js:11127)
when I used a local, non-min copy of aframe-extras
I am not a programmer, but I THINK it's the THREE.js issue mentioned in "Ocean extra nlot working on aframe 1.2.0". That said, I have no idea what a work around might look. There are a few other features in aframe 1.2.0 that I am trying to hold on to (for very simple student VR projects)
I tried this fix : https://github.com/n5ro/aframe-extras/pull/358 and can't have a navmesh with aframe 1.2.0 too. and with aframe 1.1.0 work only on safari and firefox, not on Chrome. Thanks
I looks like this issue was maybe fixed in src but never made it into dist?
Fix navmeshes
The castle example is working for me on latest build, see #388
I see that @vincentfretin is working hard in this repo, first of all, thanks for that! Really appreciate it.
Then: I prepared a Glitch with a navmesh example which is working fine with 1.0.4 and not so fine with 1.3.0. I saw that you created a new master and took the liberty to update the glitch with the current build (135d4a5): https://glitch.com/edit/#!/dk-navmesh-02
Two observations: a) it doesn't really work yet, but one can move a bit. b) the console claims that Three.js was already imported, I wonder why that is?
Thanks for the reproduction case @dirkk0 Your navmesh looks correct when I open it in blender. Indeed "WARNING: Multiple instances of Three.js being imported." is not normal, that may be the issue.
I actually also have "WARNING: Multiple instances of Three.js being imported." on the castle example but it's working correctly there.
yes, I saw that too. Also, if you uncomment the 1.0.4 in the header, the example is working. so I am pretty sure that the meshes are ok. I am comparing the castle example to the glitch now.
got it!!
problem nr1: the arch enemy of Blender users: 'apply all tranforms'

problem nr2:
navmesh doesn't like 'position' or 'scale' anymore, that's also new.
working glitch: https://dk-navmesh-03.glitch.me/
so in a nutshell:
- don't position or scale the navmesh in A-Frame
- apply all transforms in Blender.
Oh good catch for nr1. I'm glad you figured it out. For nr2 it's actually a regression introduced in #358 where the applyMatrix was removed.
Can you please help me reintroducing the applyMatrix. Can you please create a glitch example with your fixed models and add again scale and position, so I can remix it and work on a fix.
Actually I could also work on the castle example. I see that the navmesh is 3 times bigger than the castle glb. There is a scale="3 3 3" on the castle. We should apply a position on both castle and navmesh on this example and reintroduce the applyMatrix, this way we won't reintroduce the regression in the future.
True!
If you still need an example, here it is: https://glitch.com/edit/#!/dk-navmesh-04?path=index.html
Thanks. I fixed it in #390. You can give the build a try in your glitch example.
I did! It's working! Great work, and thanks, Vincent!