createTexture MethodStatic
Create a texture with the given parameters.
createTexture(iModelDb: IModelDb, definitionModelId: string, name: string, format: ImageSourceFormat, data: string | Uint8Array, description?: string): Texture
@returns The newly constructed Texture element.
@throws IModelError if unable to create the element.
@see 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
- core/backend/src/Texture.ts Line 71
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.