瀏覽代碼

Merge pull request #1628 from Wingnutt/master

Added Color3.Random() - I'm scared.  :)
David Catuhe 8 年之前
父節點
當前提交
714182df6a
共有 1 個文件被更改,包括 2 次插入1 次删除
  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
     }
-}
+}