@@ -8,8 +8,10 @@ function mergeParams( defaults, customParams ) {
88 var params = { } ;
99
1010 defaultKeys . map ( function ( key ) {
11+
1112 params [ key ] = customParams [ key ] || defaultKeys [ key ] ;
12- } ) ;
13+
14+ } ) ;
1315
1416 return params ;
1517
@@ -19,9 +21,11 @@ function mergeParams( defaults, customParams ) {
1921function getGeometryParams ( type , customParams ) {
2022
2123 if ( typeof customParams != "undefined" &&
22- typeof customParams . geometry != "undefined" &&
23- typeof customParams . geometry . parameters != "undefined" ) {
24+ typeof customParams . geometry != "undefined" &&
25+ typeof customParams . geometry . parameters != "undefined" ) {
26+
2427 var customGeometryParams = customParams . geometry . parameters ;
28+
2529 }
2630
2731 var defaults = { } ;
@@ -58,24 +62,24 @@ function getGeometry( type, customParams ) {
5862 case "BoxGeometry" :
5963
6064 return new THREE . BoxGeometry (
61- params [ 'width' ] ,
62- params [ 'height' ] ,
63- params [ 'depth' ] ,
64- params [ 'widthSegments' ] ,
65- params [ 'heightSegments' ] ,
66- params [ 'depthSegments' ]
65+ params [ 'width' ] ,
66+ params [ 'height' ] ,
67+ params [ 'depth' ] ,
68+ params [ 'widthSegments' ] ,
69+ params [ 'heightSegments' ] ,
70+ params [ 'depthSegments' ]
6771 ) ;
6872
6973 case "SphereGeometry" :
7074
7175 return new THREE . SphereGeometry (
72- params [ 'radius' ] ,
73- params [ 'widthSegments' ] ,
74- params [ 'heightSegments' ] ,
75- params [ 'phiStart' ] ,
76- params [ 'phiLength' ] ,
77- params [ 'thetaStart' ] ,
78- params [ 'thetaLength' ]
76+ params [ 'radius' ] ,
77+ params [ 'widthSegments' ] ,
78+ params [ 'heightSegments' ] ,
79+ params [ 'phiStart' ] ,
80+ params [ 'phiLength' ] ,
81+ params [ 'thetaStart' ] ,
82+ params [ 'thetaLength' ]
7983 ) ;
8084
8185 default :
@@ -102,6 +106,7 @@ function getObject( name, type, customParams ) {
102106function aBox ( name , customParams ) {
103107
104108 return getObject ( name , "BoxGeometry" , customParams ) ;
109+
105110}
106111
107112function aSphere ( name , customParams ) {
@@ -133,13 +138,14 @@ function getScriptCount( editor ) {
133138 var scriptsKeys = Object . keys ( editor . scripts ) ;
134139 var scriptCount = 0 ;
135140
136- for ( var i = 0 ; i < scriptsKeys . length ; i ++ ) {
141+ for ( var i = 0 ; i < scriptsKeys . length ; i ++ ) {
137142
138- scriptCount += editor . scripts [ scriptsKeys [ i ] ] . length ;
143+ scriptCount += editor . scripts [ scriptsKeys [ i ] ] . length ;
139144
140145 }
141146
142147 return scriptCount ;
148+
143149}
144150
145151function exportScene ( editor ) {
@@ -159,4 +165,4 @@ function importScene( data ) {
159165
160166 return result ;
161167
162- }
168+ }
0 commit comments