Tiny.js
文档
API
Playground
示例
插件
工具
文档
API
Playground
示例
插件
工具
Tiny
static
Members
base64
BLEND_MODES
config
DATA_URI
defaultConfig
DEG_TO_RAD
DRAW_MODES
GC_MODES
Loader
mixins
PI_2
PRECISION
premultiplyBlendMode
RAD_TO_DEG
RENDERER_TYPE
RETINA_PREFIX
SCALE_MODES
SHAPES
SVG_SIZE
TEXT_GRADIENT
TRANSFORM_MODE
TWEEN
TYPES
UPDATE_PRIORITY
url
URL_FILE_EXTENSION
VERSION
WIN_SIZE
WRAP_MODES
Methods
arrayRemoveObject
Back
Blink
clearTextureCache
color
color2hex
correctBlendMode
decomposeDataUri
deg2radian
destroyTextureCache
detect
earcut
FadeIn
FadeOut
FadeTo
getDistanceBetweenPoints
getResolutionOfUrl
getSvgSize
getTime
getUrlFileExtension
hex2color
hex2rgb
hex2string
isArray
isFunction
isMobile
isNumber
isObject
isPixelCollision
isString
isUndefined
isWebGLSupported
JumpTo
MoveBy
MoveTo
pluginTarget
point
premultiplyRgba
premultiplyTint
premultiplyTintToRgba
radian2deg
random
randomBool
randomColor
randomFloat
randomFromArray
randomInt
randomPM
rectContainsPoint
rectContainsRect
rectGetMaxX
rectGetMaxY
rectGetMidX
rectGetMidY
rectGetMinX
rectGetMinY
rectIntersectsRect
rectUnion
removeItems
Repeat
RepeatForever
rgb2hex
RotateBy
RotateTo
scale
ScaleBy
ScaleTo
sign
TintBy
TintTo
uid
Tiny.loaders
static
Tiny.plugins
static
Tiny.plugins.compressedTexture
static
Methods
init
supportedExtensions
Tiny.settings
static
Members
CAN_UPLOAD_SAME_BUFFER
FILTER_RESOLUTION
GC_MAX_CHECK_COUNT
GC_MAX_IDLE
GC_MODE
MIPMAP_TEXTURES
PRECISION_FRAGMENT
PRECISION_VERTEX
RENDER_OPTIONS
RESOLUTION
SCALE_MODE
SPRITE_BATCH_SIZE
SPRITE_MAX_TEXTURES
TARGET_FPMS
TRANSFORM_MODE
WRAP_MODE
Tiny.ticker
static
Members
shared
Tiny.Action
Members
duration
repeatTimes
to
Methods
cleanup
clone
isPlaying
onComplete
onStart
onStop
onUpdate
pause
resume
setDelay
setEasing
setFPS
setInterpolation
setName
setRepeatDelay
stop
Tiny.AnimatedSprite
Members
actions
alpha
anchor
animationSpeed
blendMode
buttonMode
children
currentFrame
cursor
filterArea
filters
height
hitArea
interactive
interactiveChildren
localTransform
loop
mask
name
onComplete
onFrameChange
onLoop
parent
pivot
playing
pluginName
position
renderable
rotation
scale
shader
skew
texture
textures
tint
totalFrames
transform
updateAnchor
visible
width
worldAlpha
worldTransform
worldVisible
x
y
Methods
fromFrames
fromImages
addChild
addChildAt
calculateBounds
calculateTrimmedVertices
calculateVertices
containsPoint
destroy
getAnchor
getBounds
getChildAt
getChildByName
getChildIndex
getGlobalPosition
getLocalBounds
getNature
getOpacity
getPivot
getPosition
getPositionX
getPositionY
getRotation
getScale
getSkew
getVisible
gotoAndPlay
gotoAndStop
play
removeAction
removeActions
removeActionsTrace
removeChild
removeChildAt
removeChildren
renderCanvas
renderWebGL
reverse
runAction
runSequenceAction
setAnchor
setChildIndex
setEventEnabled
setOpacity
setParent
setPivot
setPosition
setPositionX
setPositionY
setRotation
setScale
setSkew
setTransform
setVisible
stop
swapChildren
toGlobal
toLocal
updateTransform
Events
added
click
mousedown
mousemove
mouseout
mouseover
mouseup
mouseupoutside
pointercancel
pointerdown
pointermove
pointerout
pointerover
pointertap
pointerup
pointerupoutside
removed
rightclick
rightdown
rightup
rightupoutside
tap
touchcancel
touchend
touchendoutside
touchmove
touchstart
Tiny.Application
Members
FPS
camera
renderer
stage
ticker
view
Methods
destroy
getCurrentFPS
getCurrentScene
isPaused
offUpdate
onUpdate
pause
render
replaceScene
resume
run
start
stop
Tiny.BaseRenderTexture
Members
hasLoaded
height
imageType
imageUrl
isLoading
mipmap
origSource
premultipliedAlpha
realHeight
realWidth
resolution
scaleMode
source
sourceScale
textureCacheIds
valid
width
wrapMode
Methods
_loadSvgSource
_loadSvgSourceUsingDataUri
_loadSvgSourceUsingString
_loadSvgSourceUsingXhr
_updateDimensions
_updateImageType
destroy
dispose
loadSource
resize
update
updateSourceImage
Events
dispose
error
loaded
update
Tiny.BaseTexture
Members
hasLoaded
height
imageType
imageUrl
isLoading
mipmap
origSource
premultipliedAlpha
realHeight
realWidth
resolution
scaleMode
source
sourceScale
textureCacheIds
width
wrapMode
Methods
addToCache
from
fromCanvas
fromImage
removeFromCache
_loadSvgSource
_loadSvgSourceUsingDataUri
_loadSvgSourceUsingString
_loadSvgSourceUsingXhr
_updateDimensions
_updateImageType
destroy
dispose
loadSource
update
updateSourceImage
Events
dispose
error
loaded
update
Tiny.BinaryLoader
Methods
load
Tiny.Bounds
Members
maxX
maxY
minX
minY
updateID
Methods
addBounds
addBoundsArea
addBoundsMask
addFrame
addPoint
addQuad
addVertices
clear
getRectangle
isEmpty
Tiny.Buffer
Members
float32View
uint32View
Methods
destroy
Tiny.CanvasMaskManager
Methods
destroy
popMask
pushMask
renderGraphicsShape
Tiny.CanvasRenderer
Members
autoResize
backgroundColor
blendModes
clearBeforeRender
context
height
maskManager
options
plugins
preserveDrawingBuffer
refresh
resolution
rootContext
roundPixels
screen
smoothProperty
transparent
type
view
width
Methods
clear
destroy
generateTexture
invalidateBlendMode
registerPlugin
render
resize
setBlendMode
Events
postrender
prerender
Tiny.CanvasRenderTarget
Members
canvas
context
height
width
Methods
destroy
resize
Tiny.CanvasTinter
Members
cacheStepsPerColorChannel
canUseMultiply
convertTintToImage
tintMethod
Typedefs
tintMethodFunctionType
Methods
getTintedTexture
roundColor
tintWithMultiply
tintWithOverlay
tintWithPerPixel
Tiny.Circle
Members
radius
type
x
y
Methods
clone
contains
getBounds
Tiny.Container
Members
actions
alpha
buttonMode
children
cursor
filterArea
filters
height
hitArea
interactive
interactiveChildren
localTransform
mask
name
parent
pivot
position
renderable
rotation
scale
skew
transform
visible
width
worldAlpha
worldTransform
worldVisible
x
y
Methods
addChild
addChildAt
calculateBounds
destroy
getBounds
getChildAt
getChildByName
getChildIndex
getGlobalPosition
getLocalBounds
getNature
getOpacity
getPivot
getPosition
getPositionX
getPositionY
getRotation
getScale
getSkew
getVisible
removeAction
removeActions
removeActionsTrace
removeChild
removeChildAt
removeChildren
renderCanvas
renderWebGL
runAction
runSequenceAction
setChildIndex
setEventEnabled
setOpacity
setParent
setPivot
setPosition
setPositionX
setPositionY
setRotation
setScale
setSkew
setTransform
setVisible
swapChildren
toGlobal
toLocal
updateTransform
Events
added
click
mousedown
mousemove
mouseout
mouseover
mouseup
mouseupoutside
pointercancel
pointerdown
pointermove
pointerout
pointerover
pointertap
pointerup
pointerupoutside
removed
rightclick
rightdown
rightup
rightupoutside
tap
touchcancel
touchend
touchendoutside
touchmove
touchstart
Tiny.DisplayObject
Members
alpha
buttonMode
cursor
filterArea
filters
hitArea
interactive
localTransform
mask
name
parent
pivot
position
renderable
rotation
scale
skew
transform
visible
worldAlpha
worldTransform
worldVisible
x
y
Methods
destroy
getBounds
getChildByName
getGlobalPosition
getLocalBounds
getNature
getOpacity
getPivot
getPosition
getPositionX
getPositionY
getRotation
getScale
getSkew
getVisible
renderCanvas
renderWebGL
setEventEnabled
setOpacity
setParent
setPivot
setPosition
setPositionX
setPositionY
setRotation
setScale
setSkew
setTransform
setVisible
toGlobal
toLocal
updateTransform
Events
added
click
mousedown
mousemove
mouseout
mouseover
mouseup
mouseupoutside
pointercancel
pointerdown
pointermove
pointerout
pointerover
pointertap
pointerup
pointerupoutside
removed
rightclick
rightdown
rightup
rightupoutside
tap
touchcancel
touchend
touchendoutside
touchmove
touchstart
Tiny.Ellipse
Members
height
type
width
x
y
Methods
clone
contains
getBounds
Tiny.EventEmitter
Tiny.Filter
Members
defaultFragmentSrc
defaultVertexSrc
autoFit
blendMode
enabled
fragmentSrc
padding
resolution
uniforms
vertexSrc
Methods
apply
Tiny.FilterManager
Members
renderer
Methods
applyFilter
calculateNormalizedScreenSpaceMatrix
calculateScreenSpaceMatrix
calculateSpriteMatrix
destroy
emptyPool
freePotRenderTarget
getRenderTarget
onContextChange
onPrerender
popFilter
pushFilter
returnRenderTarget
syncUniforms
Tiny.Graphics
Members
CURVES
actions
alpha
blendMode
boundsPadding
buttonMode
children
cursor
fillAlpha
filterArea
filters
height
hitArea
interactive
interactiveChildren
isMask
lineAlignment
lineColor
lineWidth
localTransform
mask
name
nativeLines
parent
pivot
position
renderable
rotation
scale
skew
tint
transform
visible
width
worldAlpha
worldTransform
worldVisible
x
y
Methods
addChild
addChildAt
addHole
arc
arcTo
beginFill
bezierCurveTo
calculateBounds
clear
clone
closePath
containsPoint
destroy
drawCircle
drawEllipse
drawPolygon
drawRect
drawRoundedRect
drawShape
drawStar
endFill
generateCanvasTexture
getBounds
getChildAt
getChildByName
getChildIndex
getGlobalPosition
getLocalBounds
getNature
getOpacity
getPivot
getPosition
getPositionX
getPositionY
getRotation
getScale
getSkew
getVisible
isFastRect
lineStyle
lineTo
moveTo
quadraticCurveTo
removeAction
removeActions
removeActionsTrace
removeChild
removeChildAt
removeChildren
renderCanvas
renderWebGL
runAction
runSequenceAction
setChildIndex
setEventEnabled
setOpacity
setParent
setPivot
setPosition
setPositionX
setPositionY
setRotation
setScale
setSkew
setTransform
setVisible
swapChildren
toGlobal
toLocal
updateLocalBounds
updateTransform
Events
added
click
mousedown
mousemove
mouseout
mouseover
mouseup
mouseupoutside
pointercancel
pointerdown
pointermove
pointerout
pointerover
pointertap
pointerup
pointerupoutside
removed
rightclick
rightdown
rightup
rightupoutside
tap
touchcancel
touchend
touchendoutside
touchmove
touchstart
Tiny.GraphicsData
Members
fill
fillAlpha
fillColor
lineAlignment
lineAlpha
lineColor
lineWidth
nativeLines
shape
type
Methods
addHole
clone
destroy
Tiny.GraphicsRenderer
Members
renderer
Methods
destroy
flush
render
start
stop
Tiny.GroupD8
Methods
byDirection
isVertical
matrixAppendRotationInv
rotate180
Tiny.interaction.InteractionData
Members
global
identifier
originalEvent
pointerId
target
Methods
copyEvent
getLocalPosition
reset
Tiny.interaction.InteractionEvent
Members
currentTarget
data
stopped
target
type
Methods
reset
stopPropagation
Tiny.loaders.Loader
Members
baseUrl
concurrency
defaultQueryString
loading
onComplete
onError
onLoad
onProgress
onStart
progress
resources
Methods
addTinyMiddleware
addTinyPreMiddleware
add
destroy
load
pre
reset
run
use
Tiny.loaders.Resource
Members
LOAD_TYPE
STATUS_FLAGS
TYPE
XHR_RESPONSE_TYPE
children
crossOrigin
data
error
extension
isComplete
isDataUrl
isLoading
loadType
metadata
name
onAfterMiddleware
onComplete
onProgress
onStart
progressChunk
timeout
type
url
xhr
xhrType
Typedefs
OnCompleteSignal
OnProgressSignal
OnStartSignal
Methods
setExtensionLoadType
setExtensionXhrType
abort
complete
load
Tiny.MaskManager
Members
renderer
Methods
destroy
onContextChange
popMask
popScissorMask
popSpriteMask
popStencilMask
pushMask
pushScissorMask
pushSpriteMask
pushStencilMask
Tiny.Matrix
Members
IDENTITY
TEMP_MATRIX
a
b
c
d
tx
ty
Methods
append
apply
applyInverse
clone
copy
decompose
fromArray
identity
invert
prepend
rotate
scale
set
setTransform
toArray
translate
Tiny.ObjectRenderer
Members
renderer
Methods
destroy
flush
onContextChange
render
start
stop
Tiny.ObservablePoint
Members
x
y
Methods
clone
copy
equals
set
Tiny.plugins.compressedTexture.BASISLoader
Methods
bindTranscoder
Tiny.plugins.compressedTexture.WorkedBASISLoader
Methods
loadAndRunTranscoder
runTranscoder
Tiny.Point
Members
x
y
Methods
clone
copy
equals
set
Tiny.Polygon
Members
points
type
Methods
clone
close
contains
Tiny.Quad
Members
gl
uvs
vertices
Methods
destroy
initVao
map
upload
Tiny.Rectangle
Members
EMPTY
bottom
height
left
right
top
type
width
x
y
Methods
ceil
clone
contains
copy
enlarge
fit
pad
Tiny.RenderTarget
Members
clearColor
defaultFrame
filterData
frame
frameBuffer
gl
projectionMatrix
resolution
root
scaleMode
size
stencilBuffer
stencilMaskStack
texture
transform
Methods
activate
attachStencilBuffer
calculateProjection
clear
destroy
resize
setFrame
Tiny.RenderTexture
Members
_frame
baseTexture
defaultAnchor
frame
height
noFrame
orig
requiresUpdate
rotate
textureCacheIds
transform
trim
valid
width
Methods
create
_updateUvs
clone
destroy
resize
update
Events
update
Tiny.ResourceLoader
Members
pre
use
baseUrl
concurrency
defaultQueryString
loading
onComplete
onError
onLoad
onProgress
onStart
progress
resources
Typedefs
OnCompleteSignal
OnErrorSignal
OnLoadSignal
OnProgressSignal
OnStartSignal
Methods
add
load
pre
reset
use
Tiny.RoundedRectangle
Members
height
radius
type
width
x
y
Methods
clone
contains
Tiny.Sprite
Members
actions
alpha
anchor
blendMode
buttonMode
children
cursor
filterArea
filters
height
hitArea
interactive
interactiveChildren
localTransform
mask
name
parent
pivot
pluginName
position
renderable
rotation
scale
shader
skew
texture
tint
transform
visible
width
worldAlpha
worldTransform
worldVisible
x
y
Methods
from
fromFrame
fromImage
addChild
addChildAt
calculateBounds
calculateTrimmedVertices
calculateVertices
containsPoint
destroy
getAnchor
getBounds
getChildAt
getChildByName
getChildIndex
getGlobalPosition
getLocalBounds
getNature
getOpacity
getPivot
getPosition
getPositionX
getPositionY
getRotation
getScale
getSkew
getVisible
removeAction
removeActions
removeActionsTrace
removeChild
removeChildAt
removeChildren
renderCanvas
renderWebGL
runAction
runSequenceAction
setAnchor
setChildIndex
setEventEnabled
setOpacity
setParent
setPivot
setPosition
setPositionX
setPositionY
setRotation
setScale
setSkew
setTransform
setVisible
swapChildren
toGlobal
toLocal
updateTransform
Events
added
click
mousedown
mousemove
mouseout
mouseover
mouseup
mouseupoutside
pointercancel
pointerdown
pointermove
pointerout
pointerover
pointertap
pointerup
pointerupoutside
removed
rightclick
rightdown
rightup
rightupoutside
tap
touchcancel
touchend
touchendoutside
touchmove
touchstart
Tiny.SpriteMaskFilter
Members
autoFit
blendMode
enabled
fragmentSrc
padding
resolution
uniforms
vertexSrc
Methods
apply
Tiny.Spritesheet
Members
BATCH_SIZE
animations
textures
Methods
destroy
parse
Tiny.StencilManager
Members
renderer
Methods
destroy
onContextChange
popStencil
pushStencil
setMaskStack
Tiny.SystemRenderer
Members
autoResize
backgroundColor
blendModes
clearBeforeRender
height
options
preserveDrawingBuffer
resolution
roundPixels
screen
transparent
type
view
width
Methods
destroy
generateTexture
resize
Tiny.Text
Members
actions
alpha
anchor
blendMode
buttonMode
canvas
children
context
cursor
filterArea
filters
height
hitArea
interactive
interactiveChildren
localTransform
mask
name
parent
pivot
pluginName
position
renderable
resolution
rotation
scale
shader
skew
style
text
texture
tint
transform
visible
width
worldAlpha
worldTransform
worldVisible
x
y
Methods
addChild
addChildAt
calculateBounds
calculateTrimmedVertices
calculateVertices
containsPoint
destroy
getAnchor
getBounds
getChildAt
getChildByName
getChildIndex
getGlobalPosition
getLocalBounds
getNature
getOpacity
getPivot
getPosition
getPositionX
getPositionY
getRotation
getScale
getSkew
getVisible
removeAction
removeActions
removeActionsTrace
removeChild
removeChildAt
removeChildren
renderCanvas
renderWebGL
runAction
runSequenceAction
setAnchor
setChildIndex
setEventEnabled
setOpacity
setParent
setPivot
setPosition
setPositionX
setPositionY
setRotation
setScale
setSkew
setTransform
setVisible
swapChildren
toGlobal
toLocal
updateTransform
Events
added
click
mousedown
mousemove
mouseout
mouseover
mouseup
mouseupoutside
pointercancel
pointerdown
pointermove
pointerout
pointerover
pointertap
pointerup
pointerupoutside
removed
rightclick
rightdown
rightup
rightupoutside
tap
touchcancel
touchend
touchendoutside
touchmove
touchstart
Tiny.TextMetrics
Members
BASELINE_MULTIPLIER
BASELINE_SYMBOL
METRICS_STRING
Methods
clearMetrics
measureFont
measureText
Tiny.TextMetrics~FontMetrics
Tiny.TextStyle
Members
align
breakWords
dropShadow
dropShadowAlpha
dropShadowAngle
dropShadowBlur
dropShadowColor
dropShadowDistance
fill
fillGradientStops
fillGradientType
fontFamily
fontSize
fontStyle
fontVariant
fontWeight
leading
letterSpacing
lineHeight
lineJoin
miterLimit
padding
stroke
strokeThickness
textBaseline
trim
whiteSpace
wordWrap
wordWrapWidth
Methods
clone
reset
toFontString
Tiny.Texture
Members
EMPTY
WHITE
_frame
baseTexture
defaultAnchor
frame
height
noFrame
orig
requiresUpdate
rotate
textureCacheIds
transform
trim
valid
width
Methods
addToCache
from
fromCanvas
fromFrame
fromImage
fromLoader
fromVideo
fromVideoUrl
removeFromCache
_updateUvs
clone
destroy
update
Events
update
Tiny.TextureGarbageCollector
Methods
run
unload
update
Tiny.TextureManager
Members
gl
renderer
Methods
bindTexture
destroy
destroyTexture
getTexture
removeAll
updateTexture
Tiny.TextureTransform
Members
texture
Methods
multiplyUvs
update
Tiny.ticker.CountDown
Members
count
duration
running
ticker
times
Methods
destroy
pause
start
stop
Events
complete
pause
stop
update
Tiny.ticker.Ticker
Members
autoStart
deltaTime
elapsedMS
lastTime
speed
started
Methods
add
addOnce
destroy
remove
start
stop
update
Tiny.Transform
Members
localTransform
pivot
position
rotation
scale
skew
updateWorldTransform
worldTransform
Methods
setFromMatrix
updateLocalTransform
updateTransform
Tiny.TransformBase
Members
localTransform
updateWorldTransform
worldTransform
Methods
updateLocalTransform
updateTransform
Tiny.TransformStatic
Members
localTransform
pivot
position
rotation
scale
skew
updateWorldTransform
worldTransform
Methods
setFromMatrix
updateLocalTransform
updateTransform
Tiny.Transition
Methods
FadeColor
FadeWhite
MoveInB
MoveInL
MoveInR
MoveInT
ProgressH
ProgressInOut
ProgressOutIn
ProgressRadialCCW
ProgressRadialCW
ProgressV
SlideInB
SlideInL
SlideInR
SlideInT
Events
transitionend
Tiny.VideoBaseTexture
Members
autoPlay
autoUpdate
hasLoaded
height
imageType
imageUrl
isLoading
mipmap
origSource
premultipliedAlpha
realHeight
realWidth
resolution
scaleMode
source
sourceScale
textureCacheIds
width
wrapMode
Methods
fromUrl
fromVideo
_loadSvgSource
_loadSvgSourceUsingDataUri
_loadSvgSourceUsingString
_loadSvgSourceUsingXhr
_updateDimensions
_updateImageType
destroy
dispose
loadSource
update
updateSourceImage
Events
dispose
error
loaded
update
Tiny.WebGLManager
Members
renderer
Methods
destroy
onContextChange
Tiny.WebGLRenderer
Members
_activeRenderTarget
_activeShader
autoResize
backgroundColor
blendModes
clearBeforeRender
currentRenderer
emptyRenderer
filterManager
height
maskManager
options
plugins
preserveDrawingBuffer
resolution
roundPixels
screen
state
stencilManager
textureManager
transparent
type
view
width
Methods
bindRenderTarget
bindRenderTexture
bindShader
bindTexture
bindVao
clear
clearRenderTexture
createVao
destroy
flush
generateTexture
registerPlugin
render
reset
resize
setBlendMode
setObjectRenderer
setTransform
unbindTexture
Events
context
postrender
prerender
Tiny.WebGLState
Members
activeState
defaultState
gl
Methods
pop
push
resetAttributes
resetToDefault
setBlend
setBlendMode
setCullFace
setDepthTest
setFrontFace
setState
Namespace: plugins
Tiny
.
plugins
Namespaces
compressedTexture