Global

Members

AnUint16Array

An array containing the indices of the vertices

cachednumber

tint of the fill

cachednumber

tint of the line to draw

ifboolean

true the liens will be draw using LINES instead of TRIANGLE_STRIP

shape object to draw.

TheglCore.GLBuffer

The vertex buffer

TheglCore.GLBuffer

The index buffer

TheglCore.VertexArrayObject

The vertex array object

thenumber

alpha of the line to draw

thenumber

alpha of the fill

thenumber

color of the line to draw

thenumber

width of the line to draw

thenumber

color of the fill

Thenumber

type of the shape, see the Const.Shapes file for all the existing types,

whetherboolean

or not the shape is filled with a colour

Methods

Tween.js - Licensed under the MIT license

https://github.com/tweenjs/tween.js

See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.
Thank you all, you're awesome!

Version:
  • v16.10.0

areArraysEqual(array1, array2){boolean}

Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.
This version can also convert array of colors

Name Type Description
array1 Array

First array to compare

array2 Array

Second array to compare

Returns:
Type Description
boolean Do the arrays contain the same values in the same order

calculateScreenSpaceMatrix(filterArea, sprite, outputMatrix)

Calculates the mapped matrix

Name Type Description
filterArea Rectangle

The filter area

sprite Sprite

the target sprite

outputMatrix Matrix

@alvin

color(red, green, blue){object}

转化RGB颜色值

Name Type Description
red number
green number
blue number
Returns:
Type Description
object
Example
Tiny.color(0, 255, 255);
//=> {colorR: 0, colorG: 255, colorB: 255}

getColor(color){string}

Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.
This version can also convert array of colors

Name Type Description
color number | Array.<number>
Returns:
Type Description
string The color as a string.

getSingleColor(color){string}

Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string.

Name Type Description
color number | Array.<number>
Returns:
Type Description
string The color as a string.

getXMLHttpRequest(){XMLHttpRequest}

获取 XMLHttpRequest 对象,如果 Tiny._XMLHttpRequest 存在,则取之,如果没有,则创建一个 XMLHttpRequest 对象,并存之。
如果 Tiny._XMLHttpRequest 正在使用中,则返回一个新建的 XMLHttpRequest

Returns:
Type Description
XMLHttpRequest

hex2color(hex){Object}

转换 hex 为 color 对象

Name Type Description
hex
Returns:
Type Description
Object
Examples
var hex = 0xAA0055;
var color = Tiny.hex2color(hex);
//=> Object {colorR: 170, colorG: 0, colorB: 85}
var hex = 0xFF0000;
var color = Tiny.hex2color(hex);
//=> Object {colorR: 255, colorG: 0, colorB: 0}

Type Definitions

DecomposedDataUriobject

Typedef for decomposeDataUri return object.

Properties:
Name Type Description
Media mediaType

type, eg. image

Sub subType

type, eg. png

Data encoding

encoding, eg. base64

The data

actual data

FrameObjectobject

Properties:
Name Type Description
texture Tiny.Texture

The Tiny.Texture of the frame

time number

the duration of the frame in ms

Sizeobject

Typedef for Size object.

Properties:
Name Type Description
Width width

component

Height height

component

Documentation generated by JSDoc 3.4.3 on Thu May 31 2018 14:40:21 GMT+0800 (CST)