[x3d-public] glTF files end in .gltf and .glb (binary)

John Carlson yottzumm at gmail.com
Fri Feb 4 14:46:16 PST 2022


Joe, I more interested in language encodings at this point.  I don’t see a
reason to create a DSL when we have perfectly adequate ways of expressing
things like XML in Java, for example.  JSON, while the parser generator is
tacked onto JavaScript and other languages, can be included directly in a
JavaScript program.

Perhaps the ideal language these days is XMLisp?  Idk.

SGML was invented because it was too hard to do in C.

Thanks to Tim Sullivan (iScreen) and Cameron Browne for leading the charge!

Yes, JSON is similar to VRML.   But VRML has been a DSL in the past.  JSON
is applicable to more domains.   I know that people are moving towards WASM
as a delivery mechanism, and I think this trend will continue as a way to
get more languages on the web.   I fully expect someone to build LLVM into
web browsers soon.

I think you may like the way python merges the JSON idea and the VRML idea.
  Check it out!

On Fri, Feb 4, 2022 at 4:19 PM Joseph D Williams <joedwil at earthlink.net>
wrote:

> If encoding an entire scenegraph in .json, then it should have a suffix
> like .x3dj for an x3d file encoded in Json. A precise schema should not be
> a problem just that the x3d json  appears to read more like vrml classic in
> structure the last I saw (container field name precedes the node name)?
>
> Anyway, then a gltf file intended to be used directly as a node or field
> in a node of the scene should be named as an ordinary gltf file.
>
> Again, I don’t see the need a json language binding, like xml or classic
> since I really don’t like the typical formatting for json and a complicated
> scene would look like lots of whitespace.
>
> Sure ,if you know that form it is not that much harder to edit the text,
> just that since we can show that x3d can be encoded in json, just a proof
> that x3d is mostly fine, and that json is mostly very able to encode all or
> parts of x3d nodes and structures, No big deal or great reason to need a
> standard canonical form for encoding x3d in json except to find potential
> problems in  transcoding, which might give a clue if something deep wrong
> in x3d encoding.
>
> Thanks,
>
> Joe
>
>
>
>
>
>
>
> *From: *John Carlson <yottzumm at gmail.com>
> *Sent: *Friday, February 4, 2022 12:29 PM
> *To: *Michalis Kamburelis <michalis.kambi at gmail.com>
> *Cc: *X3D Graphics public mailing list <x3d-public at web3d.org>
> *Subject: *Re: [x3d-public] glTF files end in .gltf and .glb (binary)
>
>
>
> One thing I tried to adopt when developing X3DJSONLD was a “standards
> neutral” approach.   That means it would be applicable for X3D, XSeen,
> glTF, SVG, HTML, etc.  in the spirit of D3.js.   So it isn’t an SAI
> interface.  Someone else should work on that who already has a scenegraph
> built.
>
>
>
> X3D JSON schema is a patch in X3DJSONLD at this point, if the XML/DOM
> output isn’t validated.   I have not heard of XML validation in X3DOM or
> X_ITE.
>
>
>
> I would welcome SVG JSON and HTML JSON standardization at this point.
>
>
>
> John
>
>
>
> On Fri, Feb 4, 2022 at 2:09 PM John Carlson <yottzumm at gmail.com> wrote:
>
> We use .json because we started that way, not for any reasonable reason.
> I agree we should put in effort to change, I think some things like this
> may currently be hard-coded into X3DOM at this point.
>
>
>
> We don’t have any X3D JSON standard at this point, so often we make
> decisions that may require a lot of rework, such as changing property names
> for cross language compatibility, or simple decisions, like changing
> default field values.   Ultimately we’ll settle on a standard, but
> everything is pretty much up in the air, probably because we’re waiting for
> a JSON Schema standard.   Tools are starting to fail behind the drafts of
> the JSON schema standards, for example, there is no Java implementation of
> the 2020-12 draft that I know of.   We thought we had a good Java tool, but
> in hindsight, we probably jumped the gun.
>
>
>
> So the JSON standards world is pretty much a mess.   Good python tools
> that worked extremely quickly were displaced by extremely slow alternatives.
>
>
>
> In hindsight, I wish we were still at draft07.   Lots of good tool support
> in many languages.
>
>
>
> There’s one good thing that I treasure in all of this, and that’s the Ajv
> package.   Please fund if you can!
>
>
>
> I do not know if glTF ASCII is going through the same schema pains we are.
>
>
>
> Also Andreas did some good work in the JSON loading in SAI for X3DOM.  I
> suggest adopting it for the JavaScript and perhaps other language bindings.
>
>
>
> John
>
>
>
> On Fri, Feb 4, 2022 at 12:36 PM Michalis Kamburelis <
> michalis.kambi at gmail.com> wrote:
>
> Indeed, glTF files should have .gltf or .glb extensions. (See
>
> https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#file-extensions-and-media-types
> , """JSON glTF files SHOULD use .gltf extension and model/gltf+json
> Media Type."""")
>
> While .gltf is also valid JSON, using a generic .json extension for
> them feels "unnecessarily generic". It would be like using .xml
> instead of .x3d for models in X3D XML encoding.
>
> That being said, why do you validate with X3D JSON schema all *.json?
> Shouldn't X3D JSON also have a specific extension, not use generic
> .json?
>
> Regards,
> Michalis
>
> pt., 4 lut 2022 o 18:21 John Carlson <yottzumm at gmail.com> napisał(a):
> >
> > I believe glTF files end in .gltf and .glb (binary), not .json.   Please
> confirm and update glTF .json files found in archives.  See files below in
> X3dForAdvanceModeling.   They do no pass X3D JSON schema.
> >
> > Thanks, John
> >
> > $ grep file: results.txt |grep -i /gltf|sort -u
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTest.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AntiqueCamera.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AttenuationTest.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/DamagedHelmet.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/DragonAttenuation.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/GlamVelvetSofa.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/Lantern.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/Suzanne.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/ToyCar.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/TransmissionTest.json
> >  file: C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/WaterBottle.json
> > _______________________________________________
> > 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/20220204/cb74cf8e/attachment.html>


More information about the x3d-public mailing list