Skip to content
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

glTF 2.0 buffer: does it need a type? #786

Closed
xelatihy opened this issue Dec 1, 2016 · 7 comments
Closed

glTF 2.0 buffer: does it need a type? #786

xelatihy opened this issue Dec 1, 2016 · 7 comments

Comments

@xelatihy
Copy link
Contributor

xelatihy commented Dec 1, 2016

The buffer schema for glTF 1.1 in glTF/specification/1.1/schema/buffer.schema.json has an enum with only one possible value for the parameter value. Since only one value is possible, is this useful?

@javagl
Copy link
Contributor

javagl commented Dec 1, 2016

Some history behind this: #629

Roughly: It once was allowed to also have the type "text", but this is no longer supported. The property itself might only be kept for backward compatibility (to cope with "additionalProperties" : false), but maybe there will still be other buffer types in the future.

@lexaknyazev
Copy link
Member

That field is meant to be linked with XHR's responseType (more info on WHATWG and MDN):

var oReq = new XMLHttpRequest();
oReq.open("GET", "buffer.bin", true);
oReq.responseType = "arraybuffer"; // <-- buffer.type

oReq.onload = function (oEvent) {
  var arrayBuffer = oReq.response;
    // ...
};

oReq.send(null);

"text" value existed for possible ASCII-based encoding of buffer data (with browser-provided gzip compression), however we don't have one in the core spec yet.

@pjcozzi what do you think of removing buffer.type completely?

@pjcozzi
Copy link
Member

pjcozzi commented Dec 6, 2016

@xelatihy good eye, thanks.

@lexaknyazev +1 from me.

@pjcozzi
Copy link
Member

pjcozzi commented Dec 16, 2016

@lexaknyazev I am in support of this? Is this spec updated so we can label this resolved?

@lexaknyazev
Copy link
Member

Spec and README.md updated.

@pjcozzi
Copy link
Member

pjcozzi commented Dec 18, 2016

Great, thanks!

@pjcozzi pjcozzi changed the title glTF 1.1 buffer: does it need a type? glTF 2.0 buffer: does it need a type? Jun 15, 2017
@pjcozzi
Copy link
Member

pjcozzi commented Jun 15, 2017

Updated in #826

@pjcozzi pjcozzi closed this as completed Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants