viral-viewer-2 6.3.4 → 6.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,4 +8,5 @@ export declare class ViralRenderer {
8
8
  constructor(viralViewerApi: ViralViewerApi);
9
9
  updateSize(width: number, height: number): void;
10
10
  render(): void;
11
+ screenshot(): void;
11
12
  }
package/dist/index.mjs CHANGED
@@ -25272,7 +25272,8 @@ class w2 {
25272
25272
  antialias: !0,
25273
25273
  stencil: !1,
25274
25274
  logarithmicDepthBuffer: !0,
25275
- powerPreference: "high-performance"
25275
+ powerPreference: "high-performance",
25276
+ preserveDrawingBuffer: !0
25276
25277
  }), this.renderer.setClearColor(16777215, 0), this.renderer.setSize(
25277
25278
  this.viralViewerApi.targetElement.offsetWidth,
25278
25279
  this.viralViewerApi.targetElement.offsetHeight
@@ -25288,6 +25289,11 @@ class w2 {
25288
25289
  this.viralViewerApi.viralCamera.camera
25289
25290
  ), this.renderer.autoClear = !0));
25290
25291
  }
25292
+ screenshot() {
25293
+ let e = this.renderer.domElement.toDataURL("image/png");
25294
+ const t = document.createElement("a");
25295
+ t.href = e, t.download = "threejs_image.png", t.click();
25296
+ }
25291
25297
  }
25292
25298
  class _2 {
25293
25299
  constructor(e) {
@@ -41138,6 +41144,8 @@ class _3 {
41138
41144
  this.lifeCycleEvent,
41139
41145
  this.options
41140
41146
  ), this.targetElement = e.container, FC("QUICK_SAND"), XC(this.targetElement, "QUICK_SAND"), this.options.enableNavigationCube && (this.viralNavigationCube = new o3(this)), this.options.enableTools && (this.viralTools = new t3(this)), this.viralSpinner = new qC(this), this.viralDraggableModal = new ZC(this), this.viralContextMenu = new A2(this), this.viralScene = new i2(this), this.viralMaterialManager = new zC(this), this.viralRenderer = new w2(this), this.viralCamera = new GE(this), this.viralMouse = new WE(this), this.viralKeyboard = new S2(this), this.viralAnimation = new _2(this), this.viralVisibilityManager = new VC(this), this.viralCentralizedEventHandler = new T2(this), this.viralLoader = new PP(this), this.viralBVH = new BC(), this.viralDataManager = new QC(this), this.options.isDev && (this.viralStats = new CP(this)), this.options.isDev ? this.viralAnimation.devAnimation() : this.viralAnimation.animation();
41147
+ let t = window;
41148
+ t.VIRAL_VIEWER = this;
41141
41149
  }
41142
41150
  }
41143
41151
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viral-viewer-2",
3
- "version": "6.3.4",
3
+ "version": "6.3.6",
4
4
  "description": "",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",