Files
minecraft-bedrock-json-schemas/source/resource/textures/aseprite_flipbook.json
Piotr Brzozowski c76affe4ba Add aseprite flipbook schema (#197)
* Add aseprite flipbook schema

* Probably hash is unneeded

* Add new UI texture definition file to compress_specification.json
2023-12-14 14:42:38 +01:00

72 lines
2.1 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.resource.texture.aseprite_flipbook",
"additionalProperties": false,
"description": "The file that specifies Aseprite/libresprite flipbook animation.",
"title": "Aseprite Flipbook File",
"type": "object",
"properties": {
"meta": {
"type": "object",
"description": "The meta data of the flipbook.",
"additionalProperties": true,
"properties": {
"size": {
"type": "object",
"description": "The size of the flipbook sprite sheet.",
"properties": {
"w": {
"description": "The width of the sprite sheet.",
"type": "integer"
},
"h": {
"description": "The height of the sprite sheet.",
"type": "integer"
}
},
"required": ["w", "h"]
},
"image": {
"description": "The path to the sprite sheet. The value is required, but not used.",
"type": "string"
}
},
"required": ["size", "image"]
},
"frames": {
"type": "array",
"description": "The frames of the flipbook.",
"items": {
"type": "object",
"additionalProperties": true,
"properties": {
"duration": {
"description": "The duration of the frame in milliseconds.",
"type": "integer",
"minimum": 1
},
"frame": {
"type": "object",
"description": "The position of the frame in the sprite sheet (UV).",
"properties": {
"x": {
"type": "integer",
"description": "The x position of the frame in the sprite sheet.",
"minimum": 0
},
"y": {
"type": "integer",
"description": "The y position of the frame in the sprite sheet.",
"minimum": 0
}
},
"required": ["x", "y"]
}
},
"required": ["duration", "frame"]
}
}
},
"required": ["meta", "frames"]
}