Skip to content

Commit 6cafc63

Browse files
committed
Rename scene to content in Binary glTF extension spec
1 parent 885cb10 commit 6cafc63

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

extensions/Khronos/KHR_binary_glTF/README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ In Binary glTF, a glTF asset (JSON, .bin, images, and shaders) can be stored in
3030
This binary blob (which can be a file, for example) is divided into three subsequent parts:
3131

3232
* A 20-byte preamble, entitled the `header`
33-
* The structured glTF scene description, entitled the `scene`
33+
* The structured glTF content, entitled the `content`
3434
* The binary `body`
3535

36-
The `scene` part can refer to external resources as usual, and can also reference resources stored within the binary `body`.
36+
The `content` part can refer to external resources as usual, and can also reference resources stored within the binary `body`.
3737

3838
## Binary glTF Layout
3939

@@ -53,11 +53,11 @@ The 20-byte header consists of the following five 4-byte entries:
5353

5454
* `version` is an `uint32` that indicates the version of the Binary glTF container format. Currently available versions are shown in Table 1.
5555

56-
* `length` is the total length of the Binary glTF, including `header`, `scene`, and `body`, in bytes.
56+
* `length` is the total length of the Binary glTF, including `header`, `content`, and `body`, in bytes.
5757

58-
* `sceneLength` is the length, in bytes, of the glTF `scene`. It must be greater than zero.
58+
* `contentLength` is the length, in bytes, of the glTF `content`. It must be greater than zero.
5959

60-
* `sceneFormat` specifies the format of the glTF `scene`. A list of all valid values currently available is in Table 2.
60+
* `contentFormat` specifies the format of the glTF `content`. A list of all valid values currently available is in Table 2.
6161

6262
**Table 1**: Valid values for `version`
6363

@@ -66,22 +66,22 @@ The 20-byte header consists of the following five 4-byte entries:
6666
| 1 | 0x00000001 | Version 1 |
6767

6868

69-
**Table 2**: Valid values for `sceneFormat`
69+
**Table 2**: Valid values for `contentFormat`
7070

7171
| Decimal | Hex | Description |
7272
|--------:|-----------:|------------:|
7373
| 0 | 0x00000000 | JSON |
7474

7575

76-
### Scene
76+
### Content
7777

78-
The `scene` part holds the structured glTF scene description, as it would be provided within a .gltf file in glTF without this extension.
79-
In a JavaScript implementation, the `TextDecoder` API can be used to extract the glTF scene from the arraybuffer, and then the JSON can be parsed with `JSON.parse` as usual.
78+
The `content` part holds the structured glTF content description, as it would be provided within a .gltf file in glTF without this extension.
79+
In a JavaScript implementation, the `TextDecoder` API can be used to extract the glTF content from the arraybuffer, and then the JSON can be parsed with `JSON.parse` as usual.
8080

81-
By reading the `scene` first, an implementation is able to progressively retrieve resources from the binary body.
81+
By reading the `content` first, an implementation is able to progressively retrieve resources from the binary body.
8282
This way, it is also possible to read only a selected subset of resources from a Binary glTF asset (for instance, the coarsest LOD of a mesh).
8383

84-
Elements of the `scene` can refer to binary data within the `body`, using a special buffer with an id equal to `"binary_glTF"`.
84+
Elements of the `content` can refer to binary data within the `body`, using a special buffer with an id equal to `"binary_glTF"`.
8585
For more details, see [glTF Schema Updates](#gltf-schema-updates) below.
8686

8787
Binary glTF still supports external resources.
@@ -93,7 +93,7 @@ An advantage of Binary glTF over glTF is that resources can be embedded without
9393

9494
The binary `body` is the binary payload for geometry, animation key frames, skins, images, and shaders.
9595

96-
The start of `body` is 4-byte aligned to ease its use with JavaScript Typed Arrays. This implies that trailing spaces may be added to the JSON in the `scene` part such that `(20 + sceneLength)` is divisible by `4`.
96+
The start of `body` is 4-byte aligned to ease its use with JavaScript Typed Arrays. This implies that trailing spaces may be added to the JSON in the `content` part such that `(20 + contentLength)` is divisible by `4`.
9797

9898
The buffer with id equal to `"binary_glTF"` is used to address the content of the binary `body`.
9999
An offset of zero addresses the first byte of the binary `body`.
Binary file not shown.
Loading

0 commit comments

Comments
 (0)