This repository was archived by the owner on Oct 19, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
src/aframe/component/architecture-toolkit Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,9 @@ export default function dataToMaterials(data) {
6
6
7
7
let materials = { }
8
8
9
- var materialKeys = Object . keys ( data ) . filter ( function ( key ) {
9
+ Object . keys ( data ) . filter ( function ( key ) {
10
10
return key . indexOf ( 'material_' ) > - 1
11
- } )
12
-
13
- materialKeys . forEach ( function ( key ) {
11
+ } ) . forEach ( function ( key ) {
14
12
var mesh = key . replace ( 'material_' , '' )
15
13
materials [ mesh ] = data [ key ]
16
14
} )
Original file line number Diff line number Diff line change @@ -22,16 +22,14 @@ export default {
22
22
// remove old mesh
23
23
this . remove ( )
24
24
25
- // get defaults and
26
25
let attributes = cloneDeep ( data )
27
26
28
27
attributes . materials = dataToMaterials ( data )
29
28
30
29
// get meshes and materials
31
- // promised base because it loads external meshes
30
+ // promise base because it loads external meshes
32
31
var data3d = await kitchenData3d ( attributes )
33
32
34
-
35
33
// create new one
36
34
this_ . mesh = new THREE . Object3D ( )
37
35
this_ . data3dView = new io3d . aFrame . three . Data3dView ( { parent : this_ . mesh } )
You can’t perform that action at this time.
0 commit comments