[x3d-public] x3d document structure for autocomplete

John Carlson yottzumm at gmail.com
Tue May 2 11:27:16 PDT 2023


It’s not JSON.  Property names in JSON have double quotes.

My advice is to generate the JavaScript from X3DUOM.  Examples are in
X3DJSONLD/src/main/python.

I realize this is using way too many languages.  Please provide a
JavaScript generator instead of Python.

It kind of looks like you’re trying to duplicate JSON Schema.  I believe
there are additional parts beyond JSON Schema core for creating GUIs.

Let’s continue the discussion.

John

On Tue, May 2, 2023 at 12:56 PM Andreas Plesch <andreasplesch at gmail.com>
wrote:

> 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
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230502/41e30616/attachment.html>


More information about the x3d-public mailing list