mirror of
https://github.com/photonstorm/phaser
synced 2025-02-25 11:57:19 +00:00
Tweens - Example showing how to use the tween events, onStart, onLoop and onComplete. Lots of documentation fixes in the Tween class. Tweens fire an onLoop event if they are set to repeat. onComplete is now only fired for the final repeat (or never if the repeat is infinite) Tween.onStart is now called when the tween starts AFTER the delay value, if given (thanks stevenbouma)
762 lines
No EOL
15 KiB
JSON
762 lines
No EOL
15 KiB
JSON
{
|
|
"animation": [
|
|
{
|
|
"file": "change+texture+on+click.js",
|
|
"title": "change texture on click"
|
|
},
|
|
{
|
|
"file": "local+json+object.js",
|
|
"title": "local json object"
|
|
},
|
|
{
|
|
"file": "looped+animation.js",
|
|
"title": "looped animation"
|
|
},
|
|
{
|
|
"file": "multiple+anims.js",
|
|
"title": "multiple anims"
|
|
},
|
|
{
|
|
"file": "sprite+sheet.js",
|
|
"title": "sprite sheet"
|
|
},
|
|
{
|
|
"file": "starling+atlas.js",
|
|
"title": "starling atlas"
|
|
}
|
|
],
|
|
"audio": [
|
|
{
|
|
"file": "loop.js",
|
|
"title": "loop"
|
|
},
|
|
{
|
|
"file": "pause+and+resume.js",
|
|
"title": "pause and resume"
|
|
},
|
|
{
|
|
"file": "play+music.js",
|
|
"title": "play music"
|
|
}
|
|
],
|
|
"basics": [
|
|
{
|
|
"file": "01+-+load+an+image.js",
|
|
"title": "01 - load an image"
|
|
},
|
|
{
|
|
"file": "02+-+click+on+an+image.js",
|
|
"title": "02 - click on an image"
|
|
},
|
|
{
|
|
"file": "03+-+move+an+image.js",
|
|
"title": "03 - move an image"
|
|
},
|
|
{
|
|
"file": "04+-+image+follow+input.js",
|
|
"title": "04 - image follow input"
|
|
},
|
|
{
|
|
"file": "05+-+load+an+animation.js",
|
|
"title": "05 - load an animation"
|
|
},
|
|
{
|
|
"file": "06+-+render+text.js",
|
|
"title": "06 - render text"
|
|
}
|
|
],
|
|
"buttons": [
|
|
{
|
|
"file": "action+on+click.js",
|
|
"title": "action on click"
|
|
},
|
|
{
|
|
"file": "button+scale.js",
|
|
"title": "button scale"
|
|
},
|
|
{
|
|
"file": "changing+the+frames.js",
|
|
"title": "changing the frames"
|
|
},
|
|
{
|
|
"file": "rotated+buttons.js",
|
|
"title": "rotated buttons"
|
|
}
|
|
],
|
|
"camera": [
|
|
{
|
|
"file": "basic+follow.js",
|
|
"title": "basic follow"
|
|
},
|
|
{
|
|
"file": "camera+cull.js",
|
|
"title": "camera cull"
|
|
},
|
|
{
|
|
"file": "follow+styles.js",
|
|
"title": "follow styles"
|
|
},
|
|
{
|
|
"file": "moving+the+camera.js",
|
|
"title": "moving the camera"
|
|
},
|
|
{
|
|
"file": "world+sprite.js",
|
|
"title": "world sprite"
|
|
}
|
|
],
|
|
"collision": [
|
|
{
|
|
"file": "bounding+box.js",
|
|
"title": "bounding box"
|
|
},
|
|
{
|
|
"file": "group+vs+group.js",
|
|
"title": "group vs group"
|
|
},
|
|
{
|
|
"file": "larger+bounding+box.js",
|
|
"title": "larger bounding box"
|
|
},
|
|
{
|
|
"file": "offset+bounding+box.js",
|
|
"title": "offset bounding box"
|
|
},
|
|
{
|
|
"file": "sprite+tiles.js",
|
|
"title": "sprite tiles"
|
|
},
|
|
{
|
|
"file": "sprite+vs+group.js",
|
|
"title": "sprite vs group"
|
|
},
|
|
{
|
|
"file": "sprite+vs+sprite+custom.js",
|
|
"title": "sprite vs sprite custom"
|
|
},
|
|
{
|
|
"file": "sprite+vs+sprite.js",
|
|
"title": "sprite vs sprite"
|
|
},
|
|
{
|
|
"file": "transform.js",
|
|
"title": "transform"
|
|
},
|
|
{
|
|
"file": "vertical+collision.js",
|
|
"title": "vertical collision"
|
|
}
|
|
],
|
|
"display": [
|
|
{
|
|
"file": "bitmapdata+wobble.js",
|
|
"title": "bitmapdata wobble"
|
|
},
|
|
{
|
|
"file": "fullscreen.js",
|
|
"title": "fullscreen"
|
|
},
|
|
{
|
|
"file": "graphics.js",
|
|
"title": "graphics"
|
|
},
|
|
{
|
|
"file": "render+crisp.js",
|
|
"title": "render crisp"
|
|
},
|
|
{
|
|
"file": "render+texture+mirror.js",
|
|
"title": "render texture mirror"
|
|
},
|
|
{
|
|
"file": "render+texture+starfield.js",
|
|
"title": "render texture starfield"
|
|
},
|
|
{
|
|
"file": "render+texture+trail.js",
|
|
"title": "render texture trail"
|
|
}
|
|
],
|
|
"filters": [
|
|
{
|
|
"file": "blur.js",
|
|
"title": "blur"
|
|
},
|
|
{
|
|
"file": "checker+wave.js",
|
|
"title": "checker wave"
|
|
},
|
|
{
|
|
"file": "fire.js",
|
|
"title": "fire"
|
|
},
|
|
{
|
|
"file": "lightbeams.js",
|
|
"title": "lightbeams"
|
|
},
|
|
{
|
|
"file": "marble.js",
|
|
"title": "marble"
|
|
},
|
|
{
|
|
"file": "plasma.js",
|
|
"title": "plasma"
|
|
},
|
|
{
|
|
"file": "tunnel.js",
|
|
"title": "tunnel"
|
|
}
|
|
],
|
|
"games": [
|
|
{
|
|
"file": "breakout.js",
|
|
"title": "breakout"
|
|
},
|
|
{
|
|
"file": "invaders.js",
|
|
"title": "invaders"
|
|
},
|
|
{
|
|
"file": "matching+pairs.js",
|
|
"title": "matching pairs"
|
|
},
|
|
{
|
|
"file": "starstruck.js",
|
|
"title": "starstruck"
|
|
},
|
|
{
|
|
"file": "tanks.js",
|
|
"title": "tanks"
|
|
}
|
|
],
|
|
"geometry": [
|
|
{
|
|
"file": "circle.js",
|
|
"title": "circle"
|
|
},
|
|
{
|
|
"file": "line.js",
|
|
"title": "line"
|
|
},
|
|
{
|
|
"file": "playing+with+points.js",
|
|
"title": "playing with points"
|
|
},
|
|
{
|
|
"file": "rectangle.js",
|
|
"title": "rectangle"
|
|
},
|
|
{
|
|
"file": "rotate+point.js",
|
|
"title": "rotate point"
|
|
}
|
|
],
|
|
"groups": [
|
|
{
|
|
"file": "add+a+sprite+to+group.js",
|
|
"title": "add a sprite to group"
|
|
},
|
|
{
|
|
"file": "bring+a+child+to+top.js",
|
|
"title": "bring a child to top"
|
|
},
|
|
{
|
|
"file": "bring+a+group+to+top.js",
|
|
"title": "bring a group to top"
|
|
},
|
|
{
|
|
"file": "call+all.js",
|
|
"title": "call all"
|
|
},
|
|
{
|
|
"file": "create+group.js",
|
|
"title": "create group"
|
|
},
|
|
{
|
|
"file": "create+sprite+in+a+group.js",
|
|
"title": "create sprite in a group"
|
|
},
|
|
{
|
|
"file": "depth+sort.js",
|
|
"title": "depth sort"
|
|
},
|
|
{
|
|
"file": "display+order.js",
|
|
"title": "display order"
|
|
},
|
|
{
|
|
"file": "extending+a+group.js",
|
|
"title": "extending a group"
|
|
},
|
|
{
|
|
"file": "for+each.js",
|
|
"title": "for each"
|
|
},
|
|
{
|
|
"file": "get+first.js",
|
|
"title": "get first"
|
|
},
|
|
{
|
|
"file": "group+as+layer.js",
|
|
"title": "group as layer"
|
|
},
|
|
{
|
|
"file": "group+transform+-+rotate.js",
|
|
"title": "group transform - rotate"
|
|
},
|
|
{
|
|
"file": "group+transform+-+tween.js",
|
|
"title": "group transform - tween"
|
|
},
|
|
{
|
|
"file": "group+transform.js",
|
|
"title": "group transform"
|
|
},
|
|
{
|
|
"file": "recyling.js",
|
|
"title": "recyling"
|
|
},
|
|
{
|
|
"file": "remove.js",
|
|
"title": "remove"
|
|
},
|
|
{
|
|
"file": "replace.js",
|
|
"title": "replace"
|
|
},
|
|
{
|
|
"file": "set+All.js",
|
|
"title": "set All"
|
|
},
|
|
{
|
|
"file": "sub+groups+-+group+length.js",
|
|
"title": "sub groups - group length"
|
|
},
|
|
{
|
|
"file": "swap+children+in+a+group.js",
|
|
"title": "swap children in a group"
|
|
}
|
|
],
|
|
"input": [
|
|
{
|
|
"file": "cursor+key+movement.js",
|
|
"title": "cursor key movement"
|
|
},
|
|
{
|
|
"file": "drag+several+sprites.js",
|
|
"title": "drag several sprites"
|
|
},
|
|
{
|
|
"file": "drag.js",
|
|
"title": "drag"
|
|
},
|
|
{
|
|
"file": "drop+limitation.js",
|
|
"title": "drop limitation"
|
|
},
|
|
{
|
|
"file": "follow+mouse.js",
|
|
"title": "follow mouse"
|
|
},
|
|
{
|
|
"file": "game+scale.js",
|
|
"title": "game scale"
|
|
},
|
|
{
|
|
"file": "key.js",
|
|
"title": "key"
|
|
},
|
|
{
|
|
"file": "keyboard+hotkeys.js",
|
|
"title": "keyboard hotkeys"
|
|
},
|
|
{
|
|
"file": "keyboard+justpressed.js",
|
|
"title": "keyboard justpressed"
|
|
},
|
|
{
|
|
"file": "keyboard.js",
|
|
"title": "keyboard"
|
|
},
|
|
{
|
|
"file": "motion+lock+-+horizontal.js",
|
|
"title": "motion lock - horizontal"
|
|
},
|
|
{
|
|
"file": "motion+lock+-+vertical.js",
|
|
"title": "motion lock - vertical"
|
|
},
|
|
{
|
|
"file": "multi+touch.js",
|
|
"title": "multi touch"
|
|
},
|
|
{
|
|
"file": "override+default+controls.js",
|
|
"title": "override default controls"
|
|
},
|
|
{
|
|
"file": "pixel+perfect+click+detection.js",
|
|
"title": "pixel perfect click detection"
|
|
},
|
|
{
|
|
"file": "pixelpick+-+atlas.js",
|
|
"title": "pixelpick - atlas"
|
|
},
|
|
{
|
|
"file": "pixelpick+-+scrolling+effect.js",
|
|
"title": "pixelpick - scrolling effect"
|
|
},
|
|
{
|
|
"file": "pixelpick+-+spritesheet.js",
|
|
"title": "pixelpick - spritesheet"
|
|
},
|
|
{
|
|
"file": "snap+on+drag.js",
|
|
"title": "snap on drag"
|
|
}
|
|
],
|
|
"loader": [
|
|
{
|
|
"file": "load+audio.js",
|
|
"title": "load audio"
|
|
},
|
|
{
|
|
"file": "load+bitmap+font.js",
|
|
"title": "load bitmap font"
|
|
},
|
|
{
|
|
"file": "load+image.js",
|
|
"title": "load image"
|
|
},
|
|
{
|
|
"file": "load+spritesheet.js",
|
|
"title": "load spritesheet"
|
|
},
|
|
{
|
|
"file": "load+starling+atlas.js",
|
|
"title": "load starling atlas"
|
|
},
|
|
{
|
|
"file": "load+text+file.js",
|
|
"title": "load text file"
|
|
},
|
|
{
|
|
"file": "load+texture+atlas.js",
|
|
"title": "load texture atlas"
|
|
},
|
|
{
|
|
"file": "load+tilemap+json.js",
|
|
"title": "load tilemap json"
|
|
},
|
|
{
|
|
"file": "pick+images+from+cache.js",
|
|
"title": "pick images from cache"
|
|
}
|
|
],
|
|
"misc": [
|
|
{
|
|
"file": "net.js",
|
|
"title": "net"
|
|
},
|
|
{
|
|
"file": "random+generators.js",
|
|
"title": "random generators"
|
|
},
|
|
{
|
|
"file": "repeatable+random+numbers.js",
|
|
"title": "repeatable random numbers"
|
|
}
|
|
],
|
|
"particles": [
|
|
{
|
|
"file": "click+burst.js",
|
|
"title": "click burst"
|
|
},
|
|
{
|
|
"file": "collision.js",
|
|
"title": "collision"
|
|
},
|
|
{
|
|
"file": "diamond+burst.js",
|
|
"title": "diamond burst"
|
|
},
|
|
{
|
|
"file": "no+rotation.js",
|
|
"title": "no rotation"
|
|
},
|
|
{
|
|
"file": "random+sprite.js",
|
|
"title": "random sprite"
|
|
},
|
|
{
|
|
"file": "when+particles+collide.js",
|
|
"title": "when particles collide"
|
|
},
|
|
{
|
|
"file": "zero+gravity.js",
|
|
"title": "zero gravity"
|
|
}
|
|
],
|
|
"physics": [
|
|
{
|
|
"file": "accelerate+to+pointer.js",
|
|
"title": "accelerate to pointer"
|
|
},
|
|
{
|
|
"file": "angle+between.js",
|
|
"title": "angle between"
|
|
},
|
|
{
|
|
"file": "angle+to+pointer.js",
|
|
"title": "angle to pointer"
|
|
},
|
|
{
|
|
"file": "angular+acceleration.js",
|
|
"title": "angular acceleration"
|
|
},
|
|
{
|
|
"file": "angular+velocity.js",
|
|
"title": "angular velocity"
|
|
},
|
|
{
|
|
"file": "bounce+accelerator.js",
|
|
"title": "bounce accelerator"
|
|
},
|
|
{
|
|
"file": "bounce+knock.js",
|
|
"title": "bounce knock"
|
|
},
|
|
{
|
|
"file": "bounce+with+gravity.js",
|
|
"title": "bounce with gravity"
|
|
},
|
|
{
|
|
"file": "bounce.js",
|
|
"title": "bounce"
|
|
},
|
|
{
|
|
"file": "framerate+independence.js",
|
|
"title": "framerate independence"
|
|
},
|
|
{
|
|
"file": "mass+velocity+test.js",
|
|
"title": "mass velocity test"
|
|
},
|
|
{
|
|
"file": "move+towards+object.js",
|
|
"title": "move towards object"
|
|
},
|
|
{
|
|
"file": "multi+angle+to+pointer.js",
|
|
"title": "multi angle to pointer"
|
|
},
|
|
{
|
|
"file": "quadtree+-+collision+infos.js",
|
|
"title": "quadtree - collision infos"
|
|
},
|
|
{
|
|
"file": "quadtree+-+ids.js",
|
|
"title": "quadtree - ids"
|
|
},
|
|
{
|
|
"file": "shoot+the+pointer.js",
|
|
"title": "shoot the pointer"
|
|
},
|
|
{
|
|
"file": "snake.js",
|
|
"title": "snake"
|
|
},
|
|
{
|
|
"file": "sprite+bounds.js",
|
|
"title": "sprite bounds"
|
|
}
|
|
],
|
|
"sprites": [
|
|
{
|
|
"file": "add+a+sprite.js",
|
|
"title": "add a sprite"
|
|
},
|
|
{
|
|
"file": "add+several+sprites.js",
|
|
"title": "add several sprites"
|
|
},
|
|
{
|
|
"file": "collide+world+bounds.js",
|
|
"title": "collide world bounds"
|
|
},
|
|
{
|
|
"file": "destroy.js",
|
|
"title": "destroy"
|
|
},
|
|
{
|
|
"file": "dynamic+crop.js",
|
|
"title": "dynamic crop"
|
|
},
|
|
{
|
|
"file": "extending+sprite+demo+1.js",
|
|
"title": "extending sprite demo 1"
|
|
},
|
|
{
|
|
"file": "extending+sprite+demo+2.js",
|
|
"title": "extending sprite demo 2"
|
|
},
|
|
{
|
|
"file": "horizontal+crop.js",
|
|
"title": "horizontal crop"
|
|
},
|
|
{
|
|
"file": "move+a+sprite.js",
|
|
"title": "move a sprite"
|
|
},
|
|
{
|
|
"file": "out+of+bounds.js",
|
|
"title": "out of bounds"
|
|
},
|
|
{
|
|
"file": "scale+a+sprite.js",
|
|
"title": "scale a sprite"
|
|
},
|
|
{
|
|
"file": "shared+sprite+textures.js",
|
|
"title": "shared sprite textures"
|
|
},
|
|
{
|
|
"file": "sprite+rotation.js",
|
|
"title": "sprite rotation"
|
|
},
|
|
{
|
|
"file": "spritesheet.js",
|
|
"title": "spritesheet"
|
|
},
|
|
{
|
|
"file": "vertical+crop.js",
|
|
"title": "vertical crop"
|
|
}
|
|
],
|
|
"text": [
|
|
{
|
|
"file": "bitmap+fonts.js",
|
|
"title": "bitmap fonts"
|
|
},
|
|
{
|
|
"file": "hello+arial.js",
|
|
"title": "hello arial"
|
|
},
|
|
{
|
|
"file": "kern+of+duty.js",
|
|
"title": "kern of duty"
|
|
},
|
|
{
|
|
"file": "remove+text.js",
|
|
"title": "remove text"
|
|
},
|
|
{
|
|
"file": "text+stroke.js",
|
|
"title": "text stroke"
|
|
},
|
|
{
|
|
"file": "update+text.js",
|
|
"title": "update text"
|
|
}
|
|
],
|
|
"tile sprites": [
|
|
{
|
|
"file": "animated+tiling+sprite.js",
|
|
"title": "animated tiling sprite"
|
|
},
|
|
{
|
|
"file": "colliding+with+tiling+sprite.js",
|
|
"title": "colliding with tiling sprite"
|
|
},
|
|
{
|
|
"file": "tiling+sprite.js",
|
|
"title": "tiling sprite"
|
|
}
|
|
],
|
|
"tilemaps": [
|
|
{
|
|
"file": "fill+tiles.js",
|
|
"title": "fill tiles"
|
|
},
|
|
{
|
|
"file": "mapcollide.js",
|
|
"title": "mapcollide"
|
|
},
|
|
{
|
|
"file": "mario.js",
|
|
"title": "mario"
|
|
},
|
|
{
|
|
"file": "paint+tiles.js",
|
|
"title": "paint tiles"
|
|
},
|
|
{
|
|
"file": "randomise+tiles.js",
|
|
"title": "randomise tiles"
|
|
},
|
|
{
|
|
"file": "replace+tiles.js",
|
|
"title": "replace tiles"
|
|
},
|
|
{
|
|
"file": "sci+fly.js",
|
|
"title": "sci fly"
|
|
},
|
|
{
|
|
"file": "swap+tiles.js",
|
|
"title": "swap tiles"
|
|
}
|
|
],
|
|
"tweens": [
|
|
{
|
|
"file": "bounce.js",
|
|
"title": "bounce"
|
|
},
|
|
{
|
|
"file": "bubbles.js",
|
|
"title": "bubbles"
|
|
},
|
|
{
|
|
"file": "chained+tweens.js",
|
|
"title": "chained tweens"
|
|
},
|
|
{
|
|
"file": "combined+tweens.js",
|
|
"title": "combined tweens"
|
|
},
|
|
{
|
|
"file": "easing+spritesheets.js",
|
|
"title": "easing spritesheets"
|
|
},
|
|
{
|
|
"file": "easing.js",
|
|
"title": "easing"
|
|
},
|
|
{
|
|
"file": "fading+in+a+sprite.js",
|
|
"title": "fading in a sprite"
|
|
},
|
|
{
|
|
"file": "pause+tween.js",
|
|
"title": "pause tween"
|
|
},
|
|
{
|
|
"file": "tween+loop+event.js",
|
|
"title": "tween loop event"
|
|
},
|
|
{
|
|
"file": "tween+several+properties.js",
|
|
"title": "tween several properties"
|
|
}
|
|
],
|
|
"world": [
|
|
{
|
|
"file": "fixed+to+camera.js",
|
|
"title": "fixed to camera"
|
|
},
|
|
{
|
|
"file": "move+around+world.js",
|
|
"title": "move around world"
|
|
}
|
|
]
|
|
} |