Alexander Rose 7 years ago
parent
commit
131fd430e5
2 changed files with 7 additions and 5 deletions
  1. 3 5
      src/apps/render-test/state.ts
  2. 4 0
      src/mol-math/linear-algebra/3d/mat4.ts

+ 3 - 5
src/apps/render-test/state.ts

@@ -18,16 +18,14 @@ import Box from 'mol-geo/primitive/box'
 import Spacefill from 'mol-geo/representation/structure/spacefill'
 
 import CIF from 'mol-io/reader/cif'
-import Computation from 'mol-util/computation'
+import { Run } from 'mol-task'
+// import Computation from 'mol-util/computation'
 import { AtomSet, Structure } from 'mol-model/structure'
 import { UnitRepresentation } from 'mol-geo/representation/structure';
 
 async function parseCif(data: string|Uint8Array) {
     const comp = CIF.parse(data)
-    const ctx = Computation.observable({
-        updateRateMs: 250
-    })
-    const parsed = await comp(ctx);
+    const parsed = await Run(comp);
     if (parsed.isError) throw parsed;
     return parsed
 }

+ 4 - 0
src/mol-math/linear-algebra/3d/mat4.ts

@@ -23,6 +23,10 @@ import Quat from './quat';
 
 interface Mat4 extends Array<number> { [d: number]: number, '@type': 'mat4', length: 16 }
 
+function Mat4() {
+    return Mat4.zero();
+}
+
 /**
  * Stores a 4x4 matrix in a column major (j * 4 + i indexing) format.
  */