RFDT Solver and WiTwin Simulator are undergoing internal testing as we prepare for public release. The functions are limited. Sign up to receive updates.

Library

Asset browser for quickly adding objects to the scene

Overview#

The Library panel is an asset browser for quickly adding objects to your scene. Located on the left side (alternative to Hierarchy), it provides categorized access to primitives, lights, cameras, and custom assets with click or drag-and-drop creation.

Panel Layout#

┌─────────────────────────────┐
│  [Search...]                │
├──────┬──────────────────────┤
│      │                      │
│ Cat. │     Item Grid        │
│ Tabs │                      │
│      │  [Cube] [Sphere]     │
│      │  [Plane] [Cylinder]  │
│      │                      │
└──────┴──────────────────────┘

Default Categories#

CategoryContents
BasicPrimitives: Cube, Sphere, Plane, Cylinder, Cone, Torus
LightsPoint Light, Directional Light, Spot Light, Area Light
CamerasCamera, Orthographic Camera
RF/WirelessTransmitter, Receiver, Radar, Antenna
EmptyEmpty Object (for grouping)

Adding Objects#

Click to Create#

Click any item to create it in the scene:

  • Object appears 10 meters in front of camera
  • Automatically selected after creation
  • Name auto-incremented (e.g., "Cube", "Cube_1", "Cube_2")

Drag and Drop#

Drag an item onto the Viewport:

  1. Raycast Hit: Creates at intersection point with existing object
  2. Ground Plane: Creates at Y=0 if no object hit
  3. Fallback: Creates 10m from camera if no hit

The search box filters items across all categories:

  • Type to filter items
  • Shows "Search Results" header
  • Clear to return to category view
  • Case-insensitive matching

Python API#

Register Custom Categories#

from witwin import Library
 
# Register a new category
Library.register_category(
    id="custom",
    name="Custom Objects",
    icon="box"  # Lucide icon name
)

Register Custom Items#

from witwin import Library
 
# Register a primitive item
Library.register_item(
    id="my_cube",
    name="My Cube",
    category="custom",
    mesh_type="Cube"
)
 
# Register a custom model
Library.register_item(
    id="my_model",
    name="My Model",
    category="custom",
    model_path="/models/custom.obj"
)

Item Options#

Library.register_item(
    id="configured_cube",
    name="Configured Cube",
    category="custom",
    mesh_type="Cube",
    # Optional parameters
    default_material={
        "color": "#ff0000",
        "metalness": 0.5,
        "roughness": 0.5
    },
    default_transform={
        "position": [0, 1, 0],
        "rotation": [0, 0, 0],
        "scale": [1, 1, 1]
    }
)

Available Mesh Types#

Mesh TypeDescription
CubeBox primitive
SphereSphere primitive
PlaneFlat plane
CylinderCylinder primitive
ConeCone primitive
TorusTorus (donut) primitive
CircleCircle plane
RingRing plane

Available Icons#

The Library uses Lucide icons:

IconTypical Use
boxGeneric 3D object
lightbulbLight sources
cameraCameras
radioRF/Wireless
folderEmpty/Group

Usage Examples#

Setting Up a Custom Library#

from witwin import Library
 
# Create a category for building components
Library.register_category("building", "Building", icon="building")
 
# Register building items
Library.register_item("wall", "Wall", "building", mesh_type="Cube",
    default_transform={"scale": [5, 3, 0.2]})
Library.register_item("floor", "Floor", "building", mesh_type="Plane",
    default_transform={"scale": [10, 10, 1]})
Library.register_item("pillar", "Pillar", "building", mesh_type="Cylinder",
    default_transform={"scale": [0.3, 3, 0.3]})

RF Simulation Library#

from witwin import Library
 
# Custom RF category
Library.register_category("rf_custom", "Custom RF", icon="radio")
 
# Register RF components
Library.register_item("mimo_antenna", "MIMO Antenna", "rf_custom",
    model_path="/models/mimo_antenna.obj")
Library.register_item("reflector", "Reflector Panel", "rf_custom",
    mesh_type="Plane",
    default_material={"metalness": 1.0, "roughness": 0.1})