File tree Expand file tree Collapse file tree 6 files changed +17
-10
lines changed Expand file tree Collapse file tree 6 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
2-
3- THREE . ImageUtils . crossOrigin = '' ;
4-
52import Events from '../lib/Events' ;
63import ComponentsSidebar from './components/Sidebar' ;
74import ModalTextures from './modals/ModalTextures' ;
@@ -12,6 +9,8 @@ import TransformToolbar from './viewport/TransformToolbar';
129import ViewportHUD from './viewport/ViewportHUD' ;
1310import { injectCSS } from '../lib/utils' ;
1411
12+ THREE . ImageUtils . crossOrigin = '' ;
13+
1514// Megahack to include font-awesome.
1615injectCSS ( 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css' ) ;
1716
@@ -89,6 +88,7 @@ export default class Main extends React.Component {
8988 this . setState ( { isHelpOpen : true } ) ;
9089 } ) ;
9190 }
91+
9292 onCloseHelpModal = value => {
9393 this . setState ( { isHelpOpen : false } ) ;
9494 } ;
Original file line number Diff line number Diff line change @@ -19,8 +19,15 @@ import { updateEntity } from '../../lib/entity';
1919export default class PropertyRow extends React . Component {
2020 static propTypes = {
2121 componentname : PropTypes . string . isRequired ,
22+ data : PropTypes . oneOfType ( [
23+ PropTypes . bool . isRequired ,
24+ PropTypes . number . isRequired ,
25+ PropTypes . object . isRequired ,
26+ PropTypes . string . isRequired
27+ ] ) ,
2228 entity : PropTypes . object . isRequired ,
2329 id : PropTypes . string ,
30+ isSingle : PropTypes . bool . isRequired ,
2431 name : PropTypes . string . isRequired ,
2532 schema : PropTypes . object . isRequired
2633 } ;
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export default class ModalTextures extends React.Component {
122122 var self = this ;
123123 Array . prototype . slice
124124 . call ( document . querySelectorAll ( 'a-assets img' ) )
125- . map ( asset => {
125+ . forEach ( asset => {
126126 var image = new Image ( ) ;
127127 image . addEventListener ( 'load' , ( ) => {
128128 self . state . assetsImages . push ( {
Original file line number Diff line number Diff line change 1- /* eslint-disable curly */
1+ /* eslint-disable curly, dot-notation */
22/**
33 * @author arodic / https://github.com/arodic
44 */
11741174 scope . object . quaternion . copy ( tempQuaternion ) ;
11751175 } else if ( scope . axis === 'XYZE' ) {
11761176 var p = point
1177- . clone ( )
1178- . cross ( tempVector )
1179- . normalize ( ) ;
1177+ . clone ( )
1178+ . cross ( tempVector )
1179+ . normalize ( ) ;
11801180 quaternionE . setFromEuler ( tempEuler . set ( p . x , p . y , p . z ) ) ; // rotation axis
11811181
11821182 tempQuaternion . setFromRotationMatrix (
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ AssetsLoader.prototype = {
1717 */
1818 load : function ( ) {
1919 var xhr = new XMLHttpRequest ( ) ;
20- var url = assetsBaseUrl + assetsRelativeUrl [ ' images' ] ;
20+ var url = assetsBaseUrl + assetsRelativeUrl . images ;
2121
2222 // @todo Remove the sync call and use a callback
2323 xhr . open ( 'GET' , url ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export function Viewport(inspector) {
9696 sceneHelpers . add ( transformControls ) ;
9797
9898 Events . on ( 'entityupdate' , detail => {
99- if ( inspector . selectedEntity . object3DMap [ ' mesh' ] ) {
99+ if ( inspector . selectedEntity . object3DMap . mesh ) {
100100 selectionBox . setFromObject ( inspector . selected ) ;
101101 }
102102 } ) ;
You can’t perform that action at this time.
0 commit comments