createTexture MethodStatic
Create a texture with the given parameters.
createTexture(iModelDb: IModelDb, definitionModelId: string, name: string, format: ImageSourceFormat, data: string | Uint8Array, description?: string): Texture
throws IModelError if unable to create the element.
see Texture.insertTexture to insert a new texture into the iModel.
Parameter | Type | Description |
---|---|---|
iModelDb | IModelDb | The iModel to contain the texture. |
definitionModelId | string | The DefinitionModel to contain the texture. |
name | string | The name to serve as the texture's Code value. |
format | ImageSourceFormat | The format of the image data. |
data | string | Uint8Array | The image data in the format specified by format . |
description | string | An optional description of the texture |
Returns - Texture
The newly constructed Texture element.
Defined in
- backend/src/Texture.ts Line 72
Last Updated: 20 June, 2023