File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111import { PyramidGeometry } from 'pyramid' ;
1212import { RampGeometry } from 'ramp' ;
1313import { WedgeGeometry } from 'wedge' ;
14+ import { WedgeGeometry } from 'hipped' ;
1415import { BuildingShapeUtils } from './extras/BuildingShapeUtils.js' ;
1516/**
1617 * An OSM Building Part
@@ -286,6 +287,15 @@ class BuildingPart {
286287 } ;
287288 const geometry = new PyramidGeometry ( this . shape , options ) ;
288289
290+ material = BuildingPart . getRoofMaterial ( this . way ) ;
291+ roof = new Mesh ( geometry , material ) ;
292+ roof . rotation . x = - Math . PI / 2 ;
293+ roof . position . set ( 0 , this . options . building . height - this . options . roof . height , 0 ) ;
294+ } else if ( this . options . roof . shape === 'hipped' ) {
295+ const options = {
296+ depth : this . options . roof . height ,
297+ } ;
298+ const geometry = new HippedGeometry ( this . shape , options ) ;
289299 material = BuildingPart . getRoofMaterial ( this . way ) ;
290300 roof = new Mesh ( geometry , material ) ;
291301 roof . rotation . x = - Math . PI / 2 ;
You can’t perform that action at this time.
0 commit comments