Skip to content

Visual Traits

Part of the HoloScript Traits reference. Browse: Physics · Animation · All Traits

Visual Traits

@glowing

Adds emissive glow effect to objects.

hsplus
object Crystal @glowing {
  geometry: 'crystal'
  color: '#00ffff'
}

object Crystal @glowing(intensity: 2.0, color: '#ff00ff') {
  geometry: 'crystal'
}
ConfigTypeDefaultDescription
intensitynumber1.0Glow brightness (0-10)
colorstringobject colorGlow color (optional override)
pulsebooleanfalseEnable pulsing effect

@transparent

Makes object semi-transparent with configurable opacity.

hsplus
object GlassPane @transparent {
  geometry: 'plane'
  opacity: 0.5
}

object GlassPane @transparent(opacity: 0.3, refraction: true) {
  geometry: 'cube'
}
ConfigTypeDefaultDescription
opacitynumber0.5Transparency level (0-1)
refractionbooleanfalseEnable light refraction

@spinning

Continuous rotation animation on an axis.

hsplus
object Fan @spinning {
  geometry: 'model/fan.glb'
}

object Fan @spinning(axis: 'y', speed: 2.0) {
  geometry: 'model/fan.glb'
}
ConfigTypeDefaultDescription
axisstring'y'Rotation axis ('x', 'y', 'z')
speednumber1.0Rotations per second

@floating

Gentle floating/bobbing animation effect.

hsplus
object composition @floating {
  geometry: 'sphere'
}

object composition @floating(amplitude: 0.5, speed: 0.5) {
  geometry: 'sphere'
}
ConfigTypeDefaultDescription
amplitudenumber0.2Float height in meters
speednumber1.0Float cycle speed

@billboard

Always faces the camera/user.

hsplus
object Label @billboard {
  geometry: 'plane'
  text: 'Hello'
}

object Label @billboard(lock_y: true) {
  geometry: 'plane'
}
ConfigTypeDefaultDescription
lock_ybooleanfalseOnly rotate on Y axis

@pulse

Pulsing scale or color animation.

hsplus
object Beacon @pulse {
  geometry: 'sphere'
  color: 'red'
}

object Beacon @pulse(property: 'scale', min: 0.8, max: 1.2) {
  geometry: 'sphere'
}
ConfigTypeDefaultDescription
propertystring'color'Property to pulse ('scale', 'color', 'opacity')
minnumber0.5Minimum value
maxnumber1.0Maximum value
speednumber1.0Pulse cycles per second

@animated

Plays embedded animations from 3D model.

hsplus
object Character @animated {
  geometry: 'model/character.glb'
  animation: 'idle'
}

object Character @animated(loop: true, blend: 0.3) {
  geometry: 'model/character.glb'
}
ConfigTypeDefaultDescription
animationstring'idle'Default animation name
loopbooleantrueLoop animation
blendnumber0.2Blend time in seconds

Events:

  • animation_start - Animation started
  • animation_end - Animation completed (non-looping)

@look_at

Object rotates to face a target.

hsplus
object Turret @look_at {
  target: 'Player'
}

object Turret @look_at(target: 'Player', axis: 'y', speed: 2.0) {
  geometry: 'model/turret.glb'
}
ConfigTypeDefaultDescription
targetstring'camera'Target object ID or 'camera'
axisstring'all'Rotation constraint
speednumber5.0Rotation speed

@outline

Adds outline/silhouette effect.

hsplus
object Selected @outline {
  geometry: 'cube'
}

object Selected @outline(color: '#ff0', width: 3) {
  geometry: 'cube'
}
ConfigTypeDefaultDescription
colorstring'#fff'Outline color
widthnumber2Outline width (px)

@proximity

Triggers events when objects/players are nearby.

hsplus
object Sensor @proximity {
  range: 5
}

object Sensor @proximity(range: 10, target: 'Player') {
  on_enter: { print('Player nearby') }
}
ConfigTypeDefaultDescription
rangenumber5Detection radius (meters)
targetstring'all'Target type to detect

Events:

  • proximity_enter - Target entered range
  • proximity_exit - Target left range

See Also

Released under the MIT License.