A 3D element represents three-dimensional objects in your project, including imported 3D models, basic geometry primitives, extruded shapes from 2D shapes, 3D text, and boolean operation results.
3D elements share the common fields from Basic Element and View Element, while also introducing additional 3D-specific properties.
| Prop | Type | Required | Example | Value Range | Description |
|---|---|---|---|---|---|
| type | string | true | - | 3D | The type of the element. For 3D elements, this is always "3D". |
| sourceId | string | false | - | - | Internal identifier for the 3D model or geometry resource. |
| ext | string | false | - | glb | gltf | fbx | obj | geometry | text3d | parametric | topology | curve | The file extension or node type of the 3D element. |
| externalUrl | string | false | - | - | Optional URL for loading external glTF/glb models. The engine will fetch and cache the model. |
| nodeType | string | false | - | geometry | text3d | model | parametric | topology | curve | The type of 3D node. Determines the structure of additional properties. |
| category | string | false | - | For geometry: basic | polyhedron. For parametric: extrusion | lathe. For topology: boolean | array | mirror | compound. For curve: helix | torusKnot | custom | Sub-category of the 3D node. Available values depend on nodeType. |
| geometryType | string | false | - | - | The type of basic geometry. See "Geometry Types" section below. |
| originalWidth | number | false | - | - | The original width of the 3D model in world units. |
| originalHeight | number | false | - | - | The original height of the 3D model in world units. |
| originalDepth | number | false | - | - | The original depth of the 3D model in world units. |
| animation | object | false | - | - | Animation settings for glTF models with animations. Contains currentIndex, speed, and loop properties. |
In addition to the standard 2D transform properties (x, y, rotation, scaleX, scaleY), 3D elements support additional transform properties for three-dimensional positioning and rotation:
| Prop | Type | Required | Example | Value Range | Description |
|---|---|---|---|---|---|
| z | number | false | - | - | The depth position of the element in 3D space. Units are aligned with pixels, where z=0 corresponds to the canvas plane. |
| rotationX | number | false | - | - | Rotation around the X-axis, in degrees. |
| rotationY | number | false | - | - | Rotation around the Y-axis, in degrees. |
| scaleZ | number | false | - | > 0 | Scaling factor along the Z-axis. Values > 1 enlarge, values between 0 and 1 shrink. |
The geometryType field specifies the type of basic 3D geometry. Available types are organized by category (specified via the category field when nodeType: "geometry"):
Basic Shapes (category: "basic"):
cube - Six-sided boxsphere - Spherical geometrycylinder - Cylindrical geometrycone - Conical geometrytorus - Donut-shaped geometrycapsule - Pill-shaped geometrydisc - Flat circular discPolyhedrons (category: "polyhedron"):
pyramid - Four-sided pyramidoctahedron - Eight-faced polyhedronicosahedron - Twenty-faced polyhedrondodecahedron - Twelve-faced polyhedronhexPrism - Six-sided prismtriangle - Triangular prismParametric nodes (nodeType: "parametric") generate geometry procedurally:
Extrusion (category: "extrusion"):
Lathe (category: "lathe"):
Curve nodes (nodeType: "curve") create 3D curves and paths:
Helix (category: "helix"):
Torus Knot (category: "torusKnot"):
Custom (category: "custom"):
Topology nodes (nodeType: "topology") perform operations on existing geometry:
Boolean (category: "boolean"):
Array (category: "array"):
Mirror (category: "mirror"):
Compound (category: "compound"):
3D elements can be created by extruding 2D shapes. When you convert a 2D Shape element to 3D in the editor, it generates a new type: "3D" element with the following additional fields:
| Prop | Type | Required | Example | Value Range | Description |
|---|---|---|---|---|---|
| extrusionSource | object | false | - | - | The original 2D shape data used to create the 3D extrusion. Contains the complete ShapeNodeData. |
| shapeSizeX | number | false | - | - | Width of the extruded shape, in pixels. |
| shapeSizeY | number | false | - | - | Height of the extruded shape, in pixels. |
| shapeExtrusion | number | false | - | - | Depth of extrusion along the Z-axis, in pixels. |
| shapeCorner | string | false | - | round | chamfer | straight | Corner type for extruded shapes. |
| shapeRoundnessSmooth | number | false | - | 0 - 1 | Smoothness of rounded corners (0-1). |
| shapeRoundnessArc | number | false | - | - | Arc radius for rounded corners. |
| shapeBevel | number | false | - | - | Bevel depth for edges. |
| shapeBevelSides | number | false | - | - | Number of segments for beveled edges. |
3D elements can also represent three-dimensional text with depth and beveling:
| Prop | Type | Required | Example | Value Range | Description |
|---|---|---|---|---|---|
| textContent | string | false | - | - | The text content to render in 3D. |
| textStyle3D | object | false | - | - | Text styling properties (font, size, weight, etc.). Reuses some 2D text style fields. |
| textDepth | number | false | - | - | Extrusion depth of the 3D text. |
| textBevelSize | number | false | - | - | Size of the bevel on text edges. |
| textBevelSegments | number | false | - | - | Number of segments for text beveling. |
| textCurveSegments | number | false | - | - | Number of segments for text curves. |
3D elements use a PBR (Physically Based Rendering) material system with comprehensive texture support:
| Prop | Type | Required | Example | Value Range | Description |
|---|---|---|---|---|---|
| material | object | false | - | - | Complete material configuration including PBR properties and texture maps. |
The material object contains:
physicalMaterialData - PBR material properties:
color (string) - Base color in hex format, default: '#818cf8'roughness (number) - Surface roughness, 0-1, default: 0.4metalness (number) - Metallic property, 0-1, default: 0.0opacity (number) - Material opacity, 0-1, default: 1.0transmission (number) - Light transmission for glass-like materials, 0-1, default: 0.0ior (number) - Index of refraction, typically 1.0-2.5, default: 1.5clearcoat (number) - Clear coating layer intensity, 0-1, default: 0.0clearcoatRoughness (number) - Clear coat roughness, 0-1, default: 0.0sheen (number) - Fabric-like sheen effect, 0-1, default: 0.0sheenRoughness (number) - Sheen roughness, 0-1, default: 0.0sheenColor (string) - Sheen tint colorthickness (number) - Material thickness for transmissionmaterialXPath (string) - Optional MaterialX preset path:
Texture Maps - The material object can contain texture map URLs:
colorMap - Base color/diffuse texturenormalMap - Normal map for surface detailroughnessMap - Roughness texturemetalnessMap - Metalness textureaoMap - Ambient occlusion mapemissiveMap - Emissive/glow textureTexture maps are applied using TSL (Three.js Shading Language) functions for optimal performance.
3D elements with nodeType: "model" represent imported 3D models:
source.url to specify the URL of the remote glTF/glb/FBX filesourceIdanimation.currentIndex to select which animation to playcurrentIndex (number), speed (number, default 1.0), loop (boolean, default true)sizeParams contains width, height, depth for model dimensions1
2{
3 "id": "3d-cube-001",
4 "type": "3D",
5 "start": 0,
6 "duration": 5,
7 "trackIndex": 0,
8 "x": 540,
9 "y": 540,
10 "z": 0,
11 "width": 200,
12 "height": 200,
13 "anchorX": 100,
14 "anchorY": 100,
15 "rotation": 0,
16 "rotationX": 30,
17 "rotationY": 45,
18 "scaleX": 1,
19 "scaleY": 1,
20 "scaleZ": 1,
21 "alpha": 1,
22 "ext": "geometry",
23 "nodeType": "geometry",
24 "category": "basic",
25 "geometryType": "cube",
26 "material": {
27 "physicalMaterialData": {
28 "color": "#4A90E2",
29 "roughness": 0.4,
30 "metalness": 0.0
31 }
32 }
33}
341
2{
3 "id": "3d-extrusion-001",
4 "type": "3D",
5 "start": 0,
6 "duration": 5,
7 "trackIndex": 0,
8 "x": 540,
9 "y": 540,
10 "z": 0,
11 "width": 300,
12 "height": 300,
13 "anchorX": 150,
14 "anchorY": 150,
15 "rotation": 0,
16 "rotationX": 0,
17 "rotationY": 0,
18 "scaleX": 1,
19 "scaleY": 1,
20 "scaleZ": 1,
21 "alpha": 1,
22 "ext": "parametric",
23 "nodeType": "parametric",
24 "category": "extrusion",
25 "shapeSizeX": 300,
26 "shapeSizeY": 300,
27 "shapeExtrusion": 100,
28 "material": {
29 "physicalMaterialData": {
30 "color": "#FF6B6B",
31 "roughness": 0.3,
32 "metalness": 0.1
33 }
34 },
35 "extrusionSource": {
36 "shapeType": "SHAPE_STAR",
37 "starPoints": 5,
38 "starInnerRadius": 0.4
39 }
40}
411
2{
3 "id": "3d-model-001",
4 "type": "3D",
5 "start": 0,
6 "duration": 10,
7 "trackIndex": 0,
8 "x": 540,
9 "y": 540,
10 "z": -200,
11 "width": 400,
12 "height": 400,
13 "anchorX": 200,
14 "anchorY": 200,
15 "rotation": 0,
16 "rotationX": 0,
17 "rotationY": 0,
18 "scaleX": 1,
19 "scaleY": 1,
20 "scaleZ": 1,
21 "alpha": 1,
22 "ext": "glb",
23 "nodeType": "model",
24 "sourceId": "cached-model-123",
25 "source": {
26 "url": "https://example.com/models/animated_character.glb"
27 },
28 "animation": {
29 "currentIndex": 0,
30 "speed": 1.0,
31 "loop": true
32 },
33 "sizeParams": {
34 "width": 2,
35 "height": 2,
36 "depth": 2
37 },
38 "originalWidth": 2,
39 "originalHeight": 2,
40 "originalDepth": 2
41}
42