API Docs for: 2.7.3
Show:

AvatarComponent3D Class

Extends BaseComponent3D
Module: Component
Parent Module: Wanaplan

This component adds and handles a 3D avatar on the scene.

Constructor

AvatarComponent3D

(
  • core
)

Parameters:

  • core Core

    The main engine.

Methods

compute

() private

Inherited from BaseComponent3D:

Recompute of the component.

destroy

()

Inherited from BaseComponent3D:

Destructor.

disable

()

Inherited from BaseComponent3D

Disables event listening.

enable

()

Inherited from BaseComponent3D

Enables event listening.

getFloor

(
  • [structure]
)
BABYLON.Mesh

Inherited from BaseComponent3D:

Gets the 3D mesh of the floor structure in parameter (by default current floor).

Parameters:

Returns:

BABYLON.Mesh: The floor mesh in 3D.

initialize

()

Inherited from BaseComponent3D:

Method called when Wanaplan is initialized. You don't need to call this method manually.

onContextChanged

(
  • context
)

Inherited from BaseComponent3D:

Method called when the context is switched (2D -> 3D or 3D -> 2D)

Parameters:

  • context String
    The new context

onKeyDown

(
  • event
)

Triggered on event wnp.keyboardManager.keyDown. Used to rotate the avatar.

Parameters:

  • event Event

    The JS event.

onKeyUp

(
  • event
)

Triggered on event wnp.keyboardManager.keyUp.

Parameters:

  • event Event

    The JS event.

setVisibility

(
  • isVisible
)

Changes the Avatar visibility state.

Parameters:

  • isVisible Boolean

    True to set visible and false to set invisible.

startListening

()

Inherited from BaseComponent3D:

Calls all the event listeners.

stopListening

()

Inherited from BaseComponent3D:

Removes all the event listeners.

update

(
  • deltaTime
)

Inherited from BaseComponent3D:

Updates the dynamic part of the component.

Parameters:

  • deltaTime Number
    The time interval.

Properties

avatar

BABYLON.Mesh

The avatar mesh.

keyboardManager

wnp.KeyboardManager

Inherited from BaseComponent3D:

Instance of the Keyboard Manager (shortcut to wanaplan.keyboardManager).

name

String

Inherited from BaseComponent3D:

Name of the component.

structure

wnp.Structure

Inherited from BaseComponent3D:

Instance of the structure (shortcut to wanaplan.structure).

Events

wnp.engine3D.camera.move

Fired when the 3D camera has been moved.

wnp.engine3D.UIobject.transform

Fired when the transform of an object is modified.

wnp.request.disable-orbit-camera

Fired to disable the orbit camera.

wnp.request.enable-orbit-camera

Fired to enable the orbit camera.