[FREE] Rubiks Cube - Play rubiks cube in 3D

Short description

Play rubiks cube in 3D :smiley:

Picture of all the blocks

Docs

Docs for: RubiksCube

Events

CubeSolved

Triggers when the whole cube is solved.

CubeChanged

Triggers when the cube model is changed.

Methods

StopAnimation

Stops an in-progress animation. No operation if an animation is not in progress.

AnimateMoveReversed

Animates in reverse (i.e. with opposite twisting direction) only the previous move from the move sequence. When it has completed, the next one is not automatically started.

AnimateMove

Animates only the next move from the move sequence. When it has completed, the next one is not automatically started.

ApplyMove

Instantly applies the next move on the cube, without animation.

ApplyMoveSequenceReversed

Instantly applies the whole move sequence in reverse, on the cube, without animation.

SetMoveSequence

Sets the move sequence. Note you still have to use one of the blocks starting with animate.
Params

sequence | text


AnimateMoveSequenceReversed

Animates all the moves in the currently set move sequence one move at a time, in reverse (i.e. from end to start with opposite twisting direction).

ApplyMoveSequence

Instantly applies the whole move sequence on the cube, without animation.

GenerateRandomMoves

Generates random move sequence according to numOfMoves param to be used in SetMoveSequence.
Params

numOfMoves | number

Return type : text


ResetToInitialState

Resets the cube to solved position. Note : this does not include animation.

RestoreCube

Restores a cube with string representation generated by the save cube block.
Params

string | text


RefreshWithNewProperties

Refreshes the rubiks cube with new properties set.

AnimateMoveSequence

Animates all the moves in the currently set move sequence one move at a time. When a move has completed, the next one is automatically started.

ApplyMoveReversed

Instantly applies the previous move on reverse, on the cube, without animation.

SaveCube

Returns a string representation of this cube that can be restored any time by using restore cube block.

Return type : text


IsSolved

Generates random move sequence according to numOfMoves param to be used in SetMoveSequence.

Return type : boolean


SetupRubiksCube

Sets up Rubiks cube in a layout with porperties set.
Params

layout | component


Properties

SetDoubleRotationSpeed

Sets the rotation speed of a double rotation. This property allows to customize the speed of face turns separately from quarter turns.

Property Type : write-only
Accepts : number


SetFaceletsBorderColor

Sets border color of the facelets in rubik cube.

Property Type : write-only
Accepts : number


SetBackFacesDistance

Sets back faces distance from the cube. Typically, a value smaller than 2 means they won't be visible.

Property Type : write-only
Accepts : number


SetSingleRotationSpeed

Sets the rotation speed of a single rotation. This porperty allows to customize the speed of quarter turn separately from face turns.

Property Type : write-only
Accepts : number


SetBackgroundColor

Sets background colors of the rubik cube view.

Property Type : write-only
Accepts : number


SetEditable

Sets if rubiks cube can be changed by user or not.

Property Type : write-only
Accepts : boolean


SetCubeColors

Sets the list of colors given.

Property Type : write-only
Accepts : list


Docs for: RubiksCube

Events

CubeSolved

Triggers when the whole cube is solved.

CubeChanged

Triggers when the cube model is changed.

Methods

StopAnimation

Stops an in-progress animation. No operation if an animation is not in progress.

AnimateMoveReversed

Animates in reverse (i.e. with opposite twisting direction) only the previous move from the move sequence. When it has completed, the next one is not automatically started.

AnimateMove

Animates only the next move from the move sequence. When it has completed, the next one is not automatically started.

ApplyMove

Instantly applies the next move on the cube, without animation.

ApplyMoveSequenceReversed

Instantly applies the whole move sequence in reverse, on the cube, without animation.

SetMoveSequence

Sets the move sequence. Note you still have to use one of the blocks starting with animate.
Params

sequence | text


AnimateMoveSequenceReversed

Animates all the moves in the currently set move sequence one move at a time, in reverse (i.e. from end to start with opposite twisting direction).

ApplyMoveSequence

Instantly applies the whole move sequence on the cube, without animation.

GenerateRandomMoves

Generates random move sequence according to numOfMoves param to be used in SetMoveSequence.
Params

numOfMoves | number

Return type : text


ResetToInitialState

Resets the cube to solved position. Note : this does not include animation.

RestoreCube

Restores a cube with string representation generated by the save cube block.
Params

string | text


RefreshWithNewProperties

Refreshes the rubiks cube with new properties set.

AnimateMoveSequence

Animates all the moves in the currently set move sequence one move at a time. When a move has completed, the next one is automatically started.

ApplyMoveReversed

Instantly applies the previous move on reverse, on the cube, without animation.

SaveCube

Returns a string representation of this cube that can be restored any time by using restore cube block.

Return type : text


IsSolved

Generates random move sequence according to numOfMoves param to be used in SetMoveSequence.

Return type : boolean


SetupRubiksCube

Sets up Rubiks cube in a layout with porperties set.
Params

layout | component


Properties

SetDoubleRotationSpeed

Sets the rotation speed of a double rotation. This property allows to customize the speed of face turns separately from quarter turns.

Property Type : write-only
Accepts : number


SetFaceletsBorderColor

Sets border color of the facelets in rubik cube.

Property Type : write-only
Accepts : number


SetBackFacesDistance

Sets back faces distance from the cube. Typically, a value smaller than 2 means they won't be visible.

Property Type : write-only
Accepts : number


SetSingleRotationSpeed

Sets the rotation speed of a single rotation. This porperty allows to customize the speed of quarter turn separately from face turns.

Property Type : write-only
Accepts : number


SetBackgroundColor

Sets background colors of the rubik cube view.

Property Type : write-only
Accepts : number


SetEditable

Sets if rubiks cube can be changed by user or not.

Property Type : write-only
Accepts : boolean


SetCubeColors

Sets the list of colors given.

Property Type : write-only
Accepts : list


Instructions to use extension

Note if you change any property of extension except editable property then use refresh block
For the set Move Sequence block you can set algorithm using - Rubik's Cube Algorithms - Ruwix

Download link

com.aktech.rubikscube.aix (34.4 KB)

Demo Blocks

Output

Demo video may be of kodular but the output is same for appinventor also.
Aia -
rubiks.aia (38.4 KB)

Apk -
Download

Made with Rush
Thank you

24 Likes

What a extension :scream::scream:
Now no need to buy rubik cube and no fear that rubik cube broke :smile:

3 Likes

HOW DID YOU MAKE THIS? It's so great!

2 Likes

Thank you @gordonlu310 and @Faraz_Firoz

Awesome Extension :+1:
Completely Unexpected!
:scream:

2 Likes

Thanks @SRIKAR_B.S.S :smiley:

1 Like

thanks @Aarush_Kumar !
but There are few things floating in the air that show the colors of the angle behind the cube that we do not see.
how to make them invisible?

1 Like

well if you dont want then just change the property of SetBackFacesDistance to smaller than 2 , 0 would work well it is 0 by default unless you use my aia

2 Likes

thanks and could the extension scramble or solve the cube automatically?

about scramble currently not automatically you may use the setsequenceblock and then use the animateblock to scramble and solve currently automatically is not possible i will try to make a block like that but its tough

1 Like

could you send me an example?

here @qwe_rfv - rubiks (1).aia (31.1 KB)

1 Like

thanks and is there a way to solve the cube automatically?

currently no

Another suggestion: Adjust the size of the cube, such as: 2 by 2 3 by 3
4 in 4 and ...

but for now you may use refresh block it just makes the cube back to first stage instead showing with animation

1 Like

Devo ammetterlo, sei riuscito a fare un'estensione strabiliante..di un gioco pazzesco..ti faccio i miei complimenti.

2 Likes

Thank you @Nicola_Imperati :smiley:

1 Like

i am sorry for late response as i did not saw i would look up but this may be a little tough :smiley:

This extension is still Awesome @Aarush_Kumar!! :grinning: :smiley: :smiley: :grinning: :clap: :pray:
600x338, 75%

1 Like