Skip to content

Traits Reference

HoloScript includes 1,800+ built-in traits across 68 categories that cover VR/AR interaction, physics, networking, audio, AI, robotics, IoT, and more. Add traits with the @ prefix.

Note: This page shows a curated selection of commonly used traits. The full 1,800+ traits are organized in 68+ category modules in the HoloScript core package. Use holoscript list-traits or the MCP tool list_traits to browse all available traits.

Trait Categories Overview

CategoryExamplesCount
Core VR@grabbable, @physics, @collidable25+
Interaction@clickable, @hoverable, @draggable30+
Visual/Effects@glowing, @particle_system, @weather40+
Physics@rigid, @kinematic, @cloth, @fluid25+
Networking@networked, @synced, @persistent20+
Audio@spatial_audio, @ambient, @voice_activated15+
AI/Agents@behavior_tree, @pathfinding, @npc30+
Humanoid@avatar, @hand_tracked, @eye_tracked35+
Locomotion@teleport, @flying, @climbing20+
UI@billboard, @tooltip, @menu25+
Platform@visionos, @quest, @webxr15+
Environment@skybox, @terrain, @water30+
Nature@flora, @fauna, @ecosystem25+
Game@inventory, @health, @scoreboard40+
Magic/Sci-Fi@spell, @shield, @hologram50+
Building@snappable, @resizable, @blueprint30+
Emotion/Mood@expression, @ambient_mood20+
Social@voice_chat, @emote, @presence20+
Media@video_player, @screen_share15+
Accessibility@screen_reader, @haptic_guide15+
...and 41 more categories

Interaction Traits

TraitDescription
@grabbableObject can be picked up with hands/controllers
@throwableObject can be thrown after grabbing
@holdableObject stays in hand until released
@clickableObject responds to click/tap events
@hoverableObject responds to hover/gaze events
@draggableObject can be dragged in 2D/3D space

Example

hsplus
composition "WeaponDemo" {
  template "Weapon" {
    @grabbable
    @throwable
    @holdable
    geometry: "sphere"

    on_grab: { play_sound("pickup") }
    on_throw: { damage_on_impact(50) }
  }

  object "Weapon" using "Weapon" {
    position: [0, 1, -2]
  }
}

Physics Traits

TraitDescription
@collidableObject participates in collision detection
@physicsObject has full physics simulation
@rigidRigid body dynamics
@kinematicScripted movement, affects other physics objects
@triggerCollision detection without physical response
@gravityObject affected by gravity

Example

hsplus
composition "PhysicsDemo" {
  template "Ball" {
    @physics
    @gravity
    @collidable
    geometry: "sphere"
    mass: 1.0
    bounciness: 0.8
    friction: 0.3
  }

  object "Ball" using "Ball" {
    position: [0, 2, 0]
  }
}

Visual Traits

TraitDescription
@glowingObject emits light
@emissiveSelf-illuminating material
@transparentObject has transparency
@reflectiveMirror-like surface
@animatedObject has animation states
@billboardAlways faces the camera

Example

hsplus
composition "VisualDemo" {
  template "Powerup" {
    @glowing
    @animated
    @billboard
    geometry: "sphere"
    glow_color: "#ff00ff"
    glow_intensity: 1.5
    animation: "pulse"
  }

  object "Powerup" using "Powerup" {
    position: [0, 1, 0]
  }
}

Networking Traits

TraitDescription
@networkedState syncs across network
@syncedSpecific properties sync
@persistentState persists between sessions
@ownedHas network ownership
@host_onlyOnly host can modify

Example

hsplus
composition "NetworkDemo" {
  template "SharedDisplay" {
    @networked
    @synced
    @persistent
    geometry: "sphere"
    sync_rate: 20hz
    sync_properties: [position, rotation, state]
  }

  object "SharedDisplay" using "SharedDisplay" {
    position: [0, 1, 0]
  }
}

Behavior Traits

TraitDescription
@stackableObjects can stack on each other
@attachableObject can attach to other objects
@equippableCan be equipped to avatar slots
@consumableObject can be consumed/used up
@destructibleObject can be destroyed

Spatial Traits

TraitDescription
@anchorFixed position in world space
@trackedFollows a tracked point
@world_lockedLocked to world coordinates (AR)
@hand_trackedFollows hand position
@eye_trackedResponds to eye gaze

Audio Traits

TraitDescription
@spatial_audio3D positional audio
@ambientBackground audio source
@voice_activatedResponds to voice input

State Traits

TraitDescription
@stateHas reactive state
@reactiveAutomatically updates on state change
@observableState can be observed by other objects
@computedDerived state from other values

Combining Traits

Traits can be combined freely:

holo
object "MagicSword" {
  @grabbable
  @throwable
  @glowing
  @physics
  @spatial_audio
  @networked

  position: [0, 1, -2]
  glow_color: "#00ffff"

  on_grab: {
    play_sound("sword_draw")
    this.glow_intensity = 2.0
  }
}

Custom Trait Parameters

Some traits accept parameters:

hsplus
composition "ParameterDemo" {
  template "CustomBall" {
    @physics(mass: 2.0, drag: 0.1)
    @glowing(color: "#ff0000", intensity: 1.5)
    @networked(sync_rate: 30hz)
    geometry: "sphere"
  }

  object "Ball" using "CustomBall" {
    position: [0, 1, 0]
  }
}

Released under the MIT License.