Module: threeGenerator

threeGenerator

Members


<inner, constant> colorsDefault :object

colorsDefault
Type:
  • object
Default Value:
  • {"InteriorWall":32768,"ExteriorWall":16757760,"Roof":8388608,"InteriorFloor":8454143,"ExposedFloor":4240639,"Shade":16764573,"UndergroundWall":10834432,"UndergroundSlab":8404992,"Ceiling":16744576,"Air":16776960,"UndergroundCeiling":4227200,"RaisedFloor":4931965,"SlabOnGrade":8404992,"FreestandingColumn":8421504,"EmbeddedColumn":8421486,"Undefined":2290649224}

Methods


<static> get2DShape(vertices, material, holes)

Returns a 2D shape mesh from vertices, materials and holes
Parameters:
Name Type Description
vertices Array An array of vertices
material Object A ThreeJS Material object
holes Array An array of hole objects
Returns:
A ThreeJS Mesh object
Type
Object

<static> get3dShape(vertices, material, holes)

Returns a 3D shape mesh from vertices, materials and holes
Parameters:
Name Type Description
vertices Array An array of vertices
material Object A ThreeJS Material object
holes Array An array of hole objects
Returns:
A ThreeJS Mesh object
Type
Object

<static> getOpenings(surfacesJson)

Returns the openings from a surface
Parameters:
Name Type Description
surfacesJson Object A surface object
Returns:
An array of surface opening objects
Type
Array

<static> getPlane(points, start)

Returns a plane from an array of points
Parameters:
Name Type Default Description
points Array An array of points
start Number 0 An integer value
Returns:
A ThreeJS plane object
Type
Object

<static> getSurfaceEdges(surfaceMeshes)

Returns the edges of an array of Meshes
Parameters:
Name Type Description
surfaceMeshes Array An array of ThreeJS Meshes
Returns:
An array of edge objects
Type
Array

<static> getSurfaceMeshes(surfaces)

Returns ThreeJS Meshes from an array of surfaces
Parameters:
Name Type Description
surfaces Array An array of surface object
Returns:
An array of ThreeJS Meshes
Type
Array

<static> getVertices(polyloop)

Returns vertices from a gbXML polyloop object
Parameters:
Name Type Description
polyloop Object gbXML polyloop object
Returns:
An array of points
Type
Array