Reference isBinary()

isBinary()

This function checks if the file is in ASCII format or in Binary format

It is done by searching keyword solid at the start of the file.

An ASCII STL data must begin with solid as the first six bytes. However, ASCII STLs lacking the SPACE after the d are known to be plentiful. So, check the first 5 bytes for solid.

Several encodings, such as UTF-8, precede the text with up to 5 bytes: https://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding Search for solid to start anywhere after those prefixes.

Examples

Syntax

isBinary()

Parameters

Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/loading.js and open a pull request!

Related References