ConfiguratorModComponent3D
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.CoreWanaplan core
Item Index
Methods
Properties
Events
- wnp.engine3D.configurator.animationIn.begin
- wnp.engine3D.configurator.animationIn.begin
- wnp.engine3D.configurator.animationIn.end
- wnp.engine3D.configurator.animationIn.end
- wnp.engine3D.configurator.animationOut.begin
- wnp.engine3D.configurator.animationOut.begin
- wnp.engine3D.configurator.animationOut.end
- wnp.engine3D.configurator.animationOut.end
- wnp.engine3D.configurator.start
- wnp.engine3D.configurator.stop
- wnp.request.configurator.animation.cancel
- wnp.request.configurator.animationIn.start
- wnp.request.configurator.animationOut.start
- wnp.request.configurator.cancel
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
Syntax
compute
()
private
Summary
Recompute of the component.destroy
Syntax
destroy
()
Summary
Destructor.disable
Syntax
disable
()
Summary
Disables the componentenable
Syntax
enable
()
Summary
Enables the componentgetFloor
Syntax
getFloor
-
[structure]
Summary
Gets the 3D mesh of the floor structure in parameter (by default current floor).Parameters:
-
[structure]
FloorStructure optionalThe floor structure.
Returns:
initialize
Syntax
initialize
()
Summary
Method called when Wanaplan is initialized. You don't need to call this method manually.onContextChanged
Syntax
onContextChanged
-
context
Summary
Method called when the context is switched (2D -> 3D or 3D -> 2D)Parameters:
-
context
StringThe new context
releaseHand
Syntax
releaseHand
-
configurator
Summary
A reshaper should call this for deactivation,
Parameters:
-
configurator
Componentthe 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
Syntax
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
Componentthe reshaper that needs to be activated
Returns:
start
Syntax
start
()
Summary
Starts the reshaper master, and all the reshapers depending on it
startListening
Syntax
startListening
()
Summary
Calls all the event listeners.stop
Syntax
stop
()
Summary
Stops the reshaper master, and all the reshapers depending on it
stopListening
Syntax
stopListening
()
Summary
Removes all the event listeners.update
Syntax
update
-
deltaTime
Summary
Updates the dynamic part of the component.Parameters:
-
deltaTime
NumberThe time interval.
Properties
keyboardManager
Syntax
keyboardManager
wnp.KeyboardManager
Summary
Instance of the Keyboard Manager (shortcut to wanaplan.keyboardManager).structure
Syntax
structure
wnp.Structure
Summary
Instance of the structure (shortcut to wanaplan.structure).Events
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.begin
Syntax
wnp.engine3D.configurator.animationIn.begin
Summary
Fired by the configurator component when an 'Animation-In' begins.
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.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
Syntax
wnp.engine3D.configurator.animationOut.begin
Summary
Fired by the configurator component when an 'Animation-Out' begins.
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.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.