Home Reference Source
public class | source

Texture

Extends:

GLBoostObjectAbstractTexture → Texture

Direct Subclass:

PhinaTexture

Constructor Summary

Public Constructor
public

constructor(glBoostContext: *, src: *, userFlavorName: *, parameters: *)

Member Summary

Public Members
public get
public get
public
Private Members
private

_height: *

private

_img: *

private
private
private
private

_width: *

Method Summary

Public Methods
public
public

generateTextureFromUri(imageUri: *, isKeepBound: *): *

Private Methods
private
private

_generateTextureInner(imgCanvas: *, isKeepBound: *): *

private

_generateTextureInnerWithArrayBufferView(imgCanvas: *, width: *, height: *, isKeepBound: *): *

private

_getParamWithAlternative(paramNumber: *, alternative: *): *

private

_getParameter(paramNumber: *): *

private

Inherited Summary

From class GLBoostObject
public static
private static
private static
public get
public get
public get

Return the simple class-specific number.

public get
public get
public get
public get
public get
public get
public set
private
private
private
private
private
private
private
private
private
private
public
public
public
public

Return instance name.

public
private

_copy(instance: *)

private
From class AbstractTexture
public get

glTextureResource: *: nullliteral | existentialtypeparam

get the WebGL texture resource within this class.

public get

height: *

public get
public set
public get
public set
public get
public set
public get

width: *

private
private
private
public

getPixelValueAt(x: number, y: number, argByteArray: Uint8Array): Vector4

Origin is left bottom

public
public
public

setUp(textureUnitIndex: *): boolean

bind the texture.

public

tearDown(textureUnitIndex: *)

unbind the texture.

private

get a value nearest power of two.

private

_getResizedCanvas(image: *): *

private

check whether or not this texture size is power of two.

private

Public Constructors

public constructor(glBoostContext: *, src: *, userFlavorName: *, parameters: *) source

The constructor of PointLight class. Do not construct this class directly.

  • @param {HTMLCanvas|string} canvas canvas or canvas' id string.

Override:

AbstractTexture#constructor

Params:

NameTypeAttributeDescription
glBoostContext *
src *
userFlavorName *
parameters *
  • optional
  • default: undefined

Public Members

public get isImageAssignedForTexture: * source

public get isTextureReady: * source

public userFlavorName: * source

Override:

GLBoostObject#userFlavorName

Private Members

private _height: * source

private _img: * source

private _isTextureReady: boolean source

private _parameters: * source

private _texture: * source

private _width: * source

Public Methods

public generateTextureFromImage(img: *) source

Params:

NameTypeAttributeDescription
img *

public generateTextureFromUri(imageUri: *, isKeepBound: *): * source

Params:

NameTypeAttributeDescription
imageUri *
isKeepBound *
  • optional
  • default: undefined

Return:

*

Private Methods

private _generateTextureFromImageData(imageData: *) source

Params:

NameTypeAttributeDescription
imageData *

private _generateTextureInner(imgCanvas: *, isKeepBound: *): * source

Params:

NameTypeAttributeDescription
imgCanvas *
isKeepBound *

Return:

*

private _generateTextureInnerWithArrayBufferView(imgCanvas: *, width: *, height: *, isKeepBound: *): * source

Params:

NameTypeAttributeDescription
imgCanvas *
width *
height *
isKeepBound *

Return:

*

private _getParamWithAlternative(paramNumber: *, alternative: *): * source

Params:

NameTypeAttributeDescription
paramNumber *
alternative *

Return:

*

private _getParameter(paramNumber: *): * source

Params:

NameTypeAttributeDescription
paramNumber *

Return:

*

private _onLoad() source