From dd30248a86b1d4a1c5e3796ffda35b1b49c944aa Mon Sep 17 00:00:00 2001 From: mwfarb Date: Thu, 31 Mar 2022 15:47:39 -0400 Subject: [PATCH 1/8] add draft of md gen --- build/genmd.py | 70 ++++++++++++++++++++++++++++ build/schemas/arena-program.md | 30 ++++++++++++ build/schemas/arena-scene-options.md | 68 +++++++++++++++++++++++++++ build/schemas/arena-schema-files.md | 2 + build/schemas/box.md | 4 ++ build/schemas/circle.md | 4 ++ build/schemas/cone.md | 4 ++ build/schemas/cube.md | 4 ++ build/schemas/cylinder.md | 4 ++ build/schemas/dodecahedron.md | 4 ++ build/schemas/entity.md | 4 ++ build/schemas/gltf-model.md | 4 ++ build/schemas/image.md | 4 ++ build/schemas/light.md | 4 ++ build/schemas/line.md | 4 ++ build/schemas/octahedron.md | 4 ++ build/schemas/pcd-model.md | 4 ++ build/schemas/plane.md | 4 ++ build/schemas/ring.md | 4 ++ build/schemas/sphere.md | 4 ++ build/schemas/tetrahedron.md | 4 ++ build/schemas/text.md | 4 ++ build/schemas/thickline.md | 4 ++ build/schemas/threejs-scene.md | 4 ++ build/schemas/torus.md | 4 ++ build/schemas/torusKnot.md | 4 ++ build/schemas/triangle.md | 4 ++ 27 files changed, 262 insertions(+) create mode 100644 build/genmd.py create mode 100644 build/schemas/arena-program.md create mode 100644 build/schemas/arena-scene-options.md create mode 100644 build/schemas/arena-schema-files.md create mode 100644 build/schemas/box.md create mode 100644 build/schemas/circle.md create mode 100644 build/schemas/cone.md create mode 100644 build/schemas/cube.md create mode 100644 build/schemas/cylinder.md create mode 100644 build/schemas/dodecahedron.md create mode 100644 build/schemas/entity.md create mode 100644 build/schemas/gltf-model.md create mode 100644 build/schemas/image.md create mode 100644 build/schemas/light.md create mode 100644 build/schemas/line.md create mode 100644 build/schemas/octahedron.md create mode 100644 build/schemas/pcd-model.md create mode 100644 build/schemas/plane.md create mode 100644 build/schemas/ring.md create mode 100644 build/schemas/sphere.md create mode 100644 build/schemas/tetrahedron.md create mode 100644 build/schemas/text.md create mode 100644 build/schemas/thickline.md create mode 100644 build/schemas/threejs-scene.md create mode 100644 build/schemas/torus.md create mode 100644 build/schemas/torusKnot.md create mode 100644 build/schemas/triangle.md diff --git a/build/genmd.py b/build/genmd.py new file mode 100644 index 000000000..5fcc7e7b2 --- /dev/null +++ b/build/genmd.py @@ -0,0 +1,70 @@ +import json +import jsonschema2md + +parser = jsonschema2md.Parser( + examples_as_yaml=False, + show_examples="all", +) + +with open("./schemas/arena-schema-files.json", "r") as json_file_all: + files = json.load(json_file_all) +idx = 0 +for file in files: + print(files[file]) + fn = files[file]["file"] + t = files[file]["title"] + + md_lines = '' + md_lines+=('---\n') + md_lines+=(f'title: {t}\n') + md_lines+=(f'nav_order: {idx}\n') + md_lines+=('layout: default\n') + md_lines+=('parent: ARENA Optionsv') + md_lines+=('---\n') + md_lines+=('\n') + + with open(fn, "r") as json_file: + md_lines+=(parser.parse_schema(json.load(json_file))) + out = ''.join(md_lines) + print(out) + f = open(f"{fn[:-5]}.md", "w") + f.write(out) + f.close() + idx+=1 +# "box":{ +# "description":"Box Geometry", +# "file":"schemas/box.json", +# "title":"Box" +# }, + + + +# with open("./examples/food.json", "r") as json_file: +# md_lines = parser.parse_schema(json.load(json_file)) +# print(''.join(md_lines)) + + +# jsonschema2md build/schemas/arena-schema-files.json build/schemas/arena-schema-files.md + +# Usage: jsonschema2md [OPTIONS] + +# Convert JSON Schema to Markdown documentation. + +# Options: +# --version Show the version and exit. +# --examples-as-yaml BOOLEAN Parse examples in YAML-format instead of +# JSON. +# --show-examples [all|properties|object] +# Parse examples for only the main object, +# only properties, or all. +# --help Show this message and exit. + +# where is output directory? + +# read arena-schema-files.json + +# loop through file manifest + +# export each file as .md + +# prepend each file with jekyll preamble diff --git a/build/schemas/arena-program.md b/build/schemas/arena-program.md new file mode 100644 index 000000000..03b488a12 --- /dev/null +++ b/build/schemas/arena-program.md @@ -0,0 +1,30 @@ +---title: Programnav_order: 14layout: defaultparent: ARENA Options---# Program + +## Properties + +- **`object_id`** *(string)*: Object identifier; Must be a valid UUID. +- **`action`** *(string)*: One of 3 basic Create/Update/Delete actions or a special client event action (e.g. a click). Must be one of: `['create', 'delete', 'update', 'clientEvent']`. Default: `create`. +- **`persist`** *(boolean)*: Persist this object in the database. Default: `true`. +- **`type`** *(string)*: Must be one of: `['program']`. +- **`data`**: Object data payload; Program config data. Refer to *#/definitions/program*. +## Definitions + +- **`program`** *(object)* + - **`name`** *(string)*: Name of the program in the format namespace/program-name. + - **`affinity`** *(string)*: Indicates the module affinity (client=client's runtime; none or empty=any suitable/available runtime). Must be one of: `['client', 'none']`. Default: `client`. + - **`instantiate`** *(string)*: Single instance of the program (=single), or let every client create a program instance (=client). Per client instance will create new uuid for each program. Must be one of: `['single', 'client']`. Default: `client`. + - **`filename`** *(string)*: Filename of the entry binary. + - **`filetype`** *(string)*: Type of the program (WA=WASM or PY=Python). Must be one of: `['WA', 'PY']`. Default: `['WA']`. + - **`args`** *(array)*: Command-line arguments (passed in argv). Supports variables: ${scene}, ${mqtth}, ${cameraid}, ${username}, ${runtimeid}, ${moduleid}, ${query-string-key}. + - **Items** *(string)* + - **`env`** *(array)*: Environment variables. Supports variables: ${scene}, ${namespace}, ${mqtth}, ${cameraid}, ${username}, ${runtimeid}, ${moduleid}, ${query-string-key}. Default: `['MID=${moduleid}', 'SCENE=${scene}', 'NAMESPACE=${namespace}', 'MQTTH=${mqtth}', 'REALM=realm']`. + - **Items** *(string)* + - **`channels`** *(array)*: Channels describe files representing access to IO from pubsub and client sockets (possibly more in the future; currently only supported for WASM programs). Default: `[{'path': '/ch/${scene}', 'type': 'pubsub', 'mode': 'rw', 'params': {'topic': 'realm/s/${scene}'}}]`. + - **Items** *(object)* + - **`path`** *(string)*: Folder visible by the program. + - **`type`** *(string)*: Pubsub or client socket. Must be one of: `['pubsub', 'client']`. Default: `pubsub`. + - **`mode`** *(string)*: Access mode. Must be one of: `['r', 'w', 'rw']`. + - **`params`** *(object)*: Type (i.e. pubsub/client)-specific parameters. + - **`topic`** *(string)*: Pubsub topic (pubsub). + - **`host`** *(string)*: Destination host address (client socket; ignored for now). + - **`port`** *(number)*: Destination port (client socket; ignored for now). diff --git a/build/schemas/arena-scene-options.md b/build/schemas/arena-scene-options.md new file mode 100644 index 000000000..9a50d0275 --- /dev/null +++ b/build/schemas/arena-scene-options.md @@ -0,0 +1,68 @@ +---title: Scene Optionsnav_order: 16layout: defaultparent: ARENA Options---# Scene Config + +## Properties + +- **`object_id`** *(string)*: A uuid or otherwise unique identifier for this object. Default: `scene-options`. +- **`persist`** *(boolean)*: Persist this object in the database. Default: `true`. +- **`type`** *(string)*: Must be one of: `['scene-options']`. +- **`action`** *(string)*: One of 3 basic Create/Update/Delete actions. Must be one of: `['create', 'delete', 'update']`. Default: `create`. +- **`data`** + - **`env-presets`**: A-Frame Environment presets. Refer to *#/definitions/environment-presets*. + - **`renderer-settings`**: These settings are fed into three.js WebGLRenderer properties. Refer to *#/definitions/renderer-settings*. + - **`scene-options`**: ARENA Scene Options. Refer to *#/definitions/scene-options*. +## Definitions + +- **`environment-presets`** *(object)* + - **`active`** *(boolean)*: Show/hides the environment presets component. Use this instead of using the visible attribute. Default: `True`. + - **`dressing`** *(string)*: Dressing is the term we use here for the set of additional objects that are put on the ground for decoration. Must be one of: `['apparatus', 'arches', 'cubes', 'cylinders', 'hexagons', 'mushrooms', 'none', 'pyramids', 'stones', 'torii', 'towers', 'trees']`. Default: `none`. + - **`dressingAmount`** *(number)*: Number of objects used for dressing. Default: `10`. + - **`dressingColor`** *(string)*: Base color of dressing objects. Default: `#795449`. + - **`dressingOnPlayArea`** *(number)*: Amount of dressing on play area. Default: `0`. + - **`dressingScale`** *(number)*: Height (in meters) of dressing objects. Default: `5`. + - **`dressingUniformScale`** *(boolean)*: If false, a different value is used for each coordinate x, y, z in the random variance of size. Default: `True`. + - **`dressingVariance`**: Maximum x,y,z meters to randomize the size and rotation of each dressing object. Use 0 0 0 for no variation in size nor rotation. Refer to *#/definitions/Vector3*. Default: `{'x': 1, 'y': 1, 'z': 1}`. + - **`flatShading`** *(boolean)*: Whether to show everything smoothed (false) or polygonal (true). Default: `False`. + - **`fog`** *(number)*: Amount of fog (0 = none, 1 = full fog). The color is estimated automatically. Default: `0`. + - **`grid`** *(string)*: 1x1 and 2x2 are rectangular grids of 1 and 2 meters side, respectively. Must be one of: `['1x1', '2x2', 'crosses', 'dots', 'none', 'xlines', 'ylines']`. Default: `none`. + - **`gridColor`** *(string)*: Color of the grid. Default: `#ccc`. + - **`ground`** *(string)*: Orography style. Must be one of: `['canyon', 'flat', 'hills', 'noise', 'none', 'spikes']`. Default: `hills`. + - **`groundColor`** *(string)*: Main color of the ground. Default: `#553e35`. + - **`groundColor2`** *(string)*: Secondary color of the ground. Used for textures, ignored if groundTexture is none. Default: `#694439`. + - **`groundScale`**: Ground dimensions (in meters). Refer to *#/definitions/Vector3*. Default: `{'x': 1, 'y': 1, 'z': 1}`. + - **`groundTexture`** *(string)*: Texture applied to the ground. Must be one of: `['checkerboard', 'none', 'squares', 'walkernoise']`. Default: `none`. + - **`groundYScale`** *(number)*: Maximum height (in meters) of ground's features (hills, mountains, peaks..). Default: `3`. + - **`hideInAR`** *(boolean)*: If true, hide the environment when entering AR. Default: `True`. + - **`horizonColor`** *(string)*: Default: `#ffa500`. + - **`lighting`** *(string)*: A hemisphere light and a key light (directional or point) are added to the scene automatically when using the component. Use none if you don't want this automatic lighting set being added. The color and intensity are estimated automatically. Must be one of: `['distant', 'none', 'point']`. Default: `distant`. + - **`lightPosition`**: Position of the main light. If skyType is atmospheric, only the orientation matters (is a directional light) and it can turn the scene into night when lowered towards the horizon. Refer to *#/definitions/Vector3*. Default: `{'x': 0, 'y': 1, 'z': -0.2}`. + - **`playArea`** *(number)*: Radius of the area in the center reserved for the player and the gameplay. The ground is flat in there and no objects are placed inside. Default: `1`. + - **`preset`** *(string)*: An A-frame preset environment. Must be one of: `['arches', 'checkerboard', 'contact', 'default', 'dream', 'egypt', 'forest', 'goaland', 'goldmine', 'japan', 'none', 'osiris', 'poison', 'starry', 'threetowers', 'tron', 'volcano', 'yavapai']`. Default: `default`. + - **`seed`** *(number)*: Seed for randomization. If you don't like the layout of the elements, try another value for the seed. Default: `1`. + - **`shadow`** *(boolean)*: Shadows on/off. Sky light casts shadows on the ground of all those objects with shadow component applied. Default: `False`. + - **`shadowSize`** *(number)*: Size of the shadow, if applied. Default: `10`. + - **`skyColor`** *(string)*: Default: `#ffa500`. + - **`skyType`** *(string)*: A sky type. Must be one of: `['atmosphere', 'color', 'gradient', 'none']`. Default: `color`. +- **`renderer-settings`** *(object)* + - **`gammaFactor`** *(number)*: Gamma factor (three.js default is 2.0; we use 2.2 as default). Default: `2.2`. + - **`localClippingEnabled`** *(boolean)*: Defines whether the renderer respects object-level clipping planes. Default: `False`. + - **`outputEncoding`** *(string)*: Defines the output encoding of the renderer (three.js default is LinearEncoding; we use sRGBEncoding as default). Must be one of: `['BasicDepthPacking', 'GammaEncoding', 'LinearEncoding', 'LogLuvEncoding', 'RGBADepthPacking', 'RGBDEncoding', 'RGBEEncoding', 'RGBM16Encoding', 'RGBM7Encoding', 'sRGBEncoding']`. Default: `sRGBEncoding`. + - **`physicallyCorrectLights`** *(boolean)*: Whether to use physically correct lighting mode. Default: `False`. + - **`sortObjects`** *(boolean)*: Defines whether the renderer should sort objects. Default: `True`. +- **`scene-options`** *(object)* + - **`clickableOnlyEvents`** *(boolean)*: true = publish only mouse events for objects with click-listeners; false = all objects publish mouse events. Default: `True`. + - **`distanceModel`** *(string)*: Algorithm to use to reduce the volume of the audio source as it moves away from the listener. Must be one of: `['exponential', 'inverse', 'linear']`. Default: `inverse`. + - **`sceneHeadModel`** *(string)*: Define a default model for the scene. You must scale and rotate your source GLTF appropriately. Default: ``. + - **`jitsiHost`** *(string)*: Jitsi host used for this scene. Default: `jitsi0.andrew.cmu.edu:8443`. + - **`maxAVDist`** *(number)*: Maximum distance between cameras/users until audio and video are cut off. For saving bandwidth on scenes with large amounts of user activity at once. Default: `20`. + - **`navMesh`** *(string)*: Navigation Mesh URL. Default: ``. + - **`networkedLocationSolver`** *(boolean)*: ARMarker location solver parameter. By default (networkedLocationSolver=false) clients solve camera location locally when a static marker is detected. When true, publishes marker detections (to realm/g/a/camera-name) and defers all tag solving of client camera to a solver sitting on pubsub. Default: `False`. + - **`privateScene`** *(boolean)*: false = scene will be visible; true = scene will not show in listings. Default: `False`. + - **`refDistance`** *(number)*: Distance at which the volume reduction starts taking effect. Default: `1`. + - **`rolloffFactor`** *(number)*: How quickly the volume is reduced as the source moves away from the listener. Default: `1`. + - **`screenshare`** *(string)*: Name of the 3D object used when sharing desktop. Default: `screenshare`. + - **`disableVideoCulling`** *(boolean)*: If true will disable video frustum culling (video frustum culling stops video from users outside of view). Default: `False`. + - **`volume`** *(number)*: Volume for users in a scene. Default: `1`. +- **`Vector3`** *(object)* + - **`x`** *(number)* + - **`y`** *(number)* + - **`z`** *(number)* diff --git a/build/schemas/arena-schema-files.md b/build/schemas/arena-schema-files.md new file mode 100644 index 000000000..4f98fde1b --- /dev/null +++ b/build/schemas/arena-schema-files.md @@ -0,0 +1,2 @@ +# JSON Schema + diff --git a/build/schemas/box.md b/build/schemas/box.md new file mode 100644 index 000000000..47018f102 --- /dev/null +++ b/build/schemas/box.md @@ -0,0 +1,4 @@ +---title: Boxnav_order: 0layout: defaultparent: ARENA Options---# Box + +*Box Geometry* + diff --git a/build/schemas/circle.md b/build/schemas/circle.md new file mode 100644 index 000000000..9a27faa7a --- /dev/null +++ b/build/schemas/circle.md @@ -0,0 +1,4 @@ +---title: Circlenav_order: 1layout: defaultparent: ARENA Options---# Circle + +*Circle Geometry* + diff --git a/build/schemas/cone.md b/build/schemas/cone.md new file mode 100644 index 000000000..edf8fbec6 --- /dev/null +++ b/build/schemas/cone.md @@ -0,0 +1,4 @@ +---title: Conenav_order: 2layout: defaultparent: ARENA Options---# Cone + +*Cone Geometry* + diff --git a/build/schemas/cube.md b/build/schemas/cube.md new file mode 100644 index 000000000..3866f884e --- /dev/null +++ b/build/schemas/cube.md @@ -0,0 +1,4 @@ +---title: Cube (deprecated; don't use)nav_order: 3layout: defaultparent: ARENA Options---# Cube (deprecated; don't use) + +*Cube (=Box) Geometry; Supported for Legacy reasons; Please use Box in new scenes* + diff --git a/build/schemas/cylinder.md b/build/schemas/cylinder.md new file mode 100644 index 000000000..204b13852 --- /dev/null +++ b/build/schemas/cylinder.md @@ -0,0 +1,4 @@ +---title: Cylindernav_order: 4layout: defaultparent: ARENA Options---# Cylinder + +*cylinder Geometry* + diff --git a/build/schemas/dodecahedron.md b/build/schemas/dodecahedron.md new file mode 100644 index 000000000..1934321a6 --- /dev/null +++ b/build/schemas/dodecahedron.md @@ -0,0 +1,4 @@ +---title: Dodecahedronnav_order: 5layout: defaultparent: ARENA Options---# Dodecahedron + +*dodecahedron Geometry* + diff --git a/build/schemas/entity.md b/build/schemas/entity.md new file mode 100644 index 000000000..79d782d6f --- /dev/null +++ b/build/schemas/entity.md @@ -0,0 +1,4 @@ +---title: Entity (generic object)nav_order: 6layout: defaultparent: ARENA Options---# Entity (generic object) + +*Entities are the base of all objects in the scene. Entities are containers into which components can be attached.* + diff --git a/build/schemas/gltf-model.md b/build/schemas/gltf-model.md new file mode 100644 index 000000000..49f094707 --- /dev/null +++ b/build/schemas/gltf-model.md @@ -0,0 +1,4 @@ +---title: GLTF Modelnav_order: 7layout: defaultparent: ARENA Options---# GLTF Model + +*Load a GLTF model* + diff --git a/build/schemas/image.md b/build/schemas/image.md new file mode 100644 index 000000000..62c70bd75 --- /dev/null +++ b/build/schemas/image.md @@ -0,0 +1,4 @@ +---title: Imagenav_order: 8layout: defaultparent: ARENA Options---# Image + +*Display an image on a plane* + diff --git a/build/schemas/light.md b/build/schemas/light.md new file mode 100644 index 000000000..b32cca995 --- /dev/null +++ b/build/schemas/light.md @@ -0,0 +1,4 @@ +---title: Lightnav_order: 9layout: defaultparent: ARENA Options---# Light + +*A light* + diff --git a/build/schemas/line.md b/build/schemas/line.md new file mode 100644 index 000000000..c526c4ac0 --- /dev/null +++ b/build/schemas/line.md @@ -0,0 +1,4 @@ +---title: Linenav_order: 10layout: defaultparent: ARENA Options---# Line + +*Draw a line* + diff --git a/build/schemas/octahedron.md b/build/schemas/octahedron.md new file mode 100644 index 000000000..311bd9c09 --- /dev/null +++ b/build/schemas/octahedron.md @@ -0,0 +1,4 @@ +---title: Octahedronnav_order: 11layout: defaultparent: ARENA Options---# Octahedron + +*Octahedron Geometry* + diff --git a/build/schemas/pcd-model.md b/build/schemas/pcd-model.md new file mode 100644 index 000000000..6964a8656 --- /dev/null +++ b/build/schemas/pcd-model.md @@ -0,0 +1,4 @@ +---title: PCD Modelnav_order: 12layout: defaultparent: ARENA Options---# PCD Model + +*Load a PCD model* + diff --git a/build/schemas/plane.md b/build/schemas/plane.md new file mode 100644 index 000000000..b52f14f7c --- /dev/null +++ b/build/schemas/plane.md @@ -0,0 +1,4 @@ +---title: Planenav_order: 13layout: defaultparent: ARENA Options---# Plane + +*Plane Geometry* + diff --git a/build/schemas/ring.md b/build/schemas/ring.md new file mode 100644 index 000000000..a76528e82 --- /dev/null +++ b/build/schemas/ring.md @@ -0,0 +1,4 @@ +---title: Ringnav_order: 15layout: defaultparent: ARENA Options---# Ring + +*Ring Geometry* + diff --git a/build/schemas/sphere.md b/build/schemas/sphere.md new file mode 100644 index 000000000..138f0d4c6 --- /dev/null +++ b/build/schemas/sphere.md @@ -0,0 +1,4 @@ +---title: Spherenav_order: 17layout: defaultparent: ARENA Options---# Sphere + +*Sphere Geometry* + diff --git a/build/schemas/tetrahedron.md b/build/schemas/tetrahedron.md new file mode 100644 index 000000000..040db87a0 --- /dev/null +++ b/build/schemas/tetrahedron.md @@ -0,0 +1,4 @@ +---title: Tetrahedronnav_order: 18layout: defaultparent: ARENA Options---# Tetrahedron + +*Tetrahedron Geometry* + diff --git a/build/schemas/text.md b/build/schemas/text.md new file mode 100644 index 000000000..a1cb4eac3 --- /dev/null +++ b/build/schemas/text.md @@ -0,0 +1,4 @@ +---title: Textnav_order: 19layout: defaultparent: ARENA Options---# Text + +*Display text* + diff --git a/build/schemas/thickline.md b/build/schemas/thickline.md new file mode 100644 index 000000000..cfb514b22 --- /dev/null +++ b/build/schemas/thickline.md @@ -0,0 +1,4 @@ +---title: Thicklinenav_order: 20layout: defaultparent: ARENA Options---# Thickline + +*Draw a line that can have a custom width* + diff --git a/build/schemas/threejs-scene.md b/build/schemas/threejs-scene.md new file mode 100644 index 000000000..ec630875c --- /dev/null +++ b/build/schemas/threejs-scene.md @@ -0,0 +1,4 @@ +---title: Three.js Scenenav_order: 21layout: defaultparent: ARENA Options---# Three.js Scene + +*Load a Three.js Scene (might be THREE.js version-specific; you can see THREE.js version in the JS console once you open ARENA; using glTF is preferred)* + diff --git a/build/schemas/torus.md b/build/schemas/torus.md new file mode 100644 index 000000000..abb5b81e7 --- /dev/null +++ b/build/schemas/torus.md @@ -0,0 +1,4 @@ +---title: Torusnav_order: 22layout: defaultparent: ARENA Options---# Torus + +*Torus Geometry* + diff --git a/build/schemas/torusKnot.md b/build/schemas/torusKnot.md new file mode 100644 index 000000000..dfd7cc16f --- /dev/null +++ b/build/schemas/torusKnot.md @@ -0,0 +1,4 @@ +---title: Torus Knotnav_order: 23layout: defaultparent: ARENA Options---# Torus Knot + +*Torus Knot Geometry* + diff --git a/build/schemas/triangle.md b/build/schemas/triangle.md new file mode 100644 index 000000000..ecada778b --- /dev/null +++ b/build/schemas/triangle.md @@ -0,0 +1,4 @@ +---title: Trianglenav_order: 24layout: defaultparent: ARENA Options---# Triangle + +*Triangle Geometry* + From 16bec8cca36c3f57ec3efe90167f01e174367132 Mon Sep 17 00:00:00 2001 From: mwfarb Date: Wed, 6 Apr 2022 16:37:55 -0400 Subject: [PATCH 2/8] fix jekyll gen --- build/genmd.py | 18 +++++++++--------- build/schemas/arena-program.md | 9 ++++++++- build/schemas/arena-scene-options.md | 14 ++++++++++++-- build/schemas/box.md | 9 ++++++++- build/schemas/circle.md | 9 ++++++++- build/schemas/cone.md | 9 ++++++++- build/schemas/cube.md | 9 ++++++++- build/schemas/cylinder.md | 9 ++++++++- build/schemas/dodecahedron.md | 9 ++++++++- build/schemas/entity.md | 9 ++++++++- build/schemas/gltf-model.md | 9 ++++++++- build/schemas/image.md | 9 ++++++++- build/schemas/light.md | 9 ++++++++- build/schemas/line.md | 9 ++++++++- build/schemas/octahedron.md | 9 ++++++++- build/schemas/pcd-model.md | 9 ++++++++- build/schemas/plane.md | 9 ++++++++- build/schemas/ring.md | 9 ++++++++- build/schemas/sphere.md | 9 ++++++++- build/schemas/tetrahedron.md | 9 ++++++++- build/schemas/text.md | 9 ++++++++- build/schemas/thickline.md | 9 ++++++++- build/schemas/threejs-scene.md | 9 ++++++++- build/schemas/torus.md | 9 ++++++++- build/schemas/torusKnot.md | 9 ++++++++- build/schemas/triangle.md | 9 ++++++++- 26 files changed, 213 insertions(+), 35 deletions(-) diff --git a/build/genmd.py b/build/genmd.py index 5fcc7e7b2..264b9c22f 100644 --- a/build/genmd.py +++ b/build/genmd.py @@ -14,17 +14,17 @@ fn = files[file]["file"] t = files[file]["title"] - md_lines = '' - md_lines+=('---\n') - md_lines+=(f'title: {t}\n') - md_lines+=(f'nav_order: {idx}\n') - md_lines+=('layout: default\n') - md_lines+=('parent: ARENA Optionsv') - md_lines+=('---\n') - md_lines+=('\n') + md_lines = [] + md_lines.append('---\n') + md_lines.append(f'title: {t}\n') + md_lines.append(f'nav_order: {idx}\n') + md_lines.append('layout: default\n') + md_lines.append('parent: ARENA Options\n') + md_lines.append('---\n') + md_lines.append('\n') with open(fn, "r") as json_file: - md_lines+=(parser.parse_schema(json.load(json_file))) + md_lines.extend(parser.parse_schema(json.load(json_file))) out = ''.join(md_lines) print(out) f = open(f"{fn[:-5]}.md", "w") diff --git a/build/schemas/arena-program.md b/build/schemas/arena-program.md index 03b488a12..56b4cc109 100644 --- a/build/schemas/arena-program.md +++ b/build/schemas/arena-program.md @@ -1,4 +1,11 @@ ----title: Programnav_order: 14layout: defaultparent: ARENA Options---# Program +--- +title: Program +nav_order: 14 +layout: default +parent: ARENA Options +--- + +# Program ## Properties diff --git a/build/schemas/arena-scene-options.md b/build/schemas/arena-scene-options.md index 9a50d0275..90969eda5 100644 --- a/build/schemas/arena-scene-options.md +++ b/build/schemas/arena-scene-options.md @@ -1,4 +1,11 @@ ----title: Scene Optionsnav_order: 16layout: defaultparent: ARENA Options---# Scene Config +--- +title: Scene Options +nav_order: 16 +layout: default +parent: ARENA Options +--- + +# Scene Config ## Properties @@ -51,7 +58,10 @@ - **`scene-options`** *(object)* - **`clickableOnlyEvents`** *(boolean)*: true = publish only mouse events for objects with click-listeners; false = all objects publish mouse events. Default: `True`. - **`distanceModel`** *(string)*: Algorithm to use to reduce the volume of the audio source as it moves away from the listener. Must be one of: `['exponential', 'inverse', 'linear']`. Default: `inverse`. - - **`sceneHeadModel`** *(string)*: Define a default model for the scene. You must scale and rotate your source GLTF appropriately. Default: ``. + - **`sceneHeadModels`** *(array)*: Define the default head model(s) for the scene in a list. Users may still choose from the ARENA default list of head models as well. Default: ``. + - **Items** *(object)* + - **`name`** *(string)*: A head model name for the selection GUI. + - **`url`** *(string)*: The head model GLTF URL. You must scale and rotate your source GLTFs appropriately. - **`jitsiHost`** *(string)*: Jitsi host used for this scene. Default: `jitsi0.andrew.cmu.edu:8443`. - **`maxAVDist`** *(number)*: Maximum distance between cameras/users until audio and video are cut off. For saving bandwidth on scenes with large amounts of user activity at once. Default: `20`. - **`navMesh`** *(string)*: Navigation Mesh URL. Default: ``. diff --git a/build/schemas/box.md b/build/schemas/box.md index 47018f102..04e30ed80 100644 --- a/build/schemas/box.md +++ b/build/schemas/box.md @@ -1,4 +1,11 @@ ----title: Boxnav_order: 0layout: defaultparent: ARENA Options---# Box +--- +title: Box +nav_order: 0 +layout: default +parent: ARENA Options +--- + +# Box *Box Geometry* diff --git a/build/schemas/circle.md b/build/schemas/circle.md index 9a27faa7a..64be365a0 100644 --- a/build/schemas/circle.md +++ b/build/schemas/circle.md @@ -1,4 +1,11 @@ ----title: Circlenav_order: 1layout: defaultparent: ARENA Options---# Circle +--- +title: Circle +nav_order: 1 +layout: default +parent: ARENA Options +--- + +# Circle *Circle Geometry* diff --git a/build/schemas/cone.md b/build/schemas/cone.md index edf8fbec6..84ac7a818 100644 --- a/build/schemas/cone.md +++ b/build/schemas/cone.md @@ -1,4 +1,11 @@ ----title: Conenav_order: 2layout: defaultparent: ARENA Options---# Cone +--- +title: Cone +nav_order: 2 +layout: default +parent: ARENA Options +--- + +# Cone *Cone Geometry* diff --git a/build/schemas/cube.md b/build/schemas/cube.md index 3866f884e..04cca535f 100644 --- a/build/schemas/cube.md +++ b/build/schemas/cube.md @@ -1,4 +1,11 @@ ----title: Cube (deprecated; don't use)nav_order: 3layout: defaultparent: ARENA Options---# Cube (deprecated; don't use) +--- +title: Cube (deprecated; don't use) +nav_order: 3 +layout: default +parent: ARENA Options +--- + +# Cube (deprecated; don't use) *Cube (=Box) Geometry; Supported for Legacy reasons; Please use Box in new scenes* diff --git a/build/schemas/cylinder.md b/build/schemas/cylinder.md index 204b13852..3615fd2be 100644 --- a/build/schemas/cylinder.md +++ b/build/schemas/cylinder.md @@ -1,4 +1,11 @@ ----title: Cylindernav_order: 4layout: defaultparent: ARENA Options---# Cylinder +--- +title: Cylinder +nav_order: 4 +layout: default +parent: ARENA Options +--- + +# Cylinder *cylinder Geometry* diff --git a/build/schemas/dodecahedron.md b/build/schemas/dodecahedron.md index 1934321a6..d1f0242ba 100644 --- a/build/schemas/dodecahedron.md +++ b/build/schemas/dodecahedron.md @@ -1,4 +1,11 @@ ----title: Dodecahedronnav_order: 5layout: defaultparent: ARENA Options---# Dodecahedron +--- +title: Dodecahedron +nav_order: 5 +layout: default +parent: ARENA Options +--- + +# Dodecahedron *dodecahedron Geometry* diff --git a/build/schemas/entity.md b/build/schemas/entity.md index 79d782d6f..05964d7ec 100644 --- a/build/schemas/entity.md +++ b/build/schemas/entity.md @@ -1,4 +1,11 @@ ----title: Entity (generic object)nav_order: 6layout: defaultparent: ARENA Options---# Entity (generic object) +--- +title: Entity (generic object) +nav_order: 6 +layout: default +parent: ARENA Options +--- + +# Entity (generic object) *Entities are the base of all objects in the scene. Entities are containers into which components can be attached.* diff --git a/build/schemas/gltf-model.md b/build/schemas/gltf-model.md index 49f094707..0c73d9b80 100644 --- a/build/schemas/gltf-model.md +++ b/build/schemas/gltf-model.md @@ -1,4 +1,11 @@ ----title: GLTF Modelnav_order: 7layout: defaultparent: ARENA Options---# GLTF Model +--- +title: GLTF Model +nav_order: 7 +layout: default +parent: ARENA Options +--- + +# GLTF Model *Load a GLTF model* diff --git a/build/schemas/image.md b/build/schemas/image.md index 62c70bd75..0e10a9d1e 100644 --- a/build/schemas/image.md +++ b/build/schemas/image.md @@ -1,4 +1,11 @@ ----title: Imagenav_order: 8layout: defaultparent: ARENA Options---# Image +--- +title: Image +nav_order: 8 +layout: default +parent: ARENA Options +--- + +# Image *Display an image on a plane* diff --git a/build/schemas/light.md b/build/schemas/light.md index b32cca995..81f858e03 100644 --- a/build/schemas/light.md +++ b/build/schemas/light.md @@ -1,4 +1,11 @@ ----title: Lightnav_order: 9layout: defaultparent: ARENA Options---# Light +--- +title: Light +nav_order: 9 +layout: default +parent: ARENA Options +--- + +# Light *A light* diff --git a/build/schemas/line.md b/build/schemas/line.md index c526c4ac0..8e7f6eb2f 100644 --- a/build/schemas/line.md +++ b/build/schemas/line.md @@ -1,4 +1,11 @@ ----title: Linenav_order: 10layout: defaultparent: ARENA Options---# Line +--- +title: Line +nav_order: 10 +layout: default +parent: ARENA Options +--- + +# Line *Draw a line* diff --git a/build/schemas/octahedron.md b/build/schemas/octahedron.md index 311bd9c09..bca6ea76b 100644 --- a/build/schemas/octahedron.md +++ b/build/schemas/octahedron.md @@ -1,4 +1,11 @@ ----title: Octahedronnav_order: 11layout: defaultparent: ARENA Options---# Octahedron +--- +title: Octahedron +nav_order: 11 +layout: default +parent: ARENA Options +--- + +# Octahedron *Octahedron Geometry* diff --git a/build/schemas/pcd-model.md b/build/schemas/pcd-model.md index 6964a8656..df20ded33 100644 --- a/build/schemas/pcd-model.md +++ b/build/schemas/pcd-model.md @@ -1,4 +1,11 @@ ----title: PCD Modelnav_order: 12layout: defaultparent: ARENA Options---# PCD Model +--- +title: PCD Model +nav_order: 12 +layout: default +parent: ARENA Options +--- + +# PCD Model *Load a PCD model* diff --git a/build/schemas/plane.md b/build/schemas/plane.md index b52f14f7c..351ca8fe4 100644 --- a/build/schemas/plane.md +++ b/build/schemas/plane.md @@ -1,4 +1,11 @@ ----title: Planenav_order: 13layout: defaultparent: ARENA Options---# Plane +--- +title: Plane +nav_order: 13 +layout: default +parent: ARENA Options +--- + +# Plane *Plane Geometry* diff --git a/build/schemas/ring.md b/build/schemas/ring.md index a76528e82..dd1bd02b9 100644 --- a/build/schemas/ring.md +++ b/build/schemas/ring.md @@ -1,4 +1,11 @@ ----title: Ringnav_order: 15layout: defaultparent: ARENA Options---# Ring +--- +title: Ring +nav_order: 15 +layout: default +parent: ARENA Options +--- + +# Ring *Ring Geometry* diff --git a/build/schemas/sphere.md b/build/schemas/sphere.md index 138f0d4c6..9c7a68097 100644 --- a/build/schemas/sphere.md +++ b/build/schemas/sphere.md @@ -1,4 +1,11 @@ ----title: Spherenav_order: 17layout: defaultparent: ARENA Options---# Sphere +--- +title: Sphere +nav_order: 17 +layout: default +parent: ARENA Options +--- + +# Sphere *Sphere Geometry* diff --git a/build/schemas/tetrahedron.md b/build/schemas/tetrahedron.md index 040db87a0..88b80bea0 100644 --- a/build/schemas/tetrahedron.md +++ b/build/schemas/tetrahedron.md @@ -1,4 +1,11 @@ ----title: Tetrahedronnav_order: 18layout: defaultparent: ARENA Options---# Tetrahedron +--- +title: Tetrahedron +nav_order: 18 +layout: default +parent: ARENA Options +--- + +# Tetrahedron *Tetrahedron Geometry* diff --git a/build/schemas/text.md b/build/schemas/text.md index a1cb4eac3..20bd4e779 100644 --- a/build/schemas/text.md +++ b/build/schemas/text.md @@ -1,4 +1,11 @@ ----title: Textnav_order: 19layout: defaultparent: ARENA Options---# Text +--- +title: Text +nav_order: 19 +layout: default +parent: ARENA Options +--- + +# Text *Display text* diff --git a/build/schemas/thickline.md b/build/schemas/thickline.md index cfb514b22..2a24f2fb7 100644 --- a/build/schemas/thickline.md +++ b/build/schemas/thickline.md @@ -1,4 +1,11 @@ ----title: Thicklinenav_order: 20layout: defaultparent: ARENA Options---# Thickline +--- +title: Thickline +nav_order: 20 +layout: default +parent: ARENA Options +--- + +# Thickline *Draw a line that can have a custom width* diff --git a/build/schemas/threejs-scene.md b/build/schemas/threejs-scene.md index ec630875c..f64174241 100644 --- a/build/schemas/threejs-scene.md +++ b/build/schemas/threejs-scene.md @@ -1,4 +1,11 @@ ----title: Three.js Scenenav_order: 21layout: defaultparent: ARENA Options---# Three.js Scene +--- +title: Three.js Scene +nav_order: 21 +layout: default +parent: ARENA Options +--- + +# Three.js Scene *Load a Three.js Scene (might be THREE.js version-specific; you can see THREE.js version in the JS console once you open ARENA; using glTF is preferred)* diff --git a/build/schemas/torus.md b/build/schemas/torus.md index abb5b81e7..934882ee9 100644 --- a/build/schemas/torus.md +++ b/build/schemas/torus.md @@ -1,4 +1,11 @@ ----title: Torusnav_order: 22layout: defaultparent: ARENA Options---# Torus +--- +title: Torus +nav_order: 22 +layout: default +parent: ARENA Options +--- + +# Torus *Torus Geometry* diff --git a/build/schemas/torusKnot.md b/build/schemas/torusKnot.md index dfd7cc16f..6dfe318d1 100644 --- a/build/schemas/torusKnot.md +++ b/build/schemas/torusKnot.md @@ -1,4 +1,11 @@ ----title: Torus Knotnav_order: 23layout: defaultparent: ARENA Options---# Torus Knot +--- +title: Torus Knot +nav_order: 23 +layout: default +parent: ARENA Options +--- + +# Torus Knot *Torus Knot Geometry* diff --git a/build/schemas/triangle.md b/build/schemas/triangle.md index ecada778b..59e4fb3d2 100644 --- a/build/schemas/triangle.md +++ b/build/schemas/triangle.md @@ -1,4 +1,11 @@ ----title: Trianglenav_order: 24layout: defaultparent: ARENA Options---# Triangle +--- +title: Triangle +nav_order: 24 +layout: default +parent: ARENA Options +--- + +# Triangle *Triangle Geometry* From 7e940a64cb51037c55676e1f20a8a98818ba4763 Mon Sep 17 00:00:00 2001 From: mwfarb Date: Fri, 8 Apr 2022 16:29:41 -0400 Subject: [PATCH 3/8] rm md --- build/schemas/arena-program.md | 37 ------------- build/schemas/arena-scene-options.md | 78 ---------------------------- build/schemas/arena-schema-files.md | 2 - build/schemas/box.md | 11 ---- build/schemas/circle.md | 11 ---- build/schemas/cone.md | 11 ---- build/schemas/cube.md | 11 ---- build/schemas/cylinder.md | 11 ---- build/schemas/dodecahedron.md | 11 ---- build/schemas/entity.md | 11 ---- build/schemas/gltf-model.md | 11 ---- build/schemas/image.md | 11 ---- build/schemas/light.md | 11 ---- build/schemas/line.md | 11 ---- build/schemas/octahedron.md | 11 ---- build/schemas/pcd-model.md | 11 ---- build/schemas/plane.md | 11 ---- build/schemas/ring.md | 11 ---- build/schemas/sphere.md | 11 ---- build/schemas/tetrahedron.md | 11 ---- build/schemas/text.md | 11 ---- build/schemas/thickline.md | 11 ---- build/schemas/threejs-scene.md | 11 ---- build/schemas/torus.md | 11 ---- build/schemas/torusKnot.md | 11 ---- build/schemas/triangle.md | 11 ---- 26 files changed, 370 deletions(-) delete mode 100644 build/schemas/arena-program.md delete mode 100644 build/schemas/arena-scene-options.md delete mode 100644 build/schemas/arena-schema-files.md delete mode 100644 build/schemas/box.md delete mode 100644 build/schemas/circle.md delete mode 100644 build/schemas/cone.md delete mode 100644 build/schemas/cube.md delete mode 100644 build/schemas/cylinder.md delete mode 100644 build/schemas/dodecahedron.md delete mode 100644 build/schemas/entity.md delete mode 100644 build/schemas/gltf-model.md delete mode 100644 build/schemas/image.md delete mode 100644 build/schemas/light.md delete mode 100644 build/schemas/line.md delete mode 100644 build/schemas/octahedron.md delete mode 100644 build/schemas/pcd-model.md delete mode 100644 build/schemas/plane.md delete mode 100644 build/schemas/ring.md delete mode 100644 build/schemas/sphere.md delete mode 100644 build/schemas/tetrahedron.md delete mode 100644 build/schemas/text.md delete mode 100644 build/schemas/thickline.md delete mode 100644 build/schemas/threejs-scene.md delete mode 100644 build/schemas/torus.md delete mode 100644 build/schemas/torusKnot.md delete mode 100644 build/schemas/triangle.md diff --git a/build/schemas/arena-program.md b/build/schemas/arena-program.md deleted file mode 100644 index 56b4cc109..000000000 --- a/build/schemas/arena-program.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Program -nav_order: 14 -layout: default -parent: ARENA Options ---- - -# Program - -## Properties - -- **`object_id`** *(string)*: Object identifier; Must be a valid UUID. -- **`action`** *(string)*: One of 3 basic Create/Update/Delete actions or a special client event action (e.g. a click). Must be one of: `['create', 'delete', 'update', 'clientEvent']`. Default: `create`. -- **`persist`** *(boolean)*: Persist this object in the database. Default: `true`. -- **`type`** *(string)*: Must be one of: `['program']`. -- **`data`**: Object data payload; Program config data. Refer to *#/definitions/program*. -## Definitions - -- **`program`** *(object)* - - **`name`** *(string)*: Name of the program in the format namespace/program-name. - - **`affinity`** *(string)*: Indicates the module affinity (client=client's runtime; none or empty=any suitable/available runtime). Must be one of: `['client', 'none']`. Default: `client`. - - **`instantiate`** *(string)*: Single instance of the program (=single), or let every client create a program instance (=client). Per client instance will create new uuid for each program. Must be one of: `['single', 'client']`. Default: `client`. - - **`filename`** *(string)*: Filename of the entry binary. - - **`filetype`** *(string)*: Type of the program (WA=WASM or PY=Python). Must be one of: `['WA', 'PY']`. Default: `['WA']`. - - **`args`** *(array)*: Command-line arguments (passed in argv). Supports variables: ${scene}, ${mqtth}, ${cameraid}, ${username}, ${runtimeid}, ${moduleid}, ${query-string-key}. - - **Items** *(string)* - - **`env`** *(array)*: Environment variables. Supports variables: ${scene}, ${namespace}, ${mqtth}, ${cameraid}, ${username}, ${runtimeid}, ${moduleid}, ${query-string-key}. Default: `['MID=${moduleid}', 'SCENE=${scene}', 'NAMESPACE=${namespace}', 'MQTTH=${mqtth}', 'REALM=realm']`. - - **Items** *(string)* - - **`channels`** *(array)*: Channels describe files representing access to IO from pubsub and client sockets (possibly more in the future; currently only supported for WASM programs). Default: `[{'path': '/ch/${scene}', 'type': 'pubsub', 'mode': 'rw', 'params': {'topic': 'realm/s/${scene}'}}]`. - - **Items** *(object)* - - **`path`** *(string)*: Folder visible by the program. - - **`type`** *(string)*: Pubsub or client socket. Must be one of: `['pubsub', 'client']`. Default: `pubsub`. - - **`mode`** *(string)*: Access mode. Must be one of: `['r', 'w', 'rw']`. - - **`params`** *(object)*: Type (i.e. pubsub/client)-specific parameters. - - **`topic`** *(string)*: Pubsub topic (pubsub). - - **`host`** *(string)*: Destination host address (client socket; ignored for now). - - **`port`** *(number)*: Destination port (client socket; ignored for now). diff --git a/build/schemas/arena-scene-options.md b/build/schemas/arena-scene-options.md deleted file mode 100644 index 90969eda5..000000000 --- a/build/schemas/arena-scene-options.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Scene Options -nav_order: 16 -layout: default -parent: ARENA Options ---- - -# Scene Config - -## Properties - -- **`object_id`** *(string)*: A uuid or otherwise unique identifier for this object. Default: `scene-options`. -- **`persist`** *(boolean)*: Persist this object in the database. Default: `true`. -- **`type`** *(string)*: Must be one of: `['scene-options']`. -- **`action`** *(string)*: One of 3 basic Create/Update/Delete actions. Must be one of: `['create', 'delete', 'update']`. Default: `create`. -- **`data`** - - **`env-presets`**: A-Frame Environment presets. Refer to *#/definitions/environment-presets*. - - **`renderer-settings`**: These settings are fed into three.js WebGLRenderer properties. Refer to *#/definitions/renderer-settings*. - - **`scene-options`**: ARENA Scene Options. Refer to *#/definitions/scene-options*. -## Definitions - -- **`environment-presets`** *(object)* - - **`active`** *(boolean)*: Show/hides the environment presets component. Use this instead of using the visible attribute. Default: `True`. - - **`dressing`** *(string)*: Dressing is the term we use here for the set of additional objects that are put on the ground for decoration. Must be one of: `['apparatus', 'arches', 'cubes', 'cylinders', 'hexagons', 'mushrooms', 'none', 'pyramids', 'stones', 'torii', 'towers', 'trees']`. Default: `none`. - - **`dressingAmount`** *(number)*: Number of objects used for dressing. Default: `10`. - - **`dressingColor`** *(string)*: Base color of dressing objects. Default: `#795449`. - - **`dressingOnPlayArea`** *(number)*: Amount of dressing on play area. Default: `0`. - - **`dressingScale`** *(number)*: Height (in meters) of dressing objects. Default: `5`. - - **`dressingUniformScale`** *(boolean)*: If false, a different value is used for each coordinate x, y, z in the random variance of size. Default: `True`. - - **`dressingVariance`**: Maximum x,y,z meters to randomize the size and rotation of each dressing object. Use 0 0 0 for no variation in size nor rotation. Refer to *#/definitions/Vector3*. Default: `{'x': 1, 'y': 1, 'z': 1}`. - - **`flatShading`** *(boolean)*: Whether to show everything smoothed (false) or polygonal (true). Default: `False`. - - **`fog`** *(number)*: Amount of fog (0 = none, 1 = full fog). The color is estimated automatically. Default: `0`. - - **`grid`** *(string)*: 1x1 and 2x2 are rectangular grids of 1 and 2 meters side, respectively. Must be one of: `['1x1', '2x2', 'crosses', 'dots', 'none', 'xlines', 'ylines']`. Default: `none`. - - **`gridColor`** *(string)*: Color of the grid. Default: `#ccc`. - - **`ground`** *(string)*: Orography style. Must be one of: `['canyon', 'flat', 'hills', 'noise', 'none', 'spikes']`. Default: `hills`. - - **`groundColor`** *(string)*: Main color of the ground. Default: `#553e35`. - - **`groundColor2`** *(string)*: Secondary color of the ground. Used for textures, ignored if groundTexture is none. Default: `#694439`. - - **`groundScale`**: Ground dimensions (in meters). Refer to *#/definitions/Vector3*. Default: `{'x': 1, 'y': 1, 'z': 1}`. - - **`groundTexture`** *(string)*: Texture applied to the ground. Must be one of: `['checkerboard', 'none', 'squares', 'walkernoise']`. Default: `none`. - - **`groundYScale`** *(number)*: Maximum height (in meters) of ground's features (hills, mountains, peaks..). Default: `3`. - - **`hideInAR`** *(boolean)*: If true, hide the environment when entering AR. Default: `True`. - - **`horizonColor`** *(string)*: Default: `#ffa500`. - - **`lighting`** *(string)*: A hemisphere light and a key light (directional or point) are added to the scene automatically when using the component. Use none if you don't want this automatic lighting set being added. The color and intensity are estimated automatically. Must be one of: `['distant', 'none', 'point']`. Default: `distant`. - - **`lightPosition`**: Position of the main light. If skyType is atmospheric, only the orientation matters (is a directional light) and it can turn the scene into night when lowered towards the horizon. Refer to *#/definitions/Vector3*. Default: `{'x': 0, 'y': 1, 'z': -0.2}`. - - **`playArea`** *(number)*: Radius of the area in the center reserved for the player and the gameplay. The ground is flat in there and no objects are placed inside. Default: `1`. - - **`preset`** *(string)*: An A-frame preset environment. Must be one of: `['arches', 'checkerboard', 'contact', 'default', 'dream', 'egypt', 'forest', 'goaland', 'goldmine', 'japan', 'none', 'osiris', 'poison', 'starry', 'threetowers', 'tron', 'volcano', 'yavapai']`. Default: `default`. - - **`seed`** *(number)*: Seed for randomization. If you don't like the layout of the elements, try another value for the seed. Default: `1`. - - **`shadow`** *(boolean)*: Shadows on/off. Sky light casts shadows on the ground of all those objects with shadow component applied. Default: `False`. - - **`shadowSize`** *(number)*: Size of the shadow, if applied. Default: `10`. - - **`skyColor`** *(string)*: Default: `#ffa500`. - - **`skyType`** *(string)*: A sky type. Must be one of: `['atmosphere', 'color', 'gradient', 'none']`. Default: `color`. -- **`renderer-settings`** *(object)* - - **`gammaFactor`** *(number)*: Gamma factor (three.js default is 2.0; we use 2.2 as default). Default: `2.2`. - - **`localClippingEnabled`** *(boolean)*: Defines whether the renderer respects object-level clipping planes. Default: `False`. - - **`outputEncoding`** *(string)*: Defines the output encoding of the renderer (three.js default is LinearEncoding; we use sRGBEncoding as default). Must be one of: `['BasicDepthPacking', 'GammaEncoding', 'LinearEncoding', 'LogLuvEncoding', 'RGBADepthPacking', 'RGBDEncoding', 'RGBEEncoding', 'RGBM16Encoding', 'RGBM7Encoding', 'sRGBEncoding']`. Default: `sRGBEncoding`. - - **`physicallyCorrectLights`** *(boolean)*: Whether to use physically correct lighting mode. Default: `False`. - - **`sortObjects`** *(boolean)*: Defines whether the renderer should sort objects. Default: `True`. -- **`scene-options`** *(object)* - - **`clickableOnlyEvents`** *(boolean)*: true = publish only mouse events for objects with click-listeners; false = all objects publish mouse events. Default: `True`. - - **`distanceModel`** *(string)*: Algorithm to use to reduce the volume of the audio source as it moves away from the listener. Must be one of: `['exponential', 'inverse', 'linear']`. Default: `inverse`. - - **`sceneHeadModels`** *(array)*: Define the default head model(s) for the scene in a list. Users may still choose from the ARENA default list of head models as well. Default: ``. - - **Items** *(object)* - - **`name`** *(string)*: A head model name for the selection GUI. - - **`url`** *(string)*: The head model GLTF URL. You must scale and rotate your source GLTFs appropriately. - - **`jitsiHost`** *(string)*: Jitsi host used for this scene. Default: `jitsi0.andrew.cmu.edu:8443`. - - **`maxAVDist`** *(number)*: Maximum distance between cameras/users until audio and video are cut off. For saving bandwidth on scenes with large amounts of user activity at once. Default: `20`. - - **`navMesh`** *(string)*: Navigation Mesh URL. Default: ``. - - **`networkedLocationSolver`** *(boolean)*: ARMarker location solver parameter. By default (networkedLocationSolver=false) clients solve camera location locally when a static marker is detected. When true, publishes marker detections (to realm/g/a/camera-name) and defers all tag solving of client camera to a solver sitting on pubsub. Default: `False`. - - **`privateScene`** *(boolean)*: false = scene will be visible; true = scene will not show in listings. Default: `False`. - - **`refDistance`** *(number)*: Distance at which the volume reduction starts taking effect. Default: `1`. - - **`rolloffFactor`** *(number)*: How quickly the volume is reduced as the source moves away from the listener. Default: `1`. - - **`screenshare`** *(string)*: Name of the 3D object used when sharing desktop. Default: `screenshare`. - - **`disableVideoCulling`** *(boolean)*: If true will disable video frustum culling (video frustum culling stops video from users outside of view). Default: `False`. - - **`volume`** *(number)*: Volume for users in a scene. Default: `1`. -- **`Vector3`** *(object)* - - **`x`** *(number)* - - **`y`** *(number)* - - **`z`** *(number)* diff --git a/build/schemas/arena-schema-files.md b/build/schemas/arena-schema-files.md deleted file mode 100644 index 4f98fde1b..000000000 --- a/build/schemas/arena-schema-files.md +++ /dev/null @@ -1,2 +0,0 @@ -# JSON Schema - diff --git a/build/schemas/box.md b/build/schemas/box.md deleted file mode 100644 index 04e30ed80..000000000 --- a/build/schemas/box.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Box -nav_order: 0 -layout: default -parent: ARENA Options ---- - -# Box - -*Box Geometry* - diff --git a/build/schemas/circle.md b/build/schemas/circle.md deleted file mode 100644 index 64be365a0..000000000 --- a/build/schemas/circle.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Circle -nav_order: 1 -layout: default -parent: ARENA Options ---- - -# Circle - -*Circle Geometry* - diff --git a/build/schemas/cone.md b/build/schemas/cone.md deleted file mode 100644 index 84ac7a818..000000000 --- a/build/schemas/cone.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Cone -nav_order: 2 -layout: default -parent: ARENA Options ---- - -# Cone - -*Cone Geometry* - diff --git a/build/schemas/cube.md b/build/schemas/cube.md deleted file mode 100644 index 04cca535f..000000000 --- a/build/schemas/cube.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Cube (deprecated; don't use) -nav_order: 3 -layout: default -parent: ARENA Options ---- - -# Cube (deprecated; don't use) - -*Cube (=Box) Geometry; Supported for Legacy reasons; Please use Box in new scenes* - diff --git a/build/schemas/cylinder.md b/build/schemas/cylinder.md deleted file mode 100644 index 3615fd2be..000000000 --- a/build/schemas/cylinder.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Cylinder -nav_order: 4 -layout: default -parent: ARENA Options ---- - -# Cylinder - -*cylinder Geometry* - diff --git a/build/schemas/dodecahedron.md b/build/schemas/dodecahedron.md deleted file mode 100644 index d1f0242ba..000000000 --- a/build/schemas/dodecahedron.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Dodecahedron -nav_order: 5 -layout: default -parent: ARENA Options ---- - -# Dodecahedron - -*dodecahedron Geometry* - diff --git a/build/schemas/entity.md b/build/schemas/entity.md deleted file mode 100644 index 05964d7ec..000000000 --- a/build/schemas/entity.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Entity (generic object) -nav_order: 6 -layout: default -parent: ARENA Options ---- - -# Entity (generic object) - -*Entities are the base of all objects in the scene. Entities are containers into which components can be attached.* - diff --git a/build/schemas/gltf-model.md b/build/schemas/gltf-model.md deleted file mode 100644 index 0c73d9b80..000000000 --- a/build/schemas/gltf-model.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: GLTF Model -nav_order: 7 -layout: default -parent: ARENA Options ---- - -# GLTF Model - -*Load a GLTF model* - diff --git a/build/schemas/image.md b/build/schemas/image.md deleted file mode 100644 index 0e10a9d1e..000000000 --- a/build/schemas/image.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Image -nav_order: 8 -layout: default -parent: ARENA Options ---- - -# Image - -*Display an image on a plane* - diff --git a/build/schemas/light.md b/build/schemas/light.md deleted file mode 100644 index 81f858e03..000000000 --- a/build/schemas/light.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Light -nav_order: 9 -layout: default -parent: ARENA Options ---- - -# Light - -*A light* - diff --git a/build/schemas/line.md b/build/schemas/line.md deleted file mode 100644 index 8e7f6eb2f..000000000 --- a/build/schemas/line.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Line -nav_order: 10 -layout: default -parent: ARENA Options ---- - -# Line - -*Draw a line* - diff --git a/build/schemas/octahedron.md b/build/schemas/octahedron.md deleted file mode 100644 index bca6ea76b..000000000 --- a/build/schemas/octahedron.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Octahedron -nav_order: 11 -layout: default -parent: ARENA Options ---- - -# Octahedron - -*Octahedron Geometry* - diff --git a/build/schemas/pcd-model.md b/build/schemas/pcd-model.md deleted file mode 100644 index df20ded33..000000000 --- a/build/schemas/pcd-model.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: PCD Model -nav_order: 12 -layout: default -parent: ARENA Options ---- - -# PCD Model - -*Load a PCD model* - diff --git a/build/schemas/plane.md b/build/schemas/plane.md deleted file mode 100644 index 351ca8fe4..000000000 --- a/build/schemas/plane.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Plane -nav_order: 13 -layout: default -parent: ARENA Options ---- - -# Plane - -*Plane Geometry* - diff --git a/build/schemas/ring.md b/build/schemas/ring.md deleted file mode 100644 index dd1bd02b9..000000000 --- a/build/schemas/ring.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Ring -nav_order: 15 -layout: default -parent: ARENA Options ---- - -# Ring - -*Ring Geometry* - diff --git a/build/schemas/sphere.md b/build/schemas/sphere.md deleted file mode 100644 index 9c7a68097..000000000 --- a/build/schemas/sphere.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Sphere -nav_order: 17 -layout: default -parent: ARENA Options ---- - -# Sphere - -*Sphere Geometry* - diff --git a/build/schemas/tetrahedron.md b/build/schemas/tetrahedron.md deleted file mode 100644 index 88b80bea0..000000000 --- a/build/schemas/tetrahedron.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Tetrahedron -nav_order: 18 -layout: default -parent: ARENA Options ---- - -# Tetrahedron - -*Tetrahedron Geometry* - diff --git a/build/schemas/text.md b/build/schemas/text.md deleted file mode 100644 index 20bd4e779..000000000 --- a/build/schemas/text.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Text -nav_order: 19 -layout: default -parent: ARENA Options ---- - -# Text - -*Display text* - diff --git a/build/schemas/thickline.md b/build/schemas/thickline.md deleted file mode 100644 index 2a24f2fb7..000000000 --- a/build/schemas/thickline.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Thickline -nav_order: 20 -layout: default -parent: ARENA Options ---- - -# Thickline - -*Draw a line that can have a custom width* - diff --git a/build/schemas/threejs-scene.md b/build/schemas/threejs-scene.md deleted file mode 100644 index f64174241..000000000 --- a/build/schemas/threejs-scene.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Three.js Scene -nav_order: 21 -layout: default -parent: ARENA Options ---- - -# Three.js Scene - -*Load a Three.js Scene (might be THREE.js version-specific; you can see THREE.js version in the JS console once you open ARENA; using glTF is preferred)* - diff --git a/build/schemas/torus.md b/build/schemas/torus.md deleted file mode 100644 index 934882ee9..000000000 --- a/build/schemas/torus.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Torus -nav_order: 22 -layout: default -parent: ARENA Options ---- - -# Torus - -*Torus Geometry* - diff --git a/build/schemas/torusKnot.md b/build/schemas/torusKnot.md deleted file mode 100644 index 6dfe318d1..000000000 --- a/build/schemas/torusKnot.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Torus Knot -nav_order: 23 -layout: default -parent: ARENA Options ---- - -# Torus Knot - -*Torus Knot Geometry* - diff --git a/build/schemas/triangle.md b/build/schemas/triangle.md deleted file mode 100644 index 59e4fb3d2..000000000 --- a/build/schemas/triangle.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Triangle -nav_order: 24 -layout: default -parent: ARENA Options ---- - -# Triangle - -*Triangle Geometry* - From c42dbbb2a316db9fa681e3af85327dec84b110c6 Mon Sep 17 00:00:00 2001 From: mwfarb Date: Sat, 9 Apr 2022 22:57:58 -0400 Subject: [PATCH 4/8] update object type, links --- build/schemas/arena-scene-options.json | 2 +- build/schemas/definitions-common.json | 25 ++++++++++++++--------- build/schemas/definitions-geometries.json | 4 ++-- build/schemas/definitions-geometry.json | 15 +++++++------- build/schemas/definitions-gltf.json | 2 +- build/schemas/light.json | 4 ++-- build/schemas/text.json | 4 ++-- 7 files changed, 31 insertions(+), 25 deletions(-) diff --git a/build/schemas/arena-scene-options.json b/build/schemas/arena-scene-options.json index 81118f8ee..2d8665fd2 100755 --- a/build/schemas/arena-scene-options.json +++ b/build/schemas/arena-scene-options.json @@ -503,7 +503,7 @@ "properties":{ "env-presets":{ "$ref":"#/definitions/environment-presets", - "description":"A-Frame Environment presets" + "description":"A-Frame Environment presets. \n\nMore properties at https://github.com/supermedium/aframe-environment-component" }, "renderer-settings":{ "$ref":"#/definitions/renderer-settings", diff --git a/build/schemas/definitions-common.json b/build/schemas/definitions-common.json index 26ad0e66e..b06fff2bb 100644 --- a/build/schemas/definitions-common.json +++ b/build/schemas/definitions-common.json @@ -1,7 +1,7 @@ { "properties":{ "animation":{ - "description":"Animate and tween values", + "description":"Animate and tween values. \n\nMore properties at https://aframe.io/docs/1.3.0/components/animation.html", "properties":{ "autoplay":{ "default":true, @@ -60,7 +60,7 @@ }, "pauseEvents":{ "default":[ - + ], "description":"Comma-separated list of events to listen to trigger pause. Can be resumed with resumeEvents.", "type":"array" @@ -71,7 +71,7 @@ }, "resumeEvents":{ "default":[ - + ], "description":"Comma-separated list of events to listen to trigger resume after pausing.", "type":"array" @@ -83,7 +83,7 @@ }, "startEvents":{ "default":[ - + ], "description":"Comma-separated list of events to listen to trigger a restart and play. Animation will not autoplay if specified. startEvents will restart the animation, use pauseEvents to resume it. If there are other animation components on the entity animating the same property, those animations will be automatically paused to not conflict.", "type":"array" @@ -181,7 +181,7 @@ "markerid", "size" ], - "title":"ARMArker", + "title":"ARMarker", "type":"object" }, "click-listener":{ @@ -201,7 +201,7 @@ "type":"string" }, "dynamic-body":{ - "description":"Physics type attached to the object.", + "description":"Physics type attached to the object. \n\nMore properties at https://github.com/n5ro/aframe-physics-system#dynamic-body-and-static-body", "properties":{ "type":{ "enum":[ @@ -274,6 +274,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)", "properties":{ "randomRadiusMin":{ @@ -347,7 +348,7 @@ "default":{ "encoding":"sRGBEncoding" }, - "description":"Define extra material properties.", + "description":"Define extra material properties. See more properties at https://threejs.org/docs/#api/en/materials/Material", "properties":{ "overrideSrc":{ "type":"string", @@ -383,7 +384,7 @@ "transparentOccluder":{ "type":"boolean", "default":false, - "description":"If `true`, will set `colorWrite=false` and `renderOrder=0` to make the material a transparent occluder.." + "description":"If `true`, will set `colorWrite=false` and `renderOrder=0` to make the material a transparent occluder." } }, "title":"Material extras", @@ -412,6 +413,7 @@ "y", "z" ], + "type":"object", "title":"Position" }, "rotation":{ @@ -439,6 +441,7 @@ "y", "z" ], + "type":"object", "title":"Rotation" }, "scale":{ @@ -465,10 +468,12 @@ "y", "z" ], + "type":"object", "title":"Scale" }, "shadow":{ "title":"Shadow", + "type":"object", "default":{ "cast":false, "receive":false @@ -489,7 +494,7 @@ } }, "sound":{ - "description":"The sound component defines the entity as a source of sound or audio. The sound component is positional and is thus affected by the components-position.", + "description":"The sound component defines the entity as a source of sound or audio. The sound component is positional and is thus affected by the component's position. \n\nMore properties at https://aframe.io/docs/1.3.0/components/sound.html", "properties":{ "autoplay":{ "default":false, @@ -630,4 +635,4 @@ "type":"object" } } - } \ No newline at end of file + } diff --git a/build/schemas/definitions-geometries.json b/build/schemas/definitions-geometries.json index 9eb770504..388982970 100644 --- a/build/schemas/definitions-geometries.json +++ b/build/schemas/definitions-geometries.json @@ -7,7 +7,7 @@ "type": "boolean" }, "material": { - "description": "The material properties of the object’s surface.", + "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, @@ -178,4 +178,4 @@ "type": "boolean" } } - } \ No newline at end of file + } diff --git a/build/schemas/definitions-geometry.json b/build/schemas/definitions-geometry.json index 2a25b00b3..52ea2e714 100644 --- a/build/schemas/definitions-geometry.json +++ b/build/schemas/definitions-geometry.json @@ -9,10 +9,11 @@ "jitsi-video": { "description": "Apply a jitsi video source to the geometry", "title": "Jitsi Video", + "type":"object", "properties": { "jitsiId": { "description": "JitsiId of the video source; If defined will override displayName", - "type": "string" + "type": "string" }, "displayName": { "description": "ARENA or Jitsi display name of the video source; Will be ignored if jitsiId is given. (* change requires reload* ) ", @@ -20,9 +21,9 @@ } }, "required": ["displayName"] - }, + }, "material": { - "description": "The material properties of the object’s surface.", + "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, @@ -162,7 +163,7 @@ "encoding": "sRGBEncoding", "needsUpdate": false }, - "description": "Define extra material properties.", + "description": "Define extra material properties, namely texture encoding, whether to render the material's color and render order. The properties set here access directly Three.js material component. \n\nMore properties at https://threejs.org/docs/#api/en/materials/Material", "properties": { "encoding": { "default": "sRGBEncoding", @@ -188,7 +189,7 @@ "default": "1", "description": "This value allows the default rendering order of scene graph objects to be overridden.", "type": "number" - }, + }, "colorWrite": { "description": "Whether to render the material’s color", "type": "boolean" @@ -200,7 +201,7 @@ "defaultRenderOrder": { "description": "Used as the renderOrder when transparentOccluder is reset to false.", "type": "number" - } + } }, "title": "Material extras", "type": "object" @@ -232,4 +233,4 @@ "type": "boolean" } } - } \ No newline at end of file + } diff --git a/build/schemas/definitions-gltf.json b/build/schemas/definitions-gltf.json index 84d20e28f..f8e01471c 100644 --- a/build/schemas/definitions-gltf.json +++ b/build/schemas/definitions-gltf.json @@ -1,7 +1,7 @@ { "properties": { "animation-mixer": { - "description": "A list of available animations can usually be found by inspecting the model file or its documentation. All animations will play by default. To play only a specific set of animations, use wildcards: animation-mixer='clip: run_*'", + "description": "A list of available animations can usually be found by inspecting the model file or its documentation. All animations will play by default. To play only a specific set of animations, use wildcards: animation-mixer='clip: run_*'. \n\nMore properties at https://github.com/n5ro/aframe-extras/tree/master/src/loaders#animation", "properties": { "clampWhenFinished": { "default": false, diff --git a/build/schemas/light.json b/build/schemas/light.json index 6266f7bc2..18540b292 100644 --- a/build/schemas/light.json +++ b/build/schemas/light.json @@ -1,6 +1,6 @@ { "title": "Light", - "description": "A light", + "description": "A light. \n\nMore properties at https://aframe.io/docs/1.3.0/components/light.html", "allOf": [ { "$ref": "./schemas/definitions-arena-object.json#/properties" @@ -258,4 +258,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/text.json b/build/schemas/text.json index ce4bd3634..1f6b54b6d 100644 --- a/build/schemas/text.json +++ b/build/schemas/text.json @@ -1,6 +1,6 @@ { "title": "Text", - "description": "Display text", + "description": "Display text. \n\nMore properties at https://aframe.io/docs/1.3.0/components/text.html", "allOf": [ { "$ref": "./schemas/definitions-arena-object.json#/properties" @@ -186,4 +186,4 @@ "data", "persist" ] -} \ No newline at end of file +} From db59e7a44862ff6a34e341d3f8580d977d3bd063 Mon Sep 17 00:00:00 2001 From: mwfarb Date: Sat, 9 Apr 2022 23:00:55 -0400 Subject: [PATCH 5/8] add missing prop --- build/schemas/definitions-common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/schemas/definitions-common.json b/build/schemas/definitions-common.json index b06fff2bb..82f8c2cab 100644 --- a/build/schemas/definitions-common.json +++ b/build/schemas/definitions-common.json @@ -348,7 +348,7 @@ "default":{ "encoding":"sRGBEncoding" }, - "description":"Define extra material properties. See more properties at https://threejs.org/docs/#api/en/materials/Material", + "description": "Define extra material properties, namely texture encoding, whether to render the material's color and render order. The properties set here access directly Three.js material component. \n\nMore properties at https://threejs.org/docs/#api/en/materials/Material", "properties":{ "overrideSrc":{ "type":"string", From 319019fe00f109e4b31627ef05bfad015cc93160 Mon Sep 17 00:00:00 2001 From: mwfarb Date: Sat, 9 Apr 2022 23:01:26 -0400 Subject: [PATCH 6/8] rm script --- build/genmd.py | 70 -------------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 build/genmd.py diff --git a/build/genmd.py b/build/genmd.py deleted file mode 100644 index 264b9c22f..000000000 --- a/build/genmd.py +++ /dev/null @@ -1,70 +0,0 @@ -import json -import jsonschema2md - -parser = jsonschema2md.Parser( - examples_as_yaml=False, - show_examples="all", -) - -with open("./schemas/arena-schema-files.json", "r") as json_file_all: - files = json.load(json_file_all) -idx = 0 -for file in files: - print(files[file]) - fn = files[file]["file"] - t = files[file]["title"] - - md_lines = [] - md_lines.append('---\n') - md_lines.append(f'title: {t}\n') - md_lines.append(f'nav_order: {idx}\n') - md_lines.append('layout: default\n') - md_lines.append('parent: ARENA Options\n') - md_lines.append('---\n') - md_lines.append('\n') - - with open(fn, "r") as json_file: - md_lines.extend(parser.parse_schema(json.load(json_file))) - out = ''.join(md_lines) - print(out) - f = open(f"{fn[:-5]}.md", "w") - f.write(out) - f.close() - idx+=1 -# "box":{ -# "description":"Box Geometry", -# "file":"schemas/box.json", -# "title":"Box" -# }, - - - -# with open("./examples/food.json", "r") as json_file: -# md_lines = parser.parse_schema(json.load(json_file)) -# print(''.join(md_lines)) - - -# jsonschema2md build/schemas/arena-schema-files.json build/schemas/arena-schema-files.md - -# Usage: jsonschema2md [OPTIONS] - -# Convert JSON Schema to Markdown documentation. - -# Options: -# --version Show the version and exit. -# --examples-as-yaml BOOLEAN Parse examples in YAML-format instead of -# JSON. -# --show-examples [all|properties|object] -# Parse examples for only the main object, -# only properties, or all. -# --help Show this message and exit. - -# where is output directory? - -# read arena-schema-files.json - -# loop through file manifest - -# export each file as .md - -# prepend each file with jekyll preamble From d452a0a800702551a6c7c0e10f27177b32d06a79 Mon Sep 17 00:00:00 2001 From: mwfarb Date: Sat, 9 Apr 2022 23:47:23 -0400 Subject: [PATCH 7/8] chore: fix unlinkable url --- build/schemas/definitions-common.json | 2 +- build/schemas/gltf-model.json | 6 +++--- build/schemas/image.json | 6 +++--- build/schemas/pcd-model.json | 8 ++++---- build/schemas/threejs-scene.json | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build/schemas/definitions-common.json b/build/schemas/definitions-common.json index 82f8c2cab..df75163f4 100644 --- a/build/schemas/definitions-common.json +++ b/build/schemas/definitions-common.json @@ -577,7 +577,7 @@ "type":"object" }, "url":{ - "description":"Model URL. Store files paths under 'store/users/' (e.g. store/users/wiselab/models/factory_robot_arm/scene.gltf); to use CDN, prefix with 'https://arena-cdn.conix.io/' (e.g. https://arena-cdn.conix.io/store/users/wiselab/models/factory_robot_arm/scene.gltf)", + "description":"Model URL. Store files paths under 'store/users/' (e.g. store/users/wiselab/models/factory_robot_arm/scene.gltf); to use CDN, prefix with `https://arena-cdn.conix.io/` (e.g. https://arena-cdn.conix.io/store/users/wiselab/models/factory_robot_arm/scene.gltf)", "format":"uri", "title":"Url", "type":"string" diff --git a/build/schemas/gltf-model.json b/build/schemas/gltf-model.json index 961d33715..31a365c2c 100644 --- a/build/schemas/gltf-model.json +++ b/build/schemas/gltf-model.json @@ -20,11 +20,11 @@ ] }, "url": { - "description": "Model URL. Dropbox share links also accepted. Store files paths under '/store/users/' (e.g. store/users/wiselab/models/factory_robot_arm/scene.gltf); to use CDN, prefix with 'https://arena-cdn.conix.io/' (e.g. https://arena-cdn.conix.io/store/users/wiselab/models/factory_robot_arm/scene.gltf)", + "description": "Model URL. Dropbox share links also accepted. Store files paths under '/store/users/' (e.g. store/users/wiselab/models/factory_robot_arm/scene.gltf); to use CDN, prefix with `https://arena-cdn.conix.io/` (e.g. https://arena-cdn.conix.io/store/users/wiselab/models/factory_robot_arm/scene.gltf)", "format": "uri", "title": "Url", "type": "string" - } + } } }, { @@ -72,4 +72,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/image.json b/build/schemas/image.json index 37555ecef..ed45e4441 100644 --- a/build/schemas/image.json +++ b/build/schemas/image.json @@ -21,11 +21,11 @@ } }, "url": { - "description": "Model URL. Store files paths under 'store/users/' (e.g. store/users/wiselab/models/factory_robot_arm/scene.gltf); to use CDN, prefix with 'https://arena-cdn.conix.io/' (e.g. https://arena-cdn.conix.io/store/users/wiselab/models/factory_robot_arm/scene.gltf)", + "description": "Model URL. Store files paths under 'store/users/' (e.g. store/users/wiselab/models/factory_robot_arm/scene.gltf); to use CDN, prefix with `https://arena-cdn.conix.io/` (e.g. https://arena-cdn.conix.io/store/users/wiselab/models/factory_robot_arm/scene.gltf)", "format": "uri", "title": "Url", "type": "string" - } + } }, { "$ref": "./schemas/definitions-common.json#/properties" @@ -71,4 +71,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/pcd-model.json b/build/schemas/pcd-model.json index eb4c2952f..0ed61e8c6 100644 --- a/build/schemas/pcd-model.json +++ b/build/schemas/pcd-model.json @@ -20,7 +20,7 @@ ] }, "url": { - "description": "Model URL. Dropbox share links also accepted. Store files paths under 'store/users/' (e.g. /store/users/wiselab/pcd-models/bunny.pcd); to use CDN, prefix with 'https://arena-cdn.conix.io/' (e.g. https://arena-cdn.conix.io/store/users/wiselab/pcd-models/bunny.pcd).", + "description": "Model URL. Dropbox share links also accepted. Store files paths under 'store/users/' (e.g. /store/users/wiselab/pcd-models/bunny.pcd); to use CDN, prefix with `https://arena-cdn.conix.io/` (e.g. https://arena-cdn.conix.io/store/users/wiselab/pcd-models/bunny.pcd).", "format": "uri", "title": "Url", "type": "string" @@ -30,14 +30,14 @@ "title": "Points Size", "type": "number", "default": 0.01 - }, + }, "pointColor": { "description": "Color of the points", "title": "Points Color", "format": "color", "type": "string", "default": "#7f7f7f" - } + } } }, { @@ -88,4 +88,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/threejs-scene.json b/build/schemas/threejs-scene.json index d93d745a9..ec54ff41b 100644 --- a/build/schemas/threejs-scene.json +++ b/build/schemas/threejs-scene.json @@ -20,11 +20,11 @@ ] }, "url": { - "description": "Model URL. Store files paths under 'store/users/' (e.g. store/users/wiselab/models/factory_robot_arm/scene.gltf); to use CDN, prefix with 'https://arena-cdn.conix.io/' (e.g. https://arena-cdn.conix.io/store/users/wiselab/models/factory_robot_arm/scene.gltf)", + "description": "Model URL. Store files paths under 'store/users/' (e.g. store/users/wiselab/models/factory_robot_arm/scene.gltf); to use CDN, prefix with `https://arena-cdn.conix.io/` (e.g. https://arena-cdn.conix.io/store/users/wiselab/models/factory_robot_arm/scene.gltf)", "format": "uri", "title": "Url", "type": "string" - } + } } }, { @@ -69,4 +69,4 @@ "data", "persist" ] -} \ No newline at end of file +} From 9af69b6e978bc23f08fa8981b9ab16c9ef1bc7c8 Mon Sep 17 00:00:00 2001 From: mwfarb Date: Sun, 10 Apr 2022 22:12:00 -0400 Subject: [PATCH 8/8] fix links, desc --- build/schemas/arena-program.json | 3 ++- build/schemas/arena-scene-options.json | 20 ++++++++++---------- build/schemas/definitions-common.json | 8 ++++---- build/schemas/definitions-geometries.json | 2 +- build/schemas/definitions-geometry.json | 4 ++-- build/schemas/definitions-gltf.json | 2 +- build/schemas/light.json | 2 +- build/schemas/line.json | 2 +- build/schemas/text.json | 2 +- build/schemas/triangle.json | 8 ++++---- 10 files changed, 27 insertions(+), 26 deletions(-) diff --git a/build/schemas/arena-program.json b/build/schemas/arena-program.json index cc2cabaf4..ced7312c4 100755 --- a/build/schemas/arena-program.json +++ b/build/schemas/arena-program.json @@ -3,6 +3,7 @@ "program":{ "type":"object", "title":"Program Data", + "description":"Object data payload; Program config data", "properties":{ "name":{ "type":"string", @@ -189,4 +190,4 @@ "type", "data" ] - } \ No newline at end of file + } diff --git a/build/schemas/arena-scene-options.json b/build/schemas/arena-scene-options.json index 2d8665fd2..68988e157 100755 --- a/build/schemas/arena-scene-options.json +++ b/build/schemas/arena-scene-options.json @@ -280,8 +280,9 @@ "preset" ], "title":"Environment Presets", - "type":"object" - }, + "type":"object", + "description":"A-Frame Environment presets. \n\nMore properties at https://github.com/supermedium/aframe-environment-component" + }, "renderer-settings":{ "properties":{ "gammaFactor":{ @@ -331,7 +332,8 @@ "outputEncoding" ], "title":"Renderer Settings", - "type":"object" + "type":"object", + "description":"These settings are fed into three.js WebGLRenderer properties" }, "scene-options":{ "properties":{ @@ -449,7 +451,8 @@ "disableVideoCulling" ], "title":"Scene Options", - "type":"object" + "type":"object", + "description":"ARENA Scene Options" }, "Vector3":{ "properties":{ @@ -502,16 +505,13 @@ "data":{ "properties":{ "env-presets":{ - "$ref":"#/definitions/environment-presets", - "description":"A-Frame Environment presets. \n\nMore properties at https://github.com/supermedium/aframe-environment-component" + "$ref":"#/definitions/environment-presets" }, "renderer-settings":{ - "$ref":"#/definitions/renderer-settings", - "description":"These settings are fed into three.js WebGLRenderer properties" + "$ref":"#/definitions/renderer-settings" }, "scene-options":{ - "$ref":"#/definitions/scene-options", - "description":"ARENA Scene Options" + "$ref":"#/definitions/scene-options" } }, "required":[ diff --git a/build/schemas/definitions-common.json b/build/schemas/definitions-common.json index df75163f4..18abc042c 100644 --- a/build/schemas/definitions-common.json +++ b/build/schemas/definitions-common.json @@ -1,7 +1,7 @@ { "properties":{ "animation":{ - "description":"Animate and tween values. \n\nMore properties at https://aframe.io/docs/1.3.0/components/animation.html", + "description":"Animate and tween values. \n\nMore properties at https://aframe.io/docs/1.3.0/components/animation.html", "properties":{ "autoplay":{ "default":true, @@ -201,7 +201,7 @@ "type":"string" }, "dynamic-body":{ - "description":"Physics type attached to the object. \n\nMore properties at https://github.com/n5ro/aframe-physics-system#dynamic-body-and-static-body", + "description":"Physics type attached to the object. \n\nMore properties at https://github.com/n5ro/aframe-physics-system#dynamic-body-and-static-body", "properties":{ "type":{ "enum":[ @@ -348,7 +348,7 @@ "default":{ "encoding":"sRGBEncoding" }, - "description": "Define extra material properties, namely texture encoding, whether to render the material's color and render order. The properties set here access directly Three.js material component. \n\nMore properties at https://threejs.org/docs/#api/en/materials/Material", + "description": "Define extra material properties, namely texture encoding, whether to render the material's color and render order. The properties set here access directly Three.js material component. \n\nMore properties at https://threejs.org/docs/#api/en/materials/Material", "properties":{ "overrideSrc":{ "type":"string", @@ -494,7 +494,7 @@ } }, "sound":{ - "description":"The sound component defines the entity as a source of sound or audio. The sound component is positional and is thus affected by the component's position. \n\nMore properties at https://aframe.io/docs/1.3.0/components/sound.html", + "description":"The sound component defines the entity as a source of sound or audio. The sound component is positional and is thus affected by the component's position. \n\nMore properties at https://aframe.io/docs/1.3.0/components/sound.html", "properties":{ "autoplay":{ "default":false, diff --git a/build/schemas/definitions-geometries.json b/build/schemas/definitions-geometries.json index 388982970..a7ebbabde 100644 --- a/build/schemas/definitions-geometries.json +++ b/build/schemas/definitions-geometries.json @@ -7,7 +7,7 @@ "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", + "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, diff --git a/build/schemas/definitions-geometry.json b/build/schemas/definitions-geometry.json index 52ea2e714..2e51d513b 100644 --- a/build/schemas/definitions-geometry.json +++ b/build/schemas/definitions-geometry.json @@ -23,7 +23,7 @@ "required": ["displayName"] }, "material": { - "description": "The material properties of the object’s surface. \n\nMore properties at https://aframe.io/docs/1.3.0/components/material.html", + "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, @@ -163,7 +163,7 @@ "encoding": "sRGBEncoding", "needsUpdate": false }, - "description": "Define extra material properties, namely texture encoding, whether to render the material's color and render order. The properties set here access directly Three.js material component. \n\nMore properties at https://threejs.org/docs/#api/en/materials/Material", + "description": "Define extra material properties, namely texture encoding, whether to render the material's color and render order. The properties set here access directly Three.js material component. \n\nMore properties at https://threejs.org/docs/#api/en/materials/Material", "properties": { "encoding": { "default": "sRGBEncoding", diff --git a/build/schemas/definitions-gltf.json b/build/schemas/definitions-gltf.json index f8e01471c..6d1dc8bff 100644 --- a/build/schemas/definitions-gltf.json +++ b/build/schemas/definitions-gltf.json @@ -1,7 +1,7 @@ { "properties": { "animation-mixer": { - "description": "A list of available animations can usually be found by inspecting the model file or its documentation. All animations will play by default. To play only a specific set of animations, use wildcards: animation-mixer='clip: run_*'. \n\nMore properties at https://github.com/n5ro/aframe-extras/tree/master/src/loaders#animation", + "description": "A list of available animations can usually be found by inspecting the model file or its documentation. All animations will play by default. To play only a specific set of animations, use wildcards: animation-mixer='clip: run_*'. \n\nMore properties at https://github.com/n5ro/aframe-extras/tree/master/src/loaders#animation", "properties": { "clampWhenFinished": { "default": false, diff --git a/build/schemas/light.json b/build/schemas/light.json index 18540b292..9bd18bec6 100644 --- a/build/schemas/light.json +++ b/build/schemas/light.json @@ -1,6 +1,6 @@ { "title": "Light", - "description": "A light. \n\nMore properties at https://aframe.io/docs/1.3.0/components/light.html", + "description": "A light. \n\nMore properties at https://aframe.io/docs/1.3.0/components/light.html", "allOf": [ { "$ref": "./schemas/definitions-arena-object.json#/properties" diff --git a/build/schemas/line.json b/build/schemas/line.json index 91bfc0037..04a2cffb1 100644 --- a/build/schemas/line.json +++ b/build/schemas/line.json @@ -119,4 +119,4 @@ "data", "persist" ] -} \ No newline at end of file +} diff --git a/build/schemas/text.json b/build/schemas/text.json index 1f6b54b6d..e99b2e919 100644 --- a/build/schemas/text.json +++ b/build/schemas/text.json @@ -1,6 +1,6 @@ { "title": "Text", - "description": "Display text. \n\nMore properties at https://aframe.io/docs/1.3.0/components/text.html", + "description": "Display text. \n\nMore properties at https://aframe.io/docs/1.3.0/components/text.html", "allOf": [ { "$ref": "./schemas/definitions-arena-object.json#/properties" diff --git a/build/schemas/triangle.json b/build/schemas/triangle.json index f070b5988..7d6691ff5 100644 --- a/build/schemas/triangle.json +++ b/build/schemas/triangle.json @@ -42,7 +42,7 @@ "y": -0.5, "z": 0 } - }, + }, "vertexB": { "title": "vertex B", "properties": { @@ -66,7 +66,7 @@ "y": -0.5, "z": 0 } - }, + }, "vertexC": { "title": "vertex C", "properties": { @@ -90,7 +90,7 @@ "y": -0.5, "z": 0 } - } + } } }, { @@ -150,4 +150,4 @@ "data", "persist" ] -} \ No newline at end of file +}