AttachToBoxBehavior

A behavior that when attached to a mesh will will place a specified node on the meshes face pointing towards the camera

Hierarchy

  • AttachToBoxBehavior

Implements

Index

Constructors

constructor

Find examples in Playground
  • Creates the AttachToBoxBehavior, used to attach UI to the closest face of the box to a camera

    Parameters

    • ui: TransformNode

      The transform node that should be attched to the mesh

    Returns AttachToBoxBehavior

Properties

distanceAwayFromBottomOfFace

Find examples in Playground
distanceAwayFromBottomOfFace: number

The distance from the bottom of the face that the UI should be attached to (default: 0.15)

distanceAwayFromFace

Find examples in Playground
distanceAwayFromFace: number

The distance away from the face of the mesh that the UI should be attached to (default: 0.15)

name

Find examples in Playground
name: string

The name of the behavior

Methods

attach

Find examples in Playground
  • attach(target: Mesh): void
  • Attaches the AttachToBoxBehavior to the passed in mesh

    Parameters

    • target: Mesh

      The mesh that the specified node will be attached to

    Returns void

detach

Find examples in Playground
  • detach(): void
  • Detaches the behavior from the mesh

    Returns void

init

Find examples in Playground
  • init(): void
  • Initializes the behavior

    Returns void

Generated using TypeDoc