Jelajahi Sumber

Issue #877: black bg color of generated images

cycle20 1 tahun lalu
induk
melakukan
939d5d45a4
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      src/TmImageRenderer/index.ts

+ 2 - 0
src/TmImageRenderer/index.ts

@@ -27,6 +27,7 @@ import { setFSModule } from '../mol-util/data-source';
 import { MembraneOrientationPreset, loadWithUNITMPMembraneRepresentation } from '../tmdet-extension/behavior';
 import { TmDetColorThemeProvider } from '../tmdet-extension/tmdet-color-theme';
 import { TmDetLabelProvider } from '../tmdet-extension/labeling';
+import { ColorNames } from '../mol-util/color/names';
 
 
 const IMAGE_WIDTH = 800;
@@ -68,6 +69,7 @@ async function main() {
     const externalModules: ExternalModules = { gl, pngjs, 'jpeg-js': jpegjs };
     const canvasParams = defaultCanvas3DParams();
     canvasParams.camera!.mode = "perspective";
+    canvasParams.renderer!.backgroundColor = ColorNames.black;
     const plugin = new HeadlessPluginContext(
         externalModules,
         DefaultPluginSpec(),