Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lumiscaphe/react-viewer

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lumiscaphe/react-viewer - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

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

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

@@ -59,9 +59,8 @@ # react-viewer

// Optional - default values
const events = {
onLoadStart: () => {},
onLoadProgress: () => {},
onLoadEnd: () => {},
onLoadError: () => {},
onVrcubeInteraction: () => {},
onVrobjectInteraction: () => {},
const onLoadStart = () => {};
const onLoadProgress = () => {};
const onLoadEnd = () => {};
const onLoadError = () => {};
const onVrcubeInteraction = () => {};
const onVrobjectInteraction = () => {};
};

@@ -77,3 +76,8 @@

parameters={parameters}
events={events}
onLoadStart={onLoadStart}
onLoadProgress={onLoadProgress}
onLoadEnd={onLoadEnd}
onLoadError={onLoadError}
onVrcubeInteraction={onVrcubeInteraction}
onVrobjectInteraction={onVrobjectInteraction}
/>

@@ -194,3 +198,4 @@ );

* `onLoadError` : event sent on load error
* `onInteraction` : event sent on vrcube or vrobject interaction
* `onVrcubeInteraction` : event sent on vrcube interaction
* `onVrobjectInteraction` : event sent on vrobject interaction
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc