WanaPlan

API Docs for: 2.7.0
Show:

ConfiguratorModComponent3D

Extends BaseComponent3D
Module: Component
Parent Module: Wanaplan

Summary

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

Syntax

ConfiguratorModComponent3D

(
  • core
)

Summary

Parameters:

  • core wnp.Core

    Wanaplan core

Methods

cancel

Syntax

cancel

()

Summary

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

Inherited from BaseComponent3D:

Syntax

compute

() private

Summary

Recompute of the component.

destroy

Inherited from BaseComponent3D:

Syntax

destroy

()

Summary

Destructor.

disable

Inherited from BaseComponent3D:

Syntax

disable

()

Summary

Disables the component

enable

Inherited from BaseComponent3D:

Syntax

enable

()

Summary

Enables the component

getFloor

Inherited from BaseComponent3D:

Syntax

getFloor

(
  • [structure]
)
BABYLON.Mesh

Summary

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:

Syntax

initialize

()

Summary

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

onContextChanged

Inherited from BaseComponent3D:

Syntax

onContextChanged

(
  • context
)

Summary

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

Parameters:

  • context String
    The new context

releaseHand

Provided by the Wanaplan module.

Syntax

releaseHand

(
  • configurator
)

Summary

A reshaper should call this for deactivation,

Parameters:

  • configurator Component

    the reshaper that needs to be deactivated

requestStart

Syntax

requestStart

()

Summary

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

Syntax

requestStop

()

Summary

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

Provided by the Wanaplan module.

Syntax

requireHand

(
  • configurator
)
Boolean

Summary

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.

Syntax

start

()

Summary

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

startListening

Inherited from BaseComponent3D:

Syntax

startListening

()

Summary

Calls all the event listeners.

stop

Provided by the Wanaplan module.

Syntax

stop

()

Summary

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

stopListening

Inherited from BaseComponent3D:

Syntax

stopListening

()

Summary

Removes all the event listeners.

update

Inherited from BaseComponent3D:

Syntax

update

(
  • deltaTime
)

Summary

Updates the dynamic part of the component.

Parameters:

  • deltaTime Number
    The time interval.

Properties

keyboardManager

Inherited from BaseComponent3D:

Syntax

keyboardManager

wnp.KeyboardManager

Summary

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

name

Inherited from BaseComponent3D:

Syntax

name

String

Summary

Name of the component.

structure

Inherited from BaseComponent3D:

Syntax

structure

wnp.Structure

Summary

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

Events

wnp.engine3D.configurator.animationIn.begin

Provided by the Wanaplan module.

Syntax

wnp.engine3D.configurator.animationIn.begin

Summary

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

wnp.engine3D.configurator.animationIn.begin

Syntax

wnp.engine3D.configurator.animationIn.begin

Summary

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

wnp.engine3D.configurator.animationIn.end

Provided by the Wanaplan module.

Syntax

wnp.engine3D.configurator.animationIn.end

Summary

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

wnp.engine3D.configurator.animationIn.end

Syntax

wnp.engine3D.configurator.animationIn.end

Summary

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

wnp.engine3D.configurator.animationOut.begin

Syntax

wnp.engine3D.configurator.animationOut.begin

Summary

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

wnp.engine3D.configurator.animationOut.begin

Provided by the Wanaplan module.

Syntax

wnp.engine3D.configurator.animationOut.begin

Summary

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

wnp.engine3D.configurator.animationOut.end

Provided by the Wanaplan module.

Syntax

wnp.engine3D.configurator.animationOut.end

Summary

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

wnp.engine3D.configurator.animationOut.end

Syntax

wnp.engine3D.configurator.animationOut.end

Summary

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

wnp.engine3D.configurator.start

Syntax

wnp.engine3D.configurator.start

Summary

Fired to start the configurator.

wnp.engine3D.configurator.stop

Syntax

wnp.engine3D.configurator.stop

Summary

Fired to stop the configurator.

wnp.request.configurator.animation.cancel

Syntax

wnp.request.configurator.animation.cancel

Summary

Fired by the configurator component when an animation is canceled.

wnp.request.configurator.animationIn.start

Syntax

wnp.request.configurator.animationIn.start

Summary

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

wnp.request.configurator.animationOut.start

Syntax

wnp.request.configurator.animationOut.start

Summary

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

wnp.request.configurator.cancel

Syntax

wnp.request.configurator.cancel

Summary

Fired when the configurator needs to be hidden.