Browse Source

Merge pull request #1628 from Wingnutt/master

Added Color3.Random() - I'm scared.  :)
David Catuhe 8 years ago
parent
commit
714182df6a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Math/babylon.math.ts

+ 2 - 1
src/Math/babylon.math.ts

@@ -239,6 +239,7 @@
         public static Magenta(): Color3 { return new Color3(1, 0, 1); }
         public static Yellow(): Color3 { return new Color3(1, 1, 0); }
         public static Gray(): Color3 { return new Color3(0.5, 0.5, 0.5); }
+        public static Random(): Color3 { return new Color3(Math.Random(), Math.Random(), Math.Random()); }
     }
 
     export class Color4 {
@@ -4081,4 +4082,4 @@
             Matrix.Zero(), Matrix.Zero(),
             Matrix.Zero(), Matrix.Zero()];                      // 6 temp Matrices at once should be enough
     }
-}
+}