Quellcode durchsuchen

Issue #805: rotation stuff reverted; applyTransformations called

cycle20 vor 1 Jahr
Ursprung
Commit
f19f9866e0
2 geänderte Dateien mit 3 neuen und 21 gelöschten Zeilen
  1. 0 21
      src/examples/assembly-tm/index.ts
  2. 3 0
      src/examples/assembly-tm/preset2.ts

+ 0 - 21
src/examples/assembly-tm/index.ts

@@ -2,11 +2,6 @@ import {RcsbFv3DCustom, RcsbFv3DCustomInterface} from "../../RcsbFv3D/RcsbFv3DCu
 import { DebugUtil } from "./tmdet-extension/debug-utils";
 import { createFeatureViewerConfing } from "./FeatureViewConfig";
 import { registerRegionDescriptorData } from "./UniTmpHelper";
-import { TmDetDescriptorCache } from "./tmdet-extension/prop";
-import { applyTransformations } from "./tmdet-extension/transformation";
-import { PluginContext } from "molstar/lib/mol-plugin/context";
-import { StateTransforms } from "molstar/lib/mol-plugin-state/transforms";
-import { Vec3 } from "molstar/lib/mol-math/linear-algebra";
 
 export { DebugUtil };
 
@@ -43,21 +38,5 @@ document.addEventListener("DOMContentLoaded", (event) => {
         const panel3d = new RcsbFv3DCustom(panel3dConfig);
         panel3d.render();
 
-        setTimeout(() => {
-                const descriptor = TmDetDescriptorCache.get('1afo');
-                const plugin = (window as any).plugin as PluginContext;
-                applyTransformations(plugin, descriptor!);
-                plugin.state.data.build().to('assembly')
-                    .apply(StateTransforms.Model.TransformStructureConformation, {
-                            transform: {
-                                name: 'components',
-                                params: { axis: Vec3.unitY, angle: 90, translation: Vec3.zero() }
-                            }
-                        })
-                    .commit();
-
-            },
-            2000
-        );
     })();
 });

+ 3 - 0
src/examples/assembly-tm/preset2.ts

@@ -129,6 +129,9 @@ export const TmDetRcsbPreset = TrajectoryHierarchyPresetProvider({
         const structureProperties = await builder.insertStructureProperties(structure);
         const representation = await plugin.builders.structure.representation.applyPreset<any>(structureProperties, MembraneOrientationPreset, {});
 
+        const descriptor = TmDetDescriptorCache.get(structure.data.model.entryId);
+        applyTransformations(plugin, descriptor!);
+
         (window as any).plugin = plugin;
 
         const result = {