Description

Component composed by FluxImages that form a cube.

Component

Represents a set of images that renders as a 6 sides cube.

The component can have the following attributes.

AttributeTypeRequiredDescription
sliderObjecttrueThe VueFlux component responsible of this cube
indexObjecttrueAn object containing the sides indexes
cssObjectfalseInitial CSS style, by default sets top 0 and left 0

Example:

<flux-cube
   :slider="slider"
   :index="{front: 1, top: 2, left: '#ccc', right: '#ccc'}"
   :css="{width: '300px', height: '300px'}">
</flux-cube>

Methods

MethodParametersDescription
setCsscssObject with the style to be applied directly
transformcssObject with the style to be applied rendering, used to perform the transitions
turndirection, toTurns the cube to specified direction (top, back, bottom, left, right) with to side (left or right)
turnTopTurns the cube to top
turnBacktoTurns the cube back side, to left or to right
turnBottomTurns the cube to bottom
turnLeftTurns the cube to left
turnRightTurns the cube to right