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.0 to 1.0.1

8

CHANGELOG.MD

@@ -1,9 +0,5 @@

## [Version 1.0.0] (2019-01-28)
## [Version 1.0.0]
### Breaking changes
- Introduces `onVrcubeInteraction` and `onVrobjectInteraction` events instead of `onInteraction` event
### New features
- Add vrcube and vrobject helpers
- Add `onVrcubeInteraction` and `onVrobjectInteraction` events

@@ -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=e||self).LumiscapheViewerComponent=r(e.isequal,e.PropTypes,e.React,e.LumiscapheViewer)}(this,function(e,r,t,n){"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,n=n&&n.hasOwnProperty("default")?n.default:n;var o=function(r){function o(e){r.call(this,e),this.viewer=null}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.componentDidMount=function(){var e=this;setTimeout(function(){var r=e.props,t=r.server,o=r.scene,i=r.encoder,a=r.parameters,s=r.transition,c=r.view,p=r.events,u=r.vrcube,d=r.vrobject;e.viewer=new n(e.container,{server:t,events:p,vrcube:u,vrobject:d}),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(r){var t=this.props,n=t.scene,o=t.encoder,i=t.parameters,a=t.view,s=r.scene,c=r.encoder,p=r.parameters,u=r.view,d=!e(n,s),f=!e(o,c),l=!e(i,p),v=!e(a,u);return!!this.viewer&&(d||f||l||v)},o.prototype.componentDidUpdate=function(r){var t=this.props,n=t.scene,o=t.encoder,i=t.parameters,a=t.transition,s=t.view,c=r.scene,p=r.encoder,u=r.parameters,d=r.view;e(n,c)||this.viewer.load(n,a),e(o,p)||this.viewer.setEncoder(o),e(i,u)||this.viewer.setParameters(i),e(s,d)||this.viewer.setView(s,a)},o.prototype.componentWillUnmount=function(){this.viewer&&this.viewer.destroy()},o.prototype.render=function(){var e=this;return t.createElement("div",{ref:function(r){e.container=r}})},o}(t.Component);return o.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}),events:r.shape({onLoadStart:r.func,onLoadProgress:r.func,onLoadEnd:r.func,onLoadError:r.func,onVrcubeInteraction:r.func,onVrobjectInteraction:r.func}),vrcube:r.shape({helper:r.element}),vrobject:r.shape({helper:r.element})},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:{helper:null},vrobject:{helper:null}},o});
!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});
{
"name": "@lumiscaphe/react-viewer",
"version": "1.0.0",
"version": "1.0.1",
"description": "Official React component for Lumiscaphe 3D Viewer",

@@ -14,10 +14,10 @@ "main": "dist/index.js",

"lodash.isequal": "^4.5.0",
"prop-types": "^15.6.0",
"react": "^16.7.0"
"prop-types": "^15.7.0",
"react": "^16.8.0"
},
"devDependencies": {
"cross-env": "^5.2.0",
"eslint": "^5.12.0",
"eslint": "^5.14.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.15.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.0",

@@ -27,3 +27,3 @@ "eslint-plugin-react": "^7.12.0",

"react-dom": "^16.7.0",
"rollup": "^1.1.0",
"rollup": "^1.2.0",
"rollup-plugin-buble": "^0.19.0",

@@ -34,4 +34,4 @@ "rollup-plugin-commonjs": "^9.2.0",

"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-terser": "^4.0.3"
"rollup-plugin-terser": "^4.0.0"
}
}

@@ -22,12 +22,2 @@ # react-viewer

const helper = document.getElementById('helper');
const vrcube = {
helper: helper,
};
const vrobject = {
helper: helper,
};
const scene = [{

@@ -88,4 +78,2 @@ database: 'ee294840-5689-49b0-9edb-527598602df0',

events={events}
vrcube={vrcube}
vrobject={vrobject}
/>

@@ -207,10 +195,2 @@ );

* `onVrcubeInteraction` : event sent on vrcube interaction
* `onVrobjectInteraction` : event sent on vrobject interaction
## Vrcube
Vrcube options defined with:
* `helper` : div that will be displayed as interaction helper for vrcube
## Vrobject
Vrobject options defined with:
* `helper` : div that will be displayed as interaction helper for vrobject
* `onVrobjectInteraction` : event sent on vrobject interaction
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