Comments (7)
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
- We have to manage two properties: semantic and set
- 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.
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.
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.
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.
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.
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.
That is pushed. Closing.
from gltf.
Related Issues (20)
- Is it possible to add axis convention hint in file header ? HOT 1
- Why is the official capitalization glTF instead of GLTF? HOT 3
- MSFT_texture_dds: behaviour for unreachable or incorrect dds files
- Can GLTF model structure be customized with additional properties? HOT 3
- FB_geometry_metadata: Clarify meaning of "primitiveCount"
- Define a way to provide unique identifiers for glTF data (nodes/etc) HOT 72
- `KHR_materials_volume`: clarify that the calculation of the attenuation coefficient uses a natural logarithm
- Converting SpecularGlossiness back to MetallicRoughness HOT 2
- Request for KITTYCAD vendor prefix
- Would you please consider adding makeSEA+Catapult to your list of viewing applications? HOT 1
- How to convert 3d face coordinates into gltf ? HOT 1
- Length unit clarification HOT 2
- Coordinate System and Units HOT 2
- KHR_draco_mesh_compression and triangle strips HOT 1
- how to use this project? HOT 1
- typo in pbr.frag
- Re-using materials on meshes with different attributes HOT 3
- Accessor zero-initialization: Allow default-initialization? HOT 2
- Add ENVOKE vendor prefix
- glTF2 'sparse' object has redundancy in its indices object HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gltf.