The width of the texture.
The height of the texture.
The format of the texture.
Indicates whether to generate mipmaps for the texture.
Indicates whether the texture data can be read.
Indicates whether the texture uses sRGB color space.
Indicates whether the texture data is premultiplied by the alpha channel.
可选lock可选name静态black静态DEBUG静态error静态gray静态normal静态TEXTURE2D静态white静态cpu静态gpu增加一个依赖内容
依赖内容
增加多个依赖内容
依赖内容
The type of event.
可选data: any(Optional) Data to pass to the callback. If multiple parameters p1, p2, p3, ... need to be passed, use an array structure such as [p1, p2, p3, ...]. If a single parameter p needs to be passed and p is an array, use a structure such as [p]. For other single parameters p, you can directly pass parameter p. If data is Event.EMPTY, it means passing an Event object to the callback function. Note that it is not passing Event.TEMP, but an independent Event object.
True if there are listeners for this event type, false otherwise.
The type of event.
The listener function.
This EventDispatcher object.
The type of event.
The execution scope of the event listener function.
可选listener: FunctionThe listener function.
可选args: any[]This EventDispatcher object.
可选type: string(Optional) The type of event. If the value is null, all types of listeners on this object are removed.
This EventDispatcher object.
The target caller object.
This EventDispatcher object.
The type of event.
The listener function.
This EventDispatcher object.
The type of event.
The execution scope of the event listener function.
The listener function.
可选args: any[](Optional) The callback parameters of the event listener function.
This EventDispatcher object.
The type of event.
The listener function.
This EventDispatcher object.
The type of event.
The execution scope of the event listener function.
The listener function.
可选args: any[](Optional) The callback parameters of the event listener function.
This EventDispatcher object.
The DDS texture information containing the data to be set.
The HDR texture information containing the data to be set.
The image source, can be an HTMLImageElement, HTMLCanvasElement, or ImageBitmap.
Whether to premultiply the alpha.
Whether to invert the Y-axis of the image.
The KTX texture information containing the data to be set.
The x-offset for the sub-region.
The y-offset for the sub-region.
The width of the sub-region.
The height of the sub-region.
The pixel data for the sub-region.
The mipmap level to update, if mipmap is enabled.
Whether to generate mipmaps for the updated region.
Whether to premultiply the alpha channel of the pixel data.
Whether to invert the Y-axis of the pixel data.
静态destroy静态loadThe path to the texture file.
The callback function to be called after the texture is loaded.
En
The Texture2D class is used to generate 2D textures.
Zh
Texture2D 类用于生成2D纹理。