|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://example.com/product.schema.json", |
| 4 | + "title": "Object Info", |
| 5 | + "type": "object", |
| 6 | + "description": "Description of a game object.", |
| 7 | + "properties": { |
| 8 | + "footprint": { |
| 9 | + "type": "object", |
| 10 | + "description": "A 2D footprint of the object used for path planning and collision avoidance.", |
| 11 | + "properties": { |
| 12 | + "convex_hull": { |
| 13 | + "type": "array", |
| 14 | + "description": "A convex polygon fully containing the object.", |
| 15 | + "items": { |
| 16 | + "type": "array", |
| 17 | + "description": "2D coordinates in the object space.", |
| 18 | + "items": { |
| 19 | + "type": "number" |
| 20 | + }, |
| 21 | + "minItems": 2, |
| 22 | + "maxItems": 2 |
| 23 | + }, |
| 24 | + "minItems": 3 |
| 25 | + } |
| 26 | + }, |
| 27 | + "required": [ |
| 28 | + "convex_hull" |
| 29 | + ] |
| 30 | + }, |
| 31 | + "shape": { |
| 32 | + "type": "object", |
| 33 | + "description": "A tri-mesh collider of the object. The object 3D model is fully contained inside the buffer. Due to performance reasons, the number of triangles should be very small.", |
| 34 | + "properties": { |
| 35 | + "vertices": { |
| 36 | + "type": "array", |
| 37 | + "description": "Array of unique vertices of the tri-mesh.", |
| 38 | + "items": { |
| 39 | + "type": "array", |
| 40 | + "description": "A 3D point in object space.", |
| 41 | + "items": { |
| 42 | + "type": "number" |
| 43 | + }, |
| 44 | + "minItems": 3, |
| 45 | + "maxItems": 3 |
| 46 | + }, |
| 47 | + "minItems": 4, |
| 48 | + "uniqueItems": true |
| 49 | + }, |
| 50 | + "indices": { |
| 51 | + "type": "array", |
| 52 | + "description": "Triangle vertex triplets. Each triplets is counter clockwise.", |
| 53 | + "items": { |
| 54 | + "type": "array", |
| 55 | + "description": "An index of `vertices` array.", |
| 56 | + "items": { |
| 57 | + "type": "integer" |
| 58 | + }, |
| 59 | + "minItems": 3, |
| 60 | + "maxItems": 3, |
| 61 | + "minimum": 0 |
| 62 | + }, |
| 63 | + "minItems": 4 |
| 64 | + } |
| 65 | + }, |
| 66 | + "required": [ |
| 67 | + "vertices", |
| 68 | + "indices" |
| 69 | + ] |
| 70 | + }, |
| 71 | + "cannon": { |
| 72 | + "type": "object", |
| 73 | + "description": "Properties of a laser cannon.", |
| 74 | + "properties": { |
| 75 | + "muzzle": { |
| 76 | + "type": "array", |
| 77 | + "description": "3D coordinates of the cannon muzzle in object space.", |
| 78 | + "items": { |
| 79 | + "type": "number" |
| 80 | + }, |
| 81 | + "minItems": 3, |
| 82 | + "maxItems": 3 |
| 83 | + }, |
| 84 | + "range": { |
| 85 | + "type": "number", |
| 86 | + "description": "Maximum firing distance of the cannon.", |
| 87 | + "exclusiveMinimum": 0 |
| 88 | + }, |
| 89 | + "damage": { |
| 90 | + "type": "number", |
| 91 | + "description": "Enemy damage when hit by the gun.", |
| 92 | + "exclusiveMinimum": 0 |
| 93 | + }, |
| 94 | + "recharge_interval": { |
| 95 | + "type": "number", |
| 96 | + "description": "Minimum time between two gun shots.", |
| 97 | + "exclusiveMinimum": 0 |
| 98 | + } |
| 99 | + }, |
| 100 | + "required": [ |
| 101 | + "muzzle", |
| 102 | + "range", |
| 103 | + "damage", |
| 104 | + "recharge_interval" |
| 105 | + ] |
| 106 | + } |
| 107 | + }, |
| 108 | + "required": [ |
| 109 | + "footprint", |
| 110 | + "shape" |
| 111 | + ] |
| 112 | +} |
0 commit comments