Skip to content

Traits Reference

HoloScript v3.42.0 includes 1,800+ traits organized into 74 specialized categories across 13 top-level domains. Traits are declarative annotations that add behavior to objects without writing code.

How Traits Work: The 1,800+ count represents semantic trait tags recognized by the HoloScript parser across domains including VR interaction (13), robotics (213), AI/XR (23), scientific computing (28), and 60+ specialized semantic categories. Core traits have full runtime implementations, while domain-specific traits provide semantic richness for compiler target generation.

How Traits Work

holo
object "Ball" {
  @grabbable(grab_distance: 0.5)
  @physics(mass: 1.0, bounciness: 0.7)
  geometry: "sphere"
  position: [0, 2, 0]
}

All traits follow the TraitHandler pattern:

typescript
interface TraitHandler<TConfig> {
  name: VRTraitName;
  defaultConfig: TConfig;
  onAttach?: (node, config, context) => void;
  onDetach?: (node, config, context) => void;
  onUpdate?: (node, config, context, delta) => void;
  onEvent?: (node, config, context, event) => void;
}

Trait Categories

CategoryTraitsDescription
Interaction@grabbable, @throwable, @clickable, @hoverable, @draggable, @scalableHand-based interaction in VR
Physics@physics, @collidable, @cloth, @fluid, @soft_body, @ropePhysics simulation
AI & Behavior@behavior_tree, @goal_oriented, @llm_agent, @perception, @emotionIntelligent agent behavior
AI Autonomous@autonomous, @swarm, @scheduler, @decision_treeAutonomous system behaviors
Audio@spatial_audio, @music, @sfx, @voiceSpatial and ambient audio
Accessibility@screen_reader, @high_contrast, @motor_assistUniversal design traits
AR/Spatial@spatial_awareness, @anchor, @plane_detection, @billboardAugmented reality
Web3/Blockchain@token_gated, @wallet, @nft, @smart_contract, @zora_coinsBlockchain integration
Render Network@render_networkDecentralized GPU rendering via RNDR
OpenXR HAL@openxr_halXR device abstraction (haptics, hand/eye tracking)
Media@video, @screen, @360_video, @live_streamMedia playback
Social/Multiplayer@networked, @voice_chat, @presence, @avatarSocial and multiplayer
IoT/Integration@sensor, @actuator, @mqtt, @rest_apiIoT and external integrations
Visual@material, @lighting, @shader, @particle, @lodGraphics and rendering
Advanced@animation, @ik, @ragdoll, @procedural, @hitlAdvanced animation, generation, and HITL gates

Extending Traits

Build your own custom traits using the Trait Extension Guide.

API Reference

Released under the MIT License.