-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
specifying extensions #61
Comments
I like it. |
Agreed. Here's an example based on your proposal, which pretends that the names match the WebGL extensions (a separate discussion):
Comments:
|
Actually what I was suggesting was slightly different (and it explains why you think 2. might have been useless). On 1. i.e the array we agree. For 2. I proposed the extension property to hold specific properties for that extension, so in your example extension would be empty, but it is was for texture compression we might get something like
|
OK, I was thinking something along those lines too. For example, for EXT_texture_filter_anisotropic, is this in line with your thinking?
If so, I'll update the spec. |
exactly ! |
CC #59 |
I suggest that |
There's one issue with the current design: we can't assign extension-specific properties to the top-level glTF object. To solve this, we could have "extensions" : ["one", "two"],
"extension" : {
"one" : {
// properties specific to "one"
}
} Or we could change the root-level "extensions" : {
"one" : {
// properties specific to "one"
},
"two" // no explicit properties defined here for "two"
} This makes it slightly harder to validate and for the client since each property is now either a I suggest we make the root-level |
In my understanding, the value of Note: The second example of JSON with "no explicit properties defined here for "two"" is invalid because there is no value. I agree with you to also use Or... as an alternative, to handle the case where an extension has no parameter would be like
no entry for |
Instead of including the "extensions" : {
"one" : {
// properties specific to "one"
},
"two" : {
}
} Especially since many extensions will have properties specified, which makes Given this discussion, are you OK with the top-level |
@pjcozzi would the object at root be just for extensions at the root level, or would it be a special object that sums up all the extensions used in this asset (in which case an array for root would make more sense). |
Both. It would contain all extensions used by the asset, and properties with non-empty objects would be used at the root-level. For example, here two extensions are defined at the root-level and used by other glTF properties (not shown). "extensions" : {
"one" : {
},
"two" : {
}
} Below, "extensions" : {
"one" : {
// properties specific to "one" and apply to the entire asset
},
"two" : {
}
} Alternatively, we could use separate "allExtensions" : ["one", "two"],
"extensions" : {
"one" : {
// properties specific to "one" and apply to the entire asset
}
} Perhaps this is cleaner? |
I like the second proposal with |
Agreed. Schema is updated. 0e7499e |
…sion-link-fixes Fix links to revision histories for Cesium extensions
Strawman proposal:
"extensions": ["extensionNameA","extensionNameB"]
a "extension" property.
Why not using extras for extensions ? because extras are for application specific datas, and extensions expose fonctionalities that enhances existing concepts (compressed textures etc...).
Having 1. is not strictly needed, but would be really convenient for developers. Normally a glTF asset shouldn't be generated with extensions if the target platform does not support them, but still, it is a check that is better done sooner than later.
The text was updated successfully, but these errors were encountered: