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

  • 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

distanceAwayFromBottomOfFace: number

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

distanceAwayFromFace

distanceAwayFromFace: number

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

name

name: string

The name of the behavior

Methods

attach

  • 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

  • detach(): void
  • Detaches the behavior from the mesh

    Returns void

init

  • init(): void
  • Initializes the behavior

    Returns void

Generated using TypeDoc