Skip to content

Advanced Traits

Part of the HoloScript Traits reference. Browse: Visual · AI Autonomous · All Traits

Advanced Traits

@teleport

Enables teleportation locomotion.

hsplus
object TeleportPad @teleport {
  geometry: 'cylinder'
  destination: [10, 0, 10]
}

object TeleportPad @teleport(fade_duration: 0.5) {
  destination: 'SpawnPoint'
}
ConfigTypeDefaultDescription
destinationarray/stringnullTarget position or ID
fade_durationnumber0.3Fade transition time

@ui_panel

Creates an interactive 2D UI panel in 3D space.

hsplus
object Menu @ui_panel {
  width: 400
  height: 300
}

object Menu @ui_panel(curved: true, follow_gaze: true) {
  content: 'ui/menu.html'
}
ConfigTypeDefaultDescription
widthnumber512Panel width (px)
heightnumber512Panel height (px)
curvedbooleanfalseCurved panel surface
follow_gazebooleanfalsePanel follows user

@particle_system

Attaches a particle emitter to the object.

hsplus
object Fire @particle_system {
  preset: 'fire'
}

object Fire @particle_system(rate: 100, lifetime: 2.0) {
  texture: 'particles/spark.png'
}
ConfigTypeDefaultDescription
presetstringnullBuilt-in preset name
ratenumber50Particles per second
lifetimenumber1.0Particle lifetime (sec)

@weather

Applies weather effects to a zone.

hsplus
object WeatherZone @weather {
  type: 'rain'
}

object WeatherZone @weather(type: 'snow', intensity: 0.8) {
  radius: 50
}
ConfigTypeDefaultDescription
typestring'clear''rain', 'snow', 'fog', 'clear'
intensitynumber0.5Weather intensity (0-1)
radiusnumber100Effect radius (meters)

@day_night

Day/night cycle controller.

hsplus
object Sun @day_night {
  cycle_duration: 600
}

object Sun @day_night(start_time: 12, speed: 1.0) {
  geometry: 'sphere'
}
ConfigTypeDefaultDescription
cycle_durationnumber1200Full cycle time (sec)
start_timenumber6Starting hour (0-24)
speednumber1.0Cycle speed multiplier

@lod

Level of detail switching based on distance.

hsplus
object Building @lod {
  levels: ['high.glb', 'med.glb', 'low.glb']
  distances: [10, 30, 60]
}
ConfigTypeDefaultDescription
levelsarray[]Model paths per LOD
distancesarray[10, 30, 60]Switch distances (meters)

@hand_tracking

Enables hand tracking gesture interaction.

hsplus
object Interactive @hand_tracking {
  gestures: ['pinch', 'grab', 'point']
}
ConfigTypeDefaultDescription
gesturesarray['pinch', 'grab']Recognized gestures

Events:

  • gesture_detected - Gesture recognized
  • hand_enter - Hand entered object bounds
  • hand_exit - Hand left object bounds

@haptic

Triggers haptic feedback on controller.

hsplus
object Button @haptic {
  intensity: 0.5
  duration: 100
}

object Button @haptic(pattern: 'pulse', intensity: 0.8) {
  on_click: { haptic.play() }
}
ConfigTypeDefaultDescription
intensitynumber0.5Vibration strength (0-1)
durationnumber100Duration in milliseconds
patternstring'single''single', 'pulse', 'buzz'

@portal

Creates a portal to another scene.

hsplus
object Portal @portal {
  destination: 'LobbyScene'
}

object Portal @portal(preview: true, destination: 'GameWorld') {
  geometry: 'torus'
}
ConfigTypeDefaultDescription
destinationstringnullTarget scene name
previewbooleantrueShow destination preview

@mirror

Creates a real-time reflective surface.

hsplus
object Mirror @mirror {
  geometry: 'plane'
}

object Mirror @mirror(quality: 0.5, blur: 0.1) {
  geometry: 'plane'
  scale: [2, 3, 1]
}
ConfigTypeDefaultDescription
qualitynumber1.0Reflection resolution
blurnumber0Reflection blur amount

See Also

Released under the MIT License.