소스 검색

Added Color3.Random() static func - line 242

Wingnutt 8 년 전
부모
커밋
6d1f2493ce
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
     }
-}
+}