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 0.4.2 to 0.5.0

2

dist/index.js

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

!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.LumiscapheViewerComponent=r(e.isequal,e.PropTypes,e.React,e.LumiscapheViewer)}(this,function(e,r,o,t){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,r=r&&r.hasOwnProperty("default")?r.default:r,o=o&&o.hasOwnProperty("default")?o.default:o,t=t&&t.hasOwnProperty("default")?t.default:t;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(){e.viewer=new t(e.container,{server:e.props.server,events:{onInteraction:e.props.onInteraction,onLoadStart:e.props.onLoadStart,onLoadProgress:e.props.onLoadProgress,onLoadEnd:e.props.onLoadEnd,onError:e.props.onError}}),e.props.scene&&e.viewer.load(e.props.scene),e.props.encoder&&e.viewer.setEncoder(e.props.encoder),e.props.parameters&&e.viewer.setParameters(e.props.parameters),e.props.view&&e.viewer.setView(e.props.view)},0)},n.prototype.shouldComponentUpdate=function(r){var o=!e(this.props.scene,r.scene),t=!e(this.props.encoder,r.encoder),n=!e(this.props.parameters,r.parameters),s=!e(this.props.view,r.view);return!!this.viewer&&(o||t||n||s)},n.prototype.componentDidUpdate=function(r){e(this.props.scene,r.scene)||this.viewer.load(this.props.scene),e(this.props.encoder,r.encoder)||this.viewer.setEncoder(this.props.encoder),e(this.props.parameters,r.parameters)||this.viewer.setParameters(this.props.parameters),e(this.props.view,r.view)||this.viewer.setView(this.props.view)},n.prototype.componentWillUnmount=function(){this.viewer&&this.viewer.destroy()},n.prototype.render=function(){var e=this;return o.createElement("div",{ref:function(r){e.container=r}})},n}(o.Component);return n.propTypes={server:r.string.isRequired,scene:r.arrayOf(r.object).isRequired,view:r.object.isRequired,parameters:r.shape({antialiasing:r.bool,superSampling:r.number}),encoder:r.shape({format:r.string,quality:r.number}),onInteraction:r.func,onLoadStart:r.func,onLoadProgress:r.func,onLoadEnd:r.func,onError:r.func},n.defaultProps={parameters:{antialiasing:!1,superSampling:2},encoder:{format:"jpeg",quality:90},onInteraction:function(){},onLoadStart:function(){},onLoadProgress:function(){},onLoadEnd:function(){},onError:function(){}},n});
!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.LumiscapheViewerComponent=r(e.isequal,e.PropTypes,e.React,e.LumiscapheViewer)}(this,function(e,r,o,t){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,r=r&&r.hasOwnProperty("default")?r.default:r,o=o&&o.hasOwnProperty("default")?o.default:o,t=t&&t.hasOwnProperty("default")?t.default:t;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(){e.viewer=new t(e.container,{server:e.props.server,events:{onInteraction:e.props.onInteraction,onLoadStart:e.props.onLoadStart,onLoadProgress:e.props.onLoadProgress,onLoadEnd:e.props.onLoadEnd,onError:e.props.onError}}),e.props.scene&&e.viewer.load(e.props.scene),e.props.encoder&&e.viewer.setEncoder(e.props.encoder),e.props.parameters&&e.viewer.setParameters(e.props.parameters),e.props.view&&e.viewer.setView(e.props.view,e.props.transition)},0)},n.prototype.shouldComponentUpdate=function(r){var o=!e(this.props.scene,r.scene),t=!e(this.props.encoder,r.encoder),n=!e(this.props.parameters,r.parameters),s=!e(this.props.view,r.view);return!!this.viewer&&(o||t||n||s)},n.prototype.componentDidUpdate=function(r){e(this.props.scene,r.scene)||this.viewer.load(this.props.scene,this.props.transition),e(this.props.encoder,r.encoder)||this.viewer.setEncoder(this.props.encoder),e(this.props.parameters,r.parameters)||this.viewer.setParameters(this.props.parameters),e(this.props.view,r.view)||this.viewer.setView(this.props.view,this.props.transition)},n.prototype.componentWillUnmount=function(){this.viewer&&this.viewer.destroy()},n.prototype.render=function(){var e=this;return o.createElement("div",{ref:function(r){e.container=r}})},n}(o.Component);return n.propTypes={server:r.string.isRequired,scene:r.arrayOf(r.object).isRequired,view:r.object.isRequired,transition:r.object,parameters:r.shape({antialiasing:r.bool,superSampling:r.number}),encoder:r.shape({format:r.string,quality:r.number}),onInteraction:r.func,onLoadStart:r.func,onLoadProgress:r.func,onLoadEnd:r.func,onError:r.func},n.defaultProps={transition:{},parameters:{antialiasing:!1,superSampling:2},encoder:{format:"jpeg",quality:90},onInteraction:function(){},onLoadStart:function(){},onLoadProgress:function(){},onLoadEnd:function(){},onError:function(){}},n});
{
"name": "@lumiscaphe/react-viewer",
"version": "0.4.2",
"version": "0.5.0",
"description": "Official React component for Lumiscaphe 3D Viewer",

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

"dependencies": {
"@lumiscaphe/viewer": "^0.4.2",
"@lumiscaphe/viewer": "^0.5.0",
"lodash.isequal": "^4.5.0",

@@ -21,10 +21,10 @@ "prop-types": "^15.6.0",

"cross-env": "^5.1.1",
"eslint": "^4.16.0",
"eslint": "^4.17.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.5.1",
"eslint-plugin-react": "^7.6.1",
"husky": "^0.14.3",
"rollup": "^0.55.0",
"rollup-plugin-buble": "^0.18.0",
"rollup": "^0.55.5",
"rollup-plugin-buble": "^0.19.1",
"rollup-plugin-eslint": "^4.0.0",

@@ -31,0 +31,0 @@ "rollup-plugin-uglify-es": "^0.0.1"

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