A class in the same form as the three.js loaders for loading and parsing PGM images (ref 1, ref 2).
const loader = new PGMLoader();
loader.load( 'path/to/file.pgm', array => {
// ... loaded data ...
} );data : Uint16Array | Uint8ArrayThe PGM laid out in an array in row major order where each row has a stride of width.
width : NumberThe width of the pgm file in pixels.
height : NumberThe height of the pgm file in pixels.
maxValue : NumberThe maximum gray value in the file.
Class for loading and parsing PGM image files
fetchOptions : Object = { credentials: 'same-origin' }Fetch options for loading the file.
load( url : String ) : Promise<PGMResult>Loads and parses the PGM file. The promise resolves with the returned data from the parse function.
parse( buffer : ArrayBuffer ) : PGMResultParses the contents of the given PGM and returns an object describing the telemetry.
Three.js implementation of PGMLoaderBase.
extends PGMLoaderBase
manager : LoadingManager = DefaultLoadingManagerconstructor( manager : LoadingManager = DefaultLoadingManager ) : voidload( url : String, texture : DataTexture = new DataTexture() ) : Promise<DataTexture>Loads and parses the PGM file and returns a DataTexture. If a DataTexture is passed into the function the data is applied to it.
parse( buffer : Uint8Array | ArrayBuffer, texture : DataTexture = new DataTexture() ) : DataTextureParses the contents of the given PGM file and returns a texture with the contents.