Home Reference Source
import Texture from './core/cgp/cgp_texture.js'
public class | source

Texture

Extends:

CgTexture → Texture

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public

height: *

public

name: *

public

width: *

Private Members
private

_cgp: *

private

_log: *

Method Summary

Public Methods
public

createView(): *

public
public

getInfo(): *

public

initFromData(data: Array<Number>, w: Number, h: Number, filter: Number, wrap: Number)

public

initTexture(img: Object, filter: Number): *

set texture data from an image/canvas object

Inherited Summary

From class CgTexture
public

height: number

public

id: *

public

name: string

public
public

width: number

Public Constructors

public constructor() source

Override:

CgTexture#constructor

Public Members

public gpuTexture: * source

public gpuTextureDescriptor: * source

public height: * source

Override:

CgTexture#height

public name: * source

Override:

CgTexture#name

public width: * source

Override:

CgTexture#width

Private Members

private _cgp: * source

private _log: * source

Public Methods

public createView(): * source

Return:

*

public dispose() source

public getInfo(): * source

Return:

*

public initFromData(data: Array<Number>, w: Number, h: Number, filter: Number, wrap: Number) source

Params:

NameTypeAttributeDescription
data Array<Number>

rgb color array [r,g,b,a,r,g,b,a,...]

w Number

width

h Number

height

filter Number
wrap Number

public initTexture(img: Object, filter: Number): * source

set texture data from an image/canvas object

Params:

NameTypeAttributeDescription
img Object

image

filter Number

Return:

*