diff --git a/build/schemas/box.json b/build/schemas/box.json index 7142491c3..67b3e64b2 100644 --- a/build/schemas/box.json +++ b/build/schemas/box.json @@ -51,6 +51,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -96,4 +99,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/circle.json b/build/schemas/circle.json index 5f4216574..6f85bfbef 100644 --- a/build/schemas/circle.json +++ b/build/schemas/circle.json @@ -41,6 +41,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -82,4 +85,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/cone.json b/build/schemas/cone.json index a8b409cac..3903a912a 100644 --- a/build/schemas/cone.json +++ b/build/schemas/cone.json @@ -61,6 +61,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -104,4 +107,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/cube.json b/build/schemas/cube.json index 8d8776a90..f77d6394a 100644 --- a/build/schemas/cube.json +++ b/build/schemas/cube.json @@ -51,6 +51,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -77,4 +80,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/cylinder.json b/build/schemas/cylinder.json index b73d15216..1e94f50f6 100644 --- a/build/schemas/cylinder.json +++ b/build/schemas/cylinder.json @@ -56,6 +56,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -99,4 +102,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/definitions-common.json b/build/schemas/definitions-common.json index d56246558..6486067da 100644 --- a/build/schemas/definitions-common.json +++ b/build/schemas/definitions-common.json @@ -305,7 +305,7 @@ "landmark":{ "title":"Landmark", "type":"object", - "description":"Define entities as a landmark; Landmarks appears in the landmark list and you can move (teleport) to them; You can define the behavior of the teleport: if you will be at a fixed or random distance, looking at the landmark, fixed offset or if it is contrained by a navmesh (when it exists)", + "description":"Define entities as a landmark; Landmarks appears in the landmark list and you can move (teleport) to them; You can define the behavior of the teleport: if you will be at a fixed or random distance, looking at the landmark, fixed offset or if it is constrained by a navmesh (when it exists)", "properties":{ "randomRadiusMin":{ "default":0, @@ -420,87 +420,6 @@ "title":"Material extras", "type":"object" }, - "parent":{ - "description":"Parent's object_id. Child objects inherit attributes of their parent, for example scale and translation.", - "title":"Parent", - "type":"string" - }, - "position":{ - "description":"3D object position", - "properties":{ - "x":{ - "type":"number" - }, - "y":{ - "type":"number" - }, - "z":{ - "type":"number" - } - }, - "required":[ - "x", - "y", - "z" - ], - "type":"object", - "title":"Position" - }, - "rotation":{ - "description":"3D object rotation in degrees by default; Right-handed coordinate system. Switches to quaternion representation if 'w' is given", - "properties":{ - "w":{ - "default":1, - "type":"number" - }, - "x":{ - "default":0, - "type":"number" - }, - "y":{ - "default":0, - "type":"number" - }, - "z":{ - "default":0, - "type":"number" - } - }, - "required":[ - "x", - "y", - "z" - ], - "type":"object", - "title":"Rotation" - }, - "scale":{ - "default":{ - "x":1, - "y":1, - "z":1 - }, - "description":"3D object scale", - "id":"scale", - "properties":{ - "x":{ - "type":"number" - }, - "y":{ - "type":"number" - }, - "z":{ - "type":"number" - } - }, - "required":[ - "x", - "y", - "z" - ], - "type":"object", - "title":"Scale" - }, "shadow":{ "title":"Shadow", "type":"object", diff --git a/build/schemas/definitions-entity.json b/build/schemas/definitions-entity.json new file mode 100644 index 000000000..a0c37b0fa --- /dev/null +++ b/build/schemas/definitions-entity.json @@ -0,0 +1,90 @@ +{ + "properties":{ + "parent":{ + "description":"Parent's object_id. Child objects inherit attributes of their parent, for example scale and translation.", + "title":"Parent", + "type":"string" + }, + "position":{ + "description":"3D object position", + "properties":{ + "x":{ + "type":"number" + }, + "y":{ + "type":"number" + }, + "z":{ + "type":"number" + } + }, + "required":[ + "x", + "y", + "z" + ], + "type":"object", + "title":"Position" + }, + "rotation":{ + "description":"3D object rotation in degrees by default; Right-handed coordinate system. Switches to quaternion representation if 'w' is given", + "properties":{ + "w":{ + "default":1, + "type":"number" + }, + "x":{ + "default":0, + "type":"number" + }, + "y":{ + "default":0, + "type":"number" + }, + "z":{ + "default":0, + "type":"number" + } + }, + "required":[ + "x", + "y", + "z" + ], + "type":"object", + "title":"Rotation" + }, + "scale":{ + "default":{ + "x":1, + "y":1, + "z":1 + }, + "description":"3D object scale", + "id":"scale", + "properties":{ + "x":{ + "type":"number" + }, + "y":{ + "type":"number" + }, + "z":{ + "type":"number" + } + }, + "required":[ + "x", + "y", + "z" + ], + "type":"object", + "title":"Scale" + } + }, + "required": [ + "object_type", + "position", + "rotation" + ] +} diff --git a/build/schemas/definitions-geometries.json b/build/schemas/definitions-geometries.json deleted file mode 100644 index a7ebbabde..000000000 --- a/build/schemas/definitions-geometries.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "properties": { - "buffer": { - "default": "true", - "description": "Transform geometry into a BufferGeometry to reduce memory usage at the cost of being harder to manipulate (geometries only: box, circle, cone, ...).", - "title": "Buffer", - "type": "boolean" - }, - "material": { - "description": "The material properties of the object’s surface. \n\nMore properties at https://aframe.io/docs/1.3.0/components/material.html", - "properties": { - "alphaTest": { - "default": 0, - "description": "Alpha test threshold for transparency.", - "type": "number" - }, - "blending": { - "default": "normal", - "description": "The blending mode for the material’s RGB and Alpha sent to the WebGLRenderer. Can be one of none, normal, additive, subtractive or multiply", - "enum": [ - "none", - "normal", - "additive", - "subtractive", - "multiply" - ], - "type": "string" - }, - "color": { - "default": "#7f7f7f", - "description": "Base diffuse color.", - "format": "color", - "title": "color", - "type": "string" - }, - "colorWrite": { - "description": "Color write", - "type": "boolean" - }, - "depthTest": { - "default": true, - "description": "Whether depth testing is enabled when rendering the material.", - "type": "boolean" - }, - "dithering": { - "default": true, - "description": "Whether material is dithered with noise. Removes banding from gradients like ones produced by lighting.", - "type": "boolean" - }, - "flatShading": { - "default": false, - "description": "Use THREE.FlatShading rather than THREE.StandardShading.", - "type": "boolean" - }, - "npot": { - "default": false, - "description": "Use settings for non-power-of-two (NPOT) texture.", - "type": "boolean" - }, - "offset": { - "default": { - "x": 1, - "y": 1 - }, - "description": "Texture offset to be used.", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - }, - "required": [ - "x", - "y" - ], - "type": "object" - }, - "opacity": { - "default": 1, - "description": "Extent of transparency. If the transparent property is not true, then the material will remain opaque and opacity will only affect color.", - "type": "number" - }, - "render-order": { - "default": "0", - "description": "The render-order system takes a comma-delimited list of strings that name the render order layers. The render order layers will map to a number starting from 0 and counting up from there.", - "type": "string" - }, - "repeat": { - "default": { - "x": 1, - "y": 1 - }, - "description": "Texture repeat to be used.", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - }, - "required": [ - "x", - "y" - ], - "type": "object" - }, - "shader": { - "default": "standard", - "description": "Which material to use. Defaults to the standard material. Can be set to the flat material or to a registered custom shader material.", - "type": "string" - }, - "side": { - "default": "front", - "description": "Which sides of the mesh to render. Can be one of front, back, or double.", - "enum": [ - "front", - "back", - "double" - ], - "type": "string" - }, - "src": { - "description": "URI, relative or full path of an image/video file. e.g. 'store/users/wiselab/images/360falls.mp4'", - "format": "uri", - "type": "string" - }, - "transparent": { - "default": false, - "description": "Whether material is transparent. Transparent entities are rendered after non-transparent entities.", - "type": "boolean" - }, - "vertexColors": { - "default": "none", - "description": "Whether to use vertex or face colors to shade the material. Can be one of none, vertex, or face.", - "enum": [ - "none", - "vertex", - "face" - ], - "type": "string" - }, - "visible": { - "default": true, - "description": "Whether material is visible. Raycasters will ignore invisible materials.", - "type": "boolean" - } - }, - "title": "Material", - "type": "object" - }, - "multisrc": { - "description": "Define multiple visual sources applied to an object.", - "properties": { - "srcs": { - "description": "A comma-delimited list if URIs, e.g. “side1.png, side2.png, side3.png, side4.png, side5.png, side6.png” (required).", - "type": "string" - }, - "srcspath": { - "description": "URI, relative or full path of a directory containing srcs, e.g. “store/users/wiselab/images/dice/” (required).", - "format": "uri", - "type": "string" - } - }, - "required": [ - "srcspath", - "srcs" - ], - "title": "Multi Source", - "type": "object" - }, - "skipCache": { - "default": "true", - "description": "Disable retrieving the shared geometry object from the cache. (geometries only: box, circle, cone, ...).", - "title": "Skip Cache", - "type": "boolean" - } - } - } diff --git a/build/schemas/dodecahedron.json b/build/schemas/dodecahedron.json index 17e9a601b..bec1a3643 100644 --- a/build/schemas/dodecahedron.json +++ b/build/schemas/dodecahedron.json @@ -26,6 +26,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -67,4 +70,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/entity.json b/build/schemas/entity.json index 96e47fa79..6b61233fb 100644 --- a/build/schemas/entity.json +++ b/build/schemas/entity.json @@ -46,6 +46,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" } @@ -69,4 +72,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/gltf-model.json b/build/schemas/gltf-model.json index c2b727367..d6fd509f2 100644 --- a/build/schemas/gltf-model.json +++ b/build/schemas/gltf-model.json @@ -27,6 +27,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, diff --git a/build/schemas/image.json b/build/schemas/image.json index ed45e4441..4b2c1514e 100644 --- a/build/schemas/image.json +++ b/build/schemas/image.json @@ -27,6 +27,9 @@ "type": "string" } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, diff --git a/build/schemas/light.json b/build/schemas/light.json index 9bd18bec6..2ca5ef151 100644 --- a/build/schemas/light.json +++ b/build/schemas/light.json @@ -217,6 +217,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" } diff --git a/build/schemas/line.json b/build/schemas/line.json index 04a2cffb1..dec6198d7 100644 --- a/build/schemas/line.json +++ b/build/schemas/line.json @@ -79,6 +79,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, diff --git a/build/schemas/octahedron.json b/build/schemas/octahedron.json index eecf0b37e..fd0b2d56b 100644 --- a/build/schemas/octahedron.json +++ b/build/schemas/octahedron.json @@ -26,6 +26,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -67,4 +70,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/pcd-model.json b/build/schemas/pcd-model.json index adaf9ee38..c7b39cb15 100644 --- a/build/schemas/pcd-model.json +++ b/build/schemas/pcd-model.json @@ -40,6 +40,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, diff --git a/build/schemas/plane.json b/build/schemas/plane.json index da669812a..ce4f9ee36 100644 --- a/build/schemas/plane.json +++ b/build/schemas/plane.json @@ -41,6 +41,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -83,4 +86,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/prism.json b/build/schemas/prism.json index 4b047ddf7..c1d1b71f4 100644 --- a/build/schemas/prism.json +++ b/build/schemas/prism.json @@ -36,6 +36,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, diff --git a/build/schemas/ring.json b/build/schemas/ring.json index 1df92d41f..e50b841ae 100644 --- a/build/schemas/ring.json +++ b/build/schemas/ring.json @@ -51,6 +51,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -94,4 +97,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/sphere.json b/build/schemas/sphere.json index 62651f980..74d2a956e 100644 --- a/build/schemas/sphere.json +++ b/build/schemas/sphere.json @@ -56,6 +56,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -96,4 +99,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/tetrahedron.json b/build/schemas/tetrahedron.json index 87bfcb822..c966eb6c9 100644 --- a/build/schemas/tetrahedron.json +++ b/build/schemas/tetrahedron.json @@ -26,6 +26,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -67,4 +70,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/text.json b/build/schemas/text.json index e99b2e919..a093dbc50 100644 --- a/build/schemas/text.json +++ b/build/schemas/text.json @@ -19,8 +19,17 @@ "text" ] }, + "align": { + "default": "left", + "enum": [ + "left", + "center", + "right" + ] + }, "alphaTest": { - "default": 0.5 + "default": 0.5, + "type": "number" }, "anchor": { "default": "center", @@ -39,6 +48,11 @@ "bottom" ] }, + "color": { + "default": "#000000", + "format": "color", + "type": "string" + }, "font": { "type": "string", "default": "roboto", @@ -97,6 +111,7 @@ ] }, "tabSize": { + "type": "number", "default": 4 }, "text": { @@ -135,10 +150,6 @@ "type": "number", "default": 0 }, - "yOffset": { - "type": "number", - "default": 0 - }, "zOffset": { "type": "number", "default": 0.001 @@ -146,10 +157,7 @@ } }, { - "$ref": "./schemas/definitions-common.json#/properties" - }, - { - "$ref": "./schemas/definitions-geometry.json#/properties" + "$ref": "./schemas/definitions-entity.json#/properties" } ], "title": "Text Data", diff --git a/build/schemas/thickline.json b/build/schemas/thickline.json index 800857a37..cafca4ea9 100644 --- a/build/schemas/thickline.json +++ b/build/schemas/thickline.json @@ -19,6 +19,11 @@ "thickline" ] }, + "color": { + "default": "#000000", + "format": "color", + "type": "string" + }, "lineWidth": { "type": "number", "title": "Line width", @@ -33,16 +38,13 @@ "path": { "type": "string", "title": "Line path", - "description": "Comma-seperated list of x y z coordinates of the line vertices", + "description": "Comma-separated list of x y z coordinates of the line vertices", "default": "-2 -1 0, 0 20 0, 10 -1 10" } } }, { - "$ref": "./schemas/definitions-common.json#/properties" - }, - { - "$ref": "./schemas/definitions-geometry.json#/properties" + "$ref": "./schemas/definitions-entity.json#/properties" } ], "title": "Thickline Data", @@ -69,4 +71,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/threejs-scene.json b/build/schemas/threejs-scene.json index dba0e4f42..f5cf37f53 100644 --- a/build/schemas/threejs-scene.json +++ b/build/schemas/threejs-scene.json @@ -27,6 +27,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" } diff --git a/build/schemas/torus.json b/build/schemas/torus.json index c39d4012a..28e5caebf 100644 --- a/build/schemas/torus.json +++ b/build/schemas/torus.json @@ -46,6 +46,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -87,4 +90,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/torusKnot.json b/build/schemas/torusKnot.json index e52723b5a..683abee04 100644 --- a/build/schemas/torusKnot.json +++ b/build/schemas/torusKnot.json @@ -51,6 +51,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, @@ -92,4 +95,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/triangle.json b/build/schemas/triangle.json index 7d6691ff5..5305f4b29 100644 --- a/build/schemas/triangle.json +++ b/build/schemas/triangle.json @@ -93,6 +93,9 @@ } } }, + { + "$ref": "./schemas/definitions-entity.json#/properties" + }, { "$ref": "./schemas/definitions-common.json#/properties" }, diff --git a/build/schemas/videosphere.json b/build/schemas/videosphere.json index 5631f468d..b7e4558c8 100644 --- a/build/schemas/videosphere.json +++ b/build/schemas/videosphere.json @@ -55,7 +55,7 @@ } }, { - "$ref": "./schemas/definitions-common.json#/properties" + "$ref": "./schemas/definitions-entity.json#/properties" }, { "$ref": "./schemas/definitions-geometry.json#/properties" @@ -65,7 +65,7 @@ "additionalProperties": true, "default": { "object_type": "videosphere", - "radius": 1, + "radius": 5000, "position": { "x": 0, "y": 0,