跳到主要内容
版本:v10.0

M3D / M3D / Render / TextureObject

Class: TextureObject

M3D.Render.TextureObject

Memberof

M3D.Render

Implements

Utility.Subscriber

Description

纹理资源对象

Hierarchy

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TextureObject(): TextureObject

Returns

TextureObject

Description

构造函数

Overrides

M3DObject.constructor

new TextureObject(textureType): TextureObject

Parameters

NameType
textureTypeTextureClassType

Returns

TextureObject

Description

构造函数

Overrides

M3DObject.constructor

Properties

id

id: number

Inherited from

M3DObject.id


count

Static count: number

Inherited from

M3DObject.count

Methods

addResource

addResource(resource): any

Parameters

NameType
resourceResource

Returns

any

Description

添加资源

addResource(path, type): any

Parameters

NameType
pathstring
typeResourceType

Returns

any

Description

添加资源


clear

clear(): void

Returns

void

Description

清空资源


getEvents

getEvents(): M3DEvent[]

Returns

M3DEvent[]

Description

获得事件列表

Inherited from

M3DObject.getEvents


getId

getId(): number

Returns

number

Description

获取id

Inherited from

M3DObject.getId


getResources

getResources(): Resource[]

Returns

Resource[]

Description

获取所有资源


getResourcesCount

getResourcesCount(): number

Returns

number

Description

获取所有资源数量


getTextureEncoding

getTextureEncoding(): TextureEncodingType

Returns

TextureEncodingType

Description

获取纹理编码


getTextureType

getTextureType(): TextureClassType

Returns

TextureClassType

Description

获取纹理种类


isDirty

isDirty(): boolean

Returns

boolean

Description

获取脏标记


markDirty

markDirty(dirty?): void

Parameters

NameType
dirty?boolean

Returns

void

Description

脏标记


registerEvent

registerEvent(event): void

Parameters

NameTypeDescription
eventM3DEventM3D事件

Returns

void

Description

注册事件

Inherited from

M3DObject.registerEvent


removeEvent

removeEvent(): void

Returns

void

Description

删除事件

Inherited from

M3DObject.removeEvent


setId

setId(v): void

Parameters

NameTypeDescription
vnumberShapeId

Returns

void

Description

设置id

Inherited from

M3DObject.setId


setTextureEncoding

setTextureEncoding(encoding): void

Parameters

NameType
encodingTextureEncodingType

Returns

void

Description

设置纹理编码


setTextureParameter

setTextureParameter(para): void

Parameters

NameType
paraTextureParameter

Returns

void

Description

设置纹理参数


setTextureType

setTextureType(value): void

Parameters

NameType
valueTextureClassType

Returns

void

Description

设置纹理种类


update

update(msg): void

Parameters

NameType
msgM3DMessage

Returns

void

Description

接收消息

Implementation of

Subscriber.update