Socket
Socket
Sign inDemoInstall

@lumiscaphe/react-viewer

Package Overview
Dependencies
10
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

2

index.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("@lumiscaphe/viewer")):"function"==typeof define&&define.amd?define(["react","@lumiscaphe/viewer"],t):e["react-viewer"]=t(e.React,e.Viewer)}(this,function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;!function(){function e(e){this.value=e}function t(t){function n(e,t){return new Promise(function(n,o){var u={key:e,arg:t,resolve:n,reject:o,next:null};a?a=a.next=u:(i=a=u,r(e,t))})}function r(n,i){try{var a=t[n](i),u=a.value;u instanceof e?Promise.resolve(u.value).then(function(e){r("next",e)},function(e){r("throw",e)}):o(a.done?"return":"normal",a.value)}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":i.resolve({value:t,done:!0});break;case"throw":i.reject(t);break;default:i.resolve({value:t,done:!1})}(i=i.next)?r(i.key,i.arg):a=null}var i,a;this._invoke=n,"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}();var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t};return function(a){function u(e){return n(this,u),i(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,e))}return o(u,a),r(u,[{key:"componentDidMount",value:function(){this.createPlayer(),this.loadImage()}},{key:"componentDidUpdate",value:function(e){this.props.databaseId!==e.databaseId&&this.loadImage(),this.props.configuration!==e.configuration&&this.loadImage(),this.props.mode!==e.mode&&this.loadImage(),this.props.camera!==e.camera&&this.loadImage()}},{key:"createPlayer",value:function(){this.viewer=new t(this.container,{webrender:this.props.webrender})}},{key:"loadImage",value:function(){if(null!==this.props.databaseId&&null!==this.props.configuration){var e={databaseId:this.props.databaseId,configuration:this.props.configuration,bookmarkSet:this.props.camera.split("/")[0],bookmark:this.props.camera.split("/")[1],background:"product",softwareAntialiasing:!1,superSampling:2,imageFormat:"jpeg",imageQuality:90,width:1920,height:1080};this.viewer.load(e)}}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){t.container=e}})}}]),u}(e.Component)});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("@lumiscaphe/viewer")):"function"==typeof define&&define.amd?define(["react","@lumiscaphe/viewer"],t):e["react-viewer"]=t(e.React,e.Viewer)}(this,function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;!function(){function e(e){this.value=e}function t(t){function n(e,t){return new Promise(function(n,o){var u={key:e,arg:t,resolve:n,reject:o,next:null};a?a=a.next=u:(i=a=u,r(e,t))})}function r(n,i){try{var a=t[n](i),u=a.value;u instanceof e?Promise.resolve(u.value).then(function(e){r("next",e)},function(e){r("throw",e)}):o(a.done?"return":"normal",a.value)}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":i.resolve({value:t,done:!0});break;case"throw":i.reject(t);break;default:i.resolve({value:t,done:!1})}(i=i.next)?r(i.key,i.arg):a=null}var i,a;this._invoke=n,"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}();var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t};return function(a){function u(e){n(this,u);var t=i(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,e));return t.container=null,t.viewer=null,t.refCallback=t.refCallback.bind(t),t}return o(u,a),r(u,[{key:"componentDidMount",value:function(){this.createPlayer(),this.loadImage()}},{key:"componentDidUpdate",value:function(e){this.props.databaseId!==e.databaseId&&this.loadImage(),this.props.configuration!==e.configuration&&this.loadImage(),this.props.mode!==e.mode&&this.loadImage(),this.props.camera!==e.camera&&this.loadImage()}},{key:"createPlayer",value:function(){null!==this.container&&(this.viewer=new t(this.container,{webrender:this.props.webrender}))}},{key:"loadImage",value:function(){if(null!==this.viewer&&null!==this.props.databaseId&&null!==this.props.configuration){var e={databaseId:this.props.databaseId,configuration:this.props.configuration,bookmarkSet:this.props.camera.split("/")[0],bookmark:this.props.camera.split("/")[1],background:"product",softwareAntialiasing:!1,superSampling:2,imageFormat:"jpeg",imageQuality:90,width:1920,height:1080};this.viewer.load(e)}}},{key:"refCallback",value:function(e){this.container=e}},{key:"render",value:function(){return e.createElement("div",{ref:this.refCallback})}}]),u}(e.Component)});
{
"name": "@lumiscaphe/react-viewer",
"version": "0.0.3",
"version": "0.0.4",
"description": "Official React component for Lumiscaphe 3D Viewer",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc