Layers
3D Layer
3D layers render GLTF/GLB models, primitive shapes, or extruded SVGs in the scene. Models support materials, environment maps, and auto-rotation.
Example
3d-layer.json
{
"type": "3d",
"id": "3d-1",
"name": "3D Model",
"visible": true,
"locked": false,
"settings": {
"inputType": "model",
"modelUrl": "https://example.com/model.glb",
"shape": "sphere",
"materialType": "standard",
"color": "#ffffff",
"scale": 1,
"autoRotate": true,
"rotationX": 0,
"rotationY": 0,
"rotationZ": 0,
"envMapIntensity": 1
},
"transform": {
"x": 0,
"y": 0,
"width": 1,
"height": 1,
"rotation": 0,
"opacity": 1
}
}Input Types
- model - GLTF/GLB 3D model file
- shape - Primitive geometry (box, sphere, torus, etc.)
- svg - Extruded SVG path
Properties
| Property | Type | Description |
|---|---|---|
inputType | string | "model" | "shape" | "svg" |
modelUrl | string | URL of GLTF/GLB model (for inputType: model) |
shape | string | Primitive shape type (for inputType: shape) |
materialType | string | Material type (standard, physical, toon, etc.) |
color | string | Base color (hex) |
scale | number | Uniform scale factor |
autoRotate | boolean | Enable automatic rotation animation |
rotationX/Y/Z | number | Initial rotation in degrees |
envMapIntensity | number | Environment map reflection intensity |
Available Shapes
boxBox
Cube/rectangular prism
sphereSphere
Perfect sphere
torusTorus
Donut shape
torusKnotTorus Knot
Twisted torus
coneCone
Cone shape
cylinderCylinder
Cylinder shape
Materials
Use the materials discovery API to get all available material types:
materials.sh
GET https://efecto.app/api/v1/materials