Giter VIP home page Giter VIP logo

Comments (7)

pjcozzi avatar pjcozzi commented on August 26, 2024

A bit more details from our discussion:

The COLLADA solution is to introduce a new property, set, to uniquely identify an attribute. Although this keeps the semantic property clean and well defined, it also requires the client-side implementation to carry around two properties to link attributes from primitive to program. It seems more concise and convenient to have unique semantics, e.g,

"TEXCOORD.0"
"TEXCOORD.1",
"TEXCOORD.2"

We can define the semantic string format as "SemanticName[.OptionalUniqueIndex]."

and

We can look at it like this: there is pain either because

  1. We have to manage two properties: semantic and set
  2. We have to parse semantic

For rendering uses cases, (2) is less frequent than (1) so I prefer (2). My renderer doesn't need (2). Also, (2) requires less overall code. (1) is just a one-liner if needed.

from gltf.

fabrobinet avatar fabrobinet commented on August 26, 2024

I asked for advice from web developers. using "." character in JSON is not good practice, same for "-" , only "_" seems safe.
It is technically possible to handle "." but it might appear not right for a JSON SPEC.

from gltf.

tparisi avatar tparisi commented on August 26, 2024

what about "/" or "," , not good?

"_" is ok by me. Are we already using that anywhere in our reserved
identifiers?

Tony

On Thu, Mar 14, 2013 at 5:59 PM, Fabrice Robinet
[email protected]:

I asked for advice from web developers. using "." character in JSON is not
good practice, same for "-" , only "_" seems safe.
It is technically possible to handle "." but it might appear not right for
a JSON SPEC.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-14938621
.

Tony Parisi [email protected]
CTO at Large 415.902.8002
Skype auradeluxe
Follow me on Twitter! http://twitter.com/auradeluxe
Read my blog at http://www.tonyparisi.com/

Read my book! WebGL, Up and Running
http://shop.oreilly.com/product/0636920024729.do
http://www.amazon.com/dp/144932357X

from gltf.

pjcozzi avatar pjcozzi commented on August 26, 2024

I'm OK with "_", but why is "." a bad idea? It is inside a string literal; we should be able to do whatever we want.

from gltf.

fabrobinet avatar fabrobinet commented on August 26, 2024

Yes, but is usually not recommended because they need to access a property like this obj['prop'] and can't do obj.prop in that case, which is what people tend to like more.

To be honest I would really prefer "." I just don't want to upset JS purists here :).

from gltf.

pjcozzi avatar pjcozzi commented on August 26, 2024

Gotcha. This is a non-issue for "semantic" : "name.index"; however, I see that it is an issue for "name.index" : { whatever }.

I'm OK with "_".

from gltf.

fabrobinet avatar fabrobinet commented on August 26, 2024

That is pushed. Closing.

from gltf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.