Configurator

Configurator

Class that defines an interactive Configurator instance to be used in connection with the main Ripe owner to provide an interactive configuration experience inside a DOM.

Constructor

new Configurator(owner, element, options)

Source:
Parameters:
Name Type Description
owner Object The owner (customizer instance) for this configurator.
element Object The DOM element that is considered to be the target for the configurator, it's going to have its own inner HTML changed.
options Object The options to be used to configure the configurator instance to be created.

Methods

cancel(options)

This function is called (by the owner) whenever the current operation in the child should be canceled this way a Configurator is not updated.
Source:
Parameters:
Name Type Description
options Object Set of optional parameters to adjust the Configurator.

changeFrame(frame, options)

Displays a new frame, with an animation from the starting frame proper animation should be performed.
Source:
Parameters:
Name Type Description
frame Object The new frame to display, can use both the minimal or the extended format for the description of the frame.
options Object Set of optional parameters to adjust the change frame, such as: - 'type' - The animation style: 'simple' (fade in), 'cross' (crossfade) or 'null' (without any style). - 'duration' - The duration of the animation in milliseconds (defaults to 'null'). - 'stepDuration' - If defined the total duration of the animation is calculated using the amount of steps times the number of steps, instead of using the 'duration' field (defaults to 'null'). - 'revolutionDuration' - If defined the step duration is calculated by dividing the revolution duration by the number of frames in the view (defaults to 'null'). - 'preventDrag' - If drag actions during an animated change of frames should be ignored (defaults to 'true'). - 'safe' - If requested then the operation is only performed in case the configurator is not in the an equivalent state (default to 'true').

deinit()

The Configurator deinitializer, to be called (by the owner) when it should stop responding to updates so that any necessary cleanup operations can be executed.
Source:

disableMasks()

Turns off (disables) the masks on selection/highlight.
Source:

enableMasks()

Turns on (enables) the masks on selection/highlight.
Source:

enterFullscreen(options)

Resizes the Configurator to the defined maximum size.
Source:
Parameters:
Name Type Description
options Object Set of optional parameters to adjust the resizing.

highlight(part, options)

Highlights a model's part, showing a dark mask on top of the such referred part identifying its borders.
Source:
Parameters:
Name Type Description
part String The part of the model that should be highlighted.
options Object Set of optional parameters to adjust the highlighting.

init()

The Configurator initializer, which is called whenever the Configurator is going to become active. Sets the various values for the Configurator taking into owner's default values.
Source:

leaveFullscreen(options)

Resizes the Configurator to the prior defined size.
Source:
Parameters:
Name Type Description
options Object Set of optional parameters to adjust the resizing.

lowlight(part, options)

Removes the a highlighting of a model's part, meaning that no masks are going to be presented on screen.
Source:
Parameters:
Name Type Description
part String The part to lowlight.
options Object Set of optional parameters to adjust the lowlighting.

nextFrame()

Changes the currently displayed frame in the current view to the next one according to pre-defined direction.
Source:

previousFrame()

Changes the currently displayed frame in the current view to the previous one according to pre-defined direction.
Source:

resize(size)

Resizes the configurator's DOM element to 'size' pixels. This action is performed by setting both the attributes from the HTML elements and the style.
Source:
Parameters:
Name Type Description
size Number The number of pixels to resize to.

update(state, options)

This function is called (by the owner) whenever its state changes so that the Configurator can update itself for the new state. This method is "protected" by unique signature validation in order to avoid extra render and frame loading operations. Operations are available to force the update operation even if the signature is the same as the one previously set.
Source:
Parameters:
Name Type Description
state Object An object containing the new state of the owner.
options Object Set of optional parameters to adjust the Configurator update, such as: - 'animate' - If it's to animate the update (defaults to 'false'). - 'duration' - The duration in milliseconds that the transition should take. - 'callback' - The callback to be called at the end of the update. - 'preload' - If it's to execute the pre-loading process. - 'force' - If the updating operation should be forced (ignores signature).