Julien Barrois vor 6 Jahren
Ursprung
Commit
17cb96a43c

+ 6 - 4
postProcessLibrary/src/digitalRain/babylon.digitalRainPostProcess.ts

@@ -247,10 +247,12 @@ module BABYLON {
 
             var alpha = 0.0;
             var cosTimeZeroOne = 0.0;
-            var matrix = new Matrix();
-            for (let i = 0; i < 16; i++) {
-                matrix.m[i] = Math.random();
-            }
+            var matrix = Matrix.FromValues(
+                Math.random(), Math.random(), Math.random(), Math.random(),
+                Math.random(), Math.random(), Math.random(), Math.random(),
+                Math.random(), Math.random(), Math.random(), Math.random(),
+                Math.random(), Math.random(), Math.random(), Math.random()
+            );
 
             this.onApply = (effect: Effect) => {
                 effect.setTexture("digitalRainFont", this._digitalRainFontTexture);