create3000 / x_ite

X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.
https://create3000.github.io/x_ite/
Other
66 stars 13 forks source link

LOD level_changed VRML conflict #11

Closed andreasplesch closed 6 years ago

andreasplesch commented 6 years ago

https://x3d-lodlevel-test.glitch.me/x_ite.html

tests the LOD level_changed event by routing its value to a Switch node. Text should be displayed when the LOD level changes but it is not.

https://glitch.com/edit/#!/x3d-lodlevel-test?path=LODwithDifferentShapes.x3d

works in other X3D browsers.

I only checked if the level_changed field is actually implemented in x_ite, and it is. Not sure where to go from there.

andreasplesch commented 6 years ago

There is console message:

XML Parser Error: Bad ROUTE specification: ROUTE types MFNode and SFInt32 do not match.

So x_ite seems to think level_changed is a MFNode field which is strange.

andreasplesch commented 6 years ago

I suspect

https://github.com/create3000/x_ite/blob/40e8ff5b6dd7b1a548125261b1e445963a5c8e15/src/x_ite/Components/Navigation/LOD.js#L84

causes level_changed to refer to the MFNode children field. Perhaps vrml2 did not have the level_changed field ?

andreasplesch commented 6 years ago

http://gun.teipir.gr/VRML-amgem/spec/part1/nodesRef.html#LOD

yes, vrml2 did not have the same level_changed field.

Perhaps special case during parsing of vrml to convert 'level' to children ?

andreasplesch commented 6 years ago

Or only add alias if the encoding is vrml.

andreasplesch commented 6 years ago

fixed in https://github.com/create3000/x_ite/commit/09f6f52b2423cd21e71f10638b710e7551d7ddc2