Socket
Socket
Sign inDemoInstall

@lumiscaphe/react-viewer

Package Overview
Dependencies
8
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.10 to 0.0.11

2

dist/index.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):e["react-viewer"]=t(e.React)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(){function e(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,o,r){return o&&e(t.prototype,o),r&&e(t,r),t}}(),r=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)},a=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},i="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{};return function(n){function s(e){t(this,s);var o=a(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,e));return o.container=null,o.viewer=null,o.refCallback=o.refCallback.bind(o),o}return r(s,n),o(s,[{key:"componentDidMount",value:function(){var e=this;setTimeout(function(){e.createPlayer().then(function(){e.load()})},0)}},{key:"componentDidUpdate",value:function(e){var t=this.props.databaseId!==e.databaseId||this.props.configuration!==e.configuration,o=this.props.mode!==e.mode,r=this.props.mode!==e.mode||this.props.bookmarkSet!==e.bookmarkSet||this.props.bookmark!==e.bookmark;(t||r)&&this.load(r,!o)}},{key:"createPlayer",value:function(){var e=this;return("function"==typeof i.define&&i.define.amd?new Promise(function(e,t){i.require(["@lumiscaphe/viewer"],e,t)}):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&i.require&&"component"===i.require.loader?Promise.resolve(require("@lumiscaphe/viewer")):Promise.resolve(i["@lumiscaphe/viewer"])).then(function(t){e.viewer=new t(e.container,{server:e.props.server})})}},{key:"load",value:function(e,t){if(null!==this.viewer)switch(this.props.mode){case"image":default:this.loadImage(e,t);break;case"vrcube":this.loadVRCube(e,t);break;case"vrobject":this.loadVRObject(e,t)}}},{key:"loadImage",value:function(e,t){if(null!==this.props.databaseId){var o={databaseId:this.props.databaseId,configuration:this.props.configuration,bookmarkSet:this.props.bookmarkSet,bookmark:this.props.bookmark,background:"product",softwareAntialiasing:!0,superSampling:1,imageFormat:"jpeg",imageQuality:90,width:1920,height:1080};this.viewer.loadImage(o,e,t)}}},{key:"loadVRCube",value:function(e,t){if(null!==this.props.databaseId){var o={databaseId:this.props.databaseId,configuration:this.props.configuration,bookmarkSet:this.props.bookmarkSet,bookmark:this.props.bookmark,background:"product",softwareAntialiasing:!0,superSampling:1,imageFormat:"jpeg",imageQuality:90,width:1920,height:1080};this.viewer.loadVRCube(o,e,t)}}},{key:"loadVRObject",value:function(e,t){if(null!==this.props.databaseId){var o={databaseId:this.props.databaseId,configuration:this.props.configuration,bookmarkSet:this.props.bookmarkSet,background:"product",softwareAntialiasing:!0,superSampling:1,imageFormat:"jpeg",imageQuality:90,width:1920,height:1080};this.viewer.loadVRObject(o,e,t)}}},{key:"refCallback",value:function(e){this.container=e}},{key:"render",value:function(){return e.createElement("div",{ref:this.refCallback})}}]),s}(e.Component)});
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("react")):"function"==typeof define&&define.amd?define(["react"],o):e["react-viewer"]=o(e.React)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var o=function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")},t=function(){function e(e,o){for(var t=0;t<o.length;t++){var r=o[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(o,t,r){return t&&e(o.prototype,t),r&&e(o,r),o}}(),r=function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)},a=function(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o},i="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{};return function(n){function s(e){o(this,s);var t=a(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,e));return t.container=null,t.viewer=null,t.refCallback=t.refCallback.bind(t),t}return r(s,n),t(s,[{key:"componentDidMount",value:function(){var e=this;setTimeout(function(){e.createPlayer().then(function(){e.load()})},0)}},{key:"componentDidUpdate",value:function(e){var o=this.props.databaseId!==e.databaseId||this.props.configuration!==e.configuration,t=this.props.mode!==e.mode,r=this.props.mode!==e.mode||this.props.bookmarkSet!==e.bookmarkSet||this.props.bookmark!==e.bookmark;(o||r)&&this.load(r,!t)}},{key:"createPlayer",value:function(){var e=this;return("function"==typeof i.define&&i.define.amd?new Promise(function(e,o){i.require(["@lumiscaphe/viewer"],e,o)}):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&i.require&&"component"===i.require.loader?Promise.resolve(require("@lumiscaphe/viewer")):Promise.resolve(i["@lumiscaphe/viewer"])).then(function(o){e.viewer=new o(e.container,{server:e.props.server})})}},{key:"load",value:function(e,o){if(null!==this.viewer)switch(this.props.mode){case"image":default:this.loadImage(e,o);break;case"vrcube":this.loadVRCube(e,o);break;case"vrobject":this.loadVRObject(e,o)}}},{key:"loadImage",value:function(e,o){if(null!==this.props.databaseId){var t={databaseId:this.props.databaseId,configuration:this.props.configuration,bookmarkSet:this.props.bookmarkSet,bookmark:this.props.bookmark,background:"product",softwareAntialiasing:!1,superSampling:2,imageFormat:"jpeg",imageQuality:90};this.viewer.loadImage(t,e,o)}}},{key:"loadVRCube",value:function(e,o){if(null!==this.props.databaseId){var t={databaseId:this.props.databaseId,configuration:this.props.configuration,bookmarkSet:this.props.bookmarkSet,bookmark:this.props.bookmark,background:"product",softwareAntialiasing:!1,superSampling:2,imageFormat:"jpeg",imageQuality:90};this.viewer.loadVRCube(t,e,o)}}},{key:"loadVRObject",value:function(e,o){if(null!==this.props.databaseId){var t={databaseId:this.props.databaseId,configuration:this.props.configuration,background:"product",softwareAntialiasing:!1,superSampling:2,imageFormat:"jpeg",imageQuality:90};this.props.animation?(t.animation=this.props.animation,t.bookmarkSet=this.props.bookmarkSet,t.bookmark=this.props.bookmark,t.frames=this.props.frames):t.bookmarkSet=this.props.bookmarkSet,this.viewer.loadVRObject(t,e,o)}}},{key:"refCallback",value:function(e){this.container=e}},{key:"render",value:function(){return e.createElement("div",{ref:this.refCallback})}}]),s}(e.Component)});
{
"name": "@lumiscaphe/react-viewer",
"version": "0.0.10",
"version": "0.0.11",
"description": "Official React component for Lumiscaphe 3D Viewer",

@@ -9,3 +9,3 @@ "main": "dist/index.js",

"build": "rollup -c rollup.config.js",
"dist": "set NODE_ENV=production&&npm run build"
"dist": "cross-env NODE_ENV=production npm run build"
},

@@ -25,2 +25,3 @@ "dependencies": {

"babel-preset-stage-3": "^6.24.1",
"cross-env": "^5.1.1",
"eslint": "^4.11.0",

@@ -31,3 +32,3 @@ "eslint-config-airbnb": "^16.1.0",

"eslint-plugin-react": "^7.4.0",
"rollup": "^0.51.5",
"rollup": "^0.51.6",
"rollup-plugin-babel": "^3.0.2",

@@ -34,0 +35,0 @@ "rollup-plugin-commonjs": "^8.2.5",

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