commit a918bba1811bef1a9b8ae77f2966f915e95234d8
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Mon Apr 27 21:09:48 2020 +0100

    new VertexEffectScale

diff --git a/src/main/java/org/distorted/library/effect/EffectName.java b/src/main/java/org/distorted/library/effect/EffectName.java
index 2f0398f..bf81441 100644
--- a/src/main/java/org/distorted/library/effect/EffectName.java
+++ b/src/main/java/org/distorted/library/effect/EffectName.java
@@ -58,6 +58,7 @@ public enum EffectName
   VERTEX_MOVE      ( EffectType.VERTEX  ,   new float[] {0.0f,0.0f,0.0f} , 3, 0,     0    , VertexEffectMove.class         ),
   VERTEX_QUATERNION( EffectType.VERTEX  ,   new float[] {0.0f,0.0f,0.0f} , 4, 0,     3    , VertexEffectQuaternion.class   ),
   VERTEX_ROTATE    ( EffectType.VERTEX  ,   new float[] {0.0f}           , 4, 0,     3    , VertexEffectRotate.class       ),
+  VERTEX_SCALE     ( EffectType.VERTEX  ,   new float[] {1.0f,1.0f,1.0f} , 3, 0,     0    , VertexEffectScale.class        ),
 
   ALPHA            ( EffectType.FRAGMENT,   new float[] {1.0f}           , 1, 3,     3    , FragmentEffectAlpha.class      ),
   SMOOTH_ALPHA     ( EffectType.FRAGMENT,   new float[] {1.0f}           , 1, 3,     3    , FragmentEffectAlpha.class      ),
diff --git a/src/main/java/org/distorted/library/effect/VertexEffectScale.java b/src/main/java/org/distorted/library/effect/VertexEffectScale.java
new file mode 100644
index 0000000..d85f26b
--- /dev/null
+++ b/src/main/java/org/distorted/library/effect/VertexEffectScale.java
@@ -0,0 +1,78 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2020 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.library.effect;
+
+import org.distorted.library.type.Data3D;
+import org.distorted.library.type.Static3D;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Scale the Mesh by 3D scale factors.
+ */
+public class VertexEffectScale extends VertexEffect
+  {
+  private Data3D mScale;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Only for use by the library itself.
+ *
+ * @y.exclude
+ */
+  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
+    {
+    return mScale.get(uniforms,index,currentDuration,step);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Have to call this before the shaders get compiled (i.e before DistortedLibrary.onCreate()) for the Effect to work.
+ */
+  public static void enable()
+    {
+    addEffect( EffectName.VERTEX_SCALE, "v *= vUniforms[effect].xyz;" );
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Scale the Mesh by 3D scale factors.
+ *
+ * @param scale current x- , y- and z- scale factors.
+ */
+  public VertexEffectScale(Data3D scale)
+    {
+    super(EffectName.VERTEX_SCALE);
+    mScale = scale;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Scale the Mesh by 3D scale factors.
+ *
+ * @param scale Common x,y, and z scale factor.
+ */
+  public VertexEffectScale(float scale)
+    {
+    super(EffectName.VERTEX_SCALE);
+    mScale = new Static3D(scale,scale,scale);
+    }
+  }
