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

PropertyTypeDescription
inputTypestring"model" | "shape" | "svg"
modelUrlstringURL of GLTF/GLB model (for inputType: model)
shapestringPrimitive shape type (for inputType: shape)
materialTypestringMaterial type (standard, physical, toon, etc.)
colorstringBase color (hex)
scalenumberUniform scale factor
autoRotatebooleanEnable automatic rotation animation
rotationX/Y/ZnumberInitial rotation in degrees
envMapIntensitynumberEnvironment map reflection intensity

Available Shapes

box

Box

Cube/rectangular prism

sphere

Sphere

Perfect sphere

torus

Torus

Donut shape

torusKnot

Torus Knot

Twisted torus

cone

Cone

Cone shape

cylinder

Cylinder

Cylinder shape

Materials

Use the materials discovery API to get all available material types:

materials.sh
GET https://efecto.app/api/v1/materials