Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

@amandaghassaei/stl-parser

@amandaghassaei/stl-parser

Table of contents

Type Aliases

Functions

Type Aliases

STLMesh

Ƭ STLMesh: Object

Type declaration

Name Type
vertices Float32Array
facesNormals Float32Array
edgesIndices Uint32Array
facesColors? Float32Array
facesIndices Uint32Array
boundingBox { min: [number, number, number] ; max: [number, number, number] }
boundingBox.min [number, number, number]
boundingBox.max [number, number, number]
mergeVertices () => STLMesh
scaleVerticesToUnitBoundingBox () => STLMesh

Functions

parseSTL

parseSTL(data): STLMesh

Synchronously parse an already loaded .stl file buffer or string.

Parameters

Name Type
data string | ArrayBuffer | Buffer

Returns

STLMesh


loadSTLAsync

loadSTLAsync(urlOrFile): Promise<STLMesh>

Load and parse the .stl asynchronously from a specified url or File object (returns Promise).

Parameters

Name Type
urlOrFile string | File

Returns

Promise<STLMesh>


loadSTL

loadSTL(urlOrFile, callback): void

Load and parse the .stl from a specified url or File object.

Parameters

Name Type
urlOrFile string | File
callback (mesh: STLMesh) => void

Returns

void