Skip to content

Commit eb7b1fc

Browse files
committed
Add thumbnail property to asset header
1 parent 35d01ed commit eb7b1fc

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

specification/parts/asset.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ At a minimum, the G4MF JSON data MUST contain `"asset"` with `"dimension"` defin
2525
| **extensionsUsed** | `string[]` | An array of extensions used in the file. | `[]` No used extensions. |
2626
| **extensionDependencies** | `object` | An object mapping extensions to arrays of extensions that they depend on. | `{}` No dependencies. |
2727
| **generator** | `string` | The name of the application that generated the file. | `""` (empty string) |
28+
| **specification** | `string` | An optional link to the G4MF specification that the file adheres to. | `""` (empty string) |
29+
| **thumbnail** | `integer` | The index of the texture containing the thumbnail image for this file. | No thumbnail. |
2830
| **version** | `string` | The version of the G4MF specification used to generate the file. | `""` (empty string) |
2931

3032
### Dimension
@@ -71,6 +73,12 @@ The `"specification"` property is a string that defines an optional link to the
7173

7274
This property is intended for informational purposes when manually inspecting a file, and SHOULD NOT be used by implementations for any functional purpose. A URI to a website is recommended, such as `"https://github.com/godot-dimensions/g4mf"`, but any string is allowed.
7375

76+
### Thumbnail
77+
78+
The `"thumbnail"` property is an integer that defines the index of the texture containing the thumbnail image(s) for this file. This property is optional, with the default being that there is no thumbnail.
79+
80+
If specified, the texture index MUST point to a valid texture in the file, and that texture MUST be a 2D texture. Multiple images within the texture serve only as fallbacks, with no cutting or layering behavior. Sampling, filtering, and wrapping properties do not apply to the thumbnail and are ignored for purposes of the thumbnail, but MAY be defined if the texture is also used for other purposes.
81+
7482
### Version
7583

7684
The `"version"` property is a string that defines the version of the G4MF specification used to generate the file.

specification/schema/g4mf.asset.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
"description": "An optional link to the G4MF specification that the file adheres to. This is intended for informational purposes when manually inspecting a file, and SHOULD NOT be used by implementations for any functional purpose.",
4545
"default": ""
4646
},
47+
"thumbnail": {
48+
"type": "integer",
49+
"description": "The index of the texture containing the thumbnail image(s) for this file. This MUST be a 2D texture. Sampling, filtering, and wrapping properties do not apply to the thumbnail."
50+
},
4751
"version": {
4852
"type": "string",
4953
"description": "The version of the G4MF file format. This is intended for informational purposes. When defined, it MUST be in the format `MAJOR.MINOR` or `MAJOR.MINOR.PATCH`."

0 commit comments

Comments
 (0)