m4m.framework.atlas

@meta4d/engine / Exports / m4m / framework / atlas

Class: atlas

m4m.framework.atlas

language zh_CN

classdesc 图集资源

version m4m 1.0

Implements

Table of contents

Methods

Constructors

Properties

Accessors

Methods

Parse

Parse(jsonStr, assetmgr, bundleName?): atlas

language zh_CN

classdesc 解析资源

version m4m 1.0

Parameters

Name
Type
Default value
Description

jsonStr

string

undefined

json数据

assetmgr

undefined

资源管理实例

bundleName

string

null

-

Returns

atlas

Defined in

framework/asset/resource/atlas.ts:176


caclByteLength

caclByteLength(): number

language zh_CN

classdesc 计算资源字节大小

version m4m 1.0

Returns

number

Implementation of

IAsset.caclByteLength

Defined in

framework/asset/resource/atlas.ts:101


dispose

dispose(): void

language zh_CN

classdesc 释放资源

version m4m 1.0

Returns

void

Implementation of

IAsset.dispose

Defined in

framework/asset/resource/atlas.ts:85


getGUID

getGUID(): number

language zh_CN

classdesc 获取资源唯一id

version m4m 1.0

Returns

number

Implementation of

IAsset.getGUID

Defined in

framework/asset/resource/atlas.ts:52


getName

getName(): string

language zh_CN

classdesc 获取资源名称

version m4m 1.0

Returns

string

Implementation of

IAsset.getName

Defined in

framework/asset/resource/atlas.ts:41


unuse

unuse(disposeNow?): void

language zh_CN

classdesc 引用计数减一

version m4m 1.0

Parameters

Name
Type
Default value

disposeNow

boolean

false

Returns

void

Implementation of

IAsset.unuse

Defined in

framework/asset/resource/atlas.ts:74


use

use(): void

language zh_CN

classdesc 引用计数加一

version m4m 1.0

Returns

void

Implementation of

IAsset.use

Defined in

framework/asset/resource/atlas.ts:63

Constructors

constructor

new atlas(assetName?)

Parameters

Name
Type
Default value

assetName

string

null

Defined in

framework/asset/resource/atlas.ts:26

Properties

defaultAsset

defaultAsset: boolean

language zh_CN

classdesc 是否为默认资源

version m4m 1.0

Implementation of

IAsset.defaultAsset

Defined in

framework/asset/resource/atlas.ts:25


sprites

sprites: Object = {}

language zh_CN

classdesc 解析得到的sprite列表 key-->name

version m4m 1.0

Index signature

▪ [id: string]: sprite

Defined in

framework/asset/resource/atlas.ts:165


textureheight

textureheight: number

language zh_CN

classdesc 贴图像素高度

version m4m 1.0

Defined in

framework/asset/resource/atlas.ts:126


texturewidth

texturewidth: number

language zh_CN

classdesc 贴图像素宽度

version m4m 1.0

Defined in

framework/asset/resource/atlas.ts:118


ClassName

Static Readonly ClassName: string = "atlas"

Defined in

framework/asset/resource/atlas.ts:13

Accessors

texture

get texture(): texture

language zh_CN

classdesc 获取当前texture

version m4m 1.0

Returns

texture

Defined in

framework/asset/resource/atlas.ts:137

set texture(value): void

language zh_CN

classdesc 设置当前texture

version m4m 1.0

Parameters

Name
Type

value

Returns

void

Defined in

framework/asset/resource/atlas.ts:149

Last updated