Skip to content

Language Reference

Comprehensive syntax references for all three HoloScript formats.

Overview

HoloScript provides three file formats, each designed for different use cases:

  • .hs - Basic syntax for simple scenes and prototyping
  • .hsplus - Extended syntax with state management, templates, and events
  • .holo - Advanced syntax for VR/AR with entity-trait architecture

Quick Format Selection

Use .hs when:

  • Learning HoloScript basics
  • Creating simple static scenes
  • Prototyping quickly
  • No interactivity needed

Use .hsplus when:

  • Need templates/reusability
  • State management required
  • Event-driven interactions
  • Building games/apps
  • Modular code organization

Use .holo when:

  • Advanced trait-based configuration
  • Complex spatial computing features
  • VR/AR/XR experiences
  • Fine-grained control over spatial primitives

Format-Specific References

Basic Syntax (.hs)

Extended Syntax (.hsplus)

Advanced Compositions (.holo)

Cross-Format Comparisons

See the same functionality implemented in all three formats:

Feature Matrix

Feature.hs.hsplus.holo (entity).holo (object)
Basic objects
Templates
Decorators (@)
State blocks
Actions
Event handlers
Trait configs
Modules
Panels/UI

For AI Agents

When generating HoloScript code:

  1. Detect format - Check file extension (.hs/.hsplus/.holo)
  2. Use appropriate syntax - Match the format's syntax patterns
  3. Reference examples - Use these references as templates
  4. Validate - Ensure generated code matches format rules
  5. Prefer simplest - Use .hs for simple, .hsplus for medium, .holo for advanced

Source Code

All examples are available in the HoloScript repository.

Released under the MIT License.