ConfiguratorModComponent3D Class
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.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
()
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
destroy
()
disable
()
enable
()
getFloor
-
[structure]
Parameters:
-
[structure]
FloorStructure optionalThe floor structure.
Returns:
initialize
()
onContextChanged
-
context
Parameters:
-
context
StringThe new context
releaseHand
-
configurator
A reshaper should call this for deactivation,
Parameters:
-
configurator
Componentthe 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
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
()
Starts the reshaper master, and all the reshapers depending on it
startListening
()
stop
()
Stops the reshaper master, and all the reshapers depending on it
stopListening
()
update
-
deltaTime
Parameters:
-
deltaTime
NumberThe time interval.
Properties
keyboardManager
wnp.KeyboardManager
structure
wnp.Structure
Events
wnp.engine3D.configurator.animationIn.begin
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
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
Fired by the configurator component when an 'Animation-Out' begins.
wnp.engine3D.configurator.animationOut.end
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.