new Raster( [options])
Creates a new Raster instance.
Parameters:
Name | Type | Argument | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Configuration options Properties
|
Methods
-
<async> loadImage(tile, gl)
-
Loads an image tile and converts it to a WebGL texture. Supports both full and partial content requests.
Parameters:
Name Type Description tile
Object The tile to load
Properties
Name Type Argument Description url
string URL of the image
start
number <optional>
Start byte for partial requests
end
number <optional>
End byte for partial requests
gl
WebGLRenderingContext The WebGL rendering context
Throws:
-
If server doesn't support partial content requests when required
- Type
- Error
Returns:
Promise resolving to [texture, size]:
- texture: WebGLTexture object
- size: Size of the image in bytes (width * height * components)
- Type
- Promise.<Array>
-
Type Definitions
-
Format
-
Defines the color format for image data storage in textures and renderbuffers.
Type:
- 'vec3' | 'vec4' | 'float'