diff --git a/spec.json b/spec.json index c5edcb2b..0b94f21b 100644 --- a/spec.json +++ b/spec.json @@ -5590,34 +5590,6 @@ ], "type": "object" }, - "Extrude": { - "description": "Command for extruding a solid.", - "properties": { - "cap": { - "description": "Whether to cap the extrusion with a face, or not. If true, the resulting solid will be closed on all sides, like a dice. If false, it will be open on one side, like a drinking glass.", - "type": "boolean" - }, - "distance": { - "description": "How far off the plane to extrude", - "format": "double", - "type": "number" - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "Which sketch to extrude. Must be a closed 2D solid." - } - }, - "required": [ - "cap", - "distance", - "target" - ], - "type": "object" - }, "FileCenterOfMass": { "description": "A file center of mass result.", "properties": { @@ -6452,7 +6424,7 @@ "properties": { "type": { "enum": [ - "Gltf" + "gltf" ], "type": "string" } @@ -6475,7 +6447,7 @@ }, "type": { "enum": [ - "Step" + "step" ], "type": "string" } @@ -6499,7 +6471,7 @@ }, "type": { "enum": [ - "Obj" + "obj" ], "type": "string" }, @@ -6532,7 +6504,7 @@ }, "type": { "enum": [ - "Ply" + "ply" ], "type": "string" }, @@ -6565,7 +6537,7 @@ }, "type": { "enum": [ - "Stl" + "stl" ], "type": "string" }, @@ -7213,358 +7185,673 @@ "oneOf": [ { "description": "Start a path.", - "enum": [ - "StartPath" + "properties": { + "type": { + "enum": [ + "start_path" + ], + "type": "string" + } + }, + "required": [ + "type" ], - "type": "string" + "type": "object" }, { - "additionalProperties": false, "description": "Move the path's \"pen\".", "properties": { - "MovePathPen": { - "properties": { - "path": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "The ID of the command which created the path." - }, - "to": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Where the path's pen should be." + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" } - }, - "required": [ - "path", - "to" ], - "type": "object" + "description": "The ID of the command which created the path." + }, + "to": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Where the path's pen should be." + }, + "type": { + "enum": [ + "move_path_pen" + ], + "type": "string" } }, "required": [ - "MovePathPen" + "path", + "to", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Extend a path by adding a new segment which starts at the path's \"pen\". If no \"pen\" location has been set before (via `MovePen`), then the pen is at the origin.", "properties": { - "ExtendPath": { - "properties": { - "path": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "The ID of the command which created the path." - }, - "segment": { - "allOf": [ - { - "$ref": "#/components/schemas/PathSegment" - } - ], - "description": "Segment to append to the path. This segment will implicitly begin at the current \"pen\" location." + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" } - }, - "required": [ - "path", - "segment" ], - "type": "object" + "description": "The ID of the command which created the path." + }, + "segment": { + "allOf": [ + { + "$ref": "#/components/schemas/PathSegment" + } + ], + "description": "Segment to append to the path. This segment will implicitly begin at the current \"pen\" location." + }, + "type": { + "enum": [ + "extend_path" + ], + "type": "string" } }, "required": [ - "ExtendPath" + "path", + "segment", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Extrude a 2D solid.", "properties": { - "Extrude": { - "$ref": "#/components/schemas/Extrude" + "cap": { + "description": "Whether to cap the extrusion with a face, or not. If true, the resulting solid will be closed on all sides, like a dice. If false, it will be open on one side, like a drinking glass.", + "type": "boolean" + }, + "distance": { + "description": "How far off the plane to extrude", + "format": "double", + "type": "number" + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" + } + ], + "description": "Which sketch to extrude. Must be a closed 2D solid." + }, + "type": { + "enum": [ + "extrude" + ], + "type": "string" } }, "required": [ - "Extrude" + "cap", + "distance", + "target", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Closes a path, converting it to a 2D solid.", "properties": { - "ClosePath": { - "properties": { - "path_id": { - "description": "Which path to close.", - "format": "uuid", - "type": "string" - } - }, - "required": [ - "path_id" + "path_id": { + "description": "Which path to close.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "close_path" ], - "type": "object" + "type": "string" } }, "required": [ - "ClosePath" + "path_id", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Camera drag started.", "properties": { - "CameraDragStart": { - "properties": { - "interaction": { - "allOf": [ - { - "$ref": "#/components/schemas/CameraDragInteractionType" - } - ], - "description": "The type of camera drag interaction." - }, - "window": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "The initial mouse position." + "interaction": { + "allOf": [ + { + "$ref": "#/components/schemas/CameraDragInteractionType" } - }, - "required": [ - "interaction", - "window" ], - "type": "object" + "description": "The type of camera drag interaction." + }, + "type": { + "enum": [ + "camera_drag_start" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "The initial mouse position." } }, "required": [ - "CameraDragStart" + "interaction", + "type", + "window" ], "type": "object" }, { - "additionalProperties": false, "description": "Camera drag continued.", "properties": { - "CameraDragMove": { - "properties": { - "interaction": { - "allOf": [ - { - "$ref": "#/components/schemas/CameraDragInteractionType" - } - ], - "description": "The type of camera drag interaction." - }, - "sequence": { - "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.", - "format": "uint32", - "minimum": 0, - "nullable": true, - "type": "integer" - }, - "window": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "The current mouse position." + "interaction": { + "allOf": [ + { + "$ref": "#/components/schemas/CameraDragInteractionType" } - }, - "required": [ - "interaction", - "window" ], - "type": "object" + "description": "The type of camera drag interaction." + }, + "sequence": { + "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.", + "format": "uint32", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "type": { + "enum": [ + "camera_drag_move" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "The current mouse position." } }, "required": [ - "CameraDragMove" + "interaction", + "type", + "window" ], "type": "object" }, { - "additionalProperties": false, "description": "Camera drag ended.", "properties": { - "CameraDragEnd": { - "properties": { - "interaction": { - "allOf": [ - { - "$ref": "#/components/schemas/CameraDragInteractionType" - } - ], - "description": "The type of camera drag interaction." - }, - "window": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "The final mouse position." + "interaction": { + "allOf": [ + { + "$ref": "#/components/schemas/CameraDragInteractionType" } - }, - "required": [ - "interaction", - "window" ], - "type": "object" + "description": "The type of camera drag interaction." + }, + "type": { + "enum": [ + "camera_drag_end" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "The final mouse position." } }, "required": [ - "CameraDragEnd" + "interaction", + "type", + "window" ], "type": "object" }, { - "additionalProperties": false, "description": "Change what the default camera is looking at.", "properties": { - "DefaultCameraLookAt": { - "properties": { - "center": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "What the camera is looking at. Center of the camera's field of vision" - }, - "up": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Which way is \"up\", from the camera's point of view." - }, - "vantage": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Where the camera is positioned" + "center": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "center", - "up", - "vantage" ], - "type": "object" + "description": "What the camera is looking at. Center of the camera's field of vision" + }, + "type": { + "enum": [ + "default_camera_look_at" + ], + "type": "string" + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Which way is \"up\", from the camera's point of view." + }, + "vantage": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Where the camera is positioned" } }, "required": [ - "DefaultCameraLookAt" + "center", + "type", + "up", + "vantage" ], "type": "object" }, { - "additionalProperties": false, "description": "Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on.", "properties": { - "DefaultCameraEnableSketchMode": { - "properties": { - "distance_to_plane": { - "description": "How far to the sketching plane?", - "format": "float", - "type": "number" - }, - "origin": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "What's the origin of the sketching plane?" - }, - "ortho": { - "description": "Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera.", - "type": "boolean" - }, - "x_axis": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Which 3D axis of the scene should be the X axis of the sketching plane?" - }, - "y_axis": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Which 3D axis of the scene should be the Y axis of the sketching plane?" - } - }, - "required": [ - "distance_to_plane", - "origin", - "ortho", - "x_axis", - "y_axis" + "distance_to_plane": { + "description": "How far to the sketching plane?", + "format": "float", + "type": "number" + }, + "origin": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } ], - "type": "object" + "description": "What's the origin of the sketching plane?" + }, + "ortho": { + "description": "Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera.", + "type": "boolean" + }, + "type": { + "enum": [ + "default_camera_enable_sketch_mode" + ], + "type": "string" + }, + "x_axis": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Which 3D axis of the scene should be the X axis of the sketching plane?" + }, + "y_axis": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Which 3D axis of the scene should be the Y axis of the sketching plane?" } }, "required": [ - "DefaultCameraEnableSketchMode" + "distance_to_plane", + "origin", + "ortho", + "type", + "x_axis", + "y_axis" ], "type": "object" }, { "description": "Disable sketch mode, from the default camera.", - "enum": [ - "DefaultCameraDisableSketchMode" + "properties": { + "type": { + "enum": [ + "default_camera_disable_sketch_mode" + ], + "type": "string" + } + }, + "required": [ + "type" ], - "type": "string" + "type": "object" }, { - "additionalProperties": false, "description": "Export the scene to a file.", "properties": { - "Export": { - "properties": { - "format": { - "allOf": [ - { - "$ref": "#/components/schemas/OutputFormat" - } - ], - "description": "The file format to export to." + "entity_ids": { + "description": "IDs of the entities to be exported. If this is empty, then all entities are exported.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/OutputFormat" + } + ], + "description": "The file format to export to." + }, + "type": { + "enum": [ + "export" + ], + "type": "string" + } + }, + "required": [ + "entity_ids", + "format", + "type" + ], + "type": "object" + }, + { + "description": "What is this entity's parent?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_parent_id" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "How many children does the entity have?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_num_children" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "What is the UUID of this entity's n-th child?", + "properties": { + "child_index": { + "description": "Index into the entity's list of children.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_child_uuid" + ], + "type": "string" + } + }, + "required": [ + "child_index", + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "What are all UUIDs of this entity's children?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_all_child_uuids" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "Enter edit mode", + "properties": { + "target": { + "description": "The edit target", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "edit_mode_enter" + ], + "type": "string" + } + }, + "required": [ + "target", + "type" + ], + "type": "object" + }, + { + "description": "Exit edit mode", + "properties": { + "type": { + "enum": [ + "edit_mode_exit" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Modifies the selection by simulating a \"mouse click\" at the given x,y window coordinate Returns ID of whatever was selected.", + "properties": { + "selected_at_window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "Where in the window was selected" + }, + "selection_type": { + "allOf": [ + { + "$ref": "#/components/schemas/SceneSelectionType" + } + ], + "description": "What entity was selected?" + }, + "type": { + "enum": [ + "select_with_point" + ], + "type": "string" + } + }, + "required": [ + "selected_at_window", + "selection_type", + "type" + ], + "type": "object" + }, + { + "description": "Clear the selection", + "properties": { + "type": { + "enum": [ + "select_clear" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Adds one or more entities (by UUID) to the selection.", + "properties": { + "entities": { + "description": "Which entities to select", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "select_add" + ], + "type": "string" + } + }, + "required": [ + "entities", + "type" + ], + "type": "object" + }, + { + "description": "Removes one or more entities (by UUID) from the selection.", + "properties": { + "entities": { + "description": "Which entities to unselect", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "select_remove" + ], + "type": "string" + } + }, + "required": [ + "entities", + "type" + ], + "type": "object" + }, + { + "description": "Find all IDs of selected entities", + "properties": { + "type": { + "enum": [ + "select_get" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight.", + "properties": { + "selected_at_window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" } + ], + "description": "Coordinates of the window being clicked" + }, + "type": { + "enum": [ + "highlight_set_entity" + ], + "type": "string" + } + }, + "required": [ + "selected_at_window", + "type" + ], + "type": "object" + }, + { + "description": "Changes the current highlighted entity to these entities.", + "properties": { + "entities": { + "description": "Highlight these entities.", + "items": { + "format": "uuid", + "type": "string" }, - "required": [ - "format" + "type": "array" + }, + "type": { + "enum": [ + "highlight_set_entities" ], - "type": "object" + "type": "string" } }, "required": [ - "Export" + "entities", + "type" ], "type": "object" } @@ -7850,7 +8137,7 @@ }, "type": { "enum": [ - "Gltf" + "gltf" ], "type": "string" } @@ -7874,7 +8161,7 @@ }, "type": { "enum": [ - "Obj" + "obj" ], "type": "string" } @@ -7906,7 +8193,7 @@ }, "type": { "enum": [ - "Ply" + "ply" ], "type": "string" } @@ -7931,7 +8218,7 @@ }, "type": { "enum": [ - "Step" + "step" ], "type": "string" } @@ -7963,7 +8250,7 @@ }, "type": { "enum": [ - "Stl" + "stl" ], "type": "string" } @@ -7981,116 +8268,110 @@ "description": "A segment of a path. Paths are composed of many segments.", "oneOf": [ { - "additionalProperties": false, "description": "A straight line segment. Goes from the current path \"pen\" to the given endpoint.", "properties": { - "Line": { - "properties": { - "end": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "End point of the line." + "end": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "end" ], - "type": "object" + "description": "End point of the line." + }, + "type": { + "enum": [ + "line" + ], + "type": "string" } }, "required": [ - "Line" + "end", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "A circular arc segment.", "properties": { - "Arc": { - "properties": { - "angle_end": { - "description": "Start of the arc along circle's perimeter.", - "format": "float", - "type": "number" - }, - "angle_start": { - "description": "Start of the arc along circle's perimeter.", - "format": "float", - "type": "number" - }, - "center": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "Center of the circle" - }, - "radius": { - "description": "Radius of the circle", - "format": "float", - "type": "number" + "angle_end": { + "description": "Start of the arc along circle's perimeter.", + "format": "float", + "type": "number" + }, + "angle_start": { + "description": "Start of the arc along circle's perimeter.", + "format": "float", + "type": "number" + }, + "center": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" } - }, - "required": [ - "angle_end", - "angle_start", - "center", - "radius" ], - "type": "object" + "description": "Center of the circle" + }, + "radius": { + "description": "Radius of the circle", + "format": "float", + "type": "number" + }, + "type": { + "enum": [ + "arc" + ], + "type": "string" } }, "required": [ - "Arc" + "angle_end", + "angle_start", + "center", + "radius", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point.", "properties": { - "Bezier": { - "properties": { - "control1": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "First control point." - }, - "control2": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Second control point." - }, - "end": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Final control point." + "control1": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "control1", - "control2", - "end" ], - "type": "object" + "description": "First control point." + }, + "control2": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Second control point." + }, + "end": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Final control point." + }, + "type": { + "enum": [ + "bezier" + ], + "type": "string" } }, "required": [ - "Bezier" + "control1", + "control2", + "end", + "type" ], "type": "object" } @@ -8665,6 +8946,32 @@ }, "type": "object" }, + "SceneSelectionType": { + "description": "The type of scene selection change", + "oneOf": [ + { + "description": "Replaces the selection", + "enum": [ + "replace" + ], + "type": "string" + }, + { + "description": "Adds to the selection", + "enum": [ + "add" + ], + "type": "string" + }, + { + "description": "Removes from the selection", + "enum": [ + "remove" + ], + "type": "string" + } + ] + }, "Session": { "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", "properties": {