Home Reference Source
public class | source

PhinaTexture

Extends:

GLBoostObjectAbstractTextureTexture → PhinaTexture

Constructor Summary

Public Constructor
public

constructor(glBoostContext: *, width: *, height: *, fillStyle: *, parameters: *)

Member Summary

Private Members
private
private

_height: *

private
private
private

_width: *

Method Summary

Public Methods
public

addPhinaObject(object: *): *

public

addPhinaObjects(objects: *): *

public
public
public

setPhinaObjects(objects: *): *

Private Methods
private

_recreateTexture(imageDataUri: *)

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
From class Texture
public get
public get
public
private

_height: *

private

_img: *

private
private
private
private

_width: *

public
public

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

private
private

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

private

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

private

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

private

_getParameter(paramNumber: *): *

private

Public Constructors

public constructor(glBoostContext: *, width: *, height: *, fillStyle: *, parameters: *) source

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

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

Override:

Texture#constructor

Params:

NameTypeAttributeDescription
glBoostContext *
width *
height *
fillStyle *
parameters *
  • optional
  • default: undefined

Private Members

private _fillStyle: * source

private _height: * source

Override:

Texture#_height

private _offscreen: * source

private _phinaObjects: *[] source

private _width: * source

Override:

Texture#_width

Public Methods

public addPhinaObject(object: *): * source

Params:

NameTypeAttributeDescription
object *

Return:

*

public addPhinaObjects(objects: *): * source

Params:

NameTypeAttributeDescription
objects *

Return:

*

public clearPhinaObjects(): * source

Return:

*

public renderPhinaObjects() source

public setPhinaObjects(objects: *): * source

Params:

NameTypeAttributeDescription
objects *

Return:

*

Private Methods

private _recreateTexture(imageDataUri: *) source

Params:

NameTypeAttributeDescription
imageDataUri *

private _setUpOffscreen() source