@feng3d/render-api
    Preparing search index...

    Class Texture

    Index

    Constructors

    Properties

    dimension?: TextureDimension

    纹理维度,默认为 "2d" 。

    WebGL中不支持 "1d" "cube-array"。

    format?: TextureFormat

    纹理格式。 默认为 "rgba8unorm",

    generateMipmap?: boolean

    初始化纹理后是否生成mipmap

    label?: string

    标签。

    用于调试。

    mipLevelCount?: number

    The number of mip levels the texture will contain.

    The width, height, and depth or layer count of the texture.

    由于通过初始化时写入的资源自动计算尺寸处理所有情况难度很大且容易出错,该属性在初始化时必须设置。

    修改尺寸将会引发纹理销毁,使用时重新创建新纹理。

    sources?: readonly TextureSource[]

    初始化纹理资源。

    writeTextures?: readonly TextureSource[]

    写入纹理资源。

    Methods

    • 获取纹理数据构造函数。

      Parameters

      Returns
          | Int8ArrayConstructor
          | Uint8ArrayConstructor
          | Int16ArrayConstructor
          | Uint16ArrayConstructor
          | Int32ArrayConstructor
          | Uint32ArrayConstructor
          | Float32ArrayConstructor