Options
All
  • Public
  • Public/Protected
  • All
Menu

Class 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 attached to the mesh

    Returns AttachToBoxBehavior

Properties

distanceAwayFromBottomOfFaceSearch playground for distanceAwayFromBottomOfFace

distanceAwayFromBottomOfFace: number

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

distanceAwayFromFaceSearch playground for distanceAwayFromFace

distanceAwayFromFace: number

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

nameSearch playground for name

name: string

The name of the behavior

Methods

attachSearch playground for 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

detachSearch playground for detach

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

    Returns void

initSearch playground for init

  • init(): void
  • Initializes the behavior

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method