Closed Sgeo closed 4 years ago
At least one VRML world exists that expects this to be possible
How was this VRML file generated? Maybe the exporter is buggy?
BTW: It seems the "no dash" variant can't also be loaded because the asset uses .
(0x2e
) in identifiers which is also not valid according to http://gun.teipir.gr/VRML-amgem/spec/part1/concepts.html#SyntaxBasics.
As data point: at least Vrmlpad, BSContact, and the 3dsmax exporters accept identifiers with dashes, and we've been using dashes in identifiers in our own projects for years as well.
I guess this format is like obj. In that the community ignored the spec. Oh well..
To problem is that when allow -
and .
, it won't take long and other users will ask for +
or \
. Eventually, we come to a point where no one can say what definitions in context of VRML are supposed to be correct or not.
I think it's better to strictly implement a specific standard (the one linked in the loader's source) and stick to it. If users are not able to load their assets because of syntax issues, I suggest they pre-process their files by for example rename/sanitize identifiers.
http://gun.teipir.gr/VRML-amgem/spec/part1/grammar.html says the same thing as the other source I linked regarding -
.
I don't know why the spec seems to be contradicting itself.
Closing. Files using the mentioned characters in IDs needs to be pre-processed on app level.
Description of the problem
VRMLLoader should support identifiers with "-" (0x2D) in them.
http://x-3-x.net/vrml/archive/annotatedVRML2/APPA.HTM#Nodes states that the second and further characters of an identifier, such as that used after DEF or USE, can contain 0x2D. This does contradict the document mentioned in the comment http://gun.teipir.gr/VRML-amgem/spec/part1/concepts.html#SyntaxBasics .
At least one VRML world exists that expects this to be possible: https://sgeo.github.io/threejsvrmltest/
Three.js version
Browser
OS