new Raster16Bit( [options])
Creates a new Raster16Bit instance.
Parameters:
| Name | Type | Argument | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Configuration options Properties
|
- Source:
Methods
-
<async> loadImage(tile, gl)
-
Loads a 16-bit image tile and converts it to a WebGL texture. Overrides parent method to handle 16-bit specific formats.
Parameters:
Name Type Description tileObject The tile to load
Properties
Name Type Argument Description urlstring URL of the image
startnumber <optional>
Start byte for partial requests
endnumber <optional>
End byte for partial requests
glWebGL2RenderingContext The WebGL2 rendering context
- Source:
Throws:
-
If context is not WebGL2
- Type
- Error
Returns:
Promise resolving to [texture, size]:
- texture: WebGLTexture object
- size: Size of the image in bytes (width * height * components * bytesPerComponent)
- Type
- Promise.<Array>
Type Definitions
-
Format
-
Defines the 16-bit format for image data storage in textures.
Type:
- 'r16f' | 'rg16f' | 'rgb16f' | 'rgba16f' | 'r16ui' | 'rg16ui' | 'rgb16ui' | 'rgba16ui' | 'r16i' | 'rg16i' | 'rgb16i' | 'rgba16i' | 'depth16'
- Source:
Properties:
Name Type Description r16f'r16f' Single-channel 16-bit floating point format
rg16f'rg16f' Two-channel 16-bit floating point format
rgb16f'rgb16f' Three-channel 16-bit floating point format
rgba16f'rgba16f' Four-channel 16-bit floating point format
r16ui'r16ui' Single-channel 16-bit unsigned integer format
rg16ui'rg16ui' Two-channel 16-bit unsigned integer format
rgb16ui'rgb16ui' Three-channel 16-bit unsigned integer format
rgba16ui'rgba16ui' Four-channel 16-bit unsigned integer format
r16i'r16i' Single-channel 16-bit signed integer format
rg16i'rg16i' Two-channel 16-bit signed integer format
rgb16i'rgb16i' Three-channel 16-bit signed integer format
rgba16i'rgba16i' Four-channel 16-bit signed integer format
depth16'depth16' 16-bit depth texture format