texture()
Function in Runtime
A texture of the block's default device: using _ = device.use() names the device, and the texture is the one device.texture(options) makes.
import { texture } from 'typeshade/runtime'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
function texture(options: { readonly size: readonly [number, number]; readonly format: string; readonly storage?: boolean;}): TextureParameters
options{ readonly size: readonly [number, number]; readonly format: string; readonly storage?: boolean; }sizeandformat, asdevice.texture()takes them.
Return value
the device’s texture.
Exceptions
TypeErrorTypeErrorwhen no device is in use, and asdevice.texture()throws.
Description
A texture lives on its device only, so it takes no range of the region (R17).
In the guide
See also
Source
src/runtime/resource.ts, line 1129, at commit af54ddad5