Browse Source

fix VolumeData.One matrix, removed pesky console.logs

David Sehnal 5 years ago
parent
commit
170d0fbc9d

+ 2 - 2
src/mol-canvas3d/canvas3d.ts

@@ -132,12 +132,12 @@ namespace Canvas3D {
                     if (webgl.isContextLost) return;
                     if (!e.shiftKey || !e.ctrlKey || !e.altKey) return;
 
-                    console.log('lose context');
+                    if (isDebugMode) console.log('lose context');
                     loseContextExt.loseContext();
 
                     setTimeout(() => {
                         if (!webgl.isContextLost) return;
-                        console.log('restore context');
+                        if (isDebugMode) console.log('restore context');
                         loseContextExt.restoreContext();
                     }, 1000);
                 }, false);

+ 0 - 1
src/mol-geo/geometry/mesh/builder/tube.ts

@@ -53,7 +53,6 @@ export function addTube(state: MeshBuilder.State, controlPoints: ArrayLike<numbe
             if (radialSegments === 2) {
                 // add2AndScale2(normalVector, u, v, w * Math.cos(t), h * Math.sin(t))
                 Vec3.copy(normalVector, v);
-                console.log(i, t);
                 Vec3.normalize(normalVector, normalVector);
                 if (t !== 0 || i % 2 === 0) Vec3.negate(normalVector, normalVector);
             } else {

+ 0 - 1
src/mol-model/structure/export/mmcif.ts

@@ -146,7 +146,6 @@ export function encode_mmCIF_categories(encoder: CifWriter.Encoder, structures:
     if (params?.copyAllCategories && MmcifFormat.is(models[0].sourceData)) {
         encode_mmCIF_categories_copyAll(encoder, ctx);
     } else {
-        console.log('default');
         encode_mmCIF_categories_default(encoder, ctx, params);
     }
 }

+ 1 - 1
src/mol-model/volume/data.ts

@@ -28,7 +28,7 @@ interface VolumeData extends VolumeDataBase {
 
 namespace VolumeData {
     export const One: VolumeData = {
-        transform: { kind: 'matrix', matrix: Mat4() },
+        transform: { kind: 'matrix', matrix: Mat4.identity() },
         data: Tensor.create(Tensor.Space([1, 1, 1], [0, 1, 2]), Tensor.Data1([0])),
         dataStats: { min: 0, max: 0, mean: 0, sigma: 0 }
     };

+ 0 - 1
src/mol-plugin-ui/state/snapshots.tsx

@@ -175,7 +175,6 @@ class LocalStateSnapshotList extends PluginUIComponent<{}, {}> {
         return <ul style={{ listStyle: 'none', marginTop: '10px' }} className='msp-state-list'>
             {this.plugin.managers.snapshot.state.entries.map(e => <li key={e!.snapshot.id} className='msp-flex-row'>
                 <Button data-id={e!.snapshot.id} onClick={this.apply} className='msp-no-overflow'>
-                    {(console.log(e!.snapshot.durationInMs), false)}
                     <span style={{ fontWeight: e!.snapshot.id === current ? 'bold' : void 0 }}>
                         {e!.name || new Date(e!.timestamp).toLocaleString()}</span> <small>
                         {`${e!.snapshot.durationInMs ? formatTimespan(e!.snapshot.durationInMs, false) + `${e!.description ? ', ' : ''}` : ''}${e!.description ? e!.description : ''}`}

+ 0 - 1
src/mol-plugin-ui/structure/measurements.tsx

@@ -198,7 +198,6 @@ class MeasurementsOptions extends PurePluginUIComponent<{}, { isDisabled: boolea
         });
 
         this.subscribe(this.plugin.behaviors.state.isBusy, v => {
-            console.log('isBusy', 'measurement opt', v);
             this.setState({ isDisabled: v });
         });
     }

+ 0 - 1
src/mol-repr/volume/isosurface.ts

@@ -122,7 +122,6 @@ export async function createVolumeIsosurfaceMesh(ctx: VisualContext, volume: Vol
     const transform = VolumeData.getGridToCartesianTransform(volume);
     ctx.runtime.update({ message: 'Transforming mesh...' });
     Mesh.transform(surface, transform);
-    console.log(surface, Tensor.create(volume.data.space, Tensor.Data1(ids)));
     return surface;
 }