浏览代码

fix typescript

Julien Barrois 6 年之前
父节点
当前提交
17cb96a43c
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      postProcessLibrary/src/digitalRain/babylon.digitalRainPostProcess.ts

+ 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);