diff --git a/build/schemas/arena-schema-files.json b/build/schemas/arena-schema-files.json index e12eb3a0d..6e566445e 100644 --- a/build/schemas/arena-schema-files.json +++ b/build/schemas/arena-schema-files.json @@ -64,6 +64,11 @@ "file":"schemas/line.json", "title":"Line" }, + "ocean":{ + "description":"Ocean", + "file":"schemas/ocean.json", + "title":"Ocean" + }, "octahedron":{ "description":"Octahedron Geometry", "file":"schemas/octahedron.json", diff --git a/build/schemas/capsule.json b/build/schemas/capsule.json index b6695d3a5..433ec9363 100644 --- a/build/schemas/capsule.json +++ b/build/schemas/capsule.json @@ -56,6 +56,7 @@ "default": { "object_type": "capsule", "radius": 1, + "length": 1, "material": { "color": "#7f7f7f" }, diff --git a/build/schemas/cone.json b/build/schemas/cone.json index af4c14c39..668e117ed 100644 --- a/build/schemas/cone.json +++ b/build/schemas/cone.json @@ -75,7 +75,7 @@ "additionalProperties": true, "default": { "object_type": "cone", - "height": 2, + "height": 1, "radiusBottom": 1, "material": { "color": "#7f7f7f" diff --git a/build/schemas/cylinder.json b/build/schemas/cylinder.json index 58aae22d9..f82026892 100644 --- a/build/schemas/cylinder.json +++ b/build/schemas/cylinder.json @@ -70,7 +70,7 @@ "additionalProperties": true, "default": { "object_type": "cylinder", - "height": 2, + "height": 1, "radius": 1, "material": { "color": "#7f7f7f" diff --git a/build/schemas/definitions-common.json b/build/schemas/definitions-common.json index 797569ca8..0408ddbe0 100644 --- a/build/schemas/definitions-common.json +++ b/build/schemas/definitions-common.json @@ -830,8 +830,9 @@ "#FF0000" ], "items": { + "format": "color", "type": "string" - } + } }, "size": { "description": "Describes a particle's size.", @@ -1007,8 +1008,9 @@ "type": "array", "maxItems": 4, "items": { + "format": "color", "type": "string" - } + } }, "colorSpread": { "description": "spread to apply to colors, spread an array of vec3 (r g b) with 0 for no spread. note the spread will be re-applied through-out the lifetime of the particle", diff --git a/build/schemas/ocean.json b/build/schemas/ocean.json new file mode 100644 index 000000000..bf924b854 --- /dev/null +++ b/build/schemas/ocean.json @@ -0,0 +1,107 @@ +{ + "title": "Ocean", + "description": "Flat-shaded ocean primitive.", + "allOf": [ + { + "$ref": "./schemas/definitions-arena-object.json#/properties" + }, + { + "properties": { + "data": { + "allOf": [ + { + "properties": { + "object_type": { + "type": "string", + "title": "3D object type", + "description": "3D object type (derived from 'type' select above).", + "enum": [ + "ocean" + ] + }, + "width": { + "description": "Width of the ocean area.", + "default": 10, + "minValue": 0, + "type": "number" + }, + "depth": { + "description": "Depth of the ocean area.", + "default": 10, + "minValue": 0, + "type": "number" + }, + "density": { + "description": "Density of waves.", + "default": 10, + "type": "number" + }, + "amplitude": { + "description": "Wave amplitude.", + "default": 0.1, + "type": "number" + }, + "amplitudeVariance": { + "description": "Wave amplitude variance.", + "default": 0.3, + "type": "number" + }, + "speed": { + "description": "Wave speed.", + "default": 1, + "type": "number" + }, + "speedVariance": { + "description": "Wave speed variance.", + "default": 2, + "type": "number" + }, + "color": { + "description": "Wave color.", + "default": "#7AD2F7", + "format": "color", + "type": "string" + }, + "opacity": { + "description": "Wave opacity.", + "default": 0.8, + "type": "number" + } + } + }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + } + ], + "title": "Ocean Data", + "additionalProperties": true, + "default": { + "object_type": "ocean", + "width": 10, + "depth": 10, + "color": "#7AD2F7", + "rotation": { + "w": -0.70711, + "x": 0.70711, + "y": 0, + "z": 0 + } + }, + "required": [ + "object_type", + "width", + "depth", + "color" + ] + } + } + } + ], + "required": [ + "object_id", + "action", + "type", + "data", + "persist" + ] +} diff --git a/build/schemas/plane.json b/build/schemas/plane.json index 5e94c2502..ef8414bb7 100644 --- a/build/schemas/plane.json +++ b/build/schemas/plane.json @@ -55,6 +55,8 @@ "additionalProperties": true, "default": { "object_type": "plane", + "width": 1, + "height": 1, "material": { "color": "#7f7f7f" }, @@ -63,7 +65,6 @@ "y": 0, "z": 0 }, - "radius": 1, "rotation": { "w": 1, "x": 0, diff --git a/build/schemas/torus.json b/build/schemas/torus.json index f41c9d178..0c284d833 100644 --- a/build/schemas/torus.json +++ b/build/schemas/torus.json @@ -61,6 +61,7 @@ "default": { "object_type": "torus", "radius": 1, + "radiusTubular": 0.4, "material": { "color": "#7f7f7f" }, diff --git a/build/schemas/torusKnot.json b/build/schemas/torusKnot.json index 653b22777..a916fb789 100644 --- a/build/schemas/torusKnot.json +++ b/build/schemas/torusKnot.json @@ -66,6 +66,7 @@ "default": { "object_type": "torusKnot", "radius": 1, + "radiusTubular": 0.4, "material": { "color": "#7f7f7f" },