Socket
Socket
Sign inDemoInstall

@lumiscaphe/react-viewer

Package Overview
Dependencies
15
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.5 to 1.0.6

2

dist/index.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("lodash.isequal"),require("prop-types"),require("react")):"function"==typeof define&&define.amd?define(["lodash.isequal","prop-types","react"],t):(e=e||self).LumiscapheViewerComponent=t(e.isequal,e.PropTypes,e.React)}(this,function(e,t,r){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var o=function(t){function o(e){t.call(this,e),this.viewer=null}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.componentDidMount=function(){var e=this,t=require("@lumiscaphe/viewer");setTimeout(function(){var r=e.props,o=r.server,n=r.scene,i=r.encoder,a=r.parameters,s=r.transition,c=r.view,u=r.vrcube,p=r.vrobject,d=r.onLoadStart,v=r.onLoadProgress,f=r.onLoadEnd,l=r.onLoadError,b=r.onInteraction,m=r.onVrcubeInteraction,w=r.onVrobjectInteraction;e.viewer=new t(e.container,{server:o,events:{onLoadStart:d,onLoadProgress:v,onLoadEnd:f,onLoadError:l,onInteraction:b,onVrcubeInteraction:m,onVrobjectInteraction:w},vrcube:u,vrobject:p}),n&&e.viewer.load(n),i&&e.viewer.setEncoder(i),a&&e.viewer.setParameters(a),c&&e.viewer.setView(c,s)},0)},o.prototype.shouldComponentUpdate=function(t){var r=this.props,o=r.className,n=r.style,i=r.scene,a=r.encoder,s=r.parameters,c=r.view,u=r.vrcube,p=r.vrobject,d=t.className,v=t.style,f=t.scene,l=t.encoder,b=t.parameters,m=t.view,w=t.vrcube,y=t.vrobject,h=!e(o,d),j=!e(n,v),L=!e(i,f),V=!e(a,l),g=!e(s,b),q=!e(c,m),I=!e(u,w),E=!e(p,y);return!!this.viewer&&(h||j||L||V||g||q||I||E)},o.prototype.componentDidUpdate=function(t){var r=this.props,o=r.scene,n=r.encoder,i=r.parameters,a=r.transition,s=r.view,c=r.vrcube,u=r.vrobject,p=t.scene,d=t.encoder,v=t.parameters,f=t.view,l=t.vrcube,b=t.vrobject;e(o,p)||this.viewer.load(o,a),e(n,d)||this.viewer.setEncoder(n),e(i,v)||this.viewer.setParameters(i),e(s,f)||this.viewer.setView(s,a),e(c,l)||this.viewer.setVrcube(c),e(u,b)||this.viewer.setVrobject(u)},o.prototype.componentWillUnmount=function(){this.viewer&&this.viewer.destroy()},o.prototype.render=function(){var e=this,t=this.props,o=t.className,n=t.style;return r.createElement("div",{className:o,style:n,ref:function(t){e.container=t}})},o}((r=r&&r.hasOwnProperty("default")?r.default:r).Component);return o.propTypes={className:t.string,style:t.object,server:t.string.isRequired,scene:t.arrayOf(t.object).isRequired,encoder:t.shape({format:t.string,quality:t.number}),parameters:t.shape({antialiasing:t.bool,superSampling:t.number}),transition:t.object,view:t.object.isRequired,vrcube:t.object,vrobject:t.object,onLoadStart:t.func,onLoadProgress:t.func,onLoadEnd:t.func,onLoadError:t.func,onInteraction:t.func,onVrcubeInteraction:t.func,onVrobjectInteraction:t.func},o.defaultProps={className:"",style:{},parameters:{antialiasing:!1,superSampling:2},encoder:{format:"jpeg",quality:90},transition:{},vrcube:{},vrobject:{},onLoadStart:function(){},onLoadProgress:function(){},onLoadEnd:function(){},onLoadError:function(){},onInteraction:function(){},onVrcubeInteraction:function(){},onVrobjectInteraction:function(){}},o});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("lodash.isequal"),require("prop-types"),require("react")):"function"==typeof define&&define.amd?define(["lodash.isequal","prop-types","react"],t):(e=e||self).LumiscapheViewerComponent=t(e.isequal,e.PropTypes,e.React)}(this,function(e,t,r){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var o=function(t){function o(e){t.call(this,e),this.viewer=null}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.componentDidMount=function(){var e=this,t=require("@lumiscaphe/viewer");setTimeout(function(){var r=e.props,o=r.server,n=r.scene,i=r.encoder,a=r.parameters,s=r.transition,c=r.view,u=r.vrcube,p=r.vrobject,d=r.onLoadStart,v=r.onLoadProgress,f=r.onLoadEnd,l=r.onLoadError,b=r.onInteraction,m=r.onVrcubeInteraction,w=r.onVrobjectInteraction;e.viewer=new t(e.container,{server:o,events:{onLoadStart:d,onLoadProgress:v,onLoadEnd:f,onLoadError:l,onInteraction:b,onVrcubeInteraction:m,onVrobjectInteraction:w},vrcube:u,vrobject:p}),n&&e.viewer.load(n),i&&e.viewer.setEncoder(i),a&&e.viewer.setParameters(a),c&&e.viewer.setView(c,s)},0)},o.prototype.shouldComponentUpdate=function(t){var r=this.props,o=r.className,n=r.style,i=r.scene,a=r.encoder,s=r.parameters,c=r.view,u=r.vrcube,p=r.vrobject,d=t.className,v=t.style,f=t.scene,l=t.encoder,b=t.parameters,m=t.view,w=t.vrcube,y=t.vrobject,h=!e(o,d),j=!e(n,v),L=!e(i,f),V=!e(a,l),g=!e(s,b),q=!e(c,m),I=!e(u,w),E=!e(p,y);return!!this.viewer&&(h||j||L||V||g||q||I||E)},o.prototype.componentDidUpdate=function(t){var r=this.props,o=r.scene,n=r.encoder,i=r.parameters,a=r.transition,s=r.view,c=r.vrcube,u=r.vrobject,p=t.scene,d=t.encoder,v=t.parameters,f=t.view,l=t.vrcube,b=t.vrobject;e(o,p)||this.viewer.load(o,a),e(n,d)||this.viewer.setEncoder(n),e(i,v)||this.viewer.setParameters(i),e(s,f)||this.viewer.setView(s,a),e(c,l)||this.viewer.setVrcube(c),e(u,b)||this.viewer.setVrobject(u)},o.prototype.componentWillUnmount=function(){this.viewer&&this.viewer.destroy()},o.prototype.render=function(){var e=this,t=this.props,o=t.className,n=t.style;return r.createElement("div",{className:o,style:n,ref:function(t){e.container=t}})},o}((r=r&&r.hasOwnProperty("default")?r.default:r).Component);return o.propTypes={className:t.string,style:t.object,server:t.string.isRequired,scene:t.arrayOf(t.object).isRequired,encoder:t.shape({format:t.string,quality:t.number}),parameters:t.shape({antialiasing:t.bool,superSampling:t.number}),transition:t.object,view:t.object.isRequired,vrcube:t.object,vrobject:t.object,onLoadStart:t.func,onLoadProgress:t.func,onLoadEnd:t.func,onLoadError:t.func,onInteraction:t.func,onVrcubeInteraction:t.func,onVrobjectInteraction:t.func},o.defaultProps={className:void 0,style:void 0,parameters:{antialiasing:!1,superSampling:2},encoder:{format:"jpeg",quality:90},transition:{},vrcube:{},vrobject:{},onLoadStart:function(){},onLoadProgress:function(){},onLoadEnd:function(){},onLoadError:function(){},onInteraction:function(){},onVrcubeInteraction:function(){},onVrobjectInteraction:function(){}},o});
{
"name": "@lumiscaphe/react-viewer",
"version": "1.0.5",
"version": "1.0.6",
"description": "Official React component for Lumiscaphe 3D Viewer",

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

"dependencies": {
"@lumiscaphe/viewer": "^1.0.0",
"@lumiscaphe/viewer": "^1.0.4",
"lodash.isequal": "^4.5.0",

@@ -15,0 +15,0 @@ "prop-types": "^15.7.0",

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