Appearance
Class: Texture<T>
纹理
能力,能够完整的描述一张素材
统一传入处理
canvas 异步转 ImageBitmap
Type parameters
Name | Type |
---|---|
T | extends TextureResource = TextureResource |
Hierarchy
↳
Texture
Table of contents
Constructors
Properties
Accessors
Constructors
constructor
• new Texture<T
>(source?
)
Type parameters
Name | Type |
---|---|
T | extends TextureResource = TextureResource |
Parameters
Name | Type |
---|---|
source? | T |
Overrides
Defined in
src/core/texture/Texture.ts:40
Properties
_source
• Optional
_source: T
Defined in
src/core/texture/Texture.ts:28
anchor
• anchor: Vector2
Defined in
src/core/texture/Texture.ts:19
height
• height: number
= 0
截取高度
Inherited from
Defined in
src/core/texture/BaseTexture.ts:20
init
• init: boolean
= false
是否进行了初始化/是否需要初始化
Defined in
src/core/texture/Texture.ts:26
left
• left: number
= 0
Defined in
src/core/texture/Texture.ts:17
rotation
• rotation: number
= 0
旋转
Defined in
src/core/texture/Texture.ts:16
sourceSize
• Optional
sourceSize: Vector2
Defined in
src/core/texture/Texture.ts:21
top
• top: number
= 0
Defined in
src/core/texture/Texture.ts:18
width
• width: number
= 0
截取宽度
Inherited from
Defined in
src/core/texture/BaseTexture.ts:16
x
• x: number
= 0
记录x偏移
Inherited from
Defined in
src/core/texture/BaseTexture.ts:8
y
• y: number
= 0
记录y偏移
Inherited from
Defined in
src/core/texture/BaseTexture.ts:12
Accessors
source
• get
source(): T
Returns
T
Defined in
src/core/texture/Texture.ts:29
• set
source(val
): void
Parameters
Name | Type |
---|---|
val | T |
Returns
void