[x3d-public] x3d document structure for autocomplete
Andreas Plesch
andreasplesch at gmail.com
Tue May 2 10:57:17 PDT 2023
The editor which is used for
https://andreasplesch.github.io/Library/Viewer/index.html
has autocomplete functionality for xml. It is based on a json data
structure as a source to suggest completions. The json data looks like
this:
x3d_tags = {
X3D: {
children: ["Scene"]
},
Transform: {
attrs: {
rotation: ["0 1 0 0"],
scale: ["1 1 1"],
translation: ["0 0 0 0"]
}
},
Shape: {
children: ["Appearance", "IndexedLineSet", "Box",
"Extrusion"],
},
Appearance: {
children: ["Material", "ImageTexture", "PixelTexture"],
},
Material: {
attrs: {
"diffuseColor": ["0.8 0.8 0.8"],
"emissiveColor": ["0 0 0"],
"specularColor": ["0.1 0.1 0.1"],
"shininess": ["0.1"],
"transparency": ["0"]
}
}
};
Hopefully, this will not be mangled too badly. Possible tags are
listed as keys which then have possible attribute options and children
tag options as values.
What would be the closest x3d document structure definition to
construct a complete autocomplete from ?
Thanks, Andreas
--
Andreas Plesch
Waltham, MA 02453
More information about the x3d-public
mailing list