Socket
Socket
Sign inDemoInstall

@lumiscaphe/react-viewer

Package Overview
Dependencies
13
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

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

@@ -5,0 +5,0 @@ "main": "dist/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