Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefaultBehavior

Default behavior for 3D UI elements. Handles a BABYLON.FollowBehavior, SixDofBehavior and BABYLON.SurfaceMagnetismBehavior

Hierarchy

  • DefaultBehavior

Implements

Index

Constructors

constructor

  • Instantiates the default behavior

    Returns DefaultBehavior

Properties

attachedNodeSearch playground for attachedNode

attachedNode: Nullable<Mesh>

Attached node of this behavior

followBehaviorEnabledSearch playground for followBehaviorEnabled

followBehaviorEnabled: boolean

Enables the follow behavior

sixDofDragBehaviorEnabledSearch playground for sixDofDragBehaviorEnabled

sixDofDragBehaviorEnabled: boolean

Enables the six DoF drag behavior

surfaceMagnetismBehaviorEnabledSearch playground for surfaceMagnetismBehaviorEnabled

surfaceMagnetismBehaviorEnabled: boolean

Enables the surface magnetism behavior

Accessors

followBehavior

  • The follow behavior

    Returns FollowBehavior

name

  • get name(): string
  • The name of the behavior

    Returns string

sixDofDragBehavior

  • The six DoF drag behavior

    Returns SixDofDragBehavior

surfaceMagnetismBehavior

Methods

attachSearch playground for attach

  • attach(ownerMesh: Mesh, draggablesMeshes?: Mesh[], sceneUnderstandingMeshes?: AbstractMesh[]): void
  • Attaches the default behavior

    Parameters

    • ownerMesh: Mesh

      The top level mesh

    • Optional draggablesMeshes: Mesh[]

      Descendant meshes that can be used for dragging the owner mesh

    • Optional sceneUnderstandingMeshes: AbstractMesh[]

      Meshes from the scene understanding that will be used for surface magnetism

    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