Jelajahi Sumber

Issue #877: renderer is in progress

cycle20 1 tahun lalu
induk
melakukan
1ff91ed044
1 mengubah file dengan 15 tambahan dan 1 penghapusan
  1. 15 1
      src/TmImageRenderer/index.ts

+ 15 - 1
src/TmImageRenderer/index.ts

@@ -23,7 +23,9 @@ import { HeadlessPluginContext } from '../mol-plugin/headless-plugin-context';
 import { DefaultPluginSpec } from '../mol-plugin/spec';
 import { ExternalModules, STYLIZED_POSTPROCESSING } from '../mol-plugin/util/headless-screenshot';
 import { setFSModule } from '../mol-util/data-source';
-import { TMDETMembraneOrientation } from '../tmdet-extension/behavior';
+import { MembraneOrientationPreset, TMDETMembraneOrientation } from '../tmdet-extension/behavior';
+import { TmDetColorThemeProvider } from '../tmdet-extension/tmdet-color-theme';
+import { TmDetLabelProvider } from '../tmdet-extension/labeling';
 
 
 setFSModule(fs);
@@ -53,6 +55,18 @@ async function main() {
     const plugin = new HeadlessPluginContext(externalModules, DefaultPluginSpec(), { width: 800, height: 800 });
     await plugin.init();
 
+    let tree = plugin.state.behaviors.build();
+
+
+    plugin.builders.structure.representation.registerPreset(MembraneOrientationPreset);
+    plugin.representation.structure.themes.colorThemeRegistry.add(TmDetColorThemeProvider);
+    plugin.managers.lociLabels.addProvider(TmDetLabelProvider);
+
+    await plugin.runTask(plugin.state.behaviors.updateTree(tree, { doNotUpdateCurrent: true, doNotLogTiming: true }));
+
+
+
+
     // Download and visualize data in the plugin
     const update = plugin.build();
     const structure = update.toRoot()