m4m.framework.sprite
@meta4d/engine / Exports / m4m / framework / sprite
Class: sprite
language
zh_CN
classdesc
sprite资源
version
m4m 1.0
Implements
Table of contents
Properties
Methods
Constructors
Accessors
Properties
atlas
• atlas: string
language
zh_CN
classdesc
所属图集
version
m4m 1.0
Defined in
framework/asset/resource/sprite.ts:147
border
• border: border
language
zh_CN
classdesc
边距
version
m4m 1.0
Defined in
framework/asset/resource/sprite.ts:163
bundle
• bundle: assetBundle
Implementation of
Defined in
framework/asset/resource/sprite.ts:17
defaultAsset
• defaultAsset: boolean
language
zh_CN
classdesc
是否为默认资源
version
m4m 1.0
Implementation of
Defined in
framework/asset/resource/sprite.ts:25
rect
• rect: rect
language
zh_CN
classdesc
有效区域
version
m4m 1.0
Defined in
framework/asset/resource/sprite.ts:155
ClassName
▪ Static
Readonly
ClassName: string
= "sprite"
Defined in
framework/asset/resource/sprite.ts:13
Methods
caclByteLength
▸ caclByteLength(): number
language
zh_CN
classdesc
计算资源字节大小
version
m4m 1.0
Returns
number
Implementation of
Defined in
framework/asset/resource/sprite.ts:100
dispose
▸ dispose(): void
language
zh_CN
classdesc
释放资源
version
m4m 1.0
Returns
void
Implementation of
Defined in
framework/asset/resource/sprite.ts:85
getGUID
▸ getGUID(): number
language
zh_CN
classdesc
获取资源唯一id
version
m4m 1.0
Returns
number
Implementation of
Defined in
framework/asset/resource/sprite.ts:52
getName
▸ getName(): string
language
zh_CN
classdesc
获取资源名称
version
m4m 1.0
Returns
string
Implementation of
Defined in
framework/asset/resource/sprite.ts:41
unuse
▸ unuse(disposeNow?
): void
language
zh_CN
classdesc
引用计数减一
version
m4m 1.0
Parameters
disposeNow
boolean
false
Returns
void
Implementation of
Defined in
framework/asset/resource/sprite.ts:74
use
▸ use(): void
language
zh_CN
classdesc
引用计数加一
version
m4m 1.0
Returns
void
Implementation of
Defined in
framework/asset/resource/sprite.ts:63
Constructors
constructor
• new sprite(assetName?
)
Parameters
assetName
string
null
Defined in
framework/asset/resource/sprite.ts:26
Accessors
texture
• get
texture(): texture
language
zh_CN
classdesc
获取当前texture
version
m4m 1.0
Returns
Defined in
framework/asset/resource/sprite.ts:119
• set
texture(value
): void
language
zh_CN
classdesc
设置texture
version
m4m 1.0
Parameters
value
texture实例
Returns
void
Defined in
framework/asset/resource/sprite.ts:131
urange
• get
urange(): vector2
language
zh_CN
classdesc
uv的u范围
version
m4m 1.0
Returns
vector2
Defined in
framework/asset/resource/sprite.ts:173
vrange
• get
vrange(): vector2
language
zh_CN
classdesc
uv的v范围
version
m4m 1.0
Returns
vector2
Defined in
Last updated