commit e82f3f9c11375b69b394ec11667a9e82d86b3b23
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Fri Jun 5 12:40:26 2020 +0100

    Port RubikCube to the new library.

diff --git a/build.gradle b/build.gradle
index 27b30c51..17fb2786 100644
--- a/build.gradle
+++ b/build.gradle
@@ -35,8 +35,8 @@ android {
 
 dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])
-    implementation 'com.google.firebase:firebase-analytics:17.4.2'
-    implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
+    implementation 'com.google.firebase:firebase-analytics:17.4.3'
+    implementation 'com.google.firebase:firebase-crashlytics:17.0.1'
 
     api project(':distorted-library')
     implementation 'androidx.appcompat:appcompat:1.1.0'
diff --git a/src/main/java/org/distorted/objects/RubikCube.java b/src/main/java/org/distorted/objects/RubikCube.java
index 21845bc9..36ed4c24 100644
--- a/src/main/java/org/distorted/objects/RubikCube.java
+++ b/src/main/java/org/distorted/objects/RubikCube.java
@@ -150,13 +150,13 @@ class RubikCube extends RubikObject
       int association = 1;
       MeshBase[] meshes = new MeshRectangles[MESHES];
       meshes[0] = new MeshRectangles(14,14);
-      meshes[0].setEffectAssociation(0,association);
+      meshes[0].setEffectAssociation(0,association,0);
 
       for(int i=1; i<MESHES; i++)
         {
         association <<=1;
         meshes[i] = meshes[0].copy(true);
-        meshes[i].setEffectAssociation(0,association);
+        meshes[i].setEffectAssociation(0,association,0);
         }
 
       mMesh = new MeshJoined(meshes);
@@ -194,17 +194,17 @@ class RubikCube extends RubikObject
       Static1D dRad  = new Static1D(1);
 
       VertexEffectMove   effect0 = new VertexEffectMove(new Static3D(0,0,+0.5f));
-      effect0.setMeshAssociation(-1,63);  // all 6 sides
+      effect0.setMeshAssociation(63,-1);  // all 6 sides
       VertexEffectRotate effect1 = new VertexEffectRotate( angle180, axisX, center );
-      effect1.setMeshAssociation(-1,32);  // back
+      effect1.setMeshAssociation(32,-1);  // back
       VertexEffectRotate effect2 = new VertexEffectRotate( angle90 , axisX, center );
-      effect2.setMeshAssociation(-1, 8);  // bottom
+      effect2.setMeshAssociation( 8,-1);  // bottom
       VertexEffectRotate effect3 = new VertexEffectRotate( angle270, axisX, center );
-      effect3.setMeshAssociation(-1, 4);  // top
+      effect3.setMeshAssociation( 4,-1);  // top
       VertexEffectRotate effect4 = new VertexEffectRotate( angle270, axisY, center );
-      effect4.setMeshAssociation(-1, 2);  // left
+      effect4.setMeshAssociation( 2,-1);  // left
       VertexEffectRotate effect5 = new VertexEffectRotate( angle90 , axisY, center );
-      effect5.setMeshAssociation(-1, 1);  // right
+      effect5.setMeshAssociation( 1,-1);  // right
 
       VertexEffectDeform effect6 = new VertexEffectDeform(dVec0, dRad, dCen0, dReg);
       VertexEffectDeform effect7 = new VertexEffectDeform(dVec1, dRad, dCen1, dReg);
diff --git a/src/main/java/org/distorted/objects/RubikPyraminx.java b/src/main/java/org/distorted/objects/RubikPyraminx.java
index 7cc9dbfd..1a32a4e1 100644
--- a/src/main/java/org/distorted/objects/RubikPyraminx.java
+++ b/src/main/java/org/distorted/objects/RubikPyraminx.java
@@ -216,13 +216,13 @@ public class RubikPyraminx extends RubikObject
     MeshBase[] meshes = new MeshTriangles[MESHES];
 
     meshes[0] = new MeshTriangles(5);
-    meshes[0].setEffectAssociation(0,association);
+    meshes[0].setEffectAssociation(0,association,0);
 
     for(int i=1; i<MESHES; i++)
       {
       association <<= 1;
       meshes[i] = meshes[0].copy(true);
-      meshes[i].setEffectAssociation(0,association);
+      meshes[i].setEffectAssociation(0,association,0);
       }
 
     Static4D[] textureMaps = new Static4D[MESHES];
@@ -263,25 +263,25 @@ public class RubikPyraminx extends RubikObject
     Static3D center = new Static3D(0,0,0);
     Static4D region = new Static4D(0,0,0,0.6f);
 
-    VertexEffectScale effect1 = new VertexEffectScale ( new Static3D(1,SQ3/2,1) );
+    VertexEffectScale   effect1 = new VertexEffectScale ( new Static3D(1,SQ3/2,1) );
     VertexEffectRotate  effect2 = new VertexEffectRotate( new Static1D(90), new Static3D(1,0,0), new Static3D(0,0,0) );
-    VertexEffectMove effect3 = new VertexEffectMove  ( new Static3D(0,-SQ3*SQ2/12,SQ3/12) );
+    VertexEffectMove    effect3 = new VertexEffectMove  ( new Static3D(0,-SQ3*SQ2/12,SQ3/12) );
     VertexEffectRotate  effect4 = new VertexEffectRotate( new Static1D(180), new Static3D(0,0,1), center1 );
     VertexEffectRotate  effect5 = new VertexEffectRotate( angle, axis1, center1 );
     VertexEffectRotate  effect6 = new VertexEffectRotate( angle, axis2, center2 );
     VertexEffectRotate  effect7 = new VertexEffectRotate( angle, axis3, center2 );
 
-    VertexEffectDeform effect8 = new VertexEffectDeform(dVec0, dRad, dCen0, dReg);
-    VertexEffectDeform effect9 = new VertexEffectDeform(dVec1, dRad, dCen1, dReg);
-    VertexEffectDeform effect10= new VertexEffectDeform(dVec2, dRad, dCen2, dReg);
-    VertexEffectDeform effect11= new VertexEffectDeform(dVec3, dRad, dCen3, dReg);
+    VertexEffectDeform  effect8 = new VertexEffectDeform(dVec0, dRad, dCen0, dReg);
+    VertexEffectDeform  effect9 = new VertexEffectDeform(dVec1, dRad, dCen1, dReg);
+    VertexEffectDeform  effect10= new VertexEffectDeform(dVec2, dRad, dCen2, dReg);
+    VertexEffectDeform  effect11= new VertexEffectDeform(dVec3, dRad, dCen3, dReg);
 
-    VertexEffectSink   effect12= new VertexEffectSink( new Static1D(1.3f), center, region );
+    VertexEffectSink    effect12= new VertexEffectSink( new Static1D(1.3f), center, region );
 
-    effect4.setMeshAssociation(-1,14);  // apply to mesh[1], [2] and [3]
-    effect5.setMeshAssociation(-1, 2);  // apply only to mesh[1]
-    effect6.setMeshAssociation(-1, 4);  // apply only to mesh[2]
-    effect7.setMeshAssociation(-1, 8);  // apply only to mesh[3]
+    effect4.setMeshAssociation(14,-1);  // apply to mesh[1], [2] and [3]
+    effect5.setMeshAssociation( 2,-1);  // apply only to mesh[1]
+    effect6.setMeshAssociation( 4,-1);  // apply only to mesh[2]
+    effect7.setMeshAssociation( 8,-1);  // apply only to mesh[3]
 
     result.apply(effect1);
     result.apply(effect2);
