API Docs for: 2.7.3
Show:

ConfiguratorModComponent3D Class

Extends BaseComponent3D
Module: Component
Parent Module: Wanaplan

This component is responsible for holding the state of the configurator : state = idle | animationIn | ready | animationOut

It listens to events that alter this state. An event cycle follows this pattern :

wnp.request.configurator.start | wnp.engine3D.configurator.animationIn.begin | wnp.engine3D.configurator.animationIn.end | wnp.engine3D.configurator.start | | wnp.request.configurator.stop | wnp.engine3D.configurator.stop | wnp.engine3D.configurator.animationOut.begin | wnp.engine3D.configurator.animationOut.end | v

If the animation component is not present, this component simulates the animationIn|Out event to ensure consistency with others components

It is also responsible for inhibiting actions that should not be performed in configurator mode.

Constructor

ConfiguratorModComponent3D

(
  • core
)

Parameters:

  • core wnp.Core

    Wanaplan core

Methods

cancel

()

Stops the configurator immediately, stops the currently playing animation immediately if needed. The difference with requestStop is that if the configurator is in an animated state, it will cause the animation to stop immediately.

compute

() private

Inherited from BaseComponent3D:

Recompute of the component.

destroy

()

Inherited from BaseComponent3D:

Destructor.

disable

()

Inherited from BaseComponent3D:

Disables the component

enable

()

Inherited from BaseComponent3D:

Enables the component

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

releaseHand

(
  • configurator
)

Provided by the Wanaplan module.

A reshaper should call this for deactivation,

Parameters:

  • configurator Component

    the reshaper that needs to be deactivated

requestStart

()

Tries to start the configurator, if the state is not suitable then does nothing.

If the animationInOut component is loaded, starts the animation, else simulates the animation event cycle and starts immediately.

requestStop

()

Tries to stop the configurator, if the state is not suitable then does nothing.

If the animationOut component is loaded, starts the animation, else simulates the animation event cycle and stops immediately.

requireHand

(
  • configurator
)
Boolean

Provided by the Wanaplan module.

A reshaper should call this before being activated. If requireHand returns true, then the reshaper is activated and can edit the object, else it can't.

This prevents from having two active reshapers at the same time.

Parameters:

  • configurator Component

    the reshaper that needs to be activated

Returns:

start

()

Provided by the Wanaplan module.

Starts the reshaper master, and all the reshapers depending on it

startListening

()

Inherited from BaseComponent3D:

Calls all the event listeners.

stop

()

Provided by the Wanaplan module.

Stops the reshaper master, and all the reshapers depending on it

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

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.configurator.animationIn.begin

Provided by the Wanaplan module.

Fired by the configurator component when an 'Animation-In' begins.

wnp.engine3D.configurator.animationIn.begin

Fired by the configurator component when an 'Animation-In' begins.

wnp.engine3D.configurator.animationIn.end

Provided by the Wanaplan module.

Fired by the configurator component when an 'Animation-In' is done.

wnp.engine3D.configurator.animationIn.end

Fired by the configurator component when an 'Animation-In' is done.

wnp.engine3D.configurator.animationOut.begin

Fired by the configurator component when an 'Animation-Out' begins.

wnp.engine3D.configurator.animationOut.begin

Provided by the Wanaplan module.

Fired by the configurator component when an 'Animation-Out' begins.

wnp.engine3D.configurator.animationOut.end

Provided by the Wanaplan module.

Fired by the configurator component when an 'Animation-Out' is done.

wnp.engine3D.configurator.animationOut.end

Fired by the configurator component when an 'Animation-Out' is done.

wnp.engine3D.configurator.start

Fired to start the configurator.

wnp.engine3D.configurator.stop

Fired to stop the configurator.

wnp.request.configurator.animation.cancel

Fired by the configurator component when an animation is canceled.

wnp.request.configurator.animationIn.start

Fired to ask the configurator to start an 'Animation-In'.

wnp.request.configurator.animationOut.start

Fired to ask the configurator to start an 'Animation-Out'.

wnp.request.configurator.cancel

Fired when the configurator needs to be hidden.