260 Commits
Author SHA1 Message Date
photonstorm de3583db80 Version 1.1.6 - "Shienar" - 24th February 2014
New Examples:

* Added lovely new little mini golf game by jpcloud.

Updates:

* Loader can now load JSON files natively (thanks lucas)
* TilemapParser now errors if the tileset isn't the right size

Bug Fixes:

* Updated Physics.Body.applyDamping so that velocity is reduced down to zero properly (thanks caezs)
* ArcadePhysics.collideSpriteVsTilemapLayer wouldn't call the process or collide callbacks if only 1 tile was involved in the check (thanks mandarinx)
* Lots of documentation fixes (thanks nhowell)
* Fix for PixiPatch so it renders masks again (thanks georgios)
* Modified ArcadePhysics.intersects so it returns a value as well as asigns (thanks bunnyhero)
* Lots of TypeScript defs fixes (thanks clark)
2014-02-24 01:32:20 +00:00
photonstorm 88f901249a Final 1.1.6 package files. 2014-02-24 01:29:32 +00:00
photonstorm f4ff4d88fe 1.1.6 release. The final of the 1.1 branch. 2014-02-24 01:28:13 +00:00
Richard Davey 37323562cd Merge pull request #469 from bburky/cdnjs-1.1.5
Update CDNJS link for 1.1.5
2014-02-21 23:43:28 +00:00
Blake Burkhart f6cc40f025 Update CDNJS link for 1.1.5 2014-02-21 17:21:16 -06:00
Richard Davey 529d210006 Merge pull request #329 from lucasmonteverde/dev
Custom JSON loader
2014-02-21 18:42:01 +00:00
Richard Davey 7b572b9b81 Merge pull request #377 from Malax/dev
Added a warning when the tile set image has not the expected dimensions.
2014-02-21 16:58:06 +00:00
Richard Davey 43bc0e72f1 Merge pull request #460 from nhowell/patch-2
Fix typo of Phaser.World#preUpdate for docs
2014-02-21 15:52:41 +00:00
Richard Davey ad0e53abb9 Merge pull request #459 from nhowell/patch-1
Fix typo of Phaser.TweenManager#pauseAll for docs
2014-02-20 03:44:29 +00:00
Nicholas Howell 6dca66c501 Fix typo of Phaser.World#preUpdate for docs 2014-02-19 22:17:38 -05:00
Nicholas Howell 0fbbb887fc Fix typo of Phaser.TweenManager#pauseAll for docs 2014-02-19 21:48:59 -05:00
Richard Davey f9a63a9d2e Merge pull request #437 from bunnyhero/intersects-return
Return a value from Phaser.Physics.Arcade.intersects().
2014-02-20 02:10:44 +00:00
Richard Davey 92edaf76ef Merge pull request #452 from nhowell/patch-2
Fix typo of Phaser.Line.intersectsPoints for docs
2014-02-20 01:44:08 +00:00
Richard Davey 4c48e88fc1 Merge pull request #453 from nhowell/patch-3
Fix typo of Phaser.Math#fuzzyLessThan for docs
2014-02-20 01:42:47 +00:00
Richard Davey 59a4e80dc1 Merge pull request #454 from nhowell/patch-1
Fix typo of Phaser.Graphics.prototype.destroy for docs
2014-02-20 01:40:09 +00:00
Richard Davey 310eb0a69e Merge pull request #455 from nhowell/patch-4
Fix typo of Phaser.BitmapText.prototype.destroy for docs
2014-02-20 01:39:03 +00:00
Nicholas Howell d5e45c22e9 Fix typo of Phaser.BitmapText.prototype.destroy for docs 2014-02-19 16:16:23 -05:00
Nicholas Howell b9deb43c88 Fix typo of Phaser.Graphics.prototype.destroy for docs
The method was appearing in the wrong file in the documentation
2014-02-19 15:48:38 -05:00
Richard Davey e95ec9fdbc Merge pull request #451 from nhowell/patch-1
Fix typo for Phaser.InputHandler#pointerDragged for docs
2014-02-19 19:05:47 +00:00
Nicholas Howell 936092cba1 Fix typo of Phaser.Math#fuzzyLessThan for docs 2014-02-19 14:05:04 -05:00
Nicholas Howell 0727541e05 Fix typo of Phaser.Line.intersectsPoints for docs 2014-02-19 13:47:54 -05:00
Nicholas Howell 3c6bee8dda Fix typo for Phaser.InputHandler#pointerDragged for docs 2014-02-19 13:21:38 -05:00
Richard Davey 6d418ba9c7 Merge pull request #450 from nhowell/patch-2
Fix typo of Phaser.SinglePad#addCallbacks for docs
2014-02-19 17:00:12 +00:00
Richard Davey 4b3d282f67 Merge pull request #448 from nhowell/patch-1
Fix typo of Phaser.Point#setMagnitude for docs
2014-02-19 16:56:25 +00:00
Nicholas Howell 232d022aaa Fix typo of Phaser.SinglePad#addCallbacks for docs
This typo was causing this method to appear in the wrong page of the docs
2014-02-19 11:18:09 -05:00
Nicholas Howell 26415094b6 Fix typo of Phaser.Point#setMagnitude for docs 2014-02-19 11:08:11 -05:00
Richard Davey e396b56686 Merge pull request #447 from nhowell/patch-3
Fix typos in Phaser.Group#forEachExists for docs
2014-02-19 15:06:13 +00:00
Richard Davey 47f98ac2bc Merge pull request #444 from nhowell/patch-1
Fix typos of method names in Button.js for docs
2014-02-19 15:01:21 +00:00
Nicholas Howell d964ef7d0a Fix typos in Phaser.Group#forEachExists for docs 2014-02-19 09:42:16 -05:00
Nicholas Howell 7db37bf5d5 Fix typos of method names in Button.js for docs 2014-02-19 08:32:05 -05:00
Richard Davey a97357b34e Merge pull request #441 from nhowell/patch-1
Fix typo of Phaser.Key#justReleased for docs
2014-02-19 03:31:19 +00:00
Nicholas Howell e8559fb735 Fix typo of Phaser.Key#justReleased for docs 2014-02-18 21:33:34 -05:00
Richard Davey 58d203619a Merge pull request #438 from georgiee/dev2
Patch for PixiPatch so it renders masks again
2014-02-18 11:23:34 +00:00
Georgios Kaleadis 16dc2c1597 patch for PixiPatch so render masks again 2014-02-18 11:26:10 +01:00
bunnyhero c57071bd98 Return a value from Phaser.Physics.Arcade.intersects. 2014-02-16 21:11:08 -05:00
photonstorm 1f93b62055 Fixes #421 2014-02-14 17:10:29 +00:00
Richard Davey 947985c5b1 Merge pull request #418 from srizzling/patch-1
FIX: Spelling Mistake
2014-02-14 04:40:51 +00:00
Sriram Venkatesh 690bd3e9e2 FIX: Spelling Mistake 2014-02-14 16:21:47 +13:00
Richard Davey 3df4746e8a Merge pull request #417 from clark-stevenson/patch-2
Update phaser.d.ts
2014-02-14 00:15:26 +00:00
clark-stevenson 34e5ee3eb8 Update phaser.d.ts
Fixed #408.
2014-02-14 00:08:11 +00:00
photonstorm 819380d001 Merge branch 'origin/dev' 2014-02-13 23:48:18 +00:00
Richard Davey 26459602aa Merge pull request #409 from clark-stevenson/patch-3
Overhauled Phaser.d.ts
2014-02-13 23:47:24 +00:00
clark-stevenson 79007bc142 Overhauled Phaser.d.ts
Completely reviewed. File in Alphabetical order. Missing classes added, old API's deleted. 

I do expect to be a couple of typos here and there though! So needs tested. I will be using this for my current project.
2014-02-13 13:31:24 +00:00
photonstorm 0641170aab Explicitly paused Timer continues if you un-focus and focus the browser window (thanks georgiee)
Added TimerEvent.pendingDelete and checks in Timer.update, so that removing an event in a callback no longer throws an exception (thanks georgiee)
Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy)
Added SAT.js to TypeScript definition. Now compiles properly.
Added missing Line.js to the Grunt file.
Tilemap#paste diffX and diffY equations changed, fixed issue #393 (thanks brejep)
Added missing return value in Body.hitLeft and hitRight, fixes issue #398 (thanks ram64).
Fixed easing tween example case. Issue #379 (thanks wesleywerner)
Removed SAT.js UMD wrapped, fixes issue #361 (thanks luizbills)
Removed inContact check from Body.separate.
Fixed Tilemap docs (wrongly pointed to Tileset methods)
2014-02-12 15:33:31 +00:00
photonstorm d9323de752 Docs and Examples update. 2014-02-12 15:26:29 +00:00
photonstorm 1d633a55f0 Merged from dev. 2014-02-12 15:24:59 +00:00
photonstorm 3c631768f2 Explicitly paused Timer continues if you un-focus and focus the browser window (thanks georgiee)
Added TimerEvent.pendingDelete and checks in Timer.update, so that removing an event in a callback no longer throws an exception (thanks georgiee)
Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy)
Added SAT.js to TypeScript definition. Now compiles properly.
Added missing Line.js to the Grunt file.
Tilemap#paste diffX and diffY equations changed, fixed issue #393 (thanks brejep)
Added missing return value in Body.hitLeft and hitRight, fixes issue #398 (thanks ram64).
Fixed easing tween example case. Issue #379 (thanks wesleywerner)
Removed SAT.js UMD wrapped, fixes issue #361 (thanks luizbills)
2014-02-12 15:09:44 +00:00
Richard Davey 59ea6746db Merge pull request #393 from brejep/master
Tilemap#paste diffX and diffY equations changed
2014-02-12 14:56:41 +00:00
photonstorm 2a65488eec Added Line.js to the Gruntfile. 2014-02-12 08:25:46 +00:00
Richard Davey cf3b9ae187 Merge pull request #365 from luizbills/dev
browserify/requirejs error with SAT module fixed
2014-02-12 00:57:56 +00:00
photonstorm 10252543f2 Fixed the TypeScript definitions to include the missing SAT classes and other small tweaks. Updated README. 2014-02-10 02:43:57 +00:00
Richard Davey 62da24a7fc Merge pull request #392 from clark-stevenson/patch-1
Update phaser.d.ts
2014-02-09 19:51:28 +00:00
Brett Jephson b0f4ac3bcc Tilemap - reverse diffX and diffY equations in Tilemap#paste. 2014-02-09 17:37:21 +00:00
clark-stevenson e9ab2d30b6 Update phaser.d.ts
Sprite was missing height property
2014-02-09 17:00:07 +00:00
clark-stevenson 27bca6a8c2 Update phaser.d.ts
atlasJSONArray, atlasJSONHash should have optional parameters when it comes to URL/Object? Please disregard this if this is incorrect.
2014-02-09 16:15:10 +00:00
Manuel Giesa 8628c5b2f3 Added a warning when the expected image dimensions of the tile set do not match the actual dimensions. 2014-02-07 17:45:46 +01:00
photonstorm e11cae5373 Added the SAT class to the TypeScript defs file. Also this fixes #369. 2014-02-07 02:50:36 +00:00
Richard Davey c0032e7a58 Merge pull request #368 from Arlefreak/dev
Added description for pad len parameter
2014-02-06 21:19:25 +00:00
photonstorm 9e5e30bb12 Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy) 2014-02-06 19:36:33 +00:00
Luiz Bills 03cde81b48 Merge branch 'master' into dev 2014-02-06 11:01:20 -02:00
Luiz Bills b7bb52696f browserify/requirejs error with SAT module fixed 2014-02-06 10:07:23 -02:00
Mario Carballo Zama df2a048594 Added description for pad len parameter 2014-02-06 00:20:40 -06:00
photonstorm 68d5c73fea Explicitly paused Timer continues if you un-focus and focus the browser window.
Added TimerEvent.pendingDelete and checks in Timer.update, so that removing an event in a callback no longer throws an exception.
2014-02-05 22:35:35 +00:00
photonstorm eddce653e9 Preparing for 1.1.5 development. 2014-02-05 21:02:41 +00:00
photonstorm 16fa37081f Merge branch 'origin/dev'
Conflicts:
	README.md
2014-02-05 17:05:26 +00:00
photonstorm fd68a2fe3a Version number updates. 2014-02-05 16:59:54 +00:00
photonstorm e7a9b96d27 Final release 1.1.4 examples finished. 2014-02-05 16:55:02 +00:00
photonstorm 02b75b9e23 Updated doc files. 2014-02-05 16:55:02 +00:00
photonstorm 0896c2fac7 Updating copyright year and README. 2014-02-05 16:54:59 +00:00
photonstorm 8e77e8cedb Lots of TypeScript defs updates for the new Physics / Body classes. 2014-02-05 16:54:58 +00:00
photonstorm 846e9c5061 Removed debug info and tidying up ready for release. 2014-02-05 16:54:58 +00:00
photonstorm 1af86771ba And we have level/ground jitter fixed :) Starstruck is running again properly now too. Time to commit and remove lots of debug data. 2014-02-05 16:54:58 +00:00
photonstorm 84f0f00f49 n-way collision checks and onBeginContact and onEndContact done and working. Also fixed issue in TweenManager.removeAll. 2014-02-05 16:54:58 +00:00
Richard Davey 4502ca1bf6 Merge pull request #359 from qdrj/patch-7
Update phaser.d.ts
2014-02-05 12:33:30 +00:00
Richard Davey 70ad43e71b Merge pull request #357 from qdrj/patch-5
Update phaser.d.ts
2014-02-05 12:33:04 +00:00
qdrj a1ccddcd7e Update phaser.d.ts
Added BitmapText definitions
2014-02-05 01:19:04 -08:00
qdrj 82c39d0866 Update phaser.d.ts
It is a bit confusing that AnimationManager.getAnimation can return animation object or false. Maybe it will better if this method will be returning null instead of false.
2014-02-04 23:24:28 -08:00
Richard Davey 45f9db515a Merge pull request #356 from qdrj/patch-4
Update phaser.d.ts
2014-02-04 03:08:18 -08:00
qdrj 09d4b2bb8b Update phaser.d.ts 2014-02-04 01:32:06 -08:00
photonstorm 8315973c5d Body/Group testing complete. Now focusing on n-way collision. 2014-02-03 04:09:45 +00:00
photonstorm 28f71ed86d Fixed the Sprite / World / Group body issue. So invaders now works again, as do the new examples. 2014-02-03 04:09:45 +00:00
photonstorm 3488880956 Sprite vs. Sprite Group Body Tests. 2014-02-03 04:09:45 +00:00
Richard Davey 33d47cf9e9 Merge pull request #344 from qdrj/patch-1
Update phaser.d.ts
2014-01-31 10:28:21 -08:00
Richard Davey cdb1891420 Merge pull request #350 from qdrj/patch-3
Update phaser.d.ts
2014-01-31 10:28:02 -08:00
qdrj 30af712d6a Update phaser.d.ts
Fix typo StageScaleMode.pageAlignVeritcally
2014-01-31 07:32:17 -08:00
photonstorm 5e182d317b Fixed lots of examples and added the missing Line.js. 2014-01-31 14:12:20 +00:00
Richard Davey 26f2b2a931 Merge pull request #349 from qdrj/patch-2
Update phaser.d.ts
2014-01-31 05:41:22 -08:00
qdrj e5dc16b68d Update phaser.d.ts
Fix incorrect Loader.checkKeyExists declaration
2014-01-31 04:53:19 -08:00
photonstorm 27fc447928 New polygon collision object examples and Body scale fixes. 2014-01-31 10:34:18 +00:00
photonstorm 45b6d5a741 Removed: Debug.renderSpriteTouching, Debug.renderLocalTransformInfo, Debug.renderWorldTransformInfo, Debug.renderSpriteCollision and Debug.dumpLinkedList.
Debug.renderPhysicsBody(body, color) is extremely useful for debugging the new physics bodies. Will draw the outline + points in the color given.
Debug.renderBodyInfo(sprite, x, y, color) will display lots of Sprite body data.
2014-01-31 05:42:20 +00:00
photonstorm 13a86765cb Phaser.CANVAS_PX_ROUND is a boolean. If 'true' the Canvas renderer will Math.floor() all coordinates before drawImage, stopping pixel interpolation. Defaults to false.
Phaser.CANVAS_CLEAR_RECT is a boolean. If 'true' (the default) it will context.clearRect() every frame. If false this is skipped (useful if you know you don't need it)
Collision now works between Sprites positioned via sprite.x/y, sprite.body.x/y or sprite.body.velocity.
If you are tweening a sprite and still want physics collision, set `sprite.body.moves = false` otherwise it will fight against the tween motion.
2014-01-31 04:14:02 +00:00
photonstorm 68b7d22e0d Fixed issue with the camera being slightly out of sync with 'fixedToCamera' sprites. Also fixed 'jitter' issue with camera targets. 2014-01-31 03:32:12 +00:00
photonstorm 6e4e99f436 Added Game Update loop step debugging - has proved utterly invaluable! Resolved camera jitter issues, gravity / downward force on tile/boundary issues and most tilemap collision issues. 2014-01-31 02:06:45 +00:00
photonstorm 651858372c Added Game core loop stepping support. Super-useful for debugging, and helped me track down the issue with jittery physics collision. Double-win! 2014-01-29 17:10:13 +00:00
photonstorm d51a37211c Phaser.Line added to the group of geometry classes, with full point on line/segment and intersection tests (see new examples) 2014-01-29 00:21:28 +00:00
photonstorm 5b85c910cb New lineIntersectLine() function working nicely. 2014-01-28 17:13:07 +00:00
qdrj e5f52e8ae8 Update phaser.d.ts
GameObjectFactory.add.existing should return added object
2014-01-27 23:57:28 -08:00
photonstorm 82cb66f47b Updated intersects code, tilemap collision is running again. Still finding gravity pushing sprites through tiles. 2014-01-28 06:52:56 +00:00
photonstorm 9deb5514a2 ArcadePhysics.setBoundsToWorld implemented. Body.setCircle, setRectangle and setPolygon all working. Tidying up Body class. Need to add tile collision special case handler next. 2014-01-28 05:01:17 +00:00
photonstorm 90c09374af Velocity integration tidied up. Now moving to sync Body with Sprite center point. 2014-01-28 01:29:35 +00:00
photonstorm fbe508ab1b Direct assignment of Body values, allows for sloped ground walking. 2014-01-27 17:08:20 +00:00
photonstorm dbdb2a2026 Adjusted delta timer cap and fixed some typos and more examples. 2014-01-27 17:08:20 +00:00
Richard Davey 4432d37e6e Merge pull request #312 from miguelangelgonzalez/dev
Added missing Typescript definitions
2014-01-27 07:40:45 -08:00
Richard Davey 511858e3f5 Merge pull request #340 from qdrj/patch-2
Update phaser.d.ts
2014-01-27 07:40:25 -08:00
Richard Davey d37ec40d72 Merge pull request #339 from qdrj/patch-1
Update phaser.d.ts
2014-01-27 07:39:54 -08:00
Richard Davey f575967840 Merge pull request #327 from timcooper/dev
Allow fullscreen to work from iframe
2014-01-27 07:39:11 -08:00
Richard Davey 912551a45d Merge pull request #323 from hstolte/patch-1
removed duplicate line in Timer class
2014-01-27 07:37:55 -08:00
photonstorm 4505aa50f6 Integrated SAT. Fixed lots of examples. Fixed documentation. Added new examples and built new phaser.js file for testing. 2014-01-27 06:29:26 +00:00
photonstorm 45518b3ecd Adding checkCollision tests. 2014-01-24 17:30:37 +00:00
qdrj 3fb2eb23cd Update phaser.d.ts
Incorrect TilemapLayer constructor
2014-01-24 01:13:09 -08:00
qdrj 8b06f9cd86 Update phaser.d.ts
Remove duplicated Timer.create signature
2014-01-23 22:50:02 -08:00
photonstorm e3aaec8ac0 Removed Time delta cap, removed drag references from Emitter and tested doing a custom polygon collision. 2014-01-24 03:53:11 +00:00
photonstorm ea9e22f472 SAT implemented and working nicely at long last :) 2014-01-23 21:45:35 +00:00
photonstorm 110ab4e253 More robust gravity handling avoiding 'sticky walls'. Added new platform test with mixture of mass tile collision and physics. 2014-01-23 01:50:43 +00:00
photonstorm 31b68ac94f Removed all references to drag from the Examples and replaced with Friction. 2014-01-22 21:06:16 +00:00
photonstorm 20108e47f3 Working through re-integrating tilemap collision. So far, so good. 2014-01-22 16:16:53 +00:00
photonstorm 1370ba52b5 Fixed Sci-Fly and restored tile collision handling. 2014-01-22 14:49:06 +00:00
photonstorm b2c49ef853 Merging previous changes back in again. 2014-01-22 14:31:18 +00:00
photonstorm f6af6fe0a3 Not fully working, but commit for posterity. Time to rollback if we're ever going to get this released. 2014-01-22 12:31:35 +00:00
photonstorm 7a0e9a478c New Math functions added. 2014-01-22 10:54:49 +00:00
photonstorm 15a002e720 Finally getting there! Body collision almost as good as it can be (without a full-on physics system). Just a few last tweaks to do. 2014-01-21 16:12:50 +00:00
Lucas Monteverde 3236ea6b24 Custom JSON loader
Added a method in the Loader that enable the load of custom json files,
to be used like a the general settings of the game.

loading: game.load.json (key, url);
retrieving data from json file: game.cache.getText(key);
2014-01-21 00:19:42 -02:00
Richard Davey c9d07c7346 Testing out new Body structure 2014-01-20 23:07:56 +00:00
Tim Cooper a81d22a309 Allow fullscreen to work from iframe 2014-01-20 20:58:36 +00:00
photonstorm 128c7143d5 Lots more physics tests and updates.
PLEASE DO NOT upgrade to this release if you need your game working and it uses any of the physics functions, as they're nearly all broken here.
Just pushing up so I can share it with someone.
2014-01-20 20:14:34 +00:00
hstolte 971e17fabe removed duplicate line in Timer class
The method create(...) was defined twice (line 1357 and line 1360). I removed line 1360.
2014-01-18 22:34:28 +01:00
Richard Davey 2532df8793 Merge pull request #317 from gareththegeek/patch-3
Allow Text.style to be any type
2014-01-16 07:28:37 -08:00
Richard Davey c5840f4f6f Merge pull request #316 from gareththegeek/patch-2
Add missing addKey method to Keyboard
2014-01-16 07:28:17 -08:00
Richard Davey 4e7dabb47e Merge pull request #315 from gareththegeek/patch-1
Fix typescript compile error in 0.9.5
2014-01-16 07:27:54 -08:00
gareththegeek 47ee5a2c88 Allow Text.style to be any type
To allow a configuration object to be used rather than a string
2014-01-16 14:48:13 +00:00
gareththegeek ca1f24868a Add missing addKey method to Keyboard 2014-01-16 14:46:12 +00:00
gareththegeek 1f9df6e3f4 Fix typescript compile error in 0.9.5
Explicitly specify type for parameters array
2014-01-16 14:43:28 +00:00
Miguel Angel Gonzalez ac310ab881 Added missing Typescript definitions 2014-01-15 12:15:59 -03:00
photonstorm abdaaa0010 Tidied up the docs and removed some Body vars no longer needed. Now to attempt stacking. 2014-01-15 14:40:25 +00:00
photonstorm 58fb248575 Optimised Body loop, removed sleep properties, implemented minBounceVelocity. Working as expected at last :) 2014-01-15 14:40:25 +00:00
photonstorm 283e38aaae Time to optimise the rebound a little. 2014-01-15 14:40:25 +00:00
photonstorm be6489fbc9 Body bounce + blocking values nearly sorted. 2014-01-15 14:40:24 +00:00
photonstorm 651737fdd0 More physics tweaks. 2014-01-15 14:40:24 +00:00
Richard Davey 88ef644d47 Merge pull request #310 from theadam/dev
Fixed WebGLRenderer updateGraphics bug
2014-01-15 06:23:50 -08:00
Adam Nalisnick 7c66a6b6cc Removed an errant ';' from the end of an 'else if' causing a circle to be drawn each time a graphics object is updated 2014-01-14 20:54:50 -05:00
Richard Davey d8bf13eaaa Merge pull request #309 from jcd-as/dev1
fix sprite vs sprite overlap check
2014-01-14 14:35:06 -08:00
photonstorm bd66be1804 Updated Tilemap classes and further tests. 2014-01-14 22:34:41 +00:00
jcs 01a314018d fix sprite vs sprite overlap check 2014-01-14 13:51:55 -08:00
photonstorm ff7cad102c All of the setCollision methods now have a 'collides' parameter so you can enable or disable collision, not only enable it. Also fixed Loader example. 2014-01-14 11:58:00 +00:00
Richard Davey 8479e456dd Merge pull request #307 from jcd-as/dev
Emitters drag fix.
2014-01-14 01:49:52 -08:00
jcs b4e767161b change Emitter's particleDrag property to particleFriction to match the changes to the physics engine 2014-01-13 20:29:16 -08:00
jcs 6cde583e82 Merge branch 'dev' of https://github.com/photonstorm/phaser into dev 2014-01-13 20:20:06 -08:00
jcs ab02040bea fix Tilemap.putTile 2014-01-13 20:18:08 -08:00
photonstorm 32f5a2fa36 More examples updates. Fixed Starstruck tilemap code, removed un-needed ArcadePhysics methods and rebuilt the js files for testing. 2014-01-14 03:33:03 +00:00
photonstorm 011d2d8e05 The way the collision process callback works has changed significantly and now works as originally intended.
The World level quadtree is no longer created, they are now built and ripped down each time you collide a Group, this helps collision accuracy.
Bodies are no longer added to a world quadtree, so have had all of their quadtree properties removed such as skipQuadtree, quadTreeIndex, etc.
QuadTree.populate - you can pass it a Group and it'll automatically insert all of the children ready for inspection.
Removed ArcadePhysics binding to the QuadTree, so it can now be used independantly of the physics system.
2014-01-14 02:43:09 +00:00
Richard Davey 17af96d46a Merge pull request #306 from jcd-as/dev
fix Tilemap.setCollision
2014-01-13 17:19:25 -08:00
photonstorm bd9898db7e New merged separate function that now uses processCallback the way it was always meant to be used. 2014-01-14 01:18:46 +00:00
jcs befcf74f44 fix Tilemap.setCollision 2014-01-13 16:46:29 -08:00
photonstorm e7c2b6ae9c Fixed nearly all of the tilemap examples to use the new tilemap system. 2014-01-14 00:31:58 +00:00
photonstorm 71f82477ea Tidying up all of the map files, sorting out Tiled paths and updated the tilemap examples for 1.1.4. 2014-01-13 19:45:15 +00:00
photonstorm c6fa2cb7b6 Added the new Timer, TimerEvent and Time methods to the TypeScript definitions files. 2014-01-13 14:18:15 +00:00
photonstorm 35cef4e529 Updated Body file and compiled + minified builds for those wanting to test. 2014-01-09 18:24:12 +00:00
photonstorm 0a0e775ea5 Removed temp. debug vars. 2014-01-09 17:12:24 +00:00
photonstorm 10d105d5ce Acceleration tested and working fine. Proper accurate friction added and working really nicely, so much better than 'drag' used to. Considering removing drag, although will break the API history. 2014-01-09 03:42:58 +00:00
photonstorm 754219a978 Fixed some documentation typos. 2014-01-09 01:23:23 +00:00
Richard Davey 5f9acdca4b Merge pull request #299 from Niondir/dev
Phaser Definitions Update
2014-01-08 17:02:59 -08:00
photonstorm c6c579e6b3 Phaser.Timer is now feature complete and fully documented. You can create Phaser.TimerEvents on a Timer and lots of new examples have been provided. 2014-01-09 00:59:37 +00:00
Tarion c21365703d Phaser Definitions Update
Added "GetCurrentState" to StateManager
2014-01-08 22:57:13 +01:00
photonstorm 35e61172e1 Device.quirksMode is a boolean that informs you if the page is in strict (false) or quirks (true) mode.
Canvas.getOffset now runs a strict/quirks check and uses document.documentElement when calculating scrollTop and scrollLeft to avoid Chrome console warnings.
The Time class now has three new methods: addEvent, repeatEvent and loopEvent. See the new Timer examples to show how to use them.
2014-01-08 11:21:48 +00:00
photonstorm 67e2caafbc Added new Contributors guide. 2014-01-08 11:21:48 +00:00
Richard Davey 038bca11b2 Merge pull request #295 from Niondir/dev
phaser.d.ts corrections
2014-01-07 16:42:52 -08:00
photonstorm bd9b964710 Added a new Full Screen Mobile template example. 2014-01-08 00:34:47 +00:00
niondir 1aabb6b93d World is a Group. Needed to remove stuff again e.g. a "BitmapText" 2014-01-07 19:54:04 +01:00
niondir 77a8dc321f phaser.d.ts corrections 2014-01-07 10:58:00 +01:00
photonstorm 428e331a11 Groups can now be added to other Groups as children via group.add() and group.addAt().
Groups now have an 'alive' property, which can be useful when iterating through child groups with functions like forEachAlive.
2014-01-06 01:39:23 +00:00
photonstorm aa3a86df6e Timer class overhaul. 2014-01-04 02:53:32 +00:00
photonstorm 92033fde7c Added BitDeli badge. 2014-01-03 12:46:13 +00:00
photonstorm 7aa45b5872 Added BitDeli badge, also updating Timer class. 2014-01-03 12:43:58 +00:00
photonstorm c3183dcea9 Angular Physics re-implemented, most tests now working as expected. 2014-01-03 04:50:31 +00:00
Richard Davey f7329e0661 Further physics modifications 2014-01-03 02:24:06 +00:00
photonstorm 5526a7322b Warning: This version has a new ArcadePhysics handler in it. Don't upgrade if you need this for live game code, wait until we go to master. Otherwise, this commit contains lots of new physics demos and a new updateMotion and Body class to try and fix, once and for all, the physics issues with applied forces. 2014-01-02 23:28:22 +00:00
photonstorm 902ffee808 Loader.progressFloat contains the actual non-rounded progress value, where-as Loader.progress contains a rounded value. Use progressFloat if you've > 100 files to load. 2013-12-31 17:35:40 +00:00
photonstorm d1cd1df9a5 Lots of fixes and updates to the Button class, InputHandler for snap offsets, Sound looping and Stage scaling. 2013-12-31 17:03:09 +00:00
photonstorm 86f6ddcbc8 Two new particle examples and a group animation example. Also fixed CocoonJS sound issue and Cache sound locked bug. 2013-12-31 03:37:11 +00:00
photonstorm 3b87ce9fc9 Brand new Gamepad API support fully implemented (thanks to Karl Macklin), with examples to show use. 2013-12-31 01:45:30 +00:00
photonstorm 29d7cc36a0 Merge branch 'gamepadsupport' of https://github.com/karlmacklin/phaser into karlmacklin-gamepadsupport
Conflicts:
	README.md
2013-12-31 00:44:11 +00:00
photonstorm ba74bea4b4 New Group.destroy example and patched the desyrel font xml. 2013-12-30 21:36:50 +00:00
photonstorm ce4cf531d4 Added class constructors, fixed Stripshader, added relative Tween example and updated Tween source. 2013-12-30 16:54:00 +00:00
photonstorm fdbdd81b7b Updated some docs, added the new renderHidden parameter for Canvas and updated the RenderTexture examples as a result. 2013-12-27 00:26:21 +00:00
Richard Davey 2c8077835c Merge pull request #251 from cocoademon/physics_self_collide_fix
Don’t test self-collisions
2013-12-26 15:10:28 -08:00
Richard Davey 10f4bc7507 Merge pull request #278 from inductible-dev/dev
New example suite added, and some TypeScript def tweaks
2013-12-26 15:01:12 -08:00
Richard Davey 923a10ee81 Input no longer sets cursor to default if already set to none 2013-12-26 00:52:01 +00:00
photonstorm 167a498a5e Phaser.Game constructor can now be passed a single object containing game settings + Stage settings, useful for advanced configurations. 2013-12-24 03:18:55 +00:00
inductible.dev 7acf79338c Added examples group: Debug tools 2013-12-23 15:59:58 +00:00
inductible.dev e103d6ae83 Added examples group: Debug tools 2013-12-23 15:59:26 +00:00
inductible.dev 9a968bc5bb TypeScript defs: TileSprite now extends Sprite, and added 'fixedToCamera' property to Sprite definition 2013-12-23 09:48:07 +00:00
photonstorm 0acef49a7c RenderTexture now displays correctly in Canvas games.
Stage.display property added. A direct reference to the root Pixi Stage object (very useful for RenderTexture manipulation)
2013-12-23 04:20:09 +00:00
Richard Davey 5a5d465034 Merge pull request #275 from inductible-dev/dev
added TypeScript definitions for Key and CursorKeys object
2013-12-22 08:30:03 -08:00
inductible.dev 6be31e0f69 added TypeScript definitions for Key and CursorKeys object 2013-12-22 13:34:52 +00:00
photonstorm bf72b4d3b0 Tilemap.createFromObjects can now turn a bunch of Tiled objects into Sprites in one single call, and copies across all properties as well. 2013-12-22 04:27:12 +00:00
photonstorm 63d90a0176 Sprites that are fixedToCamera can now be input dragged regardless of world position. 2013-12-22 03:46:08 +00:00
photonstorm 3cbb820349 You can now load any binary file via the Loader: game.load.binary(key, url, callback) - the optional callback allows for post-load processing before entering the Cache. 2013-12-20 18:27:36 +00:00
photonstorm 352749e803 Collision commands in and working. Updated sci-fly example. Multiple layers rendering. Mixed tile size on one layer rendering, but collision is grid bound. 2013-12-19 05:09:49 +00:00
photonstorm 4c7a4ebf62 Tiled map loader now working much better, rendering, layering properly. 2013-12-19 03:49:28 +00:00
photonstorm 5cf7ed4fdb More TypeScript updates. 2013-12-18 16:56:14 +00:00
photonstorm f991f9cee8 Tweens have a new event: onLoop.
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)
2013-12-18 13:02:01 +00:00
photonstorm b2c680811b New unified Tiled loader. 2013-12-18 13:02:01 +00:00
Richard Davey 4ada28ba81 Merge pull request #267 from cocoademon/framerate_example
Add an example to show framerate independence in physics calculations
2013-12-17 17:15:33 -08:00
Cameron Foale 55d69e16b6 Add an example to show framerate independence in physics calculations 2013-12-18 11:58:11 +11:00
photonstorm 50eee95c99 Improved TilemapLayer rendering and debug rendering significantly. Cleared out some old assets and added a new map. 2013-12-18 00:44:04 +00:00
photonstorm dd7ae12271 ArcadePhysics.overlap and collide now recognise TileSprites in the collision checks. 2013-12-17 16:48:03 +00:00
Richard Davey a0961f27df Merge pull request #266 from cocoademon/physics_instability_fix
Physics instability fix. I'm merging this in so I can test it against the updates here.
2013-12-17 04:36:38 -08:00
photonstorm 896e9af9f5 TilemapLayers now render tiles correctly, with our without debugging overlay. Collision working well across single and index ranges. 2013-12-17 05:07:00 +00:00
Cameron Foale b8dbb5d125 Take dt into account for gravity calculations 2013-12-17 14:38:44 +11:00
Cameron Foale 388e42c80a Remove invalid multiply by 60 in Phaser.ArcadePhysics.updateMotion 2013-12-17 13:45:15 +11:00
photonstorm 7917eac255 Added Matching Pairs game and updated fixed to camera example. 2013-12-16 15:16:44 +00:00
Richard Davey 39cae4cc09 Sphere snake wip demo 2013-12-14 02:22:14 +00:00
photonstorm 03ae324d26 New user submitted examples 2013-12-13 23:56:39 +00:00
photonstorm a361a18616 Updated IE11 check, forces IE11 to use Canvas renderer even in AUTO mode. 2013-12-13 14:04:14 +00:00
Richard Davey dd9f533528 Merge pull request #134 from gabehollombe/touch_joystick_example
Added touch joystick example
2013-12-11 17:06:10 -08:00
Richard Davey 1b954066a6 Merge pull request #247 from cocoademon/trim_fix
Switch method of using trimmed sprites to support scaling and rotation
2013-12-11 16:52:01 -08:00
photonstorm da5d8c9272 Updated p2.js to latest build. 2013-12-11 03:20:33 +00:00
Richard Davey 215632c0a7 Merge pull request #261 from cocoademon/platform_riding_fix
Fix riding on platforms
2013-12-10 16:05:09 -08:00
Richard Davey 9988a2ffbe Merge pull request #260 from feiss/dev
Tutorials translated to spanish
2013-12-10 16:02:19 -08:00
Cameron Foale 56389fcaf4 Fix riding on platforms 2013-12-11 10:25:57 +11:00
Diego F. Goberna c74bac3a9c Finished translation of tutorial 02 2013-12-10 21:41:33 +01:00
Diego F. Goberna 9f6cfca9cd Title tags fixed 2013-12-10 17:31:54 +01:00
Diego F. Goberna 6805e7264d code comments translated 2013-12-10 17:31:19 +01:00
Diego F. Goberna f7202a3ff1 removed hello world example code
To avoid duplicates. Users may go to the english version (and links in
the tutorial go to the english version)
2013-12-10 17:09:03 +01:00
Diego F. Goberna fc6ae6a60b Finished translation of tutorial 01 2013-12-10 17:05:34 +01:00
Diego F. Goberna 636b1af25c Spanish translation of the tutorials 2013-12-10 16:49:01 +01:00
photonstorm 19759699df More TypeScript definitions fixes (for Easing and Animation data). 2013-12-10 14:34:22 +00:00
photonstorm 669570c701 Tidying up the examples and more Tilemap work. 2013-12-10 12:23:42 +00:00
photonstorm af5847e8e4 Tilemap and game core loop updates. 2013-12-09 16:40:48 +00:00
Richard Davey 2071fc22fc Merge pull request #253 from jcd-as/dev
fix Pixi bug (#425) - fix incorrect width property for multi-line Bitmap...
2013-12-09 02:01:24 -08:00
Richard Davey 55b2dd379a Merge pull request #254 from cocoademon/update_reorder
Split world update into preUpdate and update.
2013-12-09 02:00:49 -08:00
Cameron Foale 3e1207e1a3 Split world update into preUpdate and update.
This allows moving the state.update() call to before world.update(),
meaning results of collisions checked in the state are available to
objects in their own update().
2013-12-09 15:46:02 +11:00
Josh Shepard (jcs) 8ade29d982 fix Pixi bug (#425) - fix incorrect width property for multi-line BitmapText
(Pixi has already merged the fix)
2013-12-08 09:50:21 -08:00
photonstorm 74e0cfb13a Added Tutorial 2. 2013-12-07 02:05:07 +00:00
photonstorm 13a03f3620 TypeScript file updated, now compiles without error in VS and FlashDevelop. 2013-12-06 13:48:40 +00:00
photonstorm 886618c056 Tilemap collision fixed, regardless of rotation, number of overlapping tiles and speed (to a point anyway). Maps also don't crash if they are smaller than the render area. Layers can be positioned successfully anywhere in camera but collision isn't yet offset for this. 2013-12-06 04:34:27 +00:00
photonstorm ca3c71e8f5 Added max overlap clamp. 2013-12-06 02:44:06 +00:00
photonstorm 8e289e6b7c Mostly working, just need to apply a max overlap to avoid tunneling, although a ray would be better. 2013-12-06 02:34:28 +00:00
photonstorm 1f513a333e Fixed an issue where passing null as the Group parent wouldn't set it to game.world as it should have (thanks tito100).
Continued work on the tilemap collision - again, please don't use this version if you need working tilemaps.
2013-12-06 01:07:25 +00:00
photonstorm ea3802a556 Lots of new tilemap code in here. If your game relies on tilemaps then please don't update to this commit unless you want to help debugging! 2013-12-05 18:12:16 +00:00
photonstorm cd314cd03e Group.length now returns the number of children in the Group regardless of their exists/alive state, or 0 if the Group is has no children. 2013-12-05 09:14:49 +00:00
Richard Davey eb3d8241ca Merge pull request #250 from cocoademon/camera_bounds_fix
Switch Camera.setBoundsToWorld to match world.bounds instead of world
2013-12-05 01:11:59 -08:00
Richard Davey fe5fdb164c Merge pull request #245 from oysterCrusher/dev
Introduced a separate stage.fullScreenScaleMode property.
2013-12-05 01:10:02 -08:00
John 2e11801f9f Added a fix for fullscreen scaling in firefox. 2013-12-05 07:15:50 +00:00
Cameron Foale f6712da774 Switch Camera.setBoundsToWorld to match world.bounds instead of world 2013-12-05 16:28:17 +11:00
Cameron Foale b48669dded Don’t test self-collisions 2013-12-05 16:26:03 +11:00
Cameron Foale 8469a9c51e Switch method of using trimmed sprites to support scaling and rotation 2013-12-05 14:52:26 +11:00
John b978a2b73b Introduced a separate stage.fullScreenScaleMode property that is used to decide scaling when fullscreen. 2013-12-05 01:00:36 +00:00
photonstorm c5c754725a * When a Sprite is destroyed any active filters are removed as well.
* Updated Pixi.js so that removing filters now works correctly without breaking the display list.
2013-12-04 22:39:53 +00:00
Richard Davey 8f14483b60 Merge pull request #243 from jcd-as/dev
move 'dirty' flag for Tilemap to a per-layer flag. Fixes #242
2013-12-04 14:38:55 -08:00
Josh Shepard (jcs) 539dcdd18a move 'dirty' flag for Tilemap to a per-layer flag. Fixes #242 2013-12-04 09:42:25 -08:00
photonstorm 666df67453 Tidying up the wip folder and updating pixi. 2013-12-03 20:50:34 +00:00
photonstorm 42c0bed502 Fixed World.scale and Group.scale. 2013-12-03 02:13:57 +00:00
photonstorm 3bfea2101a Start of the Dragonfire game sample 2013-12-01 20:59:52 +00:00
Richard Davey f9ee9bfc0e Merge pull request #239 from jcd-as/dev
move TilemapLayer positioning/rendering to postUpdate to be in line with...
2013-12-01 04:50:39 -08:00
Josh Shepard (jcs) 2b99cb4be4 move TilemapLayer positioning/rendering to postUpdate to be in line with ‘normal’ Sprites.
reverts e91d40b9fc - fix was incorrect & regressed fixedToCamera Sprites’ & TilemapLayer positioning.
Fixes #237
2013-11-30 17:40:24 -08:00
photonstorm 0256117307 Preparing dev branch for 1.1.4 2013-11-29 19:40:28 +00:00
photonstorm 0302e05a83 Small link updates. 2013-11-29 18:48:17 +00:00
Gabe Hollombe 62656783f0 add gamecontroller.js to view_lite.html for the side_view layout 2013-10-28 18:56:48 +08:00
Gabe Hollombe 7a9508d01d Added touch joystick example
Using Clay.io's HTML5 Virtual Game Controller
2013-10-27 15:59:05 +08:00
944 changed files with 144088 additions and 75963 deletions
+2
View File
@@ -7,6 +7,8 @@ Phaser OSX.sublime-workspace
Phaser.sublime-project
Phaser.sublime-workspace
*.suo
*.sublime-project
*.sublime-workspace
# Vendors
node_modules/
+72
View File
@@ -0,0 +1,72 @@
#How to contribute
It's important to us that you feel you can contribute towards the evolution of Phaser. This can take many forms: from helping to fix bugs or improve the docs, to adding in new features to the source. This guide should help you in making that process as smooth as possible.
##Reporting issues
[GitHub Issues][0] is the place to report bugs you may have found in either the core library or any of the examples that are part of the repository. When submitting a bug please do the following:
1. **Search for existing issues.** Your bug may have already been fixed or addressed in a development branch version of Phaser, so be sure to search the issues first before putting in a duplicate issue.
2. **Create an isolated and reproducible test case.** If you are reporting a bug, make sure you also have a minimal, runnable, code example that reproduces the problem you have.
3. **Include a live example.** After narrowing your code down to only the problem areas, make use of[jsFiddle][1], [jsBin][2], or a link to your live site so that we can view a live example of the problem.
4. **Share as much information as possible.** Include browser version affected, your OS, version of the library, steps to reproduce, etc. "X isn't working!!!1!" will probably just be closed.
##Pixi and Phaser
It's important to understand that internally Phaser uses [Pixi.js](https://github.com/GoodBoyDigital/pixi.js/) for all rendering. It's possible you may find a bug that is generated on the Pixi level rather than Phaser. You're welcome to still report the issue of course, but if you get a reply saying we think it might be a Pixi issue this is what we're talking about :)
##Support Forum
We have a very active [Phaser Support Forum](http://www.html5gamedevs.com/forum/14-phaser/). If you need general support, or are struggling to understand how to do something or need your code checked over, then we would urge you to post it to our forum. There are a lot of friendly devs in there who can help, as well as the core Phaser and Pixi teams, so it's a great place to get support from. You're welcome to report bugs directly on GitHub, but for general support we'd always recommend using the forum first.
##Dev vs. Master
The dev branch of Phaser is our 'current working' version. It is always ahead of the master branch in terms of features and fixes. However it's also bleeding-edge and experimental and we cannot and do not guarantee it will compile or work for you. Very often we have to break things for a few days while we rebuild and patch. So by all means please export the dev branch and contribute towards it, indeed that is where all Pull Requests should be sent, but do so understanding the API may change beneath you.
##Making Changes
To take advantage of our grunt build script and jshint config it will be easiest for you if you have node.js and grunt installed locally.
You can download node.js from[nodejs.org][3]. After it has been installed open a console and run `npm i - g grunt - cli` to install the global `grunt` executable.
After that you can clone the repository and run `npm i` inside the cloned folder. This will install dependencies necessary for building the project. Once that is ready,
make your changes and submit a Pull Request:
- **Send Pull Requests to the `dev` branch.** All Pull Requests must be sent to the `dev` branch, `master` is the latest release and PRs to that branch will be closed.
- **Ensure changes are jshint validated.** Our JSHint configuration file is provided in the repository and you should check against it before submitting.
- **Never commit new builds.** When making a code change you should always run `grunt` which will rebuild the project so you can test, *however* please do not commit these new builds or your PR will be closed. Builds by default are placed in the `dist` folder, to keep them separate from the `build` folder releases.
- **Only commit relevant changes.** Don't include changes that are not directly relevant to the fix you are making. The more focused a PR is, the faster it will get attention and be merged. Extra files changing only whitespace or trash files will likely get your PR closed.
##I don't really like git / node.js, but I can fix this bug
That is fine too. While Pull Requests are the best thing in the world for us, they are not the only way to help. You're welcome to post fixes to our forum or even just email them to us. All we ask is that you still adhere to the guidelines presented here re: JSHint, etc.
##Code Style Guide
- Use 4 spaces for tabs, never tab characters.
- No trailing whitespace, blank lines should have no whitespace.
- Always favor strict equals` === `unless you * need * to use type coercion.
- Follow conventions already in the code, and listen to jshint. Our config is set-up for a reason.
Thanks to Chad for creating the original Pixi.js Contributing file which we adapted for Phaser.
[0]: https://github.com/photonstorm/phaser/issues
[1]: http://jsfiddle.net
[2]: http://jsbin.com/
[3]: http://nodejs.org
+6
View File
@@ -69,6 +69,9 @@ module.exports = function (grunt) {
'src/input/Pointer.js',
'src/input/Touch.js',
'src/input/InputHandler.js',
'src/input/Gamepad.js',
'src/input/SinglePad.js',
'src/input/GamepadButton.js',
'src/gameobjects/Events.js',
'src/gameobjects/GameObjectFactory.js',
'src/gameobjects/BitmapData.js',
@@ -90,12 +93,14 @@ module.exports = function (grunt) {
'src/geom/Point.js',
'src/geom/Rectangle.js',
'src/geom/Polygon.js',
'src/geom/Line.js',
'src/net/Net.js',
'src/tween/TweenManager.js',
'src/tween/Tween.js',
'src/tween/Easing.js',
'src/time/Time.js',
'src/time/Timer.js',
'src/time/TimerEvent.js',
'src/animation/AnimationManager.js',
'src/animation/Animation.js',
'src/animation/Frame.js',
@@ -108,6 +113,7 @@ module.exports = function (grunt) {
'src/sound/SoundManager.js',
'src/utils/Debug.js',
'src/utils/Color.js',
'src/physics/arcade/SAT.js',
'src/physics/arcade/ArcadePhysics.js',
'src/physics/arcade/Body.js',
'src/particles/Particles.js',
+162 -123
View File
@@ -1,111 +1,99 @@
![Phaser Logo](http://www.photonstorm.com/wp-content/uploads/2013/09/phaser_10_release.jpg)
Phaser 1.1
==========
Phaser 1.1.6
============
Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses [Pixi.js](https://github.com/GoodBoyDigital/pixi.js/) internally for fast 2D Canvas and WebGL rendering.
Version: 1.1.3 "Arafel" - Released: November 29th 2013
Version: 1.1.6 "Shienar" - Released: 24th February 2014
By Richard Davey, [Photon Storm](http://www.photonstorm.com)
View the [Official Website](http://phaser.io)<br />
Follow on [Twitter](https://twitter.com/photonstorm)<br />
Join the [Forum](http://www.html5gamedevs.com/forum/14-phaser/)<br />
Try out 160+ [Phaser Examples](http://gametest.mobi/phaser/examples/)
[Un-official Getting Started with Phaser](http://www.antonoffplus.com/coding-an-html5-game-for-30-minutes-or-an-introduction-to-the-phaser-framework)
* View the [Official Website](http://phaser.io)
* Follow on [Twitter](https://twitter.com/photonstorm)
* Join the [Forum](http://www.html5gamedevs.com/forum/14-phaser/)
* Try out 220+ [Phaser Examples](http://examples.phaser.io)
* Read the [documentation online](http://docs.phaser.io)
[Subscribe to our new Phaser Newsletter](https://confirmsubscription.com/h/r/369DE48E3E86AF1E). We'll email you when new versions are released as well as send you our regular Phaser game making magazine.
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/photonstorm/phaser/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
Welcome to Phaser
-----------------
It's staggering to think just how much has been achieved in the short time Phaser has been alive. We've implemented literally hundreds of bug fixes and updates, thanks to the effort the community puts in to reporting issues they find. Exciting new features have been merged into the core and we revisited old ones and pimped them out. We also completely overhauled the Examples Suite, removed the requirement for PHP, rebuilt it and filled it with over 150 examples to dig in and learn from. And more importantly we've got our first pass at the API docs ready too.
1.1.6 is the final point release before Phaser 2.0 is released this March.
There is still more to be done of course. The API docs, while a good start, are lacking in places and still need to be backed up with a proper comprehensive manual. And we desperately need to write some 'best practises' and 'getting started' tutorials too. But we hope you appreciate the amount of effort that has been put in by the team so far.
As you may know we had planned to release 1.1.4 at the end of 2013. For various reasons this didn't quite happen, but we're happy to announce it's finally out! There have been some dramatic changes internally, and if you make use of either the physics systems or tilemaps then you are going to need to update your code. Hopefully only a little bit, but there have been a number of core API changes which we detail below. There are also a host of new features, the headliners being:
There are many exciting new features and tweaks in this build that we felt it warranted a proper point release, hence the shift to version 1.1. Because of several core changes games that were in development in a 1.0.x version of Phaser may need refactoring for 1.1, but we feel those changes have helped the framework grow and mature as a whole.
* New Physics system. Uses SAT.js internally so physics bodies can now be rectangles, circles or polygons and support rotation.
* New Tilemap system. Brand new collision system for tiles, much more advanced layer handling, tile properties, multiple tilesets of layer and more.
* New Timer. This handy new class lets you create timed events easily.
* Your Game can now be configured from an external configuration object.
* Over 150 new features and updates and over 30 reported bug fixes.
As before we offer a heart-felt "Thank you!" to everyone who has encouraged us along the way. To those of you who worked with Phaser during its various incarnations, and who released full games with it despite there being zero API documentation available: you are our heroes. It's your kind words and enthusiasm that has kept us going.
This release also brings the TypeScript definitions file as bang up to date as possible. There are still a few areas that need looking at, but with your help hopefully we can iron those final few bits out and have a 100% accruate defs file on offer.
Phaser is everything we ever wanted from an HTML5 game framework. It powers all of our client work in build today and remains our single most important product, and we've only just scratched the surface of what we have planned for it.
There is a new Contributors Guide which we'd urge you to follow if you wish to help with Phaser development, and we've updated the doc files and added lots more details into key areas. The Examples have grown too! Now over 220 of them including several great ones from the community.
We're going to settle on this build for a short while as we do some quick iteration bug fixing, so expect to see some small point releases very soon that do nothing but address any issues you may find. But in parallel to this we are also now rebuilding our core to bring it in-line with the latest version of Pixi.js, which has had some dramatic changes under the hood, changes will impact a lot of what Phaser does internally. But the changes are all for the better and once we upgrade Pixi you'll have a significantly faster renderer and a smaller codebase too, as we do away with stacks of linked list code :)
As always we offer a heart-felt "Thank you!" to everyone who has encouraged us along the way. To those of you who worked with Phaser during its various incarnations. The number of games being released that were made with Phaser is staggering and we really love to see how you use it! You are our heroes. It's your kind words and enthusiasm that has keeps us going.
Phaser is everything we ever wanted from an HTML5 game framework. It powers all of our client work in build today and remains our single most important product, and we've still only just scratched the surface of what we have planned for it.
![MiniCybernoid](http://www.photonstorm.com/wp-content/uploads/2013/10/phaser-cybernoid-640x480.png)
Getting Started Guide
---------------------
We have a new [Getting Started Guide](http://phaser.io/getting-started-js.php) which covers all you need to begin developing games with Phaser. From setting up a web server to picking an IDE. If you're new to HTML5 game development (or are coming from another language like AS3) then we recommend starting there.
Help Test 2.0
-------------
Originally we were going to release Phaser 1.2 next, however after working solidly on it for a while we realise it's such a large and API breaking/changing update that we need to ste-up the version to 2.0 to avoid any possible confusion. Progress has been rapid and we'd love for you to help test it. You'll notice a new [1.2 branch](https://github.com/photonstorm/phaser/tree/1.2) on github - we're going to keep the branch name as 1.2 as we're nearly at the end of development now, but please understand this is what will actually be the 2.0 release.
Please help test out 1.2/2.0 as much as you can. It features the brand new Pixi 1.5 internally as well as nearly complete integration with p2.js for all physics (dropping ArcadePhysics entirely). New versions are being pushed several times a day, so be sure to update and pull often. Don't expect to just run old games right under it yet, but please do check out the new tests, experiment and poke it around as much as you can - thank you!
Getting Started Guides
----------------------
We have a new [Getting Started Guide](http://phaser.io/getting-started-js.php) which covers all you need to begin developing games with Phaser. From setting up a web server to picking an IDE. If you're new to HTML5 game development, or are coming from another language like AS3, then we recommend starting there.
There is a comprehensive [How to Learn Phaser](http://gamedevelopment.tutsplus.com/articles/how-to-learn-the-phaser-html5-game-engine--gamedev-13643) guide on the GameDevTuts+ site which is a great place to learn where to find tutorials, examples and support.
There is also an [un-official Getting Started Guide](http://www.antonoffplus.com/coding-an-html5-game-for-30-minutes-or-an-introduction-to-the-phaser-framework).
Change Log
----------
Version 1.1.3 - "Arafel" - November 29th 2013
Version 1.1.6 - "Shienar" - 24th February 2014
* New: Added a .jshintrc so contributions can be run through JSHint to help retain formatting across the library (thanks kevinthompson)
* New: The entire Phaser library has been updated to match the new JSHint configuration.
* New: Added a new in-built texture. Sprites now use __default if no texture was provided (a 32x32 transparent PNG) or __missing if one was given but not found (a 32x32 black box with a green cross through it)
* New: Phaser.Filter. A new way to use the new WebGL shaders/filters that the new version of Pixi supports.
* New: Phaser.BitmapData object. A Canvas you can freely draw to with lots of functions. Can be used as a texture for Sprites. See the new examples and docs for details.
* New: Loader can now load JavaScript files. Just use game.load.script('key', 'url') - the file will be turned into a script tag in the document head on successful load.
* New: RenderTexture.render now takes a Phaser.Group. Also added renderXY for when you don't want to make a new Point object.
* New: Physics.overlap now supports Sprites, Groups or Emitters and can perform group vs. group (etc) overlap checks with a custom callback and process handler.
* New: Added Sound.externalNode which allows you to connect a Sound to an external node input rather than the SoundManager gain node.
* New: Added SoundManager.connectToMaster boolean. Used in conjunction with Sound.externalNode you can easily configure audio nodes to connect together for special effects.
* New: PluginManager.remove, added PluginManager.removeAll (thanks crazysam)
* New: scrollFactorX/scrollFactorY have been added to TilemapLayers (thanks jcd-as)
* New: Phaser.Game parent can now be an HTMLElement or a string (thanks beeglebug)
* New: Now using the latest version of Pixi.js. Which means you can use all the sexy new WebGL filters :)
* New: Sprite.animations.getAnimation will return an animation instance which was added by name.
* New: Added Mouse.button which is set to the button that was pressed: Phaser.Mouse.LEFT_BUTTON, MIDDLE_BUTTON or RIGHT_BUTTON (thanks wKLV)
* New: Added Mouse.pointerLock signal which you can listen to whenever the browser enters or leaves pointer lock mode.
* New: StageScaleMode.forceOrientation allows you to lock your game to one orientation and display a Sprite (i.e. a "please rotate" screen) when incorrect.
* New: World.visible boolean added, toggles rendering of the world on/off entirely.
* New: Polygon class & drawPolygon method added to Graphics (thanks rjimenezda)
* New: Added Group.iterate, a powerful way to count or return children that match a certain criteria. Refactored Group to use iterate, lots of repeated code cut.
* New: Added Group.sort. You can now sort the Group based on any given numeric property (x, y, health), finally you can do depth-sorting :) Example created to show.
* New: Enhanced renderTexture so it can accept a Phaser.Group object and improved documentation and examples.
* New: Device.littleEndian boolean added. Only safe to use if the browser supports TypedArrays (which IE9 doesn't, but nearly all others do)
* New: You can now call game.sound.play() and simply pass it a key. The sound will play if the audio system is unlocked and optionally destroy itself on complete.
* New: Mouse.capture is a boolean. If set to true then DOM mouse events will have event.preventDefault() applied, if false they will propogate fully.
* New: The object returned by Math.sinCosGenerator now contains a length property.
New Examples:
* Updated: Lots of documentation fixes and updates across nearly all files. Tilemap now documented for example and lots of instances of 'Description' filled out.
* Updated: ArcadePhysics.updateMotion applies the dt to the velocity calculations as well as position now (thanks jcs)
* Updated: RequestAnimationFrame now retains the callbackID which is passed to cancelRequestAnimationFrame.
* Updated: Button now goes back to over state when setFrames used in action (thanks beeglebug)
* Updated: plugins now have a postUpdate callback (thanks cocoademon)
* Updated: Tided up the Graphics object (thanks BorisKozo)
* Updated: If running in Canvas mode and you have a render function it will save the context and reset the transform before running your render function.
* Updated: Sprite will now check the exists property of the Group it is in, if the Group.exists = false the Sprite won't update.
* Updated: If you specify 'null' as a Group parent it will now revert to using the World as the parent (before only 'undefined' worked)
* Updated: Skip preupdate/update for PIXI hierarchies in which an ancestor doesn't exist (thanks cocoademon)
* Updated: Loader.audio can now accept either an array of URL strings or a single URL string (thanks crazysam + kevinthompson)
* Updated: MSPointer updated to support IE11 by dropping the prefix from the event listeners.
* Updated: Device.cocoonJS added to detect if the game is running under Cocoon or a native browser.
* Updated: Loader now uses a new queue system internally, meaning you can have assets with the same key spread across different types.
* Added lovely new little mini golf game by jpcloud.
* Fixed: Lots of fixes to the TypeScript definitions file (many thanks gltovar)
* Fixed: Tilemap commands use specified layer when one given (thanks Izzimach)
* Fixed: Mouse.stop now uses the true useCapture, which means the event listeners stop listening correctly (thanks beeglebug)
* Fixed: Input Keyboard example fix (thanks Atrodilla)
* Fixed: BitmapText.destroy now checks if it has a canvas before calling parentNode on it.
* Fixed: Group.swap had a hellish to find bug that only manifested when B-A upward swaps occured. Hours of debugging later = bug crushed.
* Fixed: Point.rotate asDegrees fixed (thanks BorisKozo)
* Fixed: ArcadePhysics.separateTile wasn't returning the value, so the custom process callback wasn't getting called (thanks flameiguana)
* Fixed: StageScaleMode.forceOrientation now correctly stores the forcePortrait value (thanks haden)
* Fixed: Fixes to Math and Loader (thanks theJare)
* Fixed: Tween - isRunning not reset when non-looped tween completes (thanks crazysam + kevinthompson)
* Fixed: Math.normalizeAngle and Math.wrapAngle (thanks theJare)
* Fixed: Device.isTouch modified to test maxTouchPointers instead of MSPointer.
* Fixed: InputHandler.checkPointerOver now checks the visible status of the Sprite Group before processing.
* Fixed: The Sprite hulls (used for tile collision) were not being updated in sprite->sprite separations (thanks jcs)
* Fixed: Plugins that had a postUpdate but no Update weren't being marked as active (thanks crazysam)
* Fixed: StateManager.onPausedCallback function is not called when the game is paused (thanks haden)
* Fixed: Fix for 'jitter' in scrolling where tilemaps & sprites are one frame off (thanks jcs)
You can view the complete Change Log for all previous versions at https://github.com/photonstorm/phaser/changelog.md
Updates:
* Loader can now load JSON files natively (thanks lucas)
* TilemapParser now errors if the tileset isn't the right size
Bug Fixes:
* Updated Physics.Body.applyDamping so that velocity is reduced down to zero properly (thanks caezs)
* ArcadePhysics.collideSpriteVsTilemapLayer wouldn't call the process or collide callbacks if only 1 tile was involved in the check (thanks mandarinx)
* Lots of documentation fixes (thanks nhowell)
* Fix for PixiPatch so it renders masks again (thanks georgios)
* Modified ArcadePhysics.intersects so it returns a value as well as asigns (thanks bunnyhero)
* Lots of TypeScript defs fixes (thanks clark)
See the full Change Log for all the 1.1.4 and 1.1.5 updates and API changes (as there were a lot of them!)
You can view the Change Log for all previous versions at https://github.com/photonstorm/phaser/changelog.md
How to Build
------------
@@ -116,8 +104,37 @@ We also provide a Grunt script that will build Phaser from source along with all
Run `grunt` in the phaser folder for a list of command-line options.
Koding
------
You can [![clone the Phaser repo in Koding](http://learn.koding.com/btn/clone_d.png)][koding] and then start editing and previewing code right away using their web based VM development system.
Bower
-----
If you use bowser you can install phaser with:
`bower install phaser`
Nice and easy :)
![Tanks](http://www.photonstorm.com/wp-content/uploads/2013/10/phaser_tanks-640x480.png)
CDNJS
-----
Thanks to a community member Phaser is now available on [CDNJS](http://cdnjs.com). You can include the following in your html:
`http://cdnjs.cloudflare.com/ajax/libs/phaser/1.1.5/phaser.min.js`
Or if you prefer you can leave the protocol off, so it works via http and https:
`//cdnjs.cloudflare.com/ajax/libs/phaser/1.1.5/phaser.min.js`
Requirements
------------
@@ -125,22 +142,41 @@ Games created with Phaser require a modern web browser that supports the canvas
For developing with Phaser you can use either a plain-vanilla JavaScript approach or [TypeScript](https://typescript.codeplex.com/) using the provided TypeScript definitions file. We made no assumptions about how you like to code your games, and were careful not to impose any form of class/inheritance/structure upon you.
Phaser is 281 KB minified and 66 KB gzipped.
Phaser is 321 KB minified and 72 KB gzipped.
Learn By Example
----------------
Phaser comes with an ever growing suite of Examples. Personally I feel that we learn better by looking at small refined code examples, so we created over 200 of them and create new ones to test every new feature added. Inside the `examples` folder you'll find the current set. If you write a particularly good example then please send it to us.
The examples need to be run through a local web server (in order to avoid file access permission errors from your browser). You can use your own web server, or start the included web server using grunt.
Using a locally installed web server browse to the examples folder:
examples/index.html
Alternatively in order to start the included web server, after you've cloned the repo, run `npm install` to install all dependencies, then `grunt connect` to start a local server. After running this command you should be able to access your local webserver at `http://127.0.0.1:8000`. Then browse to the examples folder: `http://127.0.0.1:8000/examples/index.html`
There is a new 'Side View' example viewer as well. This loads all the examples into a left-hand frame for faster navigation.
You can also browse all [Phaser Examples](http://gametest.mobi/phaser/) online.
Features
--------
**WebGL &amp; Canvas**
Phaser uses both a Canvas and WebGL renderer internally and can automatically swap between them based on browser support. This allows for lightning fast rendering across Desktop and Mobile. Phaser uses and contributes towards the excellent Pixi.js library for rendering.
Phaser uses both a Canvas and WebGL renderer internally and can automatically swap between them based on browser support. This allows for lightning fast rendering across Desktop and Mobile. When running under WebGL Phaser now supports shaders, allowing for some incredible in-game effects. Phaser uses and contributes towards the excellent Pixi.js library for rendering.
**Preloader**
We've made the loading of assets as simple as one line of code. Images, Sounds, Sprite Sheets, Tilemaps, JSON data, XML - all parsed and handled automatically, ready for use in game and stored in a global Cache for Sprites to share.
We've made the loading of assets as simple as one line of code. Images, Sounds, Sprite Sheets, Tilemaps, JSON data, XML and JavaScrtip files - all parsed and handled automatically, ready for use in game and stored in a global Cache for Sprites to share.
**Physics**
Phaser ships with our Arcade Physics system. An extremely light-weight AABB physics library perfect for low-powered devices and fast collision response. Control velocity, acceleration, bounce, drag and full collision and separation control.
Phaser ships with our Arcade Physics system. A SAT based collision and physics library perfect for low-powered devices and fast collision response. Control velocity, acceleration, bounce, damping and full collision and separation control. As of version 1.1.4 we now support rectangles, circles and polygon collision with full rotation.
**Sprites**
@@ -193,81 +229,84 @@ We use Phaser every day on our many client projects. As a result it's constantly
**Battle Tested**
Although Phaser 1.0 is a brand new release it is born from years of experience building some of the biggest HTML5 games out there. We're not saying it is 100% bug free, but we use it for our client work every day, so issues get resolved <em>fast</em> and we stay on-top of the changing browser landscape.
Although Phaser 1.0 is a brand new release it is born from years of experience building some of the biggest mobile HTML5 games out there. We're not saying it is 100% bug free, but we use it for our client work every day, so issues get resolved <em>fast</em> and we stay on-top of the changing browser landscape.
![FruitParty](http://www.photonstorm.com/wp-content/uploads/2013/10/phaser_fruit_particles-640x480.png)
Road Map
--------
The 1.1 release was a massive under-taking, but we're really happy with how Phaser is progressing. It's becoming more solid and versatile with each iteration. Here is what's on our road map for future versions:
Here is what's on our road map for the coming months:
Version 1.1.4 ("Kandor")
March 2014 will see Phaser 2.0 ("Aes Sedai") Released. The new features and fixes already implemented are vast, and include:
* Update to Pixi 1.5 - this newly released build has lots of internal changes and new features we want to take advantage of.
* Integration of the p2.js physics system and removal of the old ArcadePhysics. Full body dynamics are go!
* Better CocoonJS packaging features (screencanvas, audio checks, etc)
* Fixed width bitmap font support, plus enhanced Bitmap font rendering.
* Significantly optimised render and update loops. We're seeing significant fps improvements across the board.
* Literally hundreds of bug fixes across all core classes.
Beyond version 2.0 here are some of the features planned for the future:
Version 2.1 ("Shienar")
* Enhance the State Management, so you can perform non-destructive State swaps and persistence.
* More advanced tile map features. Better support for advanced Tiled features. Proper support for DAME tilemaps.
Versions 1.2 ("Saldaea")
* Integration with an advanced physics system. We've been experimenting with p2.js but have yet to conclude our research.
* A more advanced Particle system, one that can render to a single canvas (rather than spawn hundreds of Sprites), more advanced effects, etc.
Version 1.2+
* Massively enhance the audio side of Phaser. Although it does what it does well, it could do with taking more advantage of Web Audio - echo effects, positional sound, etc.
* Comprehensive testing across Firefox OS devices, CocoonJS and Ejecta.
* Integration with third party services like Google Play Game Services and Amazon JS SDK.
* Ability to control DOM elements from the core game and layer them into the game.
* Touch Gestures.
* Virtual d-pad support and also support for the Joypad API.
* Test out packaging with Node-webkit.
* Support for parallel asset loading.
Version 2.2 ("Tarabon")
* Comprehensive testing across Firefox OS devices, CocoonJS and Ejecta.
* Integration with third party services like Google Play Game Services and Amazon JS SDK.
* Flash CC HTML5 export integration.
* Massively enhance the audio side of Phaser. Take more advantage of Web Audio: echo effects, positional sound, etc.
Beyond version 2.2
* Test out packaging with Node-webkit.
* Game parameters stored in Google Docs.
* Add a d-pad example (http://www.html5gamedevs.com/topic/1574-gameinputondown-question/)
* Create more touch input examples (http://www.html5gamedevs.com/topic/1556-mobile-touch-event/)
* Look at HiDPI Canvas settings.
* Multiple Camera support.
* DragonBones support.
Learn By Example
----------------
Phaser comes with an ever growing suite of Examples. Personally I feel that we learn better by looking at small refined code examples, so we created over 150 of them and create new ones to test every new feature added. Inside the `examples` folder you'll find the current set. If you write a particularly good example then please send it to us.
The examples need to be run through a local web server (in order to avoid file access permission errors from your browser). You can use your own web server, or start the included web server using grunt.
Using a locally installed web server browse to the examples folder:
examples/index.html
Alternatively in order to start the included web server, after you've cloned the repo, run `npm install` to install all dependencies, then `grunt connect `to start a local server. After running this command you should be able to access your local webserver at `http://127.0.0.1:8000`. Then browse to the examples folder: `http://127.0.0.1:8000/examples/index.html`
There is a new 'Side View' example viewer as well. This loads all the examples into a left-hand frame for faster navigation.
You can also browse all [Phaser Examples](http://gametest.mobi/phaser/) online.
Contributing
------------
If you find a bug (highly likely!) then please report it on github or our forum.
We now have a full [Contributors Guide][contribute] which goes into the process in more detail, but here are the headlines:
If you have a feature request, or have written a small game or demo that shows Phaser in use, then please get in touch. We'd love to hear from you.
- If you find a bug then please report it on [GitHub Issues][issues] or our [Support Forum][forum].
You can do this on the Phaser board that is part of the [HTML5 Game Devs forum](http://www.html5gamedevs.com/forum/14-phaser/) or email: rich@photonstorm.com
- If you have a feature request, or have written a game or demo that shows Phaser in use, then please get in touch. We'd love to hear from you! Either post to our [forum][forum] or email: rich@photonstorm.com
- If you issue a Pull Request for Phaser, please only do so againt the `dev` branch and *not* against the `master` branch.
- Before submitting a Pull Request please run your code through [JSHint](http://www.jshint.com/) to check for stylistic or formatting errors. To use JSHint, first install it by running `npm install jshint`, then test your code by running `jshint src`. This isn't a strict requirement and we are happy to receive Pull Requests that haven't been JSHinted, so don't let it put you off contributing, but do know that we'll reformat your source before going live with it.
Before submitting a pull request, please run your code through [JSHint](http://www.jshint.com/) to check for stylistic or formatting errors. To use JSHint, first install it by running `npm install jshint`, then test your code by running `jshint src`. This isn't a requirement, we are happy to receive pull requests that haven't been JSHinted, so don't let it put you off contributing - but do know that we'll reformat your source before going live with it.
Bugs?
-----
Please add them to the [Issue Tracker][1] with as much info as possible, especially source code demonstrating the issue.
Please add them to the [Issue Tracker][issues] with as much info as possible, especially source code demonstrating the issue.
![Phaser Tilemap](http://www.photonstorm.com/wp-content/uploads/2013/04/phaser_tilemap_collision.png)
"Being negative is not how we make progress" - Larry Page, Google
License
-------
Phaser is released under the (http://opensource.org/licenses/MIT) MIT License.
Phaser is released under the [MIT License](http://opensource.org/licenses/MIT).
[1]: https://github.com/photonstorm/phaser/issues
[issues]: https://github.com/photonstorm/phaser/issues
[contribute]: https://github.com/photonstorm/phaser/blob/master/CONTRIBUTING.md
[phaser]: https://github.com/photonstorm/phaser
[forum]: http://www.html5gamedevs.com/forum/14-phaser/
[koding]: https://koding.com/Teamwork?import=https://github.com/photonstorm/phaser/archive/master.zip&c=git1
[![Analytics](https://ga-beacon.appspot.com/UA-44006568-2/phaser/index)](https://github.com/igrigorik/ga-beacon)
+37
View File
@@ -0,0 +1,37 @@
{
"name": "phaser",
"version": "1.1.5",
"homepage": "http://phaser.io",
"authors": [
"photonstorm <rich@photonstorm.com>"
],
"description": "A fun, free and fast 2D game framework for making HTML5 games for desktop and mobile, supporting Canvas and WebGL.",
"main": "build/phaser.min.js",
"keywords": [
"html5",
"game",
"games",
"framework",
"canvas",
"WebGL",
"tilemaps",
"physics",
"sprites",
"fonts",
"images",
"audio",
"Web",
"Audio",
"touch",
"input",
"mobile"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
+3
View File
@@ -1,4 +1,7 @@
<?php
// NOTE: This script is deprecated. The build process is managed by grunt now.
// Keeping this file here for those that I know use it, but if you're trying to build fresh, use grunt.
date_default_timezone_set('Europe/London');
// Get the version number
+84 -78
View File
@@ -1,12 +1,12 @@
<?php
// All JS files in build order.
// Much easier for debugging re: line numbers
if (!isset($path))
{
$path = '..';
}
// All JS files in build order.
// Much easier for debugging re: line numbers
if (!isset($path))
{
$path = '..';
}
echo <<<EOL
echo <<<EOL
<script src="$path/src/Intro.js"></script>
<script src="$path/src/pixi/Pixi.js"></script>
@@ -55,91 +55,97 @@
<script src="$path/src/pixi/utils/EventTarget.js"></script>
<script src="$path/src/pixi/utils/Polyk.js"></script>
<script src="$path/src/core/Camera.js"></script>
<script src="$path/src/core/State.js"></script>
<script src="$path/src/core/StateManager.js"></script>
<script src="$path/src/core/LinkedList.js"></script>
<script src="$path/src/core/Signal.js"></script>
<script src="$path/src/core/SignalBinding.js"></script>
<script src="$path/src/core/Filter.js"></script>
<script src="$path/src/core/Plugin.js"></script>
<script src="$path/src/core/PluginManager.js"></script>
<script src="$path/src/core/Stage.js"></script>
<script src="$path/src/core/Group.js"></script>
<script src="$path/src/core/World.js"></script>
<script src="$path/src/core/Game.js"></script>
<script src="$path/src/core/Camera.js"></script>
<script src="$path/src/core/State.js"></script>
<script src="$path/src/core/StateManager.js"></script>
<script src="$path/src/core/LinkedList.js"></script>
<script src="$path/src/core/Signal.js"></script>
<script src="$path/src/core/SignalBinding.js"></script>
<script src="$path/src/core/Filter.js"></script>
<script src="$path/src/core/Plugin.js"></script>
<script src="$path/src/core/PluginManager.js"></script>
<script src="$path/src/core/Stage.js"></script>
<script src="$path/src/core/Group.js"></script>
<script src="$path/src/core/World.js"></script>
<script src="$path/src/core/Game.js"></script>
<script src="$path/src/input/Input.js"></script>
<script src="$path/src/input/Key.js"></script>
<script src="$path/src/input/Keyboard.js"></script>
<script src="$path/src/input/Mouse.js"></script>
<script src="$path/src/input/MSPointer.js"></script>
<script src="$path/src/input/Pointer.js"></script>
<script src="$path/src/input/Touch.js"></script>
<script src="$path/src/input/InputHandler.js"></script>
<script src="$path/src/input/Input.js"></script>
<script src="$path/src/input/Key.js"></script>
<script src="$path/src/input/Keyboard.js"></script>
<script src="$path/src/input/Mouse.js"></script>
<script src="$path/src/input/MSPointer.js"></script>
<script src="$path/src/input/Pointer.js"></script>
<script src="$path/src/input/Touch.js"></script>
<script src="$path/src/input/Gamepad.js"></script>
<script src="$path/src/input/SinglePad.js"></script>
<script src="$path/src/input/GamepadButton.js"></script>
<script src="$path/src/input/InputHandler.js"></script>
<script src="$path/src/gameobjects/Events.js"></script>
<script src="$path/src/gameobjects/GameObjectFactory.js"></script>
<script src="$path/src/gameobjects/BitmapData.js"></script>
<script src="$path/src/gameobjects/Sprite.js"></script>
<script src="$path/src/gameobjects/TileSprite.js"></script>
<script src="$path/src/gameobjects/Text.js"></script>
<script src="$path/src/gameobjects/BitmapText.js"></script>
<script src="$path/src/gameobjects/Button.js"></script>
<script src="$path/src/gameobjects/Graphics.js"></script>
<script src="$path/src/gameobjects/RenderTexture.js"></script>
<script src="$path/src/gameobjects/Events.js"></script>
<script src="$path/src/gameobjects/GameObjectFactory.js"></script>
<script src="$path/src/gameobjects/BitmapData.js"></script>
<script src="$path/src/gameobjects/Sprite.js"></script>
<script src="$path/src/gameobjects/TileSprite.js"></script>
<script src="$path/src/gameobjects/Text.js"></script>
<script src="$path/src/gameobjects/BitmapText.js"></script>
<script src="$path/src/gameobjects/Button.js"></script>
<script src="$path/src/gameobjects/Graphics.js"></script>
<script src="$path/src/gameobjects/RenderTexture.js"></script>
<script src="$path/src/system/Canvas.js"></script>
<script src="$path/src/system/StageScaleMode.js"></script>
<script src="$path/src/system/Device.js"></script>
<script src="$path/src/system/RequestAnimationFrame.js"></script>
<script src="$path/src/system/Canvas.js"></script>
<script src="$path/src/system/StageScaleMode.js"></script>
<script src="$path/src/system/Device.js"></script>
<script src="$path/src/system/RequestAnimationFrame.js"></script>
<script src="$path/src/math/RandomDataGenerator.js"></script>
<script src="$path/src/math/Math.js"></script>
<script src="$path/src/math/QuadTree.js"></script>
<script src="$path/src/math/RandomDataGenerator.js"></script>
<script src="$path/src/math/Math.js"></script>
<script src="$path/src/math/QuadTree.js"></script>
<script src="$path/src/geom/Circle.js"></script>
<script src="$path/src/geom/Point.js"></script>
<script src="$path/src/geom/Rectangle.js"></script>
<script src="$path/src/geom/Circle.js"></script>
<script src="$path/src/geom/Point.js"></script>
<script src="$path/src/geom/Rectangle.js"></script>
<script src="$path/src/geom/Line.js"></script>
<script src="$path/src/net/Net.js"></script>
<script src="$path/src/net/Net.js"></script>
<script src="$path/src/tween/TweenManager.js"></script>
<script src="$path/src/tween/Tween.js"></script>
<script src="$path/src/tween/Easing.js"></script>
<script src="$path/src/tween/TweenManager.js"></script>
<script src="$path/src/tween/Tween.js"></script>
<script src="$path/src/tween/Easing.js"></script>
<script src="$path/src/time/Time.js"></script>
<script src="$path/src/time/Timer.js"></script>
<script src="$path/src/time/Time.js"></script>
<script src="$path/src/time/Timer.js"></script>
<script src="$path/src/time/TimerEvent.js"></script>
<script src="$path/src/animation/AnimationManager.js"></script>
<script src="$path/src/animation/Animation.js"></script>
<script src="$path/src/animation/Frame.js"></script>
<script src="$path/src/animation/FrameData.js"></script>
<script src="$path/src/animation/AnimationParser.js"></script>
<script src="$path/src/animation/AnimationManager.js"></script>
<script src="$path/src/animation/Animation.js"></script>
<script src="$path/src/animation/Frame.js"></script>
<script src="$path/src/animation/FrameData.js"></script>
<script src="$path/src/animation/AnimationParser.js"></script>
<script src="$path/src/loader/Cache.js"></script>
<script src="$path/src/loader/Loader.js"></script>
<script src="$path/src/loader/LoaderParser.js"></script>
<script src="$path/src/loader/Cache.js"></script>
<script src="$path/src/loader/Loader.js"></script>
<script src="$path/src/loader/LoaderParser.js"></script>
<script src="$path/src/sound/Sound.js"></script>
<script src="$path/src/sound/SoundManager.js"></script>
<script src="$path/src/sound/Sound.js"></script>
<script src="$path/src/sound/SoundManager.js"></script>
<script src="$path/src/utils/Debug.js"></script>
<script src="$path/src/utils/Color.js"></script>
<script src="$path/src/utils/Debug.js"></script>
<script src="$path/src/utils/Color.js"></script>
<script src="$path/src/physics/arcade/ArcadePhysics.js"></script>
<script src="$path/src/physics/arcade/Body.js"></script>
<script src="$path/src/physics/arcade/SAT.js"></script>
<script src="$path/src/physics/arcade/ArcadePhysics.js"></script>
<script src="$path/src/physics/arcade/Body.js"></script>
<script src="$path/src/particles/Particles.js"></script>
<script src="$path/src/particles/arcade/ArcadeParticles.js"></script>
<script src="$path/src/particles/arcade/Emitter.js"></script>
<script src="$path/src/particles/Particles.js"></script>
<script src="$path/src/particles/arcade/ArcadeParticles.js"></script>
<script src="$path/src/particles/arcade/Emitter.js"></script>
<script src="$path/src/tilemap/Tile.js"></script>
<script src="$path/src/tilemap/Tilemap.js"></script>
<script src="$path/src/tilemap/TilemapLayer.js"></script>
<script src="$path/src/tilemap/TilemapParser.js"></script>
<script src="$path/src/tilemap/Tileset.js"></script>
<script src="$path/src/PixiPatch.js"></script>
<script src="$path/src/tilemap/Tile.js"></script>
<script src="$path/src/tilemap/Tilemap.js"></script>
<script src="$path/src/tilemap/TilemapLayer.js"></script>
<script src="$path/src/tilemap/TilemapParser.js"></script>
<script src="$path/src/tilemap/Tileset.js"></script>
<script src="$path/src/PixiPatch.js"></script>
EOL;
?>
+2728 -1803
View File
File diff suppressed because it is too large Load Diff
+13701 -7782
View File
File diff suppressed because it is too large Load Diff
+13 -12
View File
File diff suppressed because one or more lines are too long
+313 -8
View File
@@ -1,7 +1,274 @@
Change Log
----------
==========
Version 1.1.5 - "Saldaea" - 12th February 2014
----------------------------------------------
Bug Fixes:
* Explicitly paused Timer continues if you un-focus and focus the browser window (thanks georgiee)
* Added TimerEvent.pendingDelete and checks in Timer.update, so that removing an event in a callback no longer throws an exception (thanks georgiee)
* Fixed TypeScript defs on lines 1741-1748 (thanks wombatbuddy)
* Added SAT.js to TypeScript definition. Now compiles properly.
* Added missing Line.js to the Grunt file.
* Tilemap#paste diffX and diffY equations changed, fixed issue #393 (thanks brejep)
* Added missing return value in Body.hitLeft and hitRight, fixes issue #398 (thanks ram64).
* Fixed easing tween example case. Issue #379 (thanks wesleywerner)
* Removed SAT.js UMD wrapped, fixes issue #361 (thanks luizbills)
* Removed inContact check from Body.separate.
* Fixed Tilemap docs (wrongly pointed to Tileset methods)
Version 1.1.4 - "Kandor" - February 5th 2014
--------------------------------------------
Significant API changes:
* Loader.tileset has been removed as it's no longer required, this was as part of the Tilemap system overhaul.
* TilemapLayers are now created via the Tilemap object itself: map.createLayer(x, y, width, height, tileset, layer, group) and no longer via the GameObjectFactory.
* Tilemap.createFromObjects can now turn a bunch of Tiled objects into Sprites in one single call, and copies across all properties as well.
* Tween.onStartCallback and onCompleteCallback have been removed to avoid confusion. You should use the onStart, onLoop and onComplete events instead.
* Button.forceOut default value has changed from true to false, so Buttons will revert to an Up state (if set) when pressed and released.
* The way the collision process callback works has changed significantly and now works as originally intended.
* The World level quadtree is no longer created, they are now built and ripped down each time you collide a Group, this helps collision accuracy.
* A SAT system has been integrated for Body collision and separation.
* Bodies are no longer added to a world quadtree, so have had all of their quadtree properties removed such as skipQuadtree, quadTreeIndex, etc.
* Body.drag has been removed. Please use the new Body.linearDamping value instead (which is a number value, not a Point object)
* Body.embedded and Body.wasTouching have been removed as they are no longer required.
* Body.customSeparateX/Y have been removed as you should now use Body.customSeparateCallback.
* Body.maxVelocity defaults have been removed from 10,000 to 2000.
* Body.customSeparateCallback allows you to set your own callback when two Bodies need to separate rather than using the built-in method.
* Body.collideCallback allows you to set a callback that is fired whenever the Body is hit on any of its active faces.
* Body.allowCollision has been renamed to Body.checkCollision.
* Body.rebound is a boolean that controls if a body will exchange velocity on collision. Set to false to allow it to be 'pushed' (see new examples).
* Removed Body.deltaAbsX and deltaAbsY as they are no longer used internally.
* Body.screenX and screenY moved to getters, no longer calculated every frame.
* ArcadePhysics now has setBounds and setBoundsToWorld, and you can specify which walls are created or not (left, right, up, down)
* Removed: Debug.renderSpriteTouching, Debug.renderLocalTransformInfo, Debug.renderWorldTransformInfo, Debug.renderSpriteCollision and Debug.dumpLinkedList.
* Body.setSize has been removed. Please use Body.setCircle, setRectangle or setPolygon instead.
New features:
* Phaser.Timer is now feature complete and fully documented. You can create Phaser.TimerEvents on a Timer and lots of new examples have been provided.
* Gamepad API support has been added with lots of new examples (thanks Karl Macklin)
* Phaser.Game constructor can now be passed a single object containing all of your game settings + Stage settings. Useful for advanced configurations.
* The width/height given to Phaser.Game can now be percentages, i.e. "100%" will set the width to the maximum window innerWidth.
* Added a stage.fullScreenScaleMode property to determine scaling when fullscreen (thanks oysterCrusher)
* Added support for margin and spacing around a frame in Loader.spritesheet.
* Added Device.vibration to check if the Vibration API is available or not.
* Added Device.trident and Device.tridentVersion for testing IE11.
* Added Device.silk for detecting a Kindle Fire and updated desktop OS check to exclude Kindles (thanks LuckieLordie)
* TilemapLayers now have debug and debugAlpha values, this turns on the drawing of the collision edges (very handy for debugging, as the name implies!)
* Tweens have a new event: onLoop.
* You can now load any binary file via the Loader: game.load.binary(key, url, callback) - the optional callback allows for post-load processing before entering the Cache.
* Group.set will let you deep set a new propery on a single child of the Group.
* Stage.display property added. A direct reference to the root Pixi Stage object (very useful for RenderTexture manipulation)
* Added Ejecta detection to Device (thanks endel)
* Tweens can now work with relative + and - values. You can do: `tween(sprite).to( { x: '+400' })` and it will add 400 to the current sprite.x value.
* Buttons now properly use their upFrame if set.
* InputHandler now has snapOffsetX and snapOffsetY properties so your snap grid doesn't have to be 0,0 aligned (thanks srmeier)
* Loader.progressFloat contains the actual non-rounded progress value, where-as Loader.progress contains a rounded value. Use progressFloat if you've > 100 files to load.
* Groups can now be added to other Groups as children via group.add() and group.addAt()
* Groups now have an 'alive' property, which can be useful when iterating through child groups with functions like forEachAlive.
* Added a new Project Template "Full Screen Mobile" which you can find in the resources folder. Contains html / css / layout needed for a deployed Phaser game.
* Body.speed - the current speed of the body.
* Body.angle - the current angle the Body is facing based on its velocity. This is not the same as the Sprite angle that may own the body.
* Body.linearDamping - This now replaces Body.drag and provides for a much smoother damping (friction) experience.
* Body.minBounceVelocity - If a Body has bounce set, this threshold controls if it should rebound or not. Use it to stop 'jittering' on bounds/tiles with super-low velocities.
* QuadTree.populate - you can pass it a Group and it'll automatically insert all of the children ready for inspection.
* Input.setMoveCallback allows you to set a callback that will be fired each time the activePointer receives a DOM move event.
* Math.distancePow(x1,y1,x2,y2,power) returns the distance between two coordinates at the given power.
* Physics.collide now supports the 2nd parameter as an array, for when you want to collide an object against a number of sprites that aren't all in the same Group.
* Physics.overlap now supports the 2nd parameter as an array, for when you want to overlap test an object against a number of sprites that aren't all in the same Group.
* Math.reverseAngle - reverses an angle (in radians).
* Math.normalizeAngle - normalises an angle, now in radians only.
* Math.normalizeLatitude - Normalizes a latitude to the [-90,90] range.
* Math.normalizeLongitude - Normalizes a longitude to the [-180,180] range.
* Phaser.Line added to the geometry classes, with full point on line/segment and intersection tests (see new examples)
* Phaser.CANVAS_PX_ROUND is a boolean. If 'true' the Canvas renderer will Math.floor() all coordinates before drawImage, stopping pixel interpolation. Defaults to false.
* Phaser.CANVAS_CLEAR_RECT is a boolean. If 'true' (the default) it will context.clearRect() every frame. If false this is skipped (useful if you know you don't need it)
* Collision now works between Sprites positioned via sprite.x/y, sprite.body.x/y or sprite.body.velocity.
* If you are tweening a sprite and still want physics collision, set `sprite.body.moves = false` otherwise it will fight against the tween motion.
* Game.enableStep will enable core game loop stepping. When enabled you must call game.step() directly (perhaps via a DOM button?), very useful for debugging!
* Game.disableStep turns core update loop stepping off.
* Debug.renderPhysicsBody(body, color) is extremely useful for debugging the new physics bodies. Will draw the outline + points in the color given.
* Debug.renderBodyInfo(sprite, x, y, color) will display lots of Sprite body data.
* Sprite.events.onBeginContact will be fired when a Body makes contact with another Body. Once contact is over an onEndContact event will be dispatched.
New Examples:
* Physics - Bounce by Patrick OReilly.
* Physics - Bounce with gravity by Patrick OReilly.
* Physics - Bounce accelerator (use the keyboard) by Patrick OReilly.
* Physics - Bounce knock (use the keyboard) by Patrick OReilly.
* Physics - Snake (use the keyboard to control the snake like creature) by Patrick OReilly and Richard Davey.
* Physics - Launcher - Angry Birds style ball launcher demo by Patrick OReilly.
* Physics - Launcher Follow - throw the sprite anywhere in the world by Patrick OReilly.
* Physics - Launcher Follow World - an advanced version of the Launcher Follow example by Patrick OReilly.
* Input - Touch Joystick example showing how to use the clay.io virtual game controller (thanks gabehollombe)
* Games - Matching Pairs by Patrick OReilly.
* Games - Simon Says by Patrick OReilly.
* Tweens - Example showing how to use the tween events, onStart, onLoop and onComplete.
* Display - Pixi Render Texture. A Phaser conversion of the Pixi.js Render Texture example.
* Input - 5 new examples showing how to use the Gamepad API (thanks Karl Macklin)
* Animation - Group Creation, showing how to create animations across all Group children in one call.
* Particles - Rain by Jens Anders Bakke.
* Particles - Snow by Jens Anders Bakke.
* Groups - Nested Groups - showing how to embed one Group into another Group.
* Time - Lots of new examples showing how to use the updated Phaser.Timer class.
Updates:
* Updated to latest Pixi.js dev branch build (pre 1.4 release)
* When a Sprite is destroyed any active filters are removed at the same time.
* Updated Pixi.js so that removing filters now works correctly without breaking the display list.
* Phaser.Canvas.create updated so it can be given an ID as the 3rd parameter (can also be set via new Game configuration object).
* Updated display/fullscreen example to reflect new full screen change.
* Loads of updates to the TypeScript definitions files - games fully compile now and lots of missing classes added :) (thanks Niondir)
* Removed 'null parent' check from Group constructor. Will parent to game.world only if parent value is undefined.
* The tutorials have now been translated into Spanish - thanks feiss :)
* separateY updated to re-implement the 'riding platforms' special condition (thanks cocoademon)
* SoundManager.onSoundDecode now dispatches the key followed by the sound object, also now dispatched by the Cache when doing an auto-decode on load.
* Switch method of using trimmed sprites to support scaling and rotation (thanks cocoademon)
* Most of the GameObjectFactory functions now have a group parameter, so you can do: game.add.sprite(x, y, frame, frameName, group) rather than defaulting to the World group.
* Group.countLiving and countDead used to return -1 if the Group was empty, but now return 0.
* Text can now be fixedToCamera, updated world/fixed to camera example to show this.
* ArcadePhysics.overlap and collide now recognise TileSprites in the collision checks.
* 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)
* Pointer used to un-pause a paused game every time it was clicked/touched (this avoided some rogue browser plugins). Now only happens if Stage.disableVisibilityChange is true.
* Input doesn't set the cursor to default if it's already set to none.
* You can now collide a group against itself. This will check all children against each other, but not themselves (thanks cocoademon)
* RenderTexture.render / renderXY has a new parameter: renderHidden, a boolean which will allow you to render Sprites even if their visible is set to false.
* Added in prototype.constructor definitions to every class (thanks darkoverlordofdata)
* Group.destroy has a new parameter: destroyChildren (boolean) which will optionally call the destroy method of all Group children.
* Button.clearFrames method has been added.
* Device.quirksMode is a boolean that informs you if the page is in strict (false) or quirks (true) mode.
* Canvas.getOffset now runs a strict/quirks check and uses document.documentElement when calculating scrollTop and scrollLeft to avoid Chrome console warnings.
* The Time class now has its own Phaser.Timer which you can access through game.time.events. See the new Timer examples to show how to use them.
* Added StateManager.getCurrentState to return the currently running State object (thanks Niondir)
* Removed the console.log redirect from Utils as it was messing with Firefox.
* Body.acceleration is now much smoother and less eratic at high speeds.
* Removed ArcadePhysics binding to the QuadTree, so it can now be used independantly of the physics system.
* Removed ArcadePhysics.preUpdate and postUpdate as neither are needed any more.
* Body.bottom and Body.right are no longer rounded, so will give accurate sub-pixel values.
* Fixed lots of documentation in the Emitter class.
* The delta timer value used for physics calculations has had its cap limit modified from 1.0 to 0.05 in line with the core updates.
* Phaser.Math.min enhanced so you can now pass in either an array of numbers or lots of numbers as parameters to get the lowest.
* Phaser.Math.max added as the opposite of Math.min.
* Phaser.Math.minProperty and maxProperty added. Like Math.min/max but can be given a property an an array or list of objects to inspect.
* Added 'full' paramter to Body.reset, allowing you to control if motion or all data is reset or not.
* Exposed Group.pivot and Sprite.pivot to allow you to directly set the pivot points for rotation.
* Swapped to using the native and faster Array.isArray check.
* Added callback context parameter to Tween.onUpdateCallback(callback, context) to avoid having to bind or create anonymous functions.
* Updated TweenManager.removeAll so it flags all tweens as pendingDelete rather than nuking the array, to avoid tween callback array size errors (thanks DarkDev)
Bug Fixes:
* Cache.getImageKeys returned __missing in the array, now excluded.
* Fixed Group.scale so you can now scale a Group directly.
* Removed World.scale as it was preventing Group.scale from working - you can still scale the world, but you'll need to factor in Input changes yourself.
* Moved 'dirty' flag for Tilemap to a per-layer flag. Fixes #242
* Group.length now returns the number of children in the Group regardless of their exists/alive state, or 0 if the Group has no children.
* Switch Camera.setBoundsToWorld to match world.bounds instead of world (thanks cocoademon)
* Fixed an issue where passing null as the Group parent wouldn't set it to game.world as it should have (thanks tito100)
* Fixed Pixi bug (#425) incorrect width property for multi-line BitmapText (thanks jcd-as)
* Tween.onStart is now called when the tween starts AFTER the delay value, if given (thanks stevenbouma)
* Sprites that are fixedToCamera can now be input dragged regardless of world position (thanks RafaelOliveira)
* RenderTexture now displays correctly in Canvas games.
* Canvas.addToDOM is now more robust when applying the overflowHidden style.
* Fixed Pixi.StripShader which should stop the weird TileSprite GPU issues some were reporting (thanks GoodboyDigital)
* Patched desyrel.xml so it doesn't contain any zero width/height characters, as they broke Firefox 25.
* Cache.addSound now implements a locked attribute (thanks haden)
* Sound now checks for CocoonJS during playback to avoid readyState clash (thanks haden)
* Buttons now clear previously set frames correctly if you call setFrames.
* Sounds will now loop correctly if they are paused and resumed (thanks haden)
* InputHandler.checkBoundsRect and checkBoundsSprite now take into account if the Sprite is fixedToCamera or not.
* Removed the frame property from TileSprites as it cannot use them, it tiles the whole image only, not just a section of it.
* Fixed WebGLRenderer updateGraphics bug (thanks theadam)
* Removed duplicate Timer.create line (thanks hstolte)
* Fixed issue with the camera being slightly out of sync with 'fixedToCamera' sprites.
* 1px camera jitter issue fixed where map is same size, or smaller than the game size.
Version 1.1.3 - "Arafel" - November 29th 2013
---------------------------------------------
New features:
* Phaser.Filter. A new way to use the new WebGL shaders/filters that the new version of Pixi supports.
* Phaser.BitmapData object. A Canvas you can freely draw to with lots of functions. Can be used as a texture for Sprites. See the new examples and docs for details.
* The entire Phaser library has been updated to match the new JSHint configuration.
* Added a .jshintrc so contributions can be run through JSHint to help retain formatting across the library (thanks kevinthompson)
* Added a new in-built texture. Sprites now use __default if no texture was provided (a 32x32 transparent PNG) or __missing if one was given but not found (a 32x32 black box with a green cross through it)
* Loader can now load JavaScript files. Just use game.load.script('key', 'url') - the file will be turned into a script tag in the document head on successful load.
* RenderTexture.render now takes a Phaser.Group. Also added renderXY for when you don't want to make a new Point object.
* Physics.overlap now supports Sprites, Groups or Emitters and can perform group vs. group (etc) overlap checks with a custom callback and process handler.
* Added Sound.externalNode which allows you to connect a Sound to an external node input rather than the SoundManager gain node.
* Added SoundManager.connectToMaster boolean. Used in conjunction with Sound.externalNode you can easily configure audio nodes to connect together for special effects.
* PluginManager.remove, added PluginManager.removeAll (thanks crazysam)
* scrollFactorX/scrollFactorY have been added to TilemapLayers (thanks jcd-as)
* Phaser.Game parent can now be an HTMLElement or a string (thanks beeglebug)
* Now using the latest version of Pixi.js. Which means you can use all the sexy new WebGL filters :)
* Sprite.animations.getAnimation will return an animation instance which was added by name.
* Added Mouse.button which is set to the button that was pressed: Phaser.Mouse.LEFT_BUTTON, MIDDLE_BUTTON or RIGHT_BUTTON (thanks wKLV)
* Added Mouse.pointerLock signal which you can listen to whenever the browser enters or leaves pointer lock mode.
* StageScaleMode.forceOrientation allows you to lock your game to one orientation and display a Sprite (i.e. a "please rotate" screen) when incorrect.
* World.visible boolean added, toggles rendering of the world on/off entirely.
* Polygon class & drawPolygon method added to Graphics (thanks rjimenezda)
* Added Group.iterate, a powerful way to count or return children that match a certain criteria. Refactored Group to use iterate, lots of repeated code cut.
* Added Group.sort. You can now sort the Group based on any given numeric property (x, y, health), finally you can do depth-sorting :) Example created to show.
* Enhanced renderTexture so it can accept a Phaser.Group object and improved documentation and examples.
* Device.littleEndian boolean added. Only safe to use if the browser supports TypedArrays (which IE9 doesn't, but nearly all others do)
* You can now call game.sound.play() and simply pass it a key. The sound will play if the audio system is unlocked and optionally destroy itself on complete.
* Mouse.capture is a boolean. If set to true then DOM mouse events will have event.preventDefault() applied, if false they will propogate fully.
* The object returned by Math.sinCosGenerator now contains a length property.
Updates:
* Lots of documentation fixes and updates across nearly all files. Tilemap now documented for example and lots of instances of 'Description' filled out.
* ArcadePhysics.updateMotion applies the dt to the velocity calculations as well as position now (thanks jcs)
* RequestAnimationFrame now retains the callbackID which is passed to cancelRequestAnimationFrame.
* Button now goes back to over state when setFrames used in action (thanks beeglebug)
* plugins now have a postUpdate callback (thanks cocoademon)
* Tided up the Graphics object (thanks BorisKozo)
* If running in Canvas mode and you have a render function it will save the context and reset the transform before running your render function.
* Sprite will now check the exists property of the Group it is in, if the Group.exists = false the Sprite won't update.
* If you specify 'null' as a Group parent it will now revert to using the World as the parent (before only 'undefined' worked)
* Skip preupdate/update for PIXI hierarchies in which an ancestor doesn't exist (thanks cocoademon)
* Loader.audio can now accept either an array of URL strings or a single URL string (thanks crazysam + kevinthompson)
* MSPointer updated to support IE11 by dropping the prefix from the event listeners.
* Device.cocoonJS added to detect if the game is running under Cocoon or a native browser.
* Loader now uses a new queue system internally, meaning you can have assets with the same key spread across different types.
Bug Fixes:
* Lots of fixes to the TypeScript definitions file (many thanks gltovar)
* Tilemap commands use specified layer when one given (thanks Izzimach)
* Mouse.stop now uses the true useCapture, which means the event listeners stop listening correctly (thanks beeglebug)
* Input Keyboard example fix (thanks Atrodilla)
* BitmapText.destroy now checks if it has a canvas before calling parentNode on it.
* Group.swap had a hellish to find bug that only manifested when B-A upward swaps occured. Hours of debugging later = bug crushed.
* Point.rotate asDegrees fixed (thanks BorisKozo)
* ArcadePhysics.separateTile wasn't returning the value, so the custom process callback wasn't getting called (thanks flameiguana)
* StageScaleMode.forceOrientation now correctly stores the forcePortrait value (thanks haden)
* Fixes to Math and Loader (thanks theJare)
* Tween - isRunning not reset when non-looped tween completes (thanks crazysam + kevinthompson)
* Math.normalizeAngle and Math.wrapAngle (thanks theJare)
* Device.isTouch modified to test maxTouchPointers instead of MSPointer.
* InputHandler.checkPointerOver now checks the visible status of the Sprite Group before processing.
* The Sprite hulls (used for tile collision) were not being updated in sprite->sprite separations (thanks jcs)
* Plugins that had a postUpdate but no Update weren't being marked as active (thanks crazysam)
* StateManager.onPausedCallback function is not called when the game is paused (thanks haden)
* Fix for 'jitter' in scrolling where tilemaps & sprites are one frame off (thanks jcs)
Version 1.1.2 - November 1st 2013
---------------------------------
* New: You'll now find a complete Basic project Template in the resources/Project Templates folder. Will add more complex ones soon.
* New: Phaser.Button now has the ability to set over/out/up/down sound effects so they play automatically based on those events.
@@ -33,12 +300,16 @@ Version 1.1.2 - November 1st 2013
* Fixed issue 88 - Incorrect game.input.x/y values on click with scaled stage (thanks DrHackenstein)
* Fixed issue 143 - Entering full screen mode made the Input x/y coordinates go wrong.
Version 1.1.1 - October 26th 2013
---------------------------------
* Quick patch to get Phaser.AUTO working again on Firefox / Android.
* Any key added via addKey now automatically adds it to the capture list.
Version 1.1 - October 25th 2013
-------------------------------
What's New:
@@ -164,7 +435,9 @@ What has been fixed:
* Game.destroy will now stop the raf from running as well as close down all input related event listeners (issue 92, thanks astrism)
* Pixel Perfect click detection now works even if the Sprite is part of a texture atlas.
Version 1.0.6 (September 24th 2013)
Version 1.0.6 - September 24th 2013
-----------------------------------
* Added check into Pointer.move to always consider a Sprite that has pixelPerfect enabled, regardless of render ID.
* BUG: The pixel perfect click check doesn't work if the sprite is part of a texture atlas yet.
@@ -180,7 +453,9 @@ Version 1.0.6 (September 24th 2013)
* Added time smoothing to Animation update to help frames hopefully not get too out of sync during long animations with high frame rates.
* Added frame skip to Animation.update. If it gets too far behind it will now skip frames to try and catch up.
Version 1.0.5 (September 20th 2013)
Version 1.0.5 - September 20th 2013
-----------------------------------
* Fixed issue in FrameData.getFrameIndexes where the input array was being ignored.
* Added Math.numberArray - Returns an Array containing the numbers from min to max (inclusive), useful for animation frame construction.
@@ -199,7 +474,9 @@ Version 1.0.5 (September 20th 2013)
* Updated Sprite.update to set renderable to false when the object goes out of Camera, not 'visible' false, otherwise it stops the transform being updated by Pixi.
* BUG: There is a known issue where the wrong rect coordinates are given to the QuadTree if the Sprite is a child of a Group or another Sprite which has an x/y offset.
Version 1.0.4 (September 18th 2013)
Version 1.0.4 - September 18th 2013
-----------------------------------
* Small fix to Phaser.Canvas to stop it from setting overflow hidden if the parent DOM element doesn't exist.
* Added Loader.setPreloadSprite(sprite, direction) - this will automatically apply a crop rect to the Sprite which is updated in line with the load progress.
@@ -210,7 +487,9 @@ Version 1.0.4 (September 18th 2013)
* Fixed issue in Sprite where boundsY wasn't set (thanks Cameron)
* For some reason there were 2 copies of the Canvas class in the build file - fixed, a few KB saved :)
Version 1.0.3 (September 17th 2013)
Version 1.0.3 - September 17th 2013
-----------------------------------
* FrameData.getFrameIndexes and getFrameIndexesByName refactored into a more versatile getFrames function.
* Various fixes to looping parameters in the Sound system.
@@ -218,7 +497,9 @@ Version 1.0.3 (September 17th 2013)
* Optimised AnimationManager.add so it will only get the required frames rather than all of them and is now faster at parsing the frame data.
* Fixed Phaser.Text and Phaser.BitmapText so they now render correctly and added several Text examples.
Version 1.0.2 (September 16th 2013)
Version 1.0.2 - September 16th 2013
-----------------------------------
* Added optional parameter to Animation.stop: resetFrame. If true the animation will be stopped and then the current frame reset to the first frame in the animation.
* Fixed an issue causing 'explode' particle bursts to ignore the quantity parameter.
@@ -230,7 +511,9 @@ Version 1.0.2 (September 16th 2013)
* Added in the start of a Breakout game
* Added in the start of a Platformer game
Version 1.0.1 (September 15th 2013)
Version 1.0.1 - September 15th 2013
-----------------------------------
* Added checks into every Group function to ensure that the Group has children before running them.
* Added optional flag to Group.create which allows you to set the default exists state of the Sprites.
@@ -238,7 +521,9 @@ Version 1.0.1 (September 15th 2013)
* Fixed the license in package.json
* Fixed a logic bug in the separateTileX function that would sometimes cause tunneling of big sprites through small tiles.
Version 0.9.8
-------------
* Massive refactoring across the entire codebase.
* Removed Basic and GameObject and put Sprite on a diet. 127 properties and methods cut down to 32.
@@ -347,6 +632,7 @@ Version 0.9.8
Version 0.9.6
-------------
* Virtually every class now has documentation - if you spot a typo or something missing please shout (thanks pixelpicosean).
* Grunt file updated to produce the new Special FX JS file (thanks HackManiac).
@@ -434,7 +720,9 @@ Version 0.9.6
* Added the GameObjectFactory to Phaser.State
* Added new format parameter to Loader.addTextureAtlas defining the format. Currently supported: JSON Array and Starling/Sparrow XML.
Version 0.9.5
-------------
* Moved the BootScreen and PauseScreen out of Stage into their own classes (system/screens/BootScreen and PauseScreen).
* Updated the PauseScreen to show a subtle animation effect, making it easier to create your own interesting pause screens.
@@ -468,7 +756,9 @@ Version 0.9.5
* Added fun new "map draw" test - rebound those carrots! :)
* Changed SoundManager class to respect volume on first play (thanks initials and hackmaniac)
Version 0.9.4
--------------
* Added Tilemap.getTile, getTileFromWorldXY, getTileFromInputXY
* Added Tilemap.setCollisionByIndex and setCollisionByRange
@@ -480,7 +770,9 @@ Version 0.9.4
* Fixed: Circle.isEmpty properly checks diameter (thanks bapuna)
* Updated Gruntfile to export new version of phaser.js wrapped in a UMD block for require.js/commonJS (thanks Hackmaniac)
V0.9.3
Version 0.9.3
-------------
* Added the new ScrollZone game object. Endlessly useful but especially for scrolling backdrops. Created 6 example tests.
* Added GameObject.hideFromCamera(cameraID) to stop an object rendering to specific cameras (also showToCamera and clearCameraList)
@@ -498,7 +790,9 @@ V0.9.3
* Removed the need for DynamicTextures to require a key property and updated test cases.
* You can now pass an array or a single value to Input.Keyboard.addKeyCapture().
Version 0.9.2
-------------
* Fixed issue with create not being called if there was an empty init method.
* Added ability to flip a sprite (Sprite.flipped = true) + a test case for it.
@@ -506,7 +800,9 @@ Version 0.9.2
* Sprite animations don't restart if you call play on them when they are already running.
* Added Stage.disablePauseScreen. Set to true to stop your game pausing when the tab loses focus.
Version 0.9.1
-------------
* Added the new align property to GameObjects that controls placement when rendering.
* Added an align example to the Sprites test group (click the mouse to change alignment position)
@@ -517,6 +813,7 @@ for new collision system.
* Updated the States examples to bring in-line with 0.9 release.
Version 0.9
-----------
* Large refactoring. Everything now lives inside the Phaser module, so all code and all tests have been updated to reflect this. Makes coding a tiny bit more verbose but stops the framework from globbing up the global namespace. Also should make code-insight work in WebStorm and similar editors.
* Added the new GeomSprite object. This is a sprite that uses a geometry class for display (Circle, Rectangle, Point, Line). It's extremely flexible!
@@ -527,27 +824,35 @@ Version 0.9
* Added new Motion class which contains lots of handy functions like 'moveTowardsObject', 'velocityFromAngle' and more.
* Tween Manager added. You can now create tweens via Game.createTween (or for more control game.tweens). All the usual suspects are here: Bounce, * Elastic, Quintic, etc and it's hooked into the core game clock, so if your game pauses and resumes your tweens adjust accordingly.
Version 0.8
-----------
* Added ability to set Sprite frame by name (sprite.frameName), useful when you've loaded a Texture Atlas with filename values set rather than using frame indexes.
* Updated texture atlas 4 demo to show this.
* Fixed a bug that would cause a run-time error if you tried to create a sprite using an invalid texture key.
* Added in DynamicTexture support and a test case for it.
Version 0.7
-----------
* Renamed FullScreen to StageScaleMode as it's much more fitting. Tested across Android and iOS with the various scale modes.
* Added in world x/y coordinates to the input class, and the ability to get world x/y input coordinates from any Camera.
* Added the RandomDataGenerator for seeded random number generation.
* Setting the game world size now resizes the default camera (optional bool flag)
Version 0.6
-----------
* Added in Touch support for mobile devices (and desktops that enable it) and populated x/y coords in Input with common values from touch and mouse.
* Added new Circle geometry class (used by Touch) and moved them into a Geom folder.
* Added in Device class for device inspection.
* Added FullScreen class to enable full-screen support on mobile devices (scrolls URL bar out of the way on iOS and Android)
Version 0.5
-----------
* Initial release
+33 -22
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -466,7 +474,7 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
this.name = name;
/**
* @property {object} _frames
* @property {array} _frames
* @private
*/
this._frames = [];
@@ -483,7 +491,8 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
this.looped = looped;
/**
* @property {boolean} looped - The loop state of the Animation.
* @property {boolean} killOnComplete - Should the parent of this Animation be killed when the animation completes?
* @default
*/
this.killOnComplete = false;
@@ -750,6 +759,8 @@ Phaser.Animation.prototype = {
};
Phaser.Animation.prototype.constructor = Phaser.Animation;
/**
* @name Phaser.Animation#paused
* @property {boolean} paused - Gets and sets the paused state of this Animation.
@@ -906,13 +917,13 @@ Phaser.Animation.generateFrameNames = function (prefix, start, stop, suffix, zer
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+32 -22
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -689,7 +697,7 @@ Phaser.AnimationManager.prototype = {
*
* @method Phaser.AnimationManager#getAnimation
* @param {string} name - The name of the animation to be returned, e.g. "fire".
* @return {Phaser.Animation|boolean} The Animation instance, if found, otherwise false.
* @return {Phaser.Animation} The Animation instance, if found, otherwise null.
*/
getAnimation: function (name) {
@@ -701,7 +709,7 @@ Phaser.AnimationManager.prototype = {
}
}
return false;
return null;
},
@@ -734,6 +742,8 @@ Phaser.AnimationManager.prototype = {
};
Phaser.AnimationManager.prototype.constructor = Phaser.AnimationManager;
/**
* @name Phaser.AnimationManager#frameData
* @property {Phaser.FrameData} frameData - The current animations FrameData.
@@ -863,13 +873,13 @@ Object.defineProperty(Phaser.AnimationManager.prototype, 'frameName', {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+36 -26
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -443,9 +451,11 @@ Phaser.AnimationParser = {
* @param {number} frameWidth - The fixed width of each frame of the animation.
* @param {number} frameHeight - The fixed height of each frame of the animation.
* @param {number} [frameMax=-1] - The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".
* @param {number} [margin=0] - If the frames have been drawn with a margin, specify the amount here.
* @param {number} [spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.
* @return {Phaser.FrameData} A FrameData object containing the parsed frames.
*/
spriteSheet: function (game, key, frameWidth, frameHeight, frameMax) {
spriteSheet: function (game, key, frameWidth, frameHeight, frameMax, margin, spacing) {
// How big is our image?
var img = game.cache.getImage(key);
@@ -486,8 +496,8 @@ Phaser.AnimationParser = {
// Let's create some frames then
var data = new Phaser.FrameData();
var x = 0;
var y = 0;
var x = margin;
var y = margin;
for (var i = 0; i &lt; total; i++)
{
@@ -502,12 +512,12 @@ Phaser.AnimationParser = {
height: frameHeight
});
x += frameWidth;
x += frameWidth + spacing;
if (x === width)
{
x = 0;
y += frameHeight;
x = margin;
y += frameHeight + spacing;
}
}
@@ -761,13 +771,13 @@ Phaser.AnimationParser = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+692 -824
View File
File diff suppressed because it is too large Load Diff
+31 -21
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -1380,7 +1388,9 @@ Phaser.BitmapData.prototype = {
}
}
};
Phaser.BitmapData.prototype.constructor = Phaser.BitmapData;
// EaselJS Tiny API emulation
@@ -1554,13 +1564,13 @@ Phaser.BitmapData.prototype.de = Phaser.BitmapData.prototype.ellipse;
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+31 -28
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -543,11 +551,6 @@ Phaser.BitmapText = function (game, x, y, text, style) {
this._cache.x = this.x;
this._cache.y = this.y;
/**
* @property {boolean} renderable - A renderable object will be rendered to the context each frame.
*/
this.renderable = true;
};
Phaser.BitmapText.prototype = Object.create(PIXI.BitmapText.prototype);
@@ -576,13 +579,13 @@ Phaser.BitmapText.prototype.update = function() {
this._cache.dirty = true;
}
this.pivot.x = this.anchor.x*this.width;
this.pivot.y = this.anchor.y*this.height;
this.pivot.x = this.anchor.x * this.width;
this.pivot.y = this.anchor.y * this.height;
}
/**
* @method Phaser.Text.prototype.destroy
* @method Phaser.BitmapText.prototype.destroy
*/
Phaser.BitmapText.prototype.destroy = function() {
@@ -674,13 +677,13 @@ Object.defineProperty(Phaser.BitmapText.prototype, 'y', {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+1342 -439
View File
File diff suppressed because it is too large Load Diff
+206 -106
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -442,16 +450,17 @@
* @constructor
*
* @param {Phaser.Game} game Current game instance.
* @param {number} [x] - X position of the Button.
* @param {number} [y] - Y position of the Button.
* @param {number} [x=0] - X position of the Button.
* @param {number} [y=0] - Y position of the Button.
* @param {string} [key] - The image key as defined in the Game.Cache to use as the texture for this Button.
* @param {function} [callback] - The function to call when this Button is pressed.
* @param {object} [callbackContext] - The context in which the callback will be called (usually 'this').
* @param {string|number} [overFrame] - This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.
* @param {string|number} [outFrame] - This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.
* @param {string|number} [downFrame] - This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.
* @param {string|number} [upFrame] - This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name.
*/
Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) {
Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame) {
x = x || 0;
y = y || 0;
@@ -486,7 +495,7 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame,
* @default
*/
this._onDownFrameName = null;
/**
* @property {string} _onUpFrameName - Internal variable.
* @private
@@ -514,7 +523,7 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame,
* @default
*/
this._onDownFrameID = null;
/**
* @property {number} _onUpFrameID - Internal variable.
* @private
@@ -596,13 +605,13 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame,
this.freezeFrames = false;
/**
* When the Button is clicked you can optionally force the state to "out".
* When the Button is touched / clicked and then released you can force it to enter a state of "out" instead of "up".
* @property {boolean} forceOut
* @default
*/
this.forceOut = true;
this.forceOut = false;
this.setFrames(overFrame, outFrame, downFrame);
this.setFrames(overFrame, outFrame, downFrame, upFrame);
if (callback !== null)
{
@@ -624,15 +633,38 @@ Phaser.Button.prototype = Phaser.Utils.extend(true, Phaser.Button.prototype, Pha
Phaser.Button.prototype.constructor = Phaser.Button;
/**
* Used to manually set the frames that will be used for the different states of the button
* exactly like setting them in the constructor.
* Clears all of the frames set on this Button.
*
* @method Phaser.Button.prototype.clearFrames
*/
Phaser.Button.prototype.clearFrames = function () {
this._onOverFrameName = null;
this._onOverFrameID = null;
this._onOutFrameName = null;
this._onOutFrameID = null;
this._onDownFrameName = null;
this._onDownFrameID = null;
this._onUpFrameName = null;
this._onUpFrameID = null;
}
/**
* Used to manually set the frames that will be used for the different states of the Button.
*
* @method Phaser.Button.prototype.setFrames
* @param {string|number} [overFrame] - This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.
* @param {string|number} [outFrame] - This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.
* @param {string|number} [downFrame] - This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.
* @param {string|number} [upFrame] - This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name.
*/
Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame, upFrame) {
this.clearFrames();
if (overFrame !== null)
{
@@ -661,7 +693,6 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
if (typeof outFrame === 'string')
{
this._onOutFrameName = outFrame;
this._onUpFrameName = outFrame;
if (this.input.pointerOver() === false)
{
@@ -671,7 +702,6 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
else
{
this._onOutFrameID = outFrame;
this._onUpFrameID = outFrame;
if (this.input.pointerOver() === false)
{
@@ -702,6 +732,28 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
}
}
if (upFrame !== null)
{
if (typeof upFrame === 'string')
{
this._onUpFrameName = upFrame;
if (this.input.pointerUp())
{
this.frameName = upFrame;
}
}
else
{
this._onUpFrameID = upFrame;
if (this.input.pointerUp())
{
this.frame = upFrame;
}
}
}
};
/**
@@ -723,8 +775,8 @@ Phaser.Button.prototype.setSounds = function (overSound, overMarker, downSound,
this.setOverSound(overSound, overMarker);
this.setOutSound(outSound, outMarker);
this.setUpSound(upSound, upMarker);
this.setDownSound(downSound, downMarker);
this.setUpSound(upSound, upMarker);
}
@@ -777,31 +829,7 @@ Phaser.Button.prototype.setOutSound = function (sound, marker) {
}
/**
* The Sound to be played when a Pointer clicks on this Button.
*
* @method Phaser.Button.prototype.setUpSound
* @param {Phaser.Sound} sound - The Sound that will be played.
* @param {string} [marker] - A Sound Marker that will be used in the playback.
*/
Phaser.Button.prototype.setUpSound = function (sound, marker) {
this.onUpSound = null;
this.onUpSoundMarker = '';
if (sound instanceof Phaser.Sound)
{
this.onUpSound = sound;
}
if (typeof marker === 'string')
{
this.onUpSoundMarker = marker;
}
}
/**
* The Sound to be played when a Pointer clicks on this Button.
* The Sound to be played when a Pointer presses down on this Button.
*
* @method Phaser.Button.prototype.setDownSound
* @param {Phaser.Sound} sound - The Sound that will be played.
@@ -824,25 +852,43 @@ Phaser.Button.prototype.setDownSound = function (sound, marker) {
}
/**
* The Sound to be played when a Pointer has pressed down and is released from this Button.
*
* @method Phaser.Button.prototype.setUpSound
* @param {Phaser.Sound} sound - The Sound that will be played.
* @param {string} [marker] - A Sound Marker that will be used in the playback.
*/
Phaser.Button.prototype.setUpSound = function (sound, marker) {
this.onUpSound = null;
this.onUpSoundMarker = '';
if (sound instanceof Phaser.Sound)
{
this.onUpSound = sound;
}
if (typeof marker === 'string')
{
this.onUpSoundMarker = marker;
}
}
/**
* Internal function that handles input events.
*
* @protected
* @method Phaser.Button.prototype.onInputOverHandler
* @param {Phaser.Button} sprite - The Button that the event occured on.
* @param {Phaser.Pointer} pointer - The Pointer that activated the Button.
*/
Phaser.Button.prototype.onInputOverHandler = function (pointer) {
Phaser.Button.prototype.onInputOverHandler = function (sprite, pointer) {
if (this.freezeFrames === false)
{
if (this._onOverFrameName != null)
{
this.frameName = this._onOverFrameName;
}
else if (this._onOverFrameID != null)
{
this.frame = this._onOverFrameID;
}
this.setState(1);
}
if (this.onOverSound)
@@ -860,21 +906,15 @@ Phaser.Button.prototype.onInputOverHandler = function (pointer) {
* Internal function that handles input events.
*
* @protected
* @method Phaser.Button.prototype.onInputOverHandler
* @method Phaser.Button.prototype.onInputOutHandler
* @param {Phaser.Button} sprite - The Button that the event occured on.
* @param {Phaser.Pointer} pointer - The Pointer that activated the Button.
*/
Phaser.Button.prototype.onInputOutHandler = function (pointer) {
Phaser.Button.prototype.onInputOutHandler = function (sprite, pointer) {
if (this.freezeFrames === false)
{
if (this._onOutFrameName != null)
{
this.frameName = this._onOutFrameName;
}
else if (this._onOutFrameID != null)
{
this.frame = this._onOutFrameID;
}
this.setState(2);
}
if (this.onOutSound)
@@ -892,21 +932,15 @@ Phaser.Button.prototype.onInputOutHandler = function (pointer) {
* Internal function that handles input events.
*
* @protected
* @method Phaser.Button.prototype.onInputOverHandler
* @method Phaser.Button.prototype.onInputDownHandler
* @param {Phaser.Button} sprite - The Button that the event occured on.
* @param {Phaser.Pointer} pointer - The Pointer that activated the Button.
*/
Phaser.Button.prototype.onInputDownHandler = function (pointer) {
Phaser.Button.prototype.onInputDownHandler = function (sprite, pointer) {
if (this.freezeFrames === false)
{
if (this._onDownFrameName != null)
{
this.frameName = this._onDownFrameName;
}
else if (this._onDownFrameID != null)
{
this.frame = this._onDownFrameID;
}
this.setState(3);
}
if (this.onDownSound)
@@ -924,30 +958,77 @@ Phaser.Button.prototype.onInputDownHandler = function (pointer) {
* Internal function that handles input events.
*
* @protected
* @method Phaser.Button.prototype.onInputOverHandler
* @method Phaser.Button.prototype.onInputUpHandler
* @param {Phaser.Button} sprite - The Button that the event occured on.
* @param {Phaser.Pointer} pointer - The Pointer that activated the Button.
*/
Phaser.Button.prototype.onInputUpHandler = function (pointer) {
if (this.freezeFrames === false)
{
if (this._onUpFrameName != null)
{
this.frameName = this._onUpFrameName;
}
else if (this._onUpFrameID != null)
{
this.frame = this._onUpFrameID;
}
}
Phaser.Button.prototype.onInputUpHandler = function (sprite, pointer, isOver) {
if (this.onUpSound)
{
this.onUpSound.play(this.onUpSoundMarker);
}
if (this.forceOut && this.freezeFrames === false)
if (this.onInputUp)
{
this.onInputUp.dispatch(this, pointer, isOver);
}
if (this.freezeFrames)
{
return;
}
if (this.forceOut)
{
// Button should be forced to the Out frame when released.
this.setState(2);
}
else
{
if (this._onUpFrameName || this._onUpFrameID)
{
this.setState(4);
}
else
{
if (isOver)
{
this.setState(1);
}
else
{
this.setState(2);
}
}
}
};
/**
* Internal function that handles Button state changes.
*
* @protected
* @method Phaser.Button.prototype.setState
* @param {number} newState - The new State of the Button.
*/
Phaser.Button.prototype.setState = function (newState) {
if (newState === 1)
{
// Over
if (this._onOverFrameName != null)
{
this.frameName = this._onOverFrameName;
}
else if (this._onOverFrameID != null)
{
this.frame = this._onOverFrameID;
}
}
else if (newState === 2)
{
// Out
if (this._onOutFrameName != null)
{
this.frameName = this._onOutFrameName;
@@ -957,10 +1038,29 @@ Phaser.Button.prototype.onInputUpHandler = function (pointer) {
this.frame = this._onOutFrameID;
}
}
if (this.onInputUp)
else if (newState === 3)
{
this.onInputUp.dispatch(this, pointer);
// Down
if (this._onDownFrameName != null)
{
this.frameName = this._onDownFrameName;
}
else if (this._onDownFrameID != null)
{
this.frame = this._onDownFrameID;
}
}
else if (newState === 4)
{
// Up
if (this._onUpFrameName != null)
{
this.frameName = this._onUpFrameName;
}
else if (this._onUpFrameID != null)
{
this.frame = this._onUpFrameID;
}
}
};
@@ -979,13 +1079,13 @@ Phaser.Button.prototype.onInputUpHandler = function (pointer) {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+138 -137
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,16 +431,15 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Phaser.Cache constructor.
*
* @class Phaser.Cache
* @classdesc A game only has one instance of a Cache and it is used to store all externally loaded assets such
* as images, sounds and data files as a result of Loader calls. Cache items use string based keys for look-up.
* @class Phaser.Cache
* @classdesc A game only has one instance of a Cache and it is used to store all externally loaded assets such as images, sounds and data files as a result of Loader calls. Cached items use string based keys for look-up.
* @constructor
* @param {Phaser.Game} game - A reference to the currently running game.
*/
@@ -480,10 +487,10 @@ Phaser.Cache = function (game) {
this._tilemaps = {};
/**
* @property {object} _tilesets - Tileset key-value container.
* @property {object} _binary - Binary file key-value container.
* @private
*/
this._tilesets = {};
this._binary = {};
/**
* @property {object} _bitmapDatas - BitmapData key-value container.
@@ -516,6 +523,18 @@ Phaser.Cache.prototype = {
},
/**
* Add a binary object in to the cache.
* @method Phaser.Cache#addBinary
* @param {string} key - Asset key for this binary data.
* @param {object} binaryData - The binary object to be addded to the cache.
*/
addBinary: function (key, binaryData) {
this._binary[key] = binaryData;
},
/**
* Add a BitmapData object in to the cache.
* @method Phaser.Cache#addBitmapData
@@ -555,40 +574,18 @@ Phaser.Cache.prototype = {
* @param {object} data - Extra sprite sheet data.
* @param {number} frameWidth - Width of the sprite sheet.
* @param {number} frameHeight - Height of the sprite sheet.
* @param {number} frameMax - How many frames stored in the sprite sheet.
* @param {number} [frameMax=-1] - How many frames stored in the sprite sheet. If -1 then it divides the whole sheet evenly.
* @param {number} [margin=0] - If the frames have been drawn with a margin, specify the amount here.
* @param {number} [spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.
*/
addSpriteSheet: function (key, url, data, frameWidth, frameHeight, frameMax) {
addSpriteSheet: function (key, url, data, frameWidth, frameHeight, frameMax, margin, spacing) {
this._images[key] = { url: url, data: data, spriteSheet: true, frameWidth: frameWidth, frameHeight: frameHeight };
this._images[key] = { url: url, data: data, spriteSheet: true, frameWidth: frameWidth, frameHeight: frameHeight, margin: margin, spacing: spacing };
PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data);
PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]);
this._images[key].frameData = Phaser.AnimationParser.spriteSheet(this.game, key, frameWidth, frameHeight, frameMax);
},
/**
* Add a new tile set in to the cache.
*
* @method Phaser.Cache#addTileset
* @param {string} key - The unique key by which you will reference this object.
* @param {string} url - URL of this tile set file.
* @param {object} data - Extra tile set data.
* @param {number} tileWidth - Width of the sprite sheet.
* @param {number} tileHeight - Height of the sprite sheet.
* @param {number} tileMax - How many tiles stored in the sprite sheet.
* @param {number} [tileMargin=0] - If the tiles have been drawn with a margin, specify the amount here.
* @param {number} [tileSpacing=0] - If the tiles have been drawn with spacing between them, specify the amount here.
*/
addTileset: function (key, url, data, tileWidth, tileHeight, tileMax, tileMargin, tileSpacing) {
this._tilesets[key] = { url: url, data: data, tileWidth: tileWidth, tileHeight: tileHeight, tileMargin: tileMargin, tileSpacing: tileSpacing };
PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data);
PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]);
this._tilesets[key].tileData = Phaser.TilemapParser.tileset(this.game, key, tileWidth, tileHeight, tileMax, tileMargin, tileSpacing);
this._images[key].frameData = Phaser.AnimationParser.spriteSheet(this.game, key, frameWidth, frameHeight, frameMax, margin, spacing);
},
@@ -598,15 +595,13 @@ Phaser.Cache.prototype = {
* @method Phaser.Cache#addTilemap
* @param {string} key - The unique key by which you will reference this object.
* @param {string} url - URL of the tilemap image.
* @param {object} mapData - The tilemap data object.
* @param {object} mapData - The tilemap data object (either a CSV or JSON file).
* @param {number} format - The format of the tilemap data.
*/
addTilemap: function (key, url, mapData, format) {
this._tilemaps[key] = { url: url, data: mapData, format: format };
this._tilemaps[key].layers = Phaser.TilemapParser.parse(this.game, mapData, format);
},
/**
@@ -756,12 +751,13 @@ Phaser.Cache.prototype = {
decoded = true;
}
this._sounds[key] = { url: url, data: data, isDecoding: false, decoded: decoded, webAudio: webAudio, audioTag: audioTag };
this._sounds[key] = { url: url, data: data, isDecoding: false, decoded: decoded, webAudio: webAudio, audioTag: audioTag, locked: this.game.sound.touchLocked };
},
/**
* Reload a sound.
*
* @method Phaser.Cache#reloadSound
* @param {string} key - Asset key for the sound.
*/
@@ -782,7 +778,8 @@ Phaser.Cache.prototype = {
},
/**
* Description.
* Fires the onSoundUnlock event when the sound has completed reloading.
*
* @method Phaser.Cache#reloadSoundComplete
* @param {string} key - Asset key for the sound.
*/
@@ -797,7 +794,8 @@ Phaser.Cache.prototype = {
},
/**
* Description.
* Updates the sound object in the cache.
*
* @method Phaser.Cache#updateSound
* @param {string} key - Asset key for the sound.
*/
@@ -829,8 +827,8 @@ Phaser.Cache.prototype = {
* Get a canvas object from the cache by its key.
*
* @method Phaser.Cache#getCanvas
* @param {string} key - Asset key of the canvas you want.
* @return {object} The canvas you want.
* @param {string} key - Asset key of the canvas to retrieve from the Cache.
* @return {object} The canvas object.
*/
getCanvas: function (key) {
@@ -838,8 +836,10 @@ Phaser.Cache.prototype = {
{
return this._canvases[key].canvas;
}
return null;
else
{
console.warn('Phaser.Cache.getCanvas: Invalid key: "' + key + '"');
}
},
@@ -847,7 +847,7 @@ Phaser.Cache.prototype = {
* Get a BitmapData object from the cache by its key.
*
* @method Phaser.Cache#getBitmapData
* @param {string} key - Asset key of the BitmapData object you want.
* @param {string} key - Asset key of the BitmapData object to retrieve from the Cache.
* @return {Phaser.BitmapData} The requested BitmapData object if found, or null if not.
*/
getBitmapData: function (key) {
@@ -856,8 +856,10 @@ Phaser.Cache.prototype = {
{
return this._bitmapDatas[key];
}
return null;
else
{
console.warn('Phaser.Cache.getBitmapData: Invalid key: "' + key + '"');
}
},
@@ -865,7 +867,7 @@ Phaser.Cache.prototype = {
* Checks if an image key exists.
*
* @method Phaser.Cache#checkImageKey
* @param {string} key - Asset key of the image you want.
* @param {string} key - Asset key of the image to check is in the Cache.
* @return {boolean} True if the key exists, otherwise false.
*/
checkImageKey: function (key) {
@@ -883,8 +885,8 @@ Phaser.Cache.prototype = {
* Get image data by key.
*
* @method Phaser.Cache#getImage
* @param {string} key - Asset key of the image you want.
* @return {object} The image data you want.
* @param {string} key - Asset key of the image to retrieve from the Cache.
* @return {object} The image data.
*/
getImage: function (key) {
@@ -892,53 +894,19 @@ Phaser.Cache.prototype = {
{
return this._images[key].data;
}
return null;
},
/**
* Get tile set image data by key.
*
* @method Phaser.Cache#getTileSetImage
* @param {string} key - Asset key of the image you want.
* @return {object} The image data you want.
*/
getTilesetImage: function (key) {
if (this._tilesets[key])
else
{
return this._tilesets[key].data;
console.warn('Phaser.Cache.getImage: Invalid key: "' + key + '"');
}
return null;
},
/**
* Get tile set image data by key.
*
* @method Phaser.Cache#getTileset
* @param {string} key - Asset key of the image you want.
* @return {Phaser.Tileset} The tileset data. The tileset image is in the data property, the tile data in tileData.
*/
getTileset: function (key) {
if (this._tilesets[key])
{
return this._tilesets[key].tileData;
}
return null;
},
/**
* Get tilemap data by key.
*
* @method Phaser.Cache#getTilemap
* @param {string} key - Asset key of the tilemap you want.
* @return {Object} The tilemap data. The tileset image is in the data property, the map data in mapData.
* @param {string} key - Asset key of the tilemap data to retrieve from the Cache.
* @return {Object} The raw tilemap data in CSV or JSON format.
*/
getTilemapData: function (key) {
@@ -946,16 +914,19 @@ Phaser.Cache.prototype = {
{
return this._tilemaps[key];
}
else
{
console.warn('Phaser.Cache.getTilemapData: Invalid key: "' + key + '"');
}
return null;
},
/**
* Get frame data by key.
*
* @method Phaser.Cache#getFrameData
* @param {string} key - Asset key of the frame data you want.
* @return {Phaser.FrameData} The frame data you want.
* @param {string} key - Asset key of the frame data to retrieve from the Cache.
* @return {Phaser.FrameData} The frame data.
*/
getFrameData: function (key) {
@@ -971,8 +942,8 @@ Phaser.Cache.prototype = {
* Get a single frame out of a frameData set by key.
*
* @method Phaser.Cache#getFrameByIndex
* @param {string} key - Asset key of the frame data you want.
* @return {Phaser.Frame} The frame data you want.
* @param {string} key - Asset key of the frame data to retrieve from the Cache.
* @return {Phaser.Frame} The frame object.
*/
getFrameByIndex: function (key, frame) {
@@ -988,8 +959,8 @@ Phaser.Cache.prototype = {
* Get a single frame out of a frameData set by key.
*
* @method Phaser.Cache#getFrameByName
* @param {string} key - Asset key of the frame data you want.
* @return {Phaser.Frame} The frame data you want.
* @param {string} key - Asset key of the frame data to retrieve from the Cache.
* @return {Phaser.Frame} The frame object.
*/
getFrameByName: function (key, frame) {
@@ -1005,8 +976,8 @@ Phaser.Cache.prototype = {
* Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.
*
* @method Phaser.Cache#getFrame
* @param {string} key - Asset key of the frame data you want.
* @return {Phaser.Frame} The frame data you want.
* @param {string} key - Asset key of the frame data to retrieve from the Cache.
* @return {Phaser.Frame} The frame data.
*/
getFrame: function (key) {
@@ -1019,11 +990,11 @@ Phaser.Cache.prototype = {
},
/**
* Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.
* Get a single texture frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.
*
* @method Phaser.Cache#getTextureFrame
* @param {string} key - Asset key of the frame data you want.
* @return {Phaser.Frame} The frame data you want.
* @param {string} key - Asset key of the frame to retrieve from the Cache.
* @return {Phaser.Frame} The frame data.
*/
getTextureFrame: function (key) {
@@ -1039,8 +1010,8 @@ Phaser.Cache.prototype = {
* Get a RenderTexture by key.
*
* @method Phaser.Cache#getTexture
* @param {string} key - Asset key of the RenderTexture you want.
* @return {Phaser.RenderTexture} The RenderTexture you want.
* @param {string} key - Asset key of the RenderTexture to retrieve from the Cache.
* @return {Phaser.RenderTexture} The RenderTexture object.
*/
getTexture: function (key) {
@@ -1048,8 +1019,10 @@ Phaser.Cache.prototype = {
{
return this._textures[key];
}
return null;
else
{
console.warn('Phaser.Cache.getTexture: Invalid key: "' + key + '"');
}
},
@@ -1057,8 +1030,8 @@ Phaser.Cache.prototype = {
* Get sound by key.
*
* @method Phaser.Cache#getSound
* @param {string} key - Asset key of the sound you want.
* @return {Phaser.Sound} The sound you want.
* @param {string} key - Asset key of the sound to retrieve from the Cache.
* @return {Phaser.Sound} The sound object.
*/
getSound: function (key) {
@@ -1066,8 +1039,10 @@ Phaser.Cache.prototype = {
{
return this._sounds[key];
}
return null;
else
{
console.warn('Phaser.Cache.getSound: Invalid key: "' + key + '"');
}
},
@@ -1075,8 +1050,8 @@ Phaser.Cache.prototype = {
* Get sound data by key.
*
* @method Phaser.Cache#getSoundData
* @param {string} key - Asset key of the sound you want.
* @return {object} The sound data you want.
* @param {string} key - Asset key of the sound to retrieve from the Cache.
* @return {object} The sound data.
*/
getSoundData: function (key) {
@@ -1084,8 +1059,10 @@ Phaser.Cache.prototype = {
{
return this._sounds[key].data;
}
return null;
else
{
console.warn('Phaser.Cache.getSoundData: Invalid key: "' + key + '"');
}
},
@@ -1093,7 +1070,7 @@ Phaser.Cache.prototype = {
* Check if the given sound has finished decoding.
*
* @method Phaser.Cache#isSoundDecoded
* @param {string} key - Asset key of the sound you want.
* @param {string} key - Asset key of the sound in the Cache.
* @return {boolean} The decoded state of the Sound object.
*/
isSoundDecoded: function (key) {
@@ -1109,7 +1086,7 @@ Phaser.Cache.prototype = {
* Check if the given sound is ready for playback. A sound is considered ready when it has finished decoding and the device is no longer touch locked.
*
* @method Phaser.Cache#isSoundReady
* @param {string} key - Asset key of the sound you want.
* @param {string} key - Asset key of the sound in the Cache.
* @return {boolean} True if the sound is decoded and the device is not touch locked.
*/
isSoundReady: function (key) {
@@ -1140,8 +1117,8 @@ Phaser.Cache.prototype = {
* Get text data by key.
*
* @method Phaser.Cache#getText
* @param {string} key - Asset key of the text data you want.
* @return {object} The text data you want.
* @param {string} key - Asset key of the text data to retrieve from the Cache.
* @return {object} The text data.
*/
getText: function (key) {
@@ -1149,8 +1126,30 @@ Phaser.Cache.prototype = {
{
return this._text[key].data;
}
else
{
console.warn('Phaser.Cache.getText: Invalid key: "' + key + '"');
}
},
return null;
/**
* Get binary data by key.
*
* @method Phaser.Cache#getBinary
* @param {string} key - Asset key of the binary data object to retrieve from the Cache.
* @return {object} The binary data object.
*/
getBinary: function (key) {
if (this._binary[key])
{
return this._binary[key];
}
else
{
console.warn('Phaser.Cache.getBinary: Invalid key: "' + key + '"');
}
},
@@ -1168,7 +1167,7 @@ Phaser.Cache.prototype = {
for (var item in array)
{
if (item !== '__default')
if (item !== '__default' && item !== '__missing')
{
output.push(item);
}
@@ -1277,6 +1276,8 @@ Phaser.Cache.prototype = {
}
};
Phaser.Cache.prototype.constructor = Phaser.Cache;
</pre>
</article>
</section>
@@ -1292,13 +1293,13 @@ Phaser.Cache.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+48 -26
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -462,7 +470,7 @@ Phaser.Camera = function (game, id, x, y, width, height) {
* Camera view.
* The view into the world we wish to render (by default the game dimensions).
* The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render.
* Objects outside of this view are not rendered (unless set to ignore the Camera, i.e. UI?).
* Objects outside of this view are not rendered if set to camera cull.
* @property {Phaser.Rectangle} view
*/
this.view = new Phaser.Rectangle(x, y, width, height);
@@ -509,6 +517,9 @@ Phaser.Camera = function (game, id, x, y, width, height) {
*/
this._edge = 0;
/**
* @property {PIXI.DisplayObject} displayObject - The display object to which all game objects are added. Set by World.boot
*/
this.displayObject = null;
};
@@ -626,6 +637,11 @@ Phaser.Camera.prototype = {
},
/**
* Internal method
* @method Phaser.Camera#updateTarget
* @private
*/
updateTarget: function () {
if (this.deadzone)
@@ -665,9 +681,13 @@ Phaser.Camera.prototype = {
},
/**
* Update the Camera bounds to match the game world.
* @method Phaser.Camera#setBoundsToWorld
*/
setBoundsToWorld: function () {
this.bounds.setTo(this.game.world.x, this.game.world.y, this.game.world.width, this.game.world.height);
this.bounds.setTo(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height);
},
@@ -687,10 +707,10 @@ Phaser.Camera.prototype = {
this.view.x = this.bounds.x;
}
if (this.view.x > this.bounds.right - this.width)
if (this.view.right > this.bounds.right)
{
this.atLimit.x = true;
this.view.x = (this.bounds.right - this.width) + 1;
this.view.x = this.bounds.right - this.width;
}
if (this.view.y &lt; this.bounds.top)
@@ -699,10 +719,10 @@ Phaser.Camera.prototype = {
this.view.y = this.bounds.top;
}
if (this.view.y > this.bounds.bottom - this.height)
if (this.view.bottom > this.bounds.bottom)
{
this.atLimit.y = true;
this.view.y = (this.bounds.bottom - this.height) + 1;
this.view.y = this.bounds.bottom - this.height;
}
this.view.floor();
@@ -745,6 +765,8 @@ Phaser.Camera.prototype = {
};
Phaser.Camera.prototype.constructor = Phaser.Camera;
/**
* The Cameras x coordinate. This value is automatically clamped if it falls outside of the World bounds.
* @name Phaser.Camera#x
@@ -839,13 +861,13 @@ Object.defineProperty(Phaser.Camera.prototype, "height", {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+71 -39
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,12 +431,12 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* The Canvas class handles everything related to the &lt;canvas&gt; tag as a DOM Element, like styles, offset, aspect ratio
* The Canvas class handles everything related to creating the `canvas` DOM tag that Phaser will use, including styles, offset and aspect ratio.
*
* @class Phaser.Canvas
* @static
@@ -436,21 +444,29 @@
Phaser.Canvas = {
/**
* Creates the &lt;canvas&gt; tag
* Creates a `canvas` DOM element. The element is not automatically added to the document.
*
* @method Phaser.Canvas.create
* @param {number} width - The desired width.
* @param {number} height - The desired height.
* @return {HTMLCanvasElement} The newly created &lt;canvas&gt; tag.
* @param {number} [width=256] - The width of the canvas element.
* @param {number} [height=256] - The height of the canvas element..
* @param {string} [id=''] - If given this will be set as the ID of the canvas element, otherwise no ID will be set.
* @return {HTMLCanvasElement} The newly created canvas element.
*/
create: function (width, height) {
create: function (width, height, id) {
width = width || 256;
height = height || 256;
var canvas = document.createElement('canvas');
if (typeof id === 'string')
{
canvas.id = id;
}
canvas.width = width;
canvas.height = height;
canvas.style.display = 'block';
return canvas;
@@ -471,8 +487,22 @@ Phaser.Canvas = {
var box = element.getBoundingClientRect();
var clientTop = element.clientTop || document.body.clientTop || 0;
var clientLeft = element.clientLeft || document.body.clientLeft || 0;
var scrollTop = window.pageYOffset || element.scrollTop || document.body.scrollTop;
var scrollLeft = window.pageXOffset || element.scrollLeft || document.body.scrollLeft;
// Without this check Chrome is now throwing console warnings about strict vs. quirks :(
var scrollTop = 0;
var scrollLeft = 0;
if (document.compatMode === 'CSS1Compat')
{
scrollTop = window.pageYOffset || document.documentElement.scrollTop || element.scrollTop || 0;
scrollLeft = window.pageXOffset || document.documentElement.scrollLeft || element.scrollLeft || 0;
}
else
{
scrollTop = window.pageYOffset || document.body.scrollTop || element.scrollTop || 0;
scrollLeft = window.pageXOffset || document.body.scrollLeft || element.scrollLeft || 0;
}
point.x = box.left + scrollLeft - clientLeft;
point.y = box.top + scrollTop - clientTop;
@@ -560,8 +590,8 @@ Phaser.Canvas = {
*
* @method Phaser.Canvas.addToDOM
* @param {HTMLCanvasElement} canvas - The canvas to set the touch action on.
* @param {string|HTMLElement} parent - The DOM element to add the canvas to. Defaults to ''.
* @param {boolean} overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element.
* @param {string|HTMLElement} parent - The DOM element to add the canvas to.
* @param {boolean} [overflowHidden=true] - If set to true it will add the overflow='hidden' style to the parent DOM element.
* @return {HTMLCanvasElement} Returns the source canvas.
*/
addToDOM: function (canvas, parent, overflowHidden) {
@@ -572,29 +602,29 @@ Phaser.Canvas = {
if (parent)
{
// hopefully an element ID
if (typeof parent === 'string')
{
// hopefully an element ID
target = document.getElementById(parent);
}
// quick test for a HTMLelement
else if (typeof parent === 'object' && parent.nodeType === 1)
{
// quick test for a HTMLelement
target = parent;
}
if (overflowHidden)
{
target.style.overflow = 'hidden';
}
}
// fallback, covers an invalid ID and a none HTMLelement object
if(!target)
// Fallback, covers an invalid ID and a non HTMLelement object
if (!target)
{
target = document.body;
}
if (overflowHidden && target.style)
{
target.style.overflow = 'hidden';
}
target.appendChild(canvas);
return canvas;
@@ -656,9 +686,11 @@ Phaser.Canvas = {
*/
setImageRenderingCrisp: function (canvas) {
canvas.style['image-rendering'] = 'optimizeSpeed';
canvas.style['image-rendering'] = 'crisp-edges';
canvas.style['image-rendering'] = '-moz-crisp-edges';
canvas.style['image-rendering'] = '-webkit-optimize-contrast';
canvas.style['image-rendering'] = 'optimize-contrast';
canvas.style.msInterpolationMode = 'nearest-neighbor';
return canvas;
@@ -698,13 +730,13 @@ Phaser.Canvas = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+33 -23
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -432,9 +440,9 @@
* @class Circle
* @classdesc Phaser - Circle
* @constructor
* @param {number} [x] The x coordinate of the center of the circle.
* @param {number} [y] The y coordinate of the center of the circle.
* @param {number} [diameter] The diameter of the circle.
* @param {number} [x=0] - The x coordinate of the center of the circle.
* @param {number} [y=0] - The y coordinate of the center of the circle.
* @param {number} [diameter=0] - The diameter of the circle.
* @return {Phaser.Circle} This circle object
*/
Phaser.Circle = function (x, y, diameter) {
@@ -618,6 +626,8 @@ Phaser.Circle.prototype = {
};
Phaser.Circle.prototype.constructor = Phaser.Circle;
/**
* The largest distance between any two points on the circle. The same as the radius * 2.
* @name Phaser.Circle#diameter
@@ -911,13 +921,13 @@ Phaser.Circle.intersectsRectangle = function (c, r) {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+28 -20
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -787,13 +795,13 @@ Phaser.Color = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+581
View File
@@ -0,0 +1,581 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Source: gameobjects/DOMSprite.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<a class="brand" href="index.html">Phaser</a>
<ul class="nav">
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.html">Phaser</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.Animation.html">Animation</a>
</li>
<li>
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
<li>
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li>
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li>
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li>
<a href="Phaser.Button.html">Button</a>
</li>
<li>
<a href="Phaser.Cache.html">Cache</a>
</li>
<li>
<a href="Phaser.Camera.html">Camera</a>
</li>
<li>
<a href="Phaser.Canvas.html">Canvas</a>
</li>
<li>
<a href="Phaser.Circle.html">Circle</a>
</li>
<li>
<a href="Phaser.Color.html">Color</a>
</li>
<li>
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
<li>
<a href="Phaser.Easing.Back.html">Back</a>
</li>
<li>
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
<li>
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
<li>
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
<li>
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
<li>
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
<li>
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
<li>
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
<li>
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
<li>
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
<li>
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
<li>
<a href="Phaser.Events.html">Events</a>
</li>
<li>
<a href="Phaser.Filter.html">Filter</a>
</li>
<li>
<a href="Phaser.Frame.html">Frame</a>
</li>
<li>
<a href="Phaser.FrameData.html">FrameData</a>
</li>
<li>
<a href="Phaser.Game.html">Game</a>
</li>
<li>
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
<li>
<a href="Phaser.Group.html">Group</a>
</li>
<li>
<a href="Phaser.Input.html">Input</a>
</li>
<li>
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
<li>
<a href="Phaser.Key.html">Key</a>
</li>
<li>
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
<li>
<a href="Phaser.Loader.html">Loader</a>
</li>
<li>
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
<li>
<a href="Phaser.Math.html">Math</a>
</li>
<li>
<a href="Phaser.Mouse.html">Mouse</a>
</li>
<li>
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
<li>
<a href="Phaser.Net.html">Net</a>
</li>
<li>
<a href="Phaser.Particles.html">Particles</a>
</li>
<li>
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
<li>
<a href="Phaser.Physics.html">Physics</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Plugin.html">Plugin</a>
</li>
<li>
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
<li>
<a href="Phaser.Point.html">Point</a>
</li>
<li>
<a href="Phaser.Pointer.html">Pointer</a>
</li>
<li>
<a href="Phaser.Polygon.html">Polygon</a>
</li>
<li>
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
<li>
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
<li>
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
<li>
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
<li>
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
<li>
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
<li>
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
<li>
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li>
<a href="Phaser.Stage.html">Stage</a>
</li>
<li>
<a href="Phaser.StageScaleMode.html">StageScaleMode</a>
</li>
<li>
<a href="Phaser.State.html">State</a>
</li>
<li>
<a href="Phaser.StateManager.html">StateManager</a>
</li>
<li>
<a href="Phaser.Text.html">Text</a>
</li>
<li>
<a href="Phaser.Tile.html">Tile</a>
</li>
<li>
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li>
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li>
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li>
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li>
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li>
<a href="Phaser.Time.html">Time</a>
</li>
<li>
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
<li>
<a href="Phaser.Tween.html">Tween</a>
</li>
<li>
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
<li>
<a href="Phaser.Utils.html">Utils</a>
</li>
<li>
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
<li>
<a href="Phaser.World.html">World</a>
</li>
<li>
<a href="SignalBinding.html">SignalBinding</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="global.html#SAT">SAT</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div id="main">
<h1 class="page-title">Source: gameobjects/DOMSprite.js</h1>
<section>
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Create a new DOMSprite.
* @class Phaser.DOMSprite
* @constructor
* @param {Phaser.Game} game - Current game instance.
* @param {string} id - DOM ID.
* @param {number} x - X position of the new text object.
* @param {number} y - Y position of the new text object.
* @param {string} text - The actual text that will be written.
* @param {object} style - The style object containing style attributes like font, font size ,
*/
Phaser.DOMSprite = function (game, element, x, y, style) {
x = x || 0;
y = y || 0;
style = style || '';
/**
* @property {Phaser.Game} game - A reference to the currently running Game.
*/
this.game = game;
/**
* @property {boolean} exists - If exists = false then the Text isn't updated by the core game loop.
* @default
*/
this.exists = true;
/**
* @property {boolean} alive - This is a handy little var your game can use to determine if an object is alive or not, it doesn't effect rendering.
* @default
*/
this.alive = true;
/**
* @property {Phaser.Group} group - The parent Group of this Text object.
*/
this.group = null;
/**
* @property {string} name - The user defined name given to this object.
* @default
*/
this.name = '';
/**
* @property {number} type - The const type of this object.
* @default
*/
this.type = Phaser.DOMSPRITE;
/**
* @property {boolean} visible - Sets the visible state of this DOMSprite.
* @default
*/
this.visible = true;
/*
if (parent)
{
if (typeof parent === 'string')
{
// hopefully an element ID
target = document.getElementById(parent);
}
else if (typeof parent === 'object' && parent.nodeType === 1)
{
// quick test for a HTMLelement
target = parent;
}
if (overflowHidden)
{
target.style.overflow = 'hidden';
}
}
*/
};
// Phaser.DOMSprite.prototype = Object.create(PIXI.DOMSprite.prototype);
// Phaser.DOMSprite.prototype.constructor = Phaser.DOMSprite;
</pre>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
<br clear="both">
</div>
</div>
<script src="scripts/sunlight.js"></script>
<script src="scripts/sunlight.javascript.js"></script>
<script src="scripts/sunlight-plugin.doclinks.js"></script>
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
<script src="scripts/sunlight-plugin.menu.js"></script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.scrollTo.js"></script>
<script src="scripts/jquery.localScroll.js"></script>
<script src="scripts/bootstrap-dropdown.js"></script>
<script src="scripts/toc.js"></script>
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
<script>
$( function () {
$( "#toc" ).toc( {
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
</script>
</body>
</html>
+257 -209
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -453,6 +461,11 @@ Phaser.Utils.Debug = function (game) {
*/
this.font = '14px Courier';
/**
* @property {number} columnWidth - The spacing between columns.
*/
this.columnWidth = 100;
/**
* @property {number} lineHeight - The line height between the debug text.
*/
@@ -488,11 +501,12 @@ Phaser.Utils.Debug.prototype = {
/**
* Internal method that resets and starts the debug output values.
* @method Phaser.Utils.Debug#start
* @param {number} x - The X value the debug info will start from.
* @param {number} y - The Y value the debug info will start from.
* @param {string} color - The color the debug info will drawn in.
* @param {number} [x=0] - The X value the debug info will start from.
* @param {number} [y=0] - The Y value the debug info will start from.
* @param {string} [color='rgb(255,255,255)'] - The color the debug text will drawn in.
* @param {number} [columnWidth=0] - The spacing between columns.
*/
start: function (x, y, color) {
start: function (x, y, color, columnWidth) {
if (this.context == null)
{
@@ -501,16 +515,18 @@ Phaser.Utils.Debug.prototype = {
if (typeof x !== 'number') { x = 0; }
if (typeof y !== 'number') { y = 0; }
color = color || 'rgb(255,255,255)';
if (typeof columnWidth === 'undefined') { columnWidth = 0; }
this.currentX = x;
this.currentY = y;
this.currentColor = color;
this.currentAlpha = this.context.globalAlpha;
this.columnWidth = columnWidth;
this.context.save();
this.context.setTransform(1, 0, 0, 1, 0, 0);
this.context.strokeStyle = color;
this.context.fillStyle = color;
this.context.font = this.font;
this.context.globalAlpha = 1;
@@ -523,7 +539,6 @@ Phaser.Utils.Debug.prototype = {
*/
stop: function () {
this.context.restore();
this.context.globalAlpha = this.currentAlpha;
@@ -533,8 +548,8 @@ Phaser.Utils.Debug.prototype = {
* Internal method that outputs a single line of text.
* @method Phaser.Utils.Debug#line
* @param {string} text - The line of text to draw.
* @param {number} x - The X value the debug info will start from.
* @param {number} y - The Y value the debug info will start from.
* @param {number} [x] - The X value the debug info will start from.
* @param {number} [y] - The Y value the debug info will start from.
*/
line: function (text, x, y) {
@@ -543,16 +558,8 @@ Phaser.Utils.Debug.prototype = {
return;
}
x = x || null;
y = y || null;
if (x !== null) {
this.currentX = x;
}
if (y !== null) {
this.currentY = y;
}
if (typeof x !== 'undefined') { this.currentX = x; }
if (typeof y !== 'undefined') { this.currentY = y; }
if (this.renderShadow)
{
@@ -566,6 +573,38 @@ Phaser.Utils.Debug.prototype = {
},
/**
* Internal method that outputs a single line of text split over as many columns as needed, one per parameter.
* @method Phaser.Utils.Debug#splitline
* @param {string} text - The text to render. You can have as many columns of text as you want, just pass them as additional parameters.
*/
splitline: function (text) {
if (this.context == null)
{
return;
}
var x = this.currentX;
for (var i = 0; i &lt; arguments.length; i++)
{
if (this.renderShadow)
{
this.context.fillStyle = 'rgb(0,0,0)';
this.context.fillText(arguments[i], x + 1, this.currentY + 1);
this.context.fillStyle = this.currentColor;
}
this.context.fillText(arguments[i], x, this.currentY);
x += this.columnWidth;
}
this.currentY += this.lineHeight;
},
/**
* Visually renders a QuadTree to the display.
* @method Phaser.Utils.Debug#renderQuadTree
@@ -811,25 +850,27 @@ Phaser.Utils.Debug.prototype = {
},
/**
* Render Sprite collision.
* @method Phaser.Utils.Debug#renderSpriteCollision
* Render Sprite Body Physics Data as text.
* @method Phaser.Utils.Debug#renderBodyInfo
* @param {Phaser.Sprite} sprite - The sprite to be rendered.
* @param {number} x - X position of the debug info to be rendered.
* @param {number} y - Y position of the debug info to be rendered.
* @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
*/
renderSpriteCollision: function (sprite, x, y, color) {
renderBodyInfo: function (sprite, x, y, color) {
color = color || 'rgb(255,255,255)';
this.start(x, y, color);
this.line('Sprite Collision: (' + sprite.width + ' x ' + sprite.height + ')');
this.line('left: ' + sprite.body.touching.left);
this.line('right: ' + sprite.body.touching.right);
this.line('up: ' + sprite.body.touching.up);
this.line('down: ' + sprite.body.touching.down);
this.line('velocity.x: ' + sprite.body.velocity.x);
this.line('velocity.y: ' + sprite.body.velocity.y);
this.start(x, y, color, 210);
this.splitline('x: ' + sprite.body.x.toFixed(2), 'y: ' + sprite.body.y.toFixed(2), 'width: ' + sprite.width, 'height: ' + sprite.height);
this.splitline('speed: ' + sprite.body.speed.toFixed(2), 'angle: ' + sprite.body.angle.toFixed(2), 'linear damping: ' + sprite.body.linearDamping);
this.splitline('blocked left: ' + sprite.body.blocked.left, 'right: ' + sprite.body.blocked.right, 'up: ' + sprite.body.blocked.up, 'down: ' + sprite.body.blocked.down);
this.splitline('touching left: ' + sprite.body.touching.left, 'right: ' + sprite.body.touching.right, 'up: ' + sprite.body.touching.up, 'down: ' + sprite.body.touching.down);
this.splitline('gravity x: ' + sprite.body.gravity.x, 'y: ' + sprite.body.gravity.y, 'world gravity x: ' + this.game.physics.gravity.x, 'y: ' + this.game.physics.gravity.y);
this.splitline('acceleration x: ' + sprite.body.acceleration.x.toFixed(2), 'y: ' + sprite.body.acceleration.y.toFixed(2));
this.splitline('velocity x: ' + sprite.body.velocity.x.toFixed(2), 'y: ' + sprite.body.velocity.y.toFixed(2), 'deltaX: ' + sprite.body.deltaX().toFixed(2), 'deltaY: ' + sprite.body.deltaY().toFixed(2));
this.splitline('bounce x: ' + sprite.body.bounce.x.toFixed(2), 'y: ' + sprite.body.bounce.y.toFixed(2));
this.stop();
},
@@ -892,17 +933,15 @@ Phaser.Utils.Debug.prototype = {
// 4 = scaleY
// 5 = translateY
// this.line('id: ' + sprite._id);
// this.line('scale x: ' + sprite.worldTransform[0]);
// this.line('scale y: ' + sprite.worldTransform[4]);
// this.line('tx: ' + sprite.worldTransform[2]);
// this.line('ty: ' + sprite.worldTransform[5]);
// this.line('skew x: ' + sprite.worldTransform[3]);
// this.line('skew y: ' + sprite.worldTransform[1]);
this.line('deltaX: ' + sprite.body.deltaX());
this.line('deltaY: ' + sprite.body.deltaY());
// this.line('sdx: ' + sprite.deltaX());
// this.line('sdy: ' + sprite.deltaY());
this.line('id: ' + sprite._id);
this.line('scale x: ' + sprite.worldTransform[0]);
this.line('scale y: ' + sprite.worldTransform[4]);
this.line('tx: ' + sprite.worldTransform[2]);
this.line('ty: ' + sprite.worldTransform[5]);
this.line('skew x: ' + sprite.worldTransform[3]);
this.line('skew y: ' + sprite.worldTransform[1]);
this.line('sdx: ' + sprite.deltaX);
this.line('sdy: ' + sprite.deltaY);
// this.line('inCamera: ' + this.game.renderer.spriteRenderer.inCamera(this.game.camera, sprite));
this.stop();
@@ -910,65 +949,13 @@ Phaser.Utils.Debug.prototype = {
},
/**
* Render the World Transform information of the given Sprite.
* @method Phaser.Utils.Debug#renderWorldTransformInfo
* @param {Phaser.Sprite} sprite - Description.
* Renders the sprite coordinates in local, positional and world space.
* @method Phaser.Utils.Debug#renderSpriteCoords
* @param {Phaser.Sprite} line - The sprite to inspect.
* @param {number} x - X position of the debug info to be rendered.
* @param {number} y - Y position of the debug info to be rendered.
* @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
*/
renderWorldTransformInfo: function (sprite, x, y, color) {
if (this.context == null)
{
return;
}
color = color || 'rgb(255, 255, 255)';
this.start(x, y, color);
this.line('World Transform');
this.line('skewX: ' + sprite.worldTransform[3]);
this.line('skewY: ' + sprite.worldTransform[1]);
this.line('scaleX: ' + sprite.worldTransform[0]);
this.line('scaleY: ' + sprite.worldTransform[4]);
this.line('transX: ' + sprite.worldTransform[2]);
this.line('transY: ' + sprite.worldTransform[5]);
this.stop();
},
/**
* Render the Local Transform information of the given Sprite.
* @method Phaser.Utils.Debug#renderLocalTransformInfo
* @param {Phaser.Sprite} sprite - Description.
* @param {number} x - X position of the debug info to be rendered.
* @param {number} y - Y position of the debug info to be rendered.
* @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
*/
renderLocalTransformInfo: function (sprite, x, y, color) {
if (this.context == null)
{
return;
}
color = color || 'rgb(255, 255, 255)';
this.start(x, y, color);
this.line('Local Transform');
this.line('skewX: ' + sprite.localTransform[3]);
this.line('skewY: ' + sprite.localTransform[1]);
this.line('scaleX: ' + sprite.localTransform[0]);
this.line('scaleY: ' + sprite.localTransform[4]);
this.line('transX: ' + sprite.localTransform[2]);
this.line('transY: ' + sprite.localTransform[5]);
this.stop();
},
renderSpriteCoords: function (sprite, x, y, color) {
if (this.context == null)
@@ -978,29 +965,28 @@ Phaser.Utils.Debug.prototype = {
color = color || 'rgb(255, 255, 255)';
this.start(x, y, color);
this.start(x, y, color, 100);
if (sprite.name)
{
this.line(sprite.name);
}
this.line('x: ' + sprite.x);
this.line('y: ' + sprite.y);
this.line('pos x: ' + sprite.position.x);
this.line('pos y: ' + sprite.position.y);
this.line('local x: ' + sprite.localTransform[2]);
this.line('local y: ' + sprite.localTransform[5]);
this.line('t x: ' + sprite.worldTransform[2]);
this.line('t y: ' + sprite.worldTransform[5]);
this.line('world x: ' + sprite.world.x);
this.line('world y: ' + sprite.world.y);
this.splitline('x:', sprite.x.toFixed(2), 'y:', sprite.y.toFixed(2));
this.splitline('pos x:', sprite.position.x.toFixed(2), 'pos y:', sprite.position.y.toFixed(2));
this.splitline('world x:', sprite.world.x.toFixed(2), 'world y:', sprite.world.y.toFixed(2));
this.stop();
},
renderGroupInfo: function (group, x, y, color) {
/**
* Renders a Line object in the given color.
* @method Phaser.Utils.Debug#renderLine
* @param {Phaser.Line} line - The Line to render.
* @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
*/
renderLine: function (line, color) {
if (this.context == null)
{
@@ -1009,12 +995,38 @@ Phaser.Utils.Debug.prototype = {
color = color || 'rgb(255, 255, 255)';
this.start(x, y, color);
this.start(0, 0, color);
this.context.lineWidth = 1;
this.context.beginPath();
this.context.moveTo(line.start.x + 0.5, line.start.y + 0.5);
this.context.lineTo(line.end.x + 0.5, line.end.y + 0.5);
this.context.closePath();
this.context.stroke();
this.stop();
this.line('Group (size: ' + group.length + ')');
this.line('x: ' + group.x);
this.line('y: ' + group.y);
},
/**
* Renders Line information in the given color.
* @method Phaser.Utils.Debug#renderLineInfo
* @param {Phaser.Line} line - The Line to render.
* @param {number} x - X position of the debug info to be rendered.
* @param {number} y - Y position of the debug info to be rendered.
* @param {string} [color='rgb(255,255,255)'] - color of the debug info to be rendered. (format is css color string).
*/
renderLineInfo: function (line, x, y, color) {
if (this.context == null)
{
return;
}
color = color || 'rgb(255, 255, 255)';
this.start(x, y, color, 80);
this.splitline('start.x:', line.start.x.toFixed(2), 'start.y:', line.start.y.toFixed(2));
this.splitline('end.x:', line.end.x.toFixed(2), 'end.y:', line.end.y.toFixed(2));
this.splitline('length:', line.length.toFixed(2), 'angle:', line.angle);
this.stop();
},
@@ -1043,24 +1055,36 @@ Phaser.Utils.Debug.prototype = {
},
/**
* Renders just the Sprite.body bounds.
* @method Phaser.Utils.Debug#renderSpriteBody
* Renders just the full Sprite bounds.
* @method Phaser.Utils.Debug#renderSpriteBounds
* @param {Phaser.Sprite} sprite - Description.
* @param {string} [color] - Color of the debug info to be rendered (format is css color string).
* @param {boolean} [fill=false] - If false the bounds outline is rendered, if true the whole rectangle is rendered.
*/
renderSpriteBody: function (sprite, color) {
renderSpriteBody: function (sprite, color, fill) {
if (this.context == null)
{
return;
}
color = color || 'rgba(255,0,255, 0.3)';
color = color || 'rgb(255,0,255)';
if (typeof fill === 'undefined') { fill = false; }
this.start(0, 0, color);
this.context.fillStyle = color;
this.context.fillRect(sprite.body.screenX, sprite.body.screenY, sprite.body.width, sprite.body.height);
if (fill)
{
this.context.fillStyle = color;
this.context.fillRect(sprite.body.left, sprite.body.top, sprite.body.width, sprite.body.height);
}
else
{
this.context.strokeStyle = color;
this.context.strokeRect(sprite.body.left, sprite.body.top, sprite.body.width, sprite.body.height);
this.context.stroke();
}
this.stop();
@@ -1222,86 +1246,110 @@ Phaser.Utils.Debug.prototype = {
},
/**
* Dumps the Linked List to the console.
*
* @method Phaser.Utils.Debug#Phaser.LinkedList#dump
* @param {Phaser.LinkedList} list - The LinkedList to dump.
* @method Phaser.Utils.Debug#renderPhysicsBody
* @param {array} body
* @param {string} [color='rgb(255,255,255)'] - The color the polygon is stroked in.
*/
dumpLinkedList: function (list) {
renderPhysicsBody: function (body, color, context) {
var spacing = 20;
var output = "\n" + Phaser.Utils.pad('Node', spacing) + "|" + Phaser.Utils.pad('Next', spacing) + "|" + Phaser.Utils.pad('Previous', spacing) + "|" + Phaser.Utils.pad('First', spacing) + "|" + Phaser.Utils.pad('Last', spacing);
console.log(output);
var output = Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing);
console.log(output);
var entity = list;
var testObject = entity.last.next;
entity = entity.first;
do
if (this.context === null && context === null)
{
var name = entity.sprite.name || '*';
var nameNext = '-';
var namePrev = '-';
var nameFirst = '-';
var nameLast = '-';
if (entity.next)
{
nameNext = entity.next.sprite.name;
}
if (entity.prev)
{
namePrev = entity.prev.sprite.name;
}
if (entity.first)
{
nameFirst = entity.first.sprite.name;
}
if (entity.last)
{
nameLast = entity.last.sprite.name;
}
if (typeof nameNext === 'undefined')
{
nameNext = '-';
}
if (typeof namePrev === 'undefined')
{
namePrev = '-';
}
if (typeof nameFirst === 'undefined')
{
nameFirst = '-';
}
if (typeof nameLast === 'undefined')
{
nameLast = '-';
}
var output = Phaser.Utils.pad(name, spacing) + "|" + Phaser.Utils.pad(nameNext, spacing) + "|" + Phaser.Utils.pad(namePrev, spacing) + "|" + Phaser.Utils.pad(nameFirst, spacing) + "|" + Phaser.Utils.pad(nameLast, spacing);
console.log(output);
entity = entity.next;
return;
}
while(entity != testObject)
color = color || 'rgb(255,255,255)';
var x = body.x - this.game.camera.x;
var y = body.y - this.game.camera.y;
if (body.type === Phaser.Physics.Arcade.CIRCLE)
{
this.start(0, 0, color);
this.context.beginPath();
this.context.strokeStyle = color;
this.context.arc(x, y, body.shape.r, 0, Math.PI * 2, false);
this.context.stroke();
this.context.closePath();
// this.context.strokeStyle = 'rgb(0,0,255)';
// this.context.strokeRect(body.left, body.top, body.width, body.height);
this.stop();
}
else
{
var points = body.polygon.points;
this.start(0, 0, color);
this.context.beginPath();
this.context.moveTo(x + points[0].x, y + points[0].y);
for (var i = 1; i &lt; points.length; i++)
{
this.context.lineTo(x + points[i].x, y + points[i].y);
}
this.context.closePath();
this.context.strokeStyle = color;
this.context.stroke();
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(x + points[0].x - 2, y + points[0].y - 2, 5, 5);
for (var i = 1; i &lt; points.length; i++)
{
this.context.fillStyle = 'rgb(255,' + (i * 40) + ',0)';
this.context.fillRect(x + points[i].x - 2, y + points[i].y - 2, 5, 5);
}
// this.context.strokeStyle = 'rgb(0,255,255)';
// this.context.strokeRect(body.left, body.top, body.width, body.height);
this.stop();
}
},
/**
* @method Phaser.Utils.Debug#renderPolygon
* @param {array} polygon
* @param {string} [color='rgb(255,255,255)'] - The color the polygon is stroked in.
*/
renderPolygon: function (polygon, color, context) {
if (this.context === null && context === null)
{
return;
}
color = color || 'rgb(255,255,255)';
var points = polygon.points;
var x = polygon.pos.x;
var y = polygon.pos.y;
this.start(0, 0, color);
this.context.beginPath();
this.context.moveTo(x + points[0].x, y + points[0].y);
for (var i = 1; i &lt; points.length; i++)
{
this.context.lineTo(x + points[i].x, y + points[i].y);
}
this.context.closePath();
this.context.strokeStyle = color;
this.context.stroke();
this.stop();
}
};
Phaser.Utils.Debug.prototype.constructor = Phaser.Utils.Debug;
</pre>
</article>
</section>
@@ -1317,13 +1365,13 @@ Phaser.Utils.Debug.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+147 -42
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -463,6 +471,12 @@ Phaser.Device = function () {
*/
this.cocoonJS = false;
/**
* @property {boolean} ejecta - Is the game running under Ejecta?
* @default
*/
this.ejecta = false;
/**
* @property {boolean} android - Is running on android?
* @default
@@ -561,6 +575,18 @@ Phaser.Device = function () {
*/
this.typedArray = false;
/**
* @property {boolean} vibration - Does the device support the Vibration API?
* @default
*/
this.vibration = false;
/**
* @property {boolean} quirksMode - Is the browser running in strict mode (false) or quirks mode? (true)
* @default
*/
this.quirksMode = false;
// Browser
/**
@@ -599,6 +625,18 @@ Phaser.Device = function () {
*/
this.ieVersion = 0;
/**
* @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)
* @default
*/
this.trident = false;
/**
* @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx
* @default
*/
this.tridentVersion = 0;
/**
* @property {boolean} mobileSafari - Set to true if running in Mobile Safari.
* @default
@@ -629,6 +667,12 @@ Phaser.Device = function () {
*/
this.webApp = false;
/**
* @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)
* @default
*/
this.silk = false;
// Audio
/**
@@ -733,21 +777,33 @@ Phaser.Device.prototype = {
var ua = navigator.userAgent;
if (/Android/.test(ua)) {
if (/Android/.test(ua))
{
this.android = true;
} else if (/CrOS/.test(ua)) {
}
else if (/CrOS/.test(ua))
{
this.chromeOS = true;
} else if (/iP[ao]d|iPhone/i.test(ua)) {
}
else if (/iP[ao]d|iPhone/i.test(ua))
{
this.iOS = true;
} else if (/Linux/.test(ua)) {
}
else if (/Linux/.test(ua))
{
this.linux = true;
} else if (/Mac OS/.test(ua)) {
}
else if (/Mac OS/.test(ua))
{
this.macOS = true;
} else if (/Windows/.test(ua)) {
}
else if (/Windows/.test(ua))
{
this.windows = true;
}
if (this.windows || this.macOS || this.linux) {
if (this.windows || this.macOS || (this.linux && this.silk === false))
{
this.desktop = true;
}
@@ -783,16 +839,20 @@ Phaser.Device.prototype = {
this.worker = !!window['Worker'];
if ('ontouchstart' in document.documentElement || (window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 1)) {
if ('ontouchstart' in document.documentElement || (window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 1))
{
this.touch = true;
}
if (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) {
if (window.navigator.msPointerEnabled || window.navigator.pointerEnabled)
{
this.mspointer = true;
}
this.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;
this.quirksMode = (document.compatMode === 'CSS1Compat') ? false : true;
},
/**
@@ -804,36 +864,70 @@ Phaser.Device.prototype = {
var ua = navigator.userAgent;
if (/Arora/.test(ua)) {
if (/Arora/.test(ua))
{
this.arora = true;
} else if (/Chrome/.test(ua)) {
}
else if (/Chrome/.test(ua))
{
this.chrome = true;
} else if (/Epiphany/.test(ua)) {
}
else if (/Epiphany/.test(ua))
{
this.epiphany = true;
} else if (/Firefox/.test(ua)) {
}
else if (/Firefox/.test(ua))
{
this.firefox = true;
} else if (/Mobile Safari/.test(ua)) {
}
else if (/Mobile Safari/.test(ua))
{
this.mobileSafari = true;
} else if (/MSIE (\d+\.\d+);/.test(ua)) {
}
else if (/MSIE (\d+\.\d+);/.test(ua))
{
this.ie = true;
this.ieVersion = parseInt(RegExp.$1, 10);
} else if (/Midori/.test(ua)) {
}
else if (/Midori/.test(ua))
{
this.midori = true;
} else if (/Opera/.test(ua)) {
}
else if (/Opera/.test(ua))
{
this.opera = true;
} else if (/Safari/.test(ua)) {
}
else if (/Safari/.test(ua))
{
this.safari = true;
}
else if (/Silk/.test(ua))
{
this.silk = true;
}
else if (/Trident\/(\d+\.\d+);/.test(ua))
{
this.ie = true;
this.trident = true;
this.tridentVersion = parseInt(RegExp.$1, 10);
}
// WebApp mode in iOS
if (navigator['standalone']) {
if (navigator['standalone'])
{
this.webApp = true;
}
if (navigator['isCocoonJS']) {
if (navigator['isCocoonJS'])
{
this.cocoonJS = true;
}
if (typeof window.ejecta !== "undefined")
{
this.ejecta = true;
}
},
/**
@@ -906,6 +1000,13 @@ Phaser.Device.prototype = {
this.typedArray = false;
}
navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;
if (navigator.vibrate)
{
this.vibration = true;
}
},
/**
@@ -928,8 +1029,10 @@ Phaser.Device.prototype = {
// Add it to the body to get the computed style.
document.body.insertBefore(el, null);
for (var t in transforms) {
if (el.style[t] !== undefined) {
for (var t in transforms)
{
if (el.style[t] !== undefined)
{
el.style[t] = "translate3d(1px,1px,1px)";
has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);
}
@@ -1003,6 +1106,8 @@ Phaser.Device.prototype = {
}
};
Phaser.Device.prototype.constructor = Phaser.Device;
</pre>
</article>
</section>
@@ -1018,13 +1123,13 @@ Phaser.Device.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+28 -20
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -425,7 +433,7 @@
/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -999,13 +1007,13 @@ Phaser.Easing = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+108 -141
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -445,7 +453,6 @@
Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
/**
* The total number of particles in this emitter.
* @property {number} maxParticles - The total number of particles in this emitter..
* @default
*/
@@ -459,7 +466,8 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
this.name = 'emitter' + this.game.particles.ID++;
/**
* @property {Description} type - Description.
* @property {number} type - Internal Phaser Type value.
* @protected
*/
this.type = Phaser.EMITTER;
@@ -488,140 +496,114 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
this.height = 1;
/**
* The minimum possible velocity of a particle.
* The default value is (-100,-100).
* @property {Phaser.Point} minParticleSpeed
* @property {Phaser.Point} minParticleSpeed - The minimum possible velocity of a particle.
* @default
*/
this.minParticleSpeed = new Phaser.Point(-100, -100);
/**
* The maximum possible velocity of a particle.
* The default value is (100,100).
* @property {Phaser.Point} maxParticleSpeed
* @property {Phaser.Point} maxParticleSpeed - The maximum possible velocity of a particle.
* @default
*/
this.maxParticleSpeed = new Phaser.Point(100, 100);
/**
* The minimum possible scale of a particle.
* The default value is 1.
* @property {number} minParticleScale
* @property {number} minParticleScale - The minimum possible scale of a particle.
* @default
*/
this.minParticleScale = 1;
/**
* The maximum possible scale of a particle.
* The default value is 1.
* @property {number} maxParticleScale
* @property {number} maxParticleScale - The maximum possible scale of a particle.
* @default
*/
this.maxParticleScale = 1;
/**
* The minimum possible angular velocity of a particle. The default value is -360.
* @property {number} minRotation
* @property {number} minRotation - The minimum possible angular velocity of a particle.
* @default
*/
this.minRotation = -360;
/**
* The maximum possible angular velocity of a particle. The default value is 360.
* @property {number} maxRotation
* @property {number} maxRotation - The maximum possible angular velocity of a particle.
* @default
*/
this.maxRotation = 360;
/**
* Sets the &lt;code>gravity.y&lt;/code> of each particle to this value on launch.
* @property {number} gravity
* @property {number} gravity - Sets the `body.gravity.y` of each particle sprite to this value on launch.
* @default
*/
this.gravity = 2;
this.gravity = 100;
/**
* Set your own particle class type here.
* @property {Description} particleClass
* @property {any} particleClass - For emitting your own particle class types.
* @default
*/
this.particleClass = null;
/**
* The X and Y drag component of particles launched from the emitter.
* @property {Phaser.Point} particleDrag
* @property {number} particleFriction - The friction component of particles launched from the emitter.
* @default
*/
this.particleDrag = new Phaser.Point();
this.particleFriction = 0;
/**
* The angular drag component of particles launched from the emitter if they are rotating.
* @property {number} angularDrag
* @property {number} angularDrag - The angular drag component of particles launched from the emitter if they are rotating.
* @default
*/
this.angularDrag = 0;
/**
* How often a particle is emitted in ms (if emitter is started with Explode === false).
* @property {boolean} frequency
* @property {boolean} frequency - How often a particle is emitted in ms (if emitter is started with Explode === false).
* @default
*/
this.frequency = 100;
/**
* How long each particle lives once it is emitted in ms. Default is 2 seconds.
* Set lifespan to 'zero' for particles to live forever.
* @property {number} lifespan
* @property {number} lifespan - How long each particle lives once it is emitted in ms. Default is 2 seconds. Set lifespan to 'zero' for particles to live forever.
* @default
*/
this.lifespan = 2000;
/**
* How much each particle should bounce on each axis. 1 = full bounce, 0 = no bounce.
* @property {Phaser.Point} bounce
* @property {Phaser.Point} bounce - How much each particle should bounce on each axis. 1 = full bounce, 0 = no bounce.
*/
this.bounce = new Phaser.Point();
/**
* Internal helper for deciding how many particles to launch.
* @property {number} _quantity
* @property {number} _quantity - Internal helper for deciding how many particles to launch.
* @private
* @default
*/
this._quantity = 0;
/**
* Internal helper for deciding when to launch particles or kill them.
* @property {number} _timer
* @property {number} _timer - Internal helper for deciding when to launch particles or kill them.
* @private
* @default
*/
this._timer = 0;
/**
* Internal counter for figuring out how many particles to launch.
* @property {number} _counter
* @property {number} _counter - Internal counter for figuring out how many particles to launch.
* @private
* @default
*/
this._counter = 0;
/**
* Internal helper for the style of particle emission (all at once, or one at a time).
* @property {boolean} _explode
* @property {boolean} _explode - Internal helper for the style of particle emission (all at once, or one at a time).
* @private
* @default
*/
this._explode = true;
/**
* Determines whether the emitter is currently emitting particles.
* It is totally safe to directly toggle this.
* @property {boolean} on
* @property {boolean} on - Determines whether the emitter is currently emitting particles. It is totally safe to directly toggle this.
* @default
*/
this.on = false;
/**
* Determines whether the emitter is being updated by the core game loop.
* @property {boolean} exists
* @property {boolean} exists - Determines whether the emitter is being updated by the core game loop.
* @default
*/
this.exists = true;
@@ -695,43 +677,35 @@ Phaser.Particles.Arcade.Emitter.prototype.update = function () {
* This function generates a new array of particle sprites to attach to the emitter.
*
* @method Phaser.Particles.Arcade.Emitter#makeParticles
* @param {Description} keys - Description.
* @param {number} frames - Description.
* @param {number} quantity - The number of particles to generate when using the "create from image" option.
* @param {number} collide - Description.
* @param {boolean} collideWorldBounds - Description.
* @return This Emitter instance (nice for chaining stuff together, if you're into that).
* @param {array|string} keys - A string or an array of strings that the particle sprites will use as their texture. If an array one is picked at random.
* @param {array|number} frames - A frame number, or array of frames that the sprite will use. If an array one is picked at random.
* @param {number} quantity - The number of particles to generate.
* @param {boolean} [collide=false] - Sets the checkCollision.none flag on the particle sprites body.
* @param {boolean} [collideWorldBounds=false] - A particle can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World.
* @return {Phaser.Particles.Arcade.Emitter} This Emitter instance.
*/
Phaser.Particles.Arcade.Emitter.prototype.makeParticles = function (keys, frames, quantity, collide, collideWorldBounds) {
if (typeof frames == 'undefined')
{
frames = 0;
}
quantity = quantity || this.maxParticles;
collide = collide || 0;
if (typeof collideWorldBounds == 'undefined')
{
collideWorldBounds = false;
}
if (typeof frames === 'undefined') { frames = 0; }
if (typeof quantity === 'undefined') { quantity = this.maxParticles; }
if (typeof collide === 'undefined') { collide = false; }
if (typeof collideWorldBounds === 'undefined') { collideWorldBounds = false; }
var particle;
var i = 0;
var rndKey = keys;
var rndFrame = 0;
var rndFrame = frames;
while (i &lt; quantity)
{
if (this.particleClass == null)
if (this.particleClass === null)
{
if (typeof keys == 'object')
if (typeof keys === 'object')
{
rndKey = this.game.rnd.pick(keys);
}
if (typeof frames == 'object')
if (typeof frames === 'object')
{
rndFrame = this.game.rnd.pick(frames);
}
@@ -743,14 +717,14 @@ Phaser.Particles.Arcade.Emitter.prototype.makeParticles = function (keys, frames
// particle = new this.particleClass(this.game);
// }
if (collide > 0)
if (collide)
{
particle.body.allowCollision.any = true;
particle.body.allowCollision.none = false;
particle.body.checkCollision.any = true;
particle.body.checkCollision.none = false;
}
else
{
particle.body.allowCollision.none = true;
particle.body.checkCollision.none = true;
}
particle.body.collideWorldBounds = collideWorldBounds;
@@ -770,9 +744,9 @@ Phaser.Particles.Arcade.Emitter.prototype.makeParticles = function (keys, frames
}
/**
* Call this function to turn off all the particles and the emitter.
* @method Phaser.Particles.Arcade.Emitter#kill
*/
* Call this function to turn off all the particles and the emitter.
* @method Phaser.Particles.Arcade.Emitter#kill
*/
Phaser.Particles.Arcade.Emitter.prototype.kill = function () {
this.on = false;
@@ -782,10 +756,9 @@ Phaser.Particles.Arcade.Emitter.prototype.kill = function () {
}
/**
* Handy for bringing game objects "back to life". Just sets alive and exists back to true.
* In practice, this is most often called by &lt;code>Object.reset()&lt;/code>.
* @method Phaser.Particles.Arcade.Emitter#revive
*/
* Handy for bringing game objects "back to life". Just sets alive and exists back to true.
* @method Phaser.Particles.Arcade.Emitter#revive
*/
Phaser.Particles.Arcade.Emitter.prototype.revive = function () {
this.alive = true;
@@ -794,27 +767,19 @@ Phaser.Particles.Arcade.Emitter.prototype.revive = function () {
}
/**
* Call this function to start emitting particles.
* @method Phaser.Particles.Arcade.Emitter#start
* @param {boolean} explode - Whether the particles should all burst out at once.
* @param {number} lifespan - How long each particle lives once emitted. 0 = forever.
* @param {number} frequency - Ignored if Explode is set to true. Frequency is how often to emit a particle in ms.
* @param {number} quantity - How many particles to launch. 0 = "all of the particles".
*/
* Call this function to start emitting particles.
* @method Phaser.Particles.Arcade.Emitter#start
* @param {boolean} [explode=true] - Whether the particles should all burst out at once.
* @param {number} [lifespan=0] - How long each particle lives once emitted. 0 = forever.
* @param {number} [frequency=250] - Ignored if Explode is set to true. Frequency is how often to emit a particle in ms.
* @param {number} [quantity=0] - How many particles to launch. 0 = "all of the particles".
*/
Phaser.Particles.Arcade.Emitter.prototype.start = function (explode, lifespan, frequency, quantity) {
if (typeof explode !== 'boolean')
{
explode = true;
}
lifespan = lifespan || 0;
// How many ms between emissions?
frequency = frequency || 250;
// Total number of particles to emit
quantity = quantity || 0;
if (typeof explode === 'undefined') { explode = true; }
if (typeof lifespan === 'undefined') { lifespan = 0; }
if (typeof frequency === 'undefined') { frequency = 250; }
if (typeof quantity === 'undefined') { quantity = 0; }
this.revive();
@@ -840,9 +805,9 @@ Phaser.Particles.Arcade.Emitter.prototype.start = function (explode, lifespan, f
}
/**
* This function can be used both internally and externally to emit the next particle.
* @method Phaser.Particles.Arcade.Emitter#emitParticle
*/
* This function can be used both internally and externally to emit the next particle.
* @method Phaser.Particles.Arcade.Emitter#emitParticle
*/
Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () {
var particle = this.getFirstExists(false);
@@ -900,8 +865,7 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () {
particle.scale.setTo(scale, scale);
}
particle.body.drag.x = this.particleDrag.x;
particle.body.drag.y = this.particleDrag.y;
particle.body.friction = this.particleFriction;
particle.body.angularDrag = this.angularDrag;
}
@@ -909,8 +873,8 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () {
/**
* A more compact way of setting the width and height of the emitter.
* @method Phaser.Particles.Arcade.Emitter#setSize
* @param {number} width - The desired width of the emitter (particles are spawned randomly within these dimensions).
* @param {number} height - The desired height of the emitter.
* @param {number} width - The desired width of the emitter (particles are spawned randomly within these dimensions).
* @param {number} height - The desired height of the emitter.
*/
Phaser.Particles.Arcade.Emitter.prototype.setSize = function (width, height) {
@@ -922,8 +886,8 @@ Phaser.Particles.Arcade.Emitter.prototype.setSize = function (width, height) {
/**
* A more compact way of setting the X velocity range of the emitter.
* @method Phaser.Particles.Arcade.Emitter#setXSpeed
* @param {number} min - The minimum value for this range.
* @param {number} max - The maximum value for this range.
* @param {number} [min=0] - The minimum value for this range.
* @param {number} [max=0] - The maximum value for this range.
*/
Phaser.Particles.Arcade.Emitter.prototype.setXSpeed = function (min, max) {
@@ -938,8 +902,8 @@ Phaser.Particles.Arcade.Emitter.prototype.setXSpeed = function (min, max) {
/**
* A more compact way of setting the Y velocity range of the emitter.
* @method Phaser.Particles.Arcade.Emitter#setYSpeed
* @param {number} min - The minimum value for this range.
* @param {number} max - The maximum value for this range.
* @param {number} [min=0] - The minimum value for this range.
* @param {number} [max=0] - The maximum value for this range.
*/
Phaser.Particles.Arcade.Emitter.prototype.setYSpeed = function (min, max) {
@@ -954,8 +918,8 @@ Phaser.Particles.Arcade.Emitter.prototype.setYSpeed = function (min, max) {
/**
* A more compact way of setting the angular velocity constraints of the emitter.
* @method Phaser.Particles.Arcade.Emitter#setRotation
* @param {number} min - The minimum value for this range.
* @param {number} max - The maximum value for this range.
* @param {number} [min=0] - The minimum value for this range.
* @param {number} [max=0] - The maximum value for this range.
*/
Phaser.Particles.Arcade.Emitter.prototype.setRotation = function (min, max) {
@@ -968,14 +932,17 @@ Phaser.Particles.Arcade.Emitter.prototype.setRotation = function (min, max) {
}
/**
* Change the emitter's midpoint to match the midpoint of a &lt;code>Object&lt;/code>.
* Change the emitters center to match the center of any object with a `center` property, such as a Sprite.
* @method Phaser.Particles.Arcade.Emitter#at
* @param {object} object - The &lt;code>Object&lt;/code> that you want to sync up with.
* @param {object|Phaser.Sprite} object - The object that you wish to match the center with.
*/
Phaser.Particles.Arcade.Emitter.prototype.at = function (object) {
this.emitX = object.center.x;
this.emitY = object.center.y;
if (object.center)
{
this.emitX = object.center.x;
this.emitY = object.center.y;
}
}
@@ -1111,13 +1078,13 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "bottom", {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+36 -21
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -447,6 +455,7 @@
Phaser.Events = function (sprite) {
this.parent = sprite;
this.onAddedToGroup = new Phaser.Signal();
this.onRemovedFromGroup = new Phaser.Signal();
this.onKilled = new Phaser.Signal();
@@ -464,6 +473,9 @@ Phaser.Events = function (sprite) {
this.onAnimationComplete = null;
this.onAnimationLoop = null;
this.onBeginContact = null;
this.onEndContact = null;
};
Phaser.Events.prototype = {
@@ -496,7 +508,10 @@ Phaser.Events.prototype = {
}
};</pre>
};
Phaser.Events.prototype.constructor = Phaser.Events;
</pre>
</article>
</section>
@@ -511,13 +526,13 @@ Phaser.Events.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+41 -24
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -475,9 +483,9 @@ Phaser.Filter = function (game, uniforms, fragmentSrc) {
*/
this.uniforms = {
resolution: { type: '3f', value: { x: 256, y: 256, z: 0 }},
time: { type: '1f', value: 0 },
mouse: { type: '4f', value: { x: 0, y: 0, z: 0, w: 0 }}
resolution: { type: '2f', value: { x: 256, y: 256 }},
mouse: { type: '2f', value: { x: 0.0, y: 0.0 }}
};
@@ -520,8 +528,15 @@ Phaser.Filter.prototype = {
if (typeof pointer !== 'undefined')
{
this.uniforms.mouse.x = pointer.x;
this.uniforms.mouse.y = pointer.y;
if (pointer.x > 0)
{
this.uniforms.mouse.x = pointer.x.toFixed(2);
}
if (pointer.y > 0)
{
this.uniforms.mouse.y = pointer.y.toFixed(2);
}
}
this.uniforms.time.value = this.game.time.totalElapsedSeconds();
@@ -540,6 +555,8 @@ Phaser.Filter.prototype = {
};
Phaser.Filter.prototype.constructor = Phaser.Filter;
/**
* @name Phaser.Filter#width
* @property {number} width - The width (resolution uniform)
@@ -586,13 +603,13 @@ Object.defineProperty(Phaser.Filter.prototype, 'height', {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+30 -20
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -581,6 +589,8 @@ Phaser.Frame.prototype = {
}
};
Phaser.Frame.prototype.constructor = Phaser.Frame;
</pre>
</article>
</section>
@@ -596,13 +606,13 @@ Phaser.Frame.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+30 -20
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -646,6 +654,8 @@ Phaser.FrameData.prototype = {
};
Phaser.FrameData.prototype.constructor = Phaser.FrameData;
/**
* @name Phaser.FrameData#total
* @property {number} total - The total number of frames in this FrameData set.
@@ -673,13 +683,13 @@ Object.defineProperty(Phaser.FrameData.prototype, "total", {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+277 -58
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -440,64 +448,68 @@
* @param {number} [width=800] - The width of your game in game pixels.
* @param {number} [height=600] - The height of your game in game pixels.
* @param {number} [renderer=Phaser.AUTO] - Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all).
* @param {HTMLElement} [parent=''] - The Games DOM parent.
* @param {any} [state=null] - Description.
* @param {string|HTMLElement} [parent=''] - The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself.
* @param {object} [state=null] - The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null.
* @param {boolean} [transparent=false] - Use a transparent canvas background or not.
* @param {boolean} [antialias=true] - Anti-alias graphics.
*/
Phaser.Game = function (width, height, renderer, parent, state, transparent, antialias) {
width = width || 800;
height = height || 600;
renderer = renderer || Phaser.AUTO;
parent = parent || '';
state = state || null;
if (typeof transparent == 'undefined') { transparent = false; }
if (typeof antialias == 'undefined') { antialias = true; }
/**
* @property {number} id - Phaser Game ID (for when Pixi supports multiple instances).
*/
this.id = Phaser.GAMES.push(this) - 1;
/**
* @property {HTMLElement} parent - The Games DOM parent.
* @property {object} config - The Phaser.Game configuration object.
*/
this.parent = parent;
this.config = null;
// Do some more intelligent size parsing here, so they can set "100%" for example, maybe pass the scale mode in here too?
/**
* @property {HTMLElement} parent - The Games DOM parent.
* @default
*/
this.parent = '';
/**
* @property {number} width - The Game width (in pixels).
* @default
*/
this.width = width;
this.width = 800;
/**
* @property {number} height - The Game height (in pixels).
* @default
*/
this.height = height;
this.height = 600;
/**
* @property {boolean} transparent - Use a transparent canvas background or not.
* @default
*/
this.transparent = transparent;
this.transparent = false;
/**
* @property {boolean} antialias - Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality).
* @default
*/
this.antialias = antialias;
this.antialias = true;
/**
* @property {number} renderer - The Pixi Renderer
* @default
*/
this.renderer = null;
this.renderer = Phaser.AUTO;
/**
* @property {number} renderType - The Renderer this Phaser.Game will use. Either Phaser.RENDERER_AUTO, Phaser.RENDERER_CANVAS or Phaser.RENDERER_WEBGL.
*/
this.renderType = Phaser.AUTO;
/**
* @property {number} state - The StateManager.
*/
this.state = new Phaser.StateManager(this, state);
this.state = null;
/**
* @property {boolean} _paused - Is game paused?
@@ -506,11 +518,6 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
*/
this._paused = false;
/**
* @property {number} renderType - The Renderer this Phaser.Game will use. Either Phaser.RENDERER_AUTO, Phaser.RENDERER_CANVAS or Phaser.RENDERER_WEBGL.
*/
this.renderType = renderer;
/**
* @property {boolean} _loadComplete - Whether load complete loading or not.
* @private
@@ -650,6 +657,68 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
*/
this.particles = null;
/**
* @property {boolean} stepping - Enable core loop stepping with Game.enableStep().
* @default
* @readonly
*/
this.stepping = false;
/**
* @property {boolean} stepping - An internal property used by enableStep, but also useful to query from your own game objects.
* @default
* @readonly
*/
this.pendingStep = false;
/**
* @property {number} stepCount - When stepping is enabled this contains the current step cycle.
* @default
* @readonly
*/
this.stepCount = 0;
// Parse the configuration object (if any)
if (arguments.length === 1 && typeof arguments[0] === 'object')
{
this.parseConfig(arguments[0]);
}
else
{
if (typeof width !== 'undefined')
{
this.width = width;
}
if (typeof height !== 'undefined')
{
this.height = height;
}
if (typeof renderer !== 'undefined')
{
this.renderer = renderer;
this.renderType = renderer;
}
if (typeof parent !== 'undefined')
{
this.parent = parent;
}
if (typeof transparent !== 'undefined')
{
this.transparent = transparent;
}
if (typeof antialias !== 'undefined')
{
this.antialias = antialias;
}
this.state = new Phaser.StateManager(this, state);
}
var _this = this;
this._onBoot = function () {
@@ -672,6 +741,99 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
Phaser.Game.prototype = {
/**
* Parses a Game configuration object.
*
* @method Phaser.Game#parseConfig
* @protected
*/
parseConfig: function (config) {
this.config = config;
if (config['width'])
{
this.width = this.parseDimension(config['width'], 0);
}
if (config['height'])
{
this.height = this.parseDimension(config['height'], 1);
}
if (config['renderer'])
{
this.renderer = config['renderer'];
this.renderType = config['renderer'];
}
if (config['parent'])
{
this.parent = config['parent'];
}
if (config['transparent'])
{
this.transparent = config['transparent'];
}
if (config['antialias'])
{
this.antialias = config['antialias'];
}
var state = null;
if (config['state'])
{
state = config['state'];
}
this.state = new Phaser.StateManager(this, state);
},
/**
* Get dimension.
*
* @method Phaser.Game#parseDimension
* @protected
*/
parseDimension: function (size, dimension) {
var f = 0;
var px = 0;
if (typeof size === 'string')
{
// %?
if (size.substr(-1) === '%')
{
f = parseInt(size, 10) / 100;
if (dimension === 0)
{
px = window.innerWidth * f;
}
else
{
px = window.innerHeight * f;
}
}
else
{
px = parseInt(size, 10);
}
}
else
{
px = size;
}
return px;
},
/**
* Initialize engine sub modules and start the game.
*
@@ -721,6 +883,7 @@ Phaser.Game.prototype = {
this.net = new Phaser.Net(this);
this.debug = new Phaser.Utils.Debug(this);
this.time.boot();
this.stage.boot();
this.world.boot();
this.input.boot();
@@ -795,6 +958,14 @@ Phaser.Game.prototype = {
*/
setUpRenderer: function () {
/*
if (this.device.trident)
{
// Pixi WebGL renderer on IE11 doesn't work correctly with masks, if you need them you may want to comment this block out
this.renderType = Phaser.CANVAS;
}
*/
if (this.renderType === Phaser.HEADLESS || this.renderType === Phaser.CANVAS || (this.renderType === Phaser.AUTO && this.device.webGL === false))
{
if (this.device.canvas)
@@ -861,20 +1032,28 @@ Phaser.Game.prototype = {
}
else
{
this.plugins.preUpdate();
this.physics.preUpdate();
if (!this.pendingStep)
{
if (this.stepping)
{
this.pendingStep = true;
}
this.stage.update();
this.input.update();
this.tweens.update();
this.sound.update();
this.world.update();
this.particles.update();
this.state.update();
this.plugins.update();
this.plugins.preUpdate();
this.world.preUpdate();
this.world.postUpdate();
this.plugins.postUpdate();
this.stage.update();
this.tweens.update();
this.sound.update();
this.input.update();
this.state.update();
this.world.update();
this.particles.update();
this.plugins.update();
this.world.postUpdate();
this.plugins.postUpdate();
}
if (this.renderType !== Phaser.HEADLESS)
{
@@ -884,11 +1063,49 @@ Phaser.Game.prototype = {
this.plugins.postRender();
}
}
},
/**
* Enable core game loop stepping. When enabled you must call game.step() directly (perhaps via a DOM button?)
* Calling step will advance the game loop by one frame. This is extremely useful to hard to track down errors!
*
* @method Phaser.Game#enableStep
*/
enableStep: function () {
this.stepping = true;
this.pendingStep = false;
this.stepCount = 0;
},
/**
* Disables core game loop stepping.
*
* @method Phaser.Game#disableStep
*/
disableStep: function () {
this.stepping = false;
this.pendingStep = false;
},
/**
* When stepping is enabled you must call this function directly (perhaps via a DOM button?) to advance the game loop by one frame.
* This is extremely useful to hard to track down errors! Use the internal stepCount property to monitor progress.
*
* @method Phaser.Game#step
*/
step: function () {
this.pendingStep = false;
this.stepCount++;
},
/**
* Nuke the entire game from orbit
*
@@ -916,6 +1133,8 @@ Phaser.Game.prototype = {
};
Phaser.Game.prototype.constructor = Phaser.Game;
/**
* The paused state of the Game. A paused game doesn't update any of its subsystems.
* When a game is paused the onPause event is dispatched. When it is resumed the onResume event is dispatched.
@@ -969,13 +1188,13 @@ Object.defineProperty(Phaser.Game.prototype, "paused", {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+92 -74
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -470,15 +478,19 @@ Phaser.GameObjectFactory.prototype = {
* @param {number} y - Y position of the new sprite.
* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
* @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.
* @param {Phaser.Group} [group] - Optional Group to add the object to. If not specified it will be added to the World group.
* @returns {Phaser.Sprite} the newly created sprite object.
*/
sprite: function (x, y, key, frame) {
sprite: function (x, y, key, frame, group) {
return this.world.create(x, y, key, frame);
if (typeof group === 'undefined') { group = this.world; }
return group.create(x, y, key, frame);
},
/**
* DEPRECATED - will be removed in Phaser 1.2
* Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent.
*
* @method Phaser.GameObjectFactory#child
@@ -512,8 +524,8 @@ Phaser.GameObjectFactory.prototype = {
* A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
*
* @method Phaser.GameObjectFactory#group
* @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any.
* @param {string} [name=group] - A name for this Group. Not used internally but useful for debugging.
* @param {any} parent - The parent Group or DisplayObjectContainer that will hold this group, if any.
* @param {string} [name='group'] - A name for this Group. Not used internally but useful for debugging.
* @return {Phaser.Group} The newly created group.
*/
group: function (parent, name) {
@@ -523,7 +535,7 @@ Phaser.GameObjectFactory.prototype = {
},
/**
* Creates a new instance of the Sound class.
* Creates a new Sound object.
*
* @method Phaser.GameObjectFactory#audio
* @param {string} key - The Game.cache key of the sound that this object will use.
@@ -539,7 +551,23 @@ Phaser.GameObjectFactory.prototype = {
},
/**
* Creates a new &lt;code>TileSprite&lt;/code>.
* Creates a new Sound object.
*
* @method Phaser.GameObjectFactory#sound
* @param {string} key - The Game.cache key of the sound that this object will use.
* @param {number} [volume=1] - The volume at which the sound will be played.
* @param {boolean} [loop=false] - Whether or not the sound will loop.
* @param {boolean} [connect=true] - Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.
* @return {Phaser.Sound} The newly created text object.
*/
sound: function (key, volume, loop, connect) {
return this.game.sound.add(key, volume, loop, connect);
},
/**
* Creates a new TileSprite object.
*
* @method Phaser.GameObjectFactory#tileSprite
* @param {number} x - X position of the new tileSprite.
@@ -547,33 +575,38 @@ Phaser.GameObjectFactory.prototype = {
* @param {number} width - the width of the tilesprite.
* @param {number} height - the height of the tilesprite.
* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
* @param {Phaser.Group} [group] - Optional Group to add the object to. If not specified it will be added to the World group.
* @return {Phaser.TileSprite} The newly created tileSprite object.
*/
tileSprite: function (x, y, width, height, key, frame) {
tileSprite: function (x, y, width, height, key, group) {
return this.world.add(new Phaser.TileSprite(this.game, x, y, width, height, key, frame));
if (typeof group === 'undefined') { group = this.world; }
return group.add(new Phaser.TileSprite(this.game, x, y, width, height, key));
},
/**
* Creates a new &lt;code>Text&lt;/code>.
* Creates a new Text object.
*
* @method Phaser.GameObjectFactory#text
* @param {number} x - X position of the new text object.
* @param {number} y - Y position of the new text object.
* @param {string} text - The actual text that will be written.
* @param {object} style - The style object containing style attributes like font, font size , etc.
* @param {Phaser.Group} [group] - Optional Group to add the object to. If not specified it will be added to the World group.
* @return {Phaser.Text} The newly created text object.
*/
text: function (x, y, text, style) {
text: function (x, y, text, style, group) {
return this.world.add(new Phaser.Text(this.game, x, y, text, style));
if (typeof group === 'undefined') { group = this.world; }
return group.add(new Phaser.Text(this.game, x, y, text, style));
},
/**
* Creates a new &lt;code>Button&lt;/code> object.
* Creates a new Button object.
*
* @method Phaser.GameObjectFactory#button
* @param {number} [x] X position of the new button object.
@@ -584,25 +617,32 @@ Phaser.GameObjectFactory.prototype = {
* @param {string|number} [overFrame] This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.
* @param {string|number} [outFrame] This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.
* @param {string|number} [downFrame] This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.
* @param {string|number} [upFrame] This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name.
* @param {Phaser.Group} [group] - Optional Group to add the object to. If not specified it will be added to the World group.
* @return {Phaser.Button} The newly created button object.
*/
button: function (x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) {
button: function (x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame, group) {
return this.world.add(new Phaser.Button(this.game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame));
if (typeof group === 'undefined') { group = this.world; }
return group.add(new Phaser.Button(this.game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame));
},
/**
* Creates a new &lt;code>Graphics&lt;/code> object.
* Creates a new Graphics object.
*
* @method Phaser.GameObjectFactory#graphics
* @param {number} x - X position of the new graphics object.
* @param {number} y - Y position of the new graphics object.
* @param {Phaser.Group} [group] - Optional Group to add the object to. If not specified it will be added to the World group.
* @return {Phaser.Graphics} The newly created graphics object.
*/
graphics: function (x, y) {
graphics: function (x, y, group) {
return this.world.add(new Phaser.Graphics(this.game, x, y));
if (typeof group === 'undefined') { group = this.world; }
return group.add(new Phaser.Graphics(this.game, x, y));
},
@@ -624,16 +664,19 @@ Phaser.GameObjectFactory.prototype = {
},
/**
* * Create a new &lt;code>BitmapText&lt;/code>.
* * Create a new BitmapText object.
*
* @method Phaser.GameObjectFactory#bitmapText
* @param {number} x - X position of the new bitmapText object.
* @param {number} y - Y position of the new bitmapText object.
* @param {string} text - The actual text that will be written.
* @param {object} style - The style object containing style attributes like font, font size , etc.
* @param {Phaser.Group} [group] - Optional Group to add the object to. If not specified it will be added to the World group.
* @return {Phaser.BitmapText} The newly created bitmapText object.
*/
bitmapText: function (x, y, text, style) {
bitmapText: function (x, y, text, style, group) {
if (typeof group === 'undefined') { group = this.world; }
return this.world.add(new Phaser.BitmapText(this.game, x, y, text, style));
@@ -643,41 +686,13 @@ Phaser.GameObjectFactory.prototype = {
* Creates a new Tilemap object.
*
* @method Phaser.GameObjectFactory#tilemap
* @param {string} key - Asset key for the JSON file.
* @param {string} key - Asset key for the JSON or CSV map data in the cache.
* @param {object|string} tilesets - An object mapping Cache.tileset keys with the tileset names in the JSON file. If a string is provided that will be used.
* @return {Phaser.Tilemap} The newly created tilemap object.
*/
tilemap: function (key) {
tilemap: function (key, tilesets) {
return new Phaser.Tilemap(this.game, key);
},
/**
* Creates a new Tileset object.
*
* @method Phaser.GameObjectFactory#tileset
* @param {string} key - The image key as defined in the Game.Cache to use as the tileset.
* @return {Phaser.Tileset} The newly created tileset object.
*/
tileset: function (key) {
return this.game.cache.getTileset(key);
},
/**
* Creates a new Tilemap Layer object.
*
* @method Phaser.GameObjectFactory#tilemapLayer
* @param {number} x - X position of the new tilemapLayer.
* @param {number} y - Y position of the new tilemapLayer.
* @param {number} width - the width of the tilemapLayer.
* @param {number} height - the height of the tilemapLayer.
* @return {Phaser.TilemapLayer} The newly created tilemaplayer object.
*/
tilemapLayer: function (x, y, width, height, tileset, tilemap, layer) {
return this.world.add(new Phaser.TilemapLayer(this.game, x, y, width, height, tileset, tilemap, layer));
return new Phaser.Tilemap(this.game, key, tilesets);
},
@@ -701,7 +716,7 @@ Phaser.GameObjectFactory.prototype = {
},
/**
* A BitmapData object which can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.
* Experimental: A BitmapData object which can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.
*
* @method Phaser.GameObjectFactory#bitmapData
* @param {number} [width=256] - The width of the BitmapData in pixels.
@@ -734,7 +749,10 @@ Phaser.GameObjectFactory.prototype = {
}
};</pre>
};
Phaser.GameObjectFactory.prototype.constructor = Phaser.GameObjectFactory;
</pre>
</article>
</section>
@@ -749,13 +767,13 @@ Phaser.GameObjectFactory.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+1071
View File
File diff suppressed because it is too large Load Diff
+668
View File
@@ -0,0 +1,668 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Source: input/GamepadButton.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<a class="brand" href="index.html">Phaser</a>
<ul class="nav">
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.html">Phaser</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.Animation.html">Animation</a>
</li>
<li>
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
<li>
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li>
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li>
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li>
<a href="Phaser.Button.html">Button</a>
</li>
<li>
<a href="Phaser.Cache.html">Cache</a>
</li>
<li>
<a href="Phaser.Camera.html">Camera</a>
</li>
<li>
<a href="Phaser.Canvas.html">Canvas</a>
</li>
<li>
<a href="Phaser.Circle.html">Circle</a>
</li>
<li>
<a href="Phaser.Color.html">Color</a>
</li>
<li>
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
<li>
<a href="Phaser.Easing.Back.html">Back</a>
</li>
<li>
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
<li>
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
<li>
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
<li>
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
<li>
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
<li>
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
<li>
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
<li>
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
<li>
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
<li>
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
<li>
<a href="Phaser.Events.html">Events</a>
</li>
<li>
<a href="Phaser.Filter.html">Filter</a>
</li>
<li>
<a href="Phaser.Frame.html">Frame</a>
</li>
<li>
<a href="Phaser.FrameData.html">FrameData</a>
</li>
<li>
<a href="Phaser.Game.html">Game</a>
</li>
<li>
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
<li>
<a href="Phaser.Group.html">Group</a>
</li>
<li>
<a href="Phaser.Input.html">Input</a>
</li>
<li>
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
<li>
<a href="Phaser.Key.html">Key</a>
</li>
<li>
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
<li>
<a href="Phaser.Loader.html">Loader</a>
</li>
<li>
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
<li>
<a href="Phaser.Math.html">Math</a>
</li>
<li>
<a href="Phaser.Mouse.html">Mouse</a>
</li>
<li>
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
<li>
<a href="Phaser.Net.html">Net</a>
</li>
<li>
<a href="Phaser.Particles.html">Particles</a>
</li>
<li>
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
<li>
<a href="Phaser.Physics.html">Physics</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Plugin.html">Plugin</a>
</li>
<li>
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
<li>
<a href="Phaser.Point.html">Point</a>
</li>
<li>
<a href="Phaser.Pointer.html">Pointer</a>
</li>
<li>
<a href="Phaser.Polygon.html">Polygon</a>
</li>
<li>
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
<li>
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
<li>
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
<li>
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
<li>
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
<li>
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
<li>
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
<li>
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li>
<a href="Phaser.Stage.html">Stage</a>
</li>
<li>
<a href="Phaser.StageScaleMode.html">StageScaleMode</a>
</li>
<li>
<a href="Phaser.State.html">State</a>
</li>
<li>
<a href="Phaser.StateManager.html">StateManager</a>
</li>
<li>
<a href="Phaser.Text.html">Text</a>
</li>
<li>
<a href="Phaser.Tile.html">Tile</a>
</li>
<li>
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li>
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li>
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li>
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li>
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li>
<a href="Phaser.Time.html">Time</a>
</li>
<li>
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
<li>
<a href="Phaser.Tween.html">Tween</a>
</li>
<li>
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
<li>
<a href="Phaser.Utils.html">Utils</a>
</li>
<li>
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
<li>
<a href="Phaser.World.html">World</a>
</li>
<li>
<a href="SignalBinding.html">SignalBinding</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="global.html#SAT">SAT</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div id="main">
<h1 class="page-title">Source: input/GamepadButton.js</h1>
<section>
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author @karlmacklin &lt;tacklemcclean@gmail.com>
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @class Phaser.GamepadButton
* @classdesc If you need more fine-grained control over the handling of specific buttons you can create and use Phaser.GamepadButton objects.
* @constructor
* @param {Phaser.Game} game - Current game instance.
* @param {number} buttoncode - The button code this GamepadButton is responsible for.
*/
Phaser.GamepadButton = function (game, buttoncode) {
/**
* @property {Phaser.Game} game - A reference to the currently running game.
*/
this.game = game;
/**
* @property {boolean} isDown - The "down" state of the button.
* @default
*/
this.isDown = false;
/**
* @property {boolean} isUp - The "up" state of the button.
* @default
*/
this.isUp = false;
/**
* @property {number} timeDown - The timestamp when the button was last pressed down.
* @default
*/
this.timeDown = 0;
/**
* If the button is down this value holds the duration of that button press and is constantly updated.
* If the button is up it holds the duration of the previous down session.
* @property {number} duration - The number of milliseconds this button has been held down for.
* @default
*/
this.duration = 0;
/**
* @property {number} timeUp - The timestamp when the button was last released.
* @default
*/
this.timeUp = 0;
/**
* @property {number} repeats - If a button is held down this holds down the number of times the button has 'repeated'.
* @default
*/
this.repeats = 0;
/**
* @property {number} value - Button value. Mainly useful for checking analog buttons (like shoulder triggers)
* @default
*/
this.value = 0;
/**
* @property {number} buttonCode - The buttoncode of this button.
*/
this.buttonCode = buttoncode;
/**
* @property {Phaser.Signal} onDown - This Signal is dispatched every time this GamepadButton is pressed down. It is only dispatched once (until the button is released again).
*/
this.onDown = new Phaser.Signal();
/**
* @property {Phaser.Signal} onUp - This Signal is dispatched every time this GamepadButton is pressed down. It is only dispatched once (until the button is released again).
*/
this.onUp = new Phaser.Signal();
/**
* @property {Phaser.Signal} onFloat - This Signal is dispatched every time this GamepadButton changes floating value (between (but not exactly) 0 and 1)
*/
this.onFloat = new Phaser.Signal();
};
Phaser.GamepadButton.prototype = {
/**
* Called automatically by Phaser.SinglePad.
* @method Phaser.GamepadButton#processButtonDown
* @param {Object} value - Button value
* @protected
*/
processButtonDown: function (value) {
if (this.isDown)
{
this.duration = this.game.time.now - this.timeDown;
this.repeats++;
}
else
{
this.isDown = true;
this.isUp = false;
this.timeDown = this.game.time.now;
this.duration = 0;
this.repeats = 0;
this.value = value;
this.onDown.dispatch(this, value);
}
},
/**
* Called automatically by Phaser.SinglePad.
* @method Phaser.GamepadButton#processButtonUp
* @param {Object} value - Button value
* @protected
*/
processButtonUp: function (value) {
this.isDown = false;
this.isUp = true;
this.timeUp = this.game.time.now;
this.value = value;
this.onUp.dispatch(this, value);
},
/**
* Called automatically by Phaser.Gamepad.
* @method Phaser.GamepadButton#processButtonFloat
* @param {Object} value - Button value
* @protected
*/
processButtonFloat: function (value) {
this.value = value;
this.onFloat.dispatch(this, value);
},
/**
* Returns the "just pressed" state of this button. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).
* @method Phaser.GamepadButton#justPressed
* @param {number} [duration=250] - The duration below which the button is considered as being just pressed.
* @return {boolean} True if the button is just pressed otherwise false.
*/
justPressed: function (duration) {
if (typeof duration === "undefined") { duration = 250; }
return (this.isDown && this.duration &lt; duration);
},
/**
* Returns the "just released" state of this button. Just released is considered as being true if the button was released within the duration given (default 250ms).
* @method Phaser.GamepadButton#justPressed
* @param {number} [duration=250] - The duration below which the button is considered as being just released.
* @return {boolean} True if the button is just pressed otherwise false.
*/
justReleased: function (duration) {
if (typeof duration === "undefined") { duration = 250; }
return (this.isDown === false && (this.game.time.now - this.timeUp &lt; duration));
}
};
Phaser.GamepadButton.prototype.constructor = Phaser.GamepadButton;
</pre>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
<br clear="both">
</div>
</div>
<script src="scripts/sunlight.js"></script>
<script src="scripts/sunlight.javascript.js"></script>
<script src="scripts/sunlight-plugin.doclinks.js"></script>
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
<script src="scripts/sunlight-plugin.menu.js"></script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.scrollTo.js"></script>
<script src="scripts/jquery.localScroll.js"></script>
<script src="scripts/bootstrap-dropdown.js"></script>
<script src="scripts/toc.js"></script>
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
<script>
$( function () {
$( "#toc" ).toc( {
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
</script>
</body>
</html>
+29 -21
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -459,7 +467,7 @@ Phaser.Graphics.prototype.constructor = Phaser.Graphics;
/**
* Destroy this Graphics instance.
*
* @method Phaser.Sprite.prototype.destroy
* @method Phaser.Graphics.prototype.destroy
*/
Phaser.Graphics.prototype.destroy = function() {
@@ -540,13 +548,13 @@ Object.defineProperty(Phaser.Graphics.prototype, 'y', {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+201 -174
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -433,32 +441,32 @@
* @classdesc A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
* @constructor
* @param {Phaser.Game} game - A reference to the currently running game.
* @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any.
* @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any. If undefined it will use game.world.
* @param {string} [name=group] - A name for this Group. Not used internally but useful for debugging.
* @param {boolean} [useStage=false] - Should the DisplayObjectContainer this Group creates be added to the World (default, false) or direct to the Stage (true).
*/
Phaser.Group = function (game, parent, name, useStage) {
if (typeof parent === 'undefined' || typeof parent === null)
/**
* @property {Phaser.Game} game - A reference to the currently running Game.
*/
this.game = game;
if (typeof parent === 'undefined')
{
parent = game.world;
}
/**
* @property {string} name - A name for this Group. Not used internally but useful for debugging.
*/
this.name = name || 'group';
if (typeof useStage === 'undefined')
{
useStage = false;
}
/**
* @property {Phaser.Game} game - A reference to the currently running Game.
*/
this.game = game;
/**
* @property {string} name - A name for this Group. Not used internally but useful for debugging.
*/
this.name = name || 'group';
if (useStage)
{
this._container = this.game.stage._stage;
@@ -473,7 +481,6 @@ Phaser.Group = function (game, parent, name, useStage) {
if (parent instanceof Phaser.Group)
{
parent._container.addChild(this._container);
parent._container.updateTransform();
}
else
{
@@ -494,6 +501,12 @@ Phaser.Group = function (game, parent, name, useStage) {
*/
this.type = Phaser.GROUP;
/**
* @property {boolean} alive - The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.
* @default
*/
this.alive = true;
/**
* @property {boolean} exists - If exists is true the the Group is updated, otherwise it is skipped.
* @default
@@ -501,9 +514,22 @@ Phaser.Group = function (game, parent, name, useStage) {
this.exists = true;
/**
* @property {Phaser.Point} scale - Replaces the PIXI.Point with a slightly more flexible one.
* @property {Phaser.Group} group - The parent Group of this Group, if a child of another.
*/
this.scale = new Phaser.Point(1, 1);
this.group = null;
// Replaces the PIXI.Point with a slightly more flexible one.
this._container.scale = new Phaser.Point(1, 1);
/**
* @property {Phaser.Point} scale - The scane of the Group container.
*/
this.scale = this._container.scale;
/**
* @property {Phaser.Point} pivot - The pivot point of the Group container.
*/
this.pivot = this._container.pivot;
/**
* The cursor is a simple way to iterate through the objects in a Group using the Group.next and Group.previous functions.
@@ -561,16 +587,27 @@ Phaser.Group.prototype = {
if (child.group !== this)
{
child.group = this;
if (child.events)
if (child.type && child.type === Phaser.GROUP)
{
child.events.onAddedToGroup.dispatch(child, this);
child.group = this;
this._container.addChild(child._container);
child._container.updateTransform();
}
else
{
child.group = this;
this._container.addChild(child);
this._container.addChild(child);
child.updateTransform();
child.updateTransform();
if (child.events)
{
child.events.onAddedToGroup.dispatch(child, this);
}
}
if (this.cursor === null)
{
@@ -595,16 +632,27 @@ Phaser.Group.prototype = {
if (child.group !== this)
{
child.group = this;
if (child.events)
if (child.type && child.type === Phaser.GROUP)
{
child.events.onAddedToGroup.dispatch(child, this);
child.group = this;
this._container.addChildAt(child._container, index);
child._container.updateTransform();
}
else
{
child.group = this;
this._container.addChildAt(child, index);
this._container.addChildAt(child, index);
child.updateTransform();
child.updateTransform();
if (child.events)
{
child.events.onAddedToGroup.dispatch(child, this);
}
}
if (this.cursor === null)
{
@@ -643,7 +691,7 @@ Phaser.Group.prototype = {
*/
create: function (x, y, key, frame, exists) {
if (typeof exists == 'undefined') { exists = true; }
if (typeof exists === 'undefined') { exists = true; }
var child = new Phaser.Sprite(this.game, x, y, key, frame);
@@ -652,15 +700,15 @@ Phaser.Group.prototype = {
child.visible = exists;
child.alive = exists;
this._container.addChild(child);
child.updateTransform();
if (child.events)
{
child.events.onAddedToGroup.dispatch(child, this);
}
this._container.addChild(child);
child.updateTransform();
if (this.cursor === null)
{
this.cursor = child;
@@ -683,7 +731,7 @@ Phaser.Group.prototype = {
*/
createMultiple: function (quantity, key, frame, exists) {
if (typeof exists == 'undefined') { exists = false; }
if (typeof exists === 'undefined') { exists = false; }
for (var i = 0; i &lt; quantity; i++)
{
@@ -694,14 +742,15 @@ Phaser.Group.prototype = {
child.visible = exists;
child.alive = exists;
this._container.addChild(child);
child.updateTransform();
if (child.events)
{
child.events.onAddedToGroup.dispatch(child, this);
}
this._container.addChild(child);
child.updateTransform();
if (this.cursor === null)
{
this.cursor = child;
@@ -755,6 +804,11 @@ Phaser.Group.prototype = {
},
/**
* Internal test.
*
* @method Phaser.Group#childTest
*/
childTest: function (prefix, child) {
var s = prefix + ' next: ';
@@ -783,13 +837,16 @@ Phaser.Group.prototype = {
},
/**
* Internal test.
*
* @method Phaser.Group#swapIndex
*/
swapIndex: function (index1, index2) {
var child1 = this.getAt(index1);
var child2 = this.getAt(index2);
console.log('swapIndex ', index1, ' with ', index2);
this.swap(child1, child2);
},
@@ -1054,6 +1111,32 @@ Phaser.Group.prototype = {
},
/**
* This function allows you to quickly set a property on a single child of this Group to a new value.
* The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.
*
* @method Phaser.Group#set
* @param {Phaser.Sprite} child - The child to set the property on.
* @param {string} key - The property, as a string, to be set. For example: 'body.velocity.x'
* @param {*} value - The value that will be set.
* @param {boolean} [checkAlive=false] - If set then the child will only be updated if alive=true.
* @param {boolean} [checkVisible=false] - If set then the child will only be updated if visible=true.
* @param {number} [operation=0] - Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.
*/
set: function (child, key, value, checkAlive, checkVisible, operation) {
key = key.split('.');
if (typeof checkAlive === 'undefined') { checkAlive = false; }
if (typeof checkVisible === 'undefined') { checkVisible = false; }
if ((checkAlive === false || (checkAlive && child.alive)) && (checkVisible === false || (checkVisible && child.visible)))
{
this.setProperty(child, key, value, operation);
}
},
/**
* This function allows you to quickly set the same property across all children of this Group to a new value.
* The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.
@@ -1189,7 +1272,7 @@ Phaser.Group.prototype = {
},
/**
* Calls a function on all of the children that have exists=true in this Group.
* Returns a reference to a function that exists on a child of the Group based on the given callback array.
*
* @method Phaser.Group#callbackFromArray
* @param {object} child - The object to inspect.
@@ -1247,7 +1330,7 @@ Phaser.Group.prototype = {
*
* @method Phaser.Group#callAll
* @param {string} method - A string containing the name of the function that will be called. The function must exist on the child.
* @param {string} [context=''] - A string containing the context under which the method will be executed. Leave to '' to default to the child.
* @param {string} [context=null] - A string containing the context under which the method will be executed. Set to null to default to the child.
* @param {...*} parameter - Additional parameters that will be passed to the method.
*/
callAll: function (method, context) {
@@ -1314,6 +1397,7 @@ Phaser.Group.prototype = {
* Allows you to call your own function on each member of this Group. You must pass the callback and context in which it will run.
* After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child.
* For example: Group.forEach(awardBonusGold, this, true, 100, 500)
* Note: Currently this will skip any children which are Groups themselves.
*
* @method Phaser.Group#forEach
* @param {function} callback - The function that will be called. Each child of the Group will be passed to it as its first parameter.
@@ -1351,11 +1435,11 @@ Phaser.Group.prototype = {
},
/**
* Allows you to call your own function on each alive member of this Group (where child.alive=true). You must pass the callback and context in which it will run.
* Allows you to call your own function on each existing member of this Group (where child.exists=true). You must pass the callback and context in which it will run.
* You can add as many parameters as you like, which will all be passed to the callback along with the child.
* For example: Group.forEachAlive(causeDamage, this, 500)
* For example: Group.forEachExists(causeDamage, this, 500)
*
* @method Phaser.Group#forEachAlive
* @method Phaser.Group#forEachExists
* @param {function} callback - The function that will be called. Each child of the Group will be passed to it as its first parameter.
* @param {Object} callbackContext - The context in which the function should be called (usually 'this').
*/
@@ -1464,12 +1548,13 @@ Phaser.Group.prototype = {
* @param {number} returnType - How to return the data from this method. Either Phaser.Group.RETURN_NONE, Phaser.Group.RETURN_TOTAL or Phaser.Group.RETURN_CHILD.
* @param {function} [callback=null] - Optional function that will be called on each matching child. Each child of the Group will be passed to it as its first parameter.
* @param {Object} [callbackContext] - The context in which the function should be called (usually 'this').
* @return {any} Returns either a numeric total (if RETURN_TOTAL was specified) or the child object.
*/
iterate: function (key, value, returnType, callback, callbackContext, args) {
if (returnType == Phaser.Group.RETURN_TOTAL && this._container.children.length === 0)
if (returnType === Phaser.Group.RETURN_TOTAL && this._container.children.length === 0)
{
return -1;
return 0;
}
if (typeof callback === 'undefined')
@@ -1495,7 +1580,7 @@ Phaser.Group.prototype = {
callback.apply(callbackContext, args);
}
if (returnType == Phaser.Group.RETURN_CHILD)
if (returnType === Phaser.Group.RETURN_CHILD)
{
return currentNode;
}
@@ -1506,11 +1591,11 @@ Phaser.Group.prototype = {
while (currentNode != this._container.last._iNext);
}
if (returnType == Phaser.Group.RETURN_TOTAL)
if (returnType === Phaser.Group.RETURN_TOTAL)
{
return total;
}
else if (returnType == Phaser.Group.RETURN_CHILD)
else if (returnType === Phaser.Group.RETURN_CHILD)
{
return null;
}
@@ -1565,7 +1650,7 @@ Phaser.Group.prototype = {
* Call this function to find out how many members of the group are alive.
*
* @method Phaser.Group#countLiving
* @return {number} The number of children flagged as alive. Returns -1 if Group is empty.
* @return {number} The number of children flagged as alive.
*/
countLiving: function () {
@@ -1577,7 +1662,7 @@ Phaser.Group.prototype = {
* Call this function to find out how many members of the group are dead.
*
* @method Phaser.Group#countDead
* @return {number} The number of children flagged as dead. Returns -1 if Group is empty.
* @return {number} The number of children flagged as dead.
*/
countDead: function () {
@@ -1721,11 +1806,31 @@ Phaser.Group.prototype = {
* Destroys this Group. Removes all children, then removes the container from the display list and nulls references.
*
* @method Phaser.Group#destroy
* @param {boolean} [destroyChildren=false] - Should every child of this Group have its destroy method called?
*/
destroy: function () {
destroy: function (destroyChildren) {
this.removeAll();
if (typeof destroyChildren === 'undefined') { destroyChildren = false; }
if (destroyChildren)
{
if (this._container.children.length > 0)
{
do
{
if (this._container.children[0].group)
{
this._container.children[0].destroy();
}
}
while (this._container.children.length > 0);
}
}
else
{
this.removeAll();
}
this._container.parent.removeChild(this._container);
this._container = null;
@@ -1778,130 +1883,52 @@ Phaser.Group.prototype = {
return true;
},
/**
* Dumps out a list of Group children and their index positions to the browser console. Useful for group debugging.
*
* @method Phaser.Group#dump
* @param {boolean} [full=false] - If full the dump will include the entire display list, start from the Stage. Otherwise it will only include this container.
*/
dump: function (full) {
if (typeof full == 'undefined')
{
full = false;
}
var spacing = 20;
var output = "\n" + Phaser.Utils.pad('Node', spacing) + "|" + Phaser.Utils.pad('Next', spacing) + "|" + Phaser.Utils.pad('Previous', spacing) + "|" + Phaser.Utils.pad('First', spacing) + "|" + Phaser.Utils.pad('Last', spacing);
console.log(output);
var output = Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing);
console.log(output);
if (full)
{
var testObject = this.game.stage._stage.last._iNext;
var displayObject = this.game.stage._stage;
}
else
{
var testObject = this._container.last._iNext;
var displayObject = this._container;
}
do
{
var name = displayObject.name || '*';
if (this.cursor == displayObject)
{
var name = '> ' + name;
}
var nameNext = '-';
var namePrev = '-';
var nameFirst = '-';
var nameLast = '-';
if (displayObject._iNext)
{
nameNext = displayObject._iNext.name;
}
if (displayObject._iPrev)
{
namePrev = displayObject._iPrev.name;
}
if (displayObject.first)
{
nameFirst = displayObject.first.name;
}
if (displayObject.last)
{
nameLast = displayObject.last.name;
}
if (typeof nameNext === 'undefined')
{
nameNext = '-';
}
if (typeof namePrev === 'undefined')
{
namePrev = '-';
}
if (typeof nameFirst === 'undefined')
{
nameFirst = '-';
}
if (typeof nameLast === 'undefined')
{
nameLast = '-';
}
var output = Phaser.Utils.pad(name, spacing) + "|" + Phaser.Utils.pad(nameNext, spacing) + "|" + Phaser.Utils.pad(namePrev, spacing) + "|" + Phaser.Utils.pad(nameFirst, spacing) + "|" + Phaser.Utils.pad(nameLast, spacing);
console.log(output);
displayObject = displayObject._iNext;
}
while(displayObject != testObject)
}
};
Phaser.Group.prototype.constructor = Phaser.Group;
/**
* @name Phaser.Group#total
* @property {number} total - The total number of children in this Group, regardless of their alive state.
* @property {number} total - The total number of children in this Group who have a state of exists = true.
* @readonly
*/
Object.defineProperty(Phaser.Group.prototype, "total", {
get: function () {
return this.iterate('exists', true, Phaser.Group.RETURN_TOTAL);
// return this._container.children.length;
if (this._container)
{
return this.iterate('exists', true, Phaser.Group.RETURN_TOTAL);
}
else
{
return 0;
}
}
});
/**
* @name Phaser.Group#length
* @property {number} length - The number of children in this Group.
* @property {number} length - The total number of children in this Group, regardless of their exists/alive status.
* @readonly
*/
Object.defineProperty(Phaser.Group.prototype, "length", {
get: function () {
return this.iterate('exists', true, Phaser.Group.RETURN_TOTAL);
// return this._container.children.length;
if (this._container)
{
return this._container.children.length;
}
else
{
return 0;
}
}
});
@@ -2024,13 +2051,13 @@ Object.defineProperty(Phaser.Group.prototype, "alpha", {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+74 -21
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -453,6 +461,16 @@ Phaser.Input = function (game) {
* @default
*/
this.hitContext = null;
/**
* @property {function} moveCallback - An optional callback that will be fired every time the activePointer receives a move event from the DOM. Set to null to disable.
*/
this.moveCallback = null;
/**
* @property {object} moveCallbackContext - The context in which the moveCallback will be sent. Defaults to Phaser.Input but can be set to any valid JS object.
*/
this.moveCallbackContext = this;
};
@@ -729,6 +747,13 @@ Phaser.Input.prototype = {
*/
mspointer: null,
/**
* The Gamepad Input manager.
* @property {Phaser.Gamepad} gamepad - The Gamepad Input manager.
* @default
*/
gamepad: null,
/**
* A Signal that is dispatched each time a pointer is pressed down.
* @property {Phaser.Signal} onDown
@@ -778,6 +803,7 @@ Phaser.Input.prototype = {
this.keyboard = new Phaser.Keyboard(this.game);
this.touch = new Phaser.Touch(this.game);
this.mspointer = new Phaser.MSPointer(this.game);
this.gamepad = new Phaser.Gamepad(this.game);
this.onDown = new Phaser.Signal();
this.onUp = new Phaser.Signal();
@@ -817,6 +843,24 @@ Phaser.Input.prototype = {
this.keyboard.stop();
this.touch.stop();
this.mspointer.stop();
this.gamepad.stop();
this.moveCallback = null;
},
/**
* Sets a callback that is fired every time the activePointer receives a DOM move event such as a mousemove or touchmove.
* It will be called every time the activePointer moves, which in a multi-touch game can be a lot of times, so this is best
* to only use if you've limited input to a single pointer (i.e. mouse or touch)
* @method Phaser.Input#setMoveCallback
* @param {function} callback - The callback that will be called each time the activePointer receives a DOM move event.
* @param {object} callbackContext - The context in which the callback will be called.
*/
setMoveCallback: function (callback, callbackContext) {
this.moveCallback = callback;
this.moveCallbackContext = callbackContext;
},
@@ -870,6 +914,8 @@ Phaser.Input.prototype = {
this._oldPosition.copyFrom(this.position);
this.mousePointer.update();
if (this.gamepad.active) { this.gamepad.update(); }
this.pointer1.update();
this.pointer2.update();
@@ -901,6 +947,7 @@ Phaser.Input.prototype = {
this.keyboard.reset();
this.mousePointer.reset();
this.gamepad.reset();
for (var i = 1; i &lt;= 10; i++)
{
@@ -911,7 +958,11 @@ Phaser.Input.prototype = {
}
this.currentPointers = 0;
this.game.stage.canvas.style.cursor = "default";
if (this.game.canvas.style.cursor !== 'none')
{
this.game.canvas.style.cursor = 'default';
}
if (hard === true)
{
@@ -1108,6 +1159,8 @@ Phaser.Input.prototype = {
};
Phaser.Input.prototype.constructor = Phaser.Input;
/**
* The X coordinate of the most recently active pointer. This value takes game scaling into account automatically. See Pointer.screenX/clientX for source values.
* @name Phaser.Input#x
@@ -1235,13 +1288,13 @@ Object.defineProperty(Phaser.Input.prototype, "worldY", {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+208 -108
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -451,36 +459,6 @@ Phaser.InputHandler = function (sprite) {
*/
this.enabled = false;
/**
* @property {Description} parent - Description.
* @default
*/
// this.parent = null;
/**
* @property {Description} next - Linked List
* @default
*/
// this.next = null;
/**
* @property {Description} prev - Description.
* @default
*/
// this.prev = null;
/**
* @property {Description} last - Description.
* @default
*/
// this.last = this;
/**
* @property {Description} first - Description.
* @default
*/
// this.first = this;
/**
* @property {number} priorityID - The PriorityID controls which Sprite receives an Input event first if they should overlap.
* @default
@@ -547,6 +525,18 @@ Phaser.InputHandler = function (sprite) {
*/
this.snapY = 0;
/**
* @property {number} snapOffsetX - This defines the top-left X coordinate of the snap grid.
* @default
*/
this.snapOffsetX = 0;
/**
* @property {number} snapOffsetY - This defines the top-left Y coordinate of the snap grid..
* @default
*/
this.snapOffsetY = 0;
/**
* @property {number} pixelPerfect - Should we use pixel perfect hit detection? Warning: expensive. Only enable if you really need it!
* @default
@@ -622,8 +612,6 @@ Phaser.InputHandler.prototype = {
*/
start: function (priority, useHandCursor) {
console.log('InputHandler start');
priority = priority || 0;
if (typeof useHandCursor == 'undefined') { useHandCursor = false; }
@@ -915,7 +903,7 @@ Phaser.InputHandler.prototype = {
/**
* Is this sprite being dragged by the mouse or not?
* @method Phaser.InputHandler#pointerTimeOut
* @method Phaser.InputHandler#pointerDragged
* @param {Phaser.Pointer} pointer
* @return {number}
*/
@@ -1039,7 +1027,7 @@ Phaser.InputHandler.prototype = {
if (this.useHandCursor && this._pointerData[pointer.id].isDragged === false)
{
this.game.stage.canvas.style.cursor = "pointer";
this.game.canvas.style.cursor = "pointer";
}
this.sprite.events.onInputOver.dispatch(this.sprite, pointer);
@@ -1060,7 +1048,7 @@ Phaser.InputHandler.prototype = {
if (this.useHandCursor && this._pointerData[pointer.id].isDragged === false)
{
this.game.stage.canvas.style.cursor = "default";
this.game.canvas.style.cursor = "default";
}
if (this.sprite && this.sprite.events)
@@ -1121,15 +1109,18 @@ Phaser.InputHandler.prototype = {
// Only release the InputUp signal if the pointer is still over this sprite
if (this.checkPointerOver(pointer))
{
//console.log('releasedHandler: ' + Date.now());
this.sprite.events.onInputUp.dispatch(this.sprite, pointer);
// Release the inputUp signal and provide optional parameter if pointer is still over the sprite or not
this.sprite.events.onInputUp.dispatch(this.sprite, pointer, true);
}
else
{
// Release the inputUp signal and provide optional parameter if pointer is still over the sprite or not
this.sprite.events.onInputUp.dispatch(this.sprite, pointer, false);
// Pointer outside the sprite? Reset the cursor
if (this.useHandCursor)
{
this.game.stage.canvas.style.cursor = "default";
this.game.canvas.style.cursor = "default";
}
}
@@ -1156,30 +1147,61 @@ Phaser.InputHandler.prototype = {
return false;
}
if (this.allowHorizontalDrag)
if (this.sprite.fixedToCamera)
{
this.sprite.x = pointer.x + this._dragPoint.x + this.dragOffset.x;
}
if (this.allowHorizontalDrag)
{
this.sprite.cameraOffset.x = pointer.x + this._dragPoint.x + this.dragOffset.x;
}
if (this.allowVerticalDrag)
{
this.sprite.y = pointer.y + this._dragPoint.y + this.dragOffset.y;
}
if (this.allowVerticalDrag)
{
this.sprite.cameraOffset.y = pointer.y + this._dragPoint.y + this.dragOffset.y;
}
if (this.boundsRect)
{
this.checkBoundsRect();
}
if (this.boundsRect)
{
this.checkBoundsRect();
}
if (this.boundsSprite)
{
this.checkBoundsSprite();
}
if (this.boundsSprite)
{
this.checkBoundsSprite();
}
if (this.snapOnDrag)
if (this.snapOnDrag)
{
this.sprite.cameraOffset.x = Math.round((this.sprite.cameraOffset.x - (this.snapOffsetX % this.snapX)) / this.snapX) * this.snapX + (this.snapOffsetX % this.snapX);
this.sprite.cameraOffset.y = Math.round((this.sprite.cameraOffset.y - (this.snapOffsetY % this.snapY)) / this.snapY) * this.snapY + (this.snapOffsetY % this.snapY);
}
}
else
{
this.sprite.x = Math.round(this.sprite.x / this.snapX) * this.snapX;
this.sprite.y = Math.round(this.sprite.y / this.snapY) * this.snapY;
if (this.allowHorizontalDrag)
{
this.sprite.x = pointer.x + this._dragPoint.x + this.dragOffset.x;
}
if (this.allowVerticalDrag)
{
this.sprite.y = pointer.y + this._dragPoint.y + this.dragOffset.y;
}
if (this.boundsRect)
{
this.checkBoundsRect();
}
if (this.boundsSprite)
{
this.checkBoundsSprite();
}
if (this.snapOnDrag)
{
this.sprite.x = Math.round((this.sprite.x - (this.snapOffsetX % this.snapX)) / this.snapX) * this.snapX + (this.snapOffsetX % this.snapX);
this.sprite.y = Math.round((this.sprite.y - (this.snapOffsetY % this.snapY)) / this.snapY) * this.snapY + (this.snapOffsetY % this.snapY);
}
}
return true;
@@ -1359,14 +1381,29 @@ Phaser.InputHandler.prototype = {
this._draggedPointerID = pointer.id;
this._pointerData[pointer.id].isDragged = true;
if (this.dragFromCenter)
if (this.sprite.fixedToCamera)
{
this.sprite.centerOn(pointer.x, pointer.y);
this._dragPoint.setTo(this.sprite.x - pointer.x, this.sprite.y - pointer.y);
if (this.dragFromCenter)
{
this.sprite.centerOn(pointer.x, pointer.y);
this._dragPoint.setTo(this.sprite.cameraOffset.x - pointer.x, this.sprite.cameraOffset.y - pointer.y);
}
else
{
this._dragPoint.setTo(this.sprite.cameraOffset.x - pointer.x, this.sprite.cameraOffset.y - pointer.y);
}
}
else
{
this._dragPoint.setTo(this.sprite.x - pointer.x, this.sprite.y - pointer.y);
if (this.dragFromCenter)
{
this.sprite.centerOn(pointer.x, pointer.y);
this._dragPoint.setTo(this.sprite.x - pointer.x, this.sprite.y - pointer.y);
}
else
{
this._dragPoint.setTo(this.sprite.x - pointer.x, this.sprite.y - pointer.y);
}
}
this.updateDrag(pointer);
@@ -1393,8 +1430,16 @@ Phaser.InputHandler.prototype = {
if (this.snapOnRelease)
{
this.sprite.x = Math.round(this.sprite.x / this.snapX) * this.snapX;
this.sprite.y = Math.round(this.sprite.y / this.snapY) * this.snapY;
if (this.sprite.fixedToCamera)
{
this.sprite.cameraOffset.x = Math.round((this.sprite.cameraOffset.x - (this.snapOffsetX % this.snapX)) / this.snapX) * this.snapX + (this.snapOffsetX % this.snapX);
this.sprite.cameraOffset.y = Math.round((this.sprite.cameraOffset.y - (this.snapOffsetY % this.snapY)) / this.snapY) * this.snapY + (this.snapOffsetY % this.snapY);
}
else
{
this.sprite.x = Math.round((this.sprite.x - (this.snapOffsetX % this.snapX)) / this.snapX) * this.snapX + (this.snapOffsetX % this.snapX);
this.sprite.y = Math.round((this.sprite.y - (this.snapOffsetY % this.snapY)) / this.snapY) * this.snapY + (this.snapOffsetY % this.snapY);
}
}
this.sprite.events.onDragStop.dispatch(this.sprite, pointer);
@@ -1431,14 +1476,20 @@ Phaser.InputHandler.prototype = {
* @param {number} snapY - The height of the grid cell to snap to.
* @param {boolean} [onDrag=true] - If true the sprite will snap to the grid while being dragged.
* @param {boolean} [onRelease=false] - If true the sprite will snap to the grid when released.
* @param {number} [snapOffsetX=0] - Used to offset the top-left starting point of the snap grid.
* @param {number} [snapOffsetX=0] - Used to offset the top-left starting point of the snap grid.
*/
enableSnap: function (snapX, snapY, onDrag, onRelease) {
enableSnap: function (snapX, snapY, onDrag, onRelease, snappOffsetX, snappOffsetY) {
if (typeof onDrag == 'undefined') { onDrag = true; }
if (typeof onRelease == 'undefined') { onRelease = false; }
if (typeof snapOffsetX == 'undefined') { snapOffsetX = 0; }
if (typeof snapOffsetY == 'undefined') { snapOffsetY = 0; }
this.snapX = snapX;
this.snapY = snapY;
this.snapOffsetX = snapOffsetX;
this.snapOffsetY = snapOffsetY;
this.snapOnDrag = onDrag;
this.snapOnRelease = onRelease;
@@ -1461,22 +1512,45 @@ Phaser.InputHandler.prototype = {
*/
checkBoundsRect: function () {
if (this.sprite.x &lt; this.boundsRect.left)
if (this.sprite.fixedToCamera)
{
this.sprite.x = this.boundsRect.x;
}
else if ((this.sprite.x + this.sprite.width) > this.boundsRect.right)
{
this.sprite.x = this.boundsRect.right - this.sprite.width;
}
if (this.sprite.cameraOffset.x &lt; this.boundsRect.left)
{
this.sprite.cameraOffset.x = this.boundsRect.cameraOffset.x;
}
else if ((this.sprite.cameraOffset.x + this.sprite.width) > this.boundsRect.right)
{
this.sprite.cameraOffset.x = this.boundsRect.right - this.sprite.width;
}
if (this.sprite.y &lt; this.boundsRect.top)
{
this.sprite.y = this.boundsRect.top;
if (this.sprite.cameraOffset.y &lt; this.boundsRect.top)
{
this.sprite.cameraOffset.y = this.boundsRect.top;
}
else if ((this.sprite.cameraOffset.y + this.sprite.height) > this.boundsRect.bottom)
{
this.sprite.cameraOffset.y = this.boundsRect.bottom - this.sprite.height;
}
}
else if ((this.sprite.y + this.sprite.height) > this.boundsRect.bottom)
else
{
this.sprite.y = this.boundsRect.bottom - this.sprite.height;
if (this.sprite.x &lt; this.boundsRect.left)
{
this.sprite.x = this.boundsRect.x;
}
else if ((this.sprite.x + this.sprite.width) > this.boundsRect.right)
{
this.sprite.x = this.boundsRect.right - this.sprite.width;
}
if (this.sprite.y &lt; this.boundsRect.top)
{
this.sprite.y = this.boundsRect.top;
}
else if ((this.sprite.y + this.sprite.height) > this.boundsRect.bottom)
{
this.sprite.y = this.boundsRect.bottom - this.sprite.height;
}
}
},
@@ -1487,27 +1561,53 @@ Phaser.InputHandler.prototype = {
*/
checkBoundsSprite: function () {
if (this.sprite.x &lt; this.boundsSprite.x)
if (this.sprite.fixedToCamera && this.boundsSprite.fixedToCamera)
{
this.sprite.x = this.boundsSprite.x;
}
else if ((this.sprite.x + this.sprite.width) > (this.boundsSprite.x + this.boundsSprite.width))
{
this.sprite.x = (this.boundsSprite.x + this.boundsSprite.width) - this.sprite.width;
}
if (this.sprite.cameraOffset.x &lt; this.boundsSprite.camerOffset.x)
{
this.sprite.cameraOffset.x = this.boundsSprite.camerOffset.x;
}
else if ((this.sprite.cameraOffset.x + this.sprite.width) > (this.boundsSprite.camerOffset.x + this.boundsSprite.width))
{
this.sprite.cameraOffset.x = (this.boundsSprite.camerOffset.x + this.boundsSprite.width) - this.sprite.width;
}
if (this.sprite.y &lt; this.boundsSprite.y)
{
this.sprite.y = this.boundsSprite.y;
if (this.sprite.cameraOffset.y &lt; this.boundsSprite.camerOffset.y)
{
this.sprite.cameraOffset.y = this.boundsSprite.camerOffset.y;
}
else if ((this.sprite.cameraOffset.y + this.sprite.height) > (this.boundsSprite.camerOffset.y + this.boundsSprite.height))
{
this.sprite.cameraOffset.y = (this.boundsSprite.camerOffset.y + this.boundsSprite.height) - this.sprite.height;
}
}
else if ((this.sprite.y + this.sprite.height) > (this.boundsSprite.y + this.boundsSprite.height))
else
{
this.sprite.y = (this.boundsSprite.y + this.boundsSprite.height) - this.sprite.height;
if (this.sprite.x &lt; this.boundsSprite.x)
{
this.sprite.x = this.boundsSprite.x;
}
else if ((this.sprite.x + this.sprite.width) > (this.boundsSprite.x + this.boundsSprite.width))
{
this.sprite.x = (this.boundsSprite.x + this.boundsSprite.width) - this.sprite.width;
}
if (this.sprite.y &lt; this.boundsSprite.y)
{
this.sprite.y = this.boundsSprite.y;
}
else if ((this.sprite.y + this.sprite.height) > (this.boundsSprite.y + this.boundsSprite.height))
{
this.sprite.y = (this.boundsSprite.y + this.boundsSprite.height) - this.sprite.height;
}
}
}
};</pre>
};
Phaser.InputHandler.prototype.constructor = Phaser.InputHandler;
</pre>
</article>
</section>
@@ -1522,13 +1622,13 @@ Phaser.InputHandler.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+39 -13
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,7 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
<a href="global.html#hex2rgb">hex2rgb</a>
</li>
<li>
@@ -389,15 +413,11 @@
</li>
<li>
<a href="global.html#render">render</a>
<a href="global.html#x">x</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#y">y</a>
</li>
@@ -423,16 +443,18 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @overview
*
* ![Phaser Logo](http://www.photonstorm.com/wp-content/uploads/2013/09/phaser_10_release.jpg)
*
* Phaser - http://www.phaser.io
*
* v1.1.3 - Released November 28th 2013.
* v1.1.4 - Released February 5th 2014.
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@@ -441,9 +463,13 @@
*
* Phaser uses Pixi.js for rendering, created by Mat Groves http://matgroves.com/ @Doormat23.
*
* Follow Phaser development progress at http://www.photonstorm.com
* View the [Official Website](http://phaser.io)&lt;br />
* Follow on [Twitter](https://twitter.com/photonstorm)&lt;br />
* Join the [Forum](http://www.html5gamedevs.com/forum/14-phaser/)&lt;br />
* Try out 210+ [Phaser Examples](http://examples.phaser.io)&lt;br />
* Read the [documentation online](http://docs.phaser.io)
*
* Many thanks to Adam Saltsman (@ADAMATOMIC) for releasing Flixel, from both which Phaser
* Many thanks to Adam Saltsman (@ADAMATOMIC) for releasing Flixel, from which both Phaser
* and my love of game development originate.
*
* "If you want your children to be intelligent, read them fairy tales."
@@ -465,13 +491,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Wed Feb 05 2014 06:18:03 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+31 -21
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -579,7 +587,7 @@ Phaser.Key.prototype = {
/**
* Returns the "just released" state of the Key. Just released is considered as being true if the key was released within the duration given (default 250ms)
* @method Phaser.Key#justPressed
* @method Phaser.Key#justReleased
* @param {number} [duration=250] - The duration below which the key is considered as being just released.
* @return {boolean} True if the key is just released otherwise false.
*/
@@ -592,6 +600,8 @@ Phaser.Key.prototype = {
}
};
Phaser.Key.prototype.constructor = Phaser.Key;
</pre>
</article>
</section>
@@ -607,13 +617,13 @@ Phaser.Key.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+36 -26
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -523,7 +531,7 @@ Phaser.Keyboard.prototype = {
* The Key object can then be polled, have events attached to it, etc.
*
* @method Phaser.Keyboard#addKey
* @param {number} keycode - The keycode of the key, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR
* @param {number} keycode - The keycode of the key, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR
* @return {Phaser.Key} The Key object which you can store locally and reference directly.
*/
addKey: function (keycode) {
@@ -540,7 +548,7 @@ Phaser.Keyboard.prototype = {
* Removes a Key object from the Keyboard manager.
*
* @method Phaser.Keyboard#removeKey
* @param {number} keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR
* @param {number} keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR
*/
removeKey: function (keycode) {
@@ -762,7 +770,7 @@ Phaser.Keyboard.prototype = {
/**
* Returns the "just pressed" state of the key. Just pressed is considered true if the key was pressed down within the duration given (default 250ms)
* @method Phaser.Keyboard#justPressed
* @param {number} keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR
* @param {number} keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR
* @param {number} [duration=250] - The duration below which the key is considered as being just pressed.
* @return {boolean} True if the key is just pressed otherwise false.
*/
@@ -781,8 +789,8 @@ Phaser.Keyboard.prototype = {
/**
* Returns the "just released" state of the Key. Just released is considered as being true if the key was released within the duration given (default 250ms)
* @method Phaser.Keyboard#justPressed
* @param {number} keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR
* @method Phaser.Keyboard#justReleased
* @param {number} keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR
* @param {number} [duration=250] - The duration below which the key is considered as being just released.
* @return {boolean} True if the key is just released otherwise false.
*/
@@ -802,7 +810,7 @@ Phaser.Keyboard.prototype = {
/**
* Returns true of the key is currently pressed down. Note that it can only detect key presses on the web browser.
* @method Phaser.Keyboard#isDown
* @param {number} keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR
* @param {number} keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR
* @return {boolean} True if the key is currently down.
*/
isDown: function (keycode) {
@@ -818,6 +826,8 @@ Phaser.Keyboard.prototype = {
};
Phaser.Keyboard.prototype.constructor = Phaser.Keyboard;
Phaser.Keyboard.A = "A".charCodeAt(0);
Phaser.Keyboard.B = "B".charCodeAt(0);
Phaser.Keyboard.C = "C".charCodeAt(0);
@@ -931,13 +941,13 @@ Phaser.Keyboard.NUM_LOCK = 144;
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+757
View File
@@ -0,0 +1,757 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Source: geom/Line.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<a class="brand" href="index.html">Phaser</a>
<ul class="nav">
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.html">Phaser</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.Animation.html">Animation</a>
</li>
<li>
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
<li>
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li>
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li>
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li>
<a href="Phaser.Button.html">Button</a>
</li>
<li>
<a href="Phaser.Cache.html">Cache</a>
</li>
<li>
<a href="Phaser.Camera.html">Camera</a>
</li>
<li>
<a href="Phaser.Canvas.html">Canvas</a>
</li>
<li>
<a href="Phaser.Circle.html">Circle</a>
</li>
<li>
<a href="Phaser.Color.html">Color</a>
</li>
<li>
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
<li>
<a href="Phaser.Easing.Back.html">Back</a>
</li>
<li>
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
<li>
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
<li>
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
<li>
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
<li>
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
<li>
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
<li>
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
<li>
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
<li>
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
<li>
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
<li>
<a href="Phaser.Events.html">Events</a>
</li>
<li>
<a href="Phaser.Filter.html">Filter</a>
</li>
<li>
<a href="Phaser.Frame.html">Frame</a>
</li>
<li>
<a href="Phaser.FrameData.html">FrameData</a>
</li>
<li>
<a href="Phaser.Game.html">Game</a>
</li>
<li>
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
<li>
<a href="Phaser.Group.html">Group</a>
</li>
<li>
<a href="Phaser.Input.html">Input</a>
</li>
<li>
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
<li>
<a href="Phaser.Key.html">Key</a>
</li>
<li>
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
<li>
<a href="Phaser.Loader.html">Loader</a>
</li>
<li>
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
<li>
<a href="Phaser.Math.html">Math</a>
</li>
<li>
<a href="Phaser.Mouse.html">Mouse</a>
</li>
<li>
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
<li>
<a href="Phaser.Net.html">Net</a>
</li>
<li>
<a href="Phaser.Particles.html">Particles</a>
</li>
<li>
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
<li>
<a href="Phaser.Physics.html">Physics</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Plugin.html">Plugin</a>
</li>
<li>
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
<li>
<a href="Phaser.Point.html">Point</a>
</li>
<li>
<a href="Phaser.Pointer.html">Pointer</a>
</li>
<li>
<a href="Phaser.Polygon.html">Polygon</a>
</li>
<li>
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
<li>
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
<li>
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
<li>
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
<li>
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
<li>
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
<li>
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
<li>
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li>
<a href="Phaser.Stage.html">Stage</a>
</li>
<li>
<a href="Phaser.StageScaleMode.html">StageScaleMode</a>
</li>
<li>
<a href="Phaser.State.html">State</a>
</li>
<li>
<a href="Phaser.StateManager.html">StateManager</a>
</li>
<li>
<a href="Phaser.Text.html">Text</a>
</li>
<li>
<a href="Phaser.Tile.html">Tile</a>
</li>
<li>
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li>
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li>
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li>
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li>
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li>
<a href="Phaser.Time.html">Time</a>
</li>
<li>
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
<li>
<a href="Phaser.Tween.html">Tween</a>
</li>
<li>
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
<li>
<a href="Phaser.Utils.html">Utils</a>
</li>
<li>
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
<li>
<a href="Phaser.World.html">World</a>
</li>
<li>
<a href="SignalBinding.html">SignalBinding</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="global.html#SAT">SAT</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div id="main">
<h1 class="page-title">Source: geom/Line.js</h1>
<section>
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Creates a new Line object with a start and an end point.
* @class Line
* @classdesc Phaser - Line
* @constructor
* @param {number} [x1=0] - The x coordinate of the start of the line.
* @param {number} [y1=0] - The y coordinate of the start of the line.
* @param {number} [x2=0] - The x coordinate of the end of the line.
* @param {number} [y2=0] - The y coordinate of the end of the line.
* @return {Phaser.Line} This line object
*/
Phaser.Line = function (x1, y1, x2, y2) {
x1 = x1 || 0;
y1 = y1 || 0;
x2 = x2 || 0;
y2 = y2 || 0;
/**
* @property {Phaser.Point} start - The start point of the line.
*/
this.start = new Phaser.Point(x1, y1);
/**
* @property {Phaser.Point} end - The end point of the line.
*/
this.end = new Phaser.Point(x2, y2);
};
Phaser.Line.prototype = {
/**
* Sets the components of the Line to the specified values.
* @method Phaser.Line#setTo
* @param {number} [x1=0] - The x coordinate of the start of the line.
* @param {number} [y1=0] - The y coordinate of the start of the line.
* @param {number} [x2=0] - The x coordinate of the end of the line.
* @param {number} [y2=0] - The y coordinate of the end of the line.
* @return {Phaser.Line} This line object
*/
setTo: function (x1, y1, x2, y2) {
this.start.setTo(x1, y1);
this.end.setTo(x2, y2);
return this;
},
/**
* Sets the line to match the x/y coordinates of the two given sprites.
* Can optionally be calculated from their center coordinates.
* @method Phaser.Line#fromSprite
* @param {Phaser.Sprite} startSprite - The coordinates of this Sprite will be set to the Line.start point.
* @param {Phaser.Sprite} endSprite - The coordinates of this Sprite will be set to the Line.start point.
* @param {boolean} [useCenter=true] - If true it will use startSprite.center.x, if false startSprite.x.
* @return {Phaser.Line} This line object
*/
fromSprite: function (startSprite, endSprite, useCenter) {
if (typeof useCenter === 'undefined') { useCenter = true; }
if (useCenter)
{
return this.setTo(startSprite.center.x, startSprite.center.y, endSprite.center.x, endSprite.center.y);
}
else
{
return this.setTo(startSprite.x, startSprite.y, endSprite.x, endSprite.y);
}
},
/**
* Checks for intersection between this line and another Line.
* If asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection.
* Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.
*
* @method Phaser.Line#intersects
* @param {Phaser.Line} line - The line to check against this one.
* @param {boolean} [asSegment=true] - If true it will check for segment intersection, otherwise full line intersection.
* @param {Phaser.Point} [result] - A Point object to store the result in, if not given a new one will be created.
* @return {Phaser.Point} The intersection segment of the two lines as a Point, or null if there is no intersection.
*/
intersects: function (line, asSegment, result) {
return Phaser.Line.intersectsPoints(this.start, this.end, line.start, line.end, asSegment, result);
},
/**
* Tests if the given coordinates fall on this line. See pointOnSegment to test against just the line segment.
* @method Phaser.Line#pointOnLine
* @param {number} x - The line to check against this one.
* @param {number} y - The line to check against this one.
* @return {boolean} True if the point is on the line, false if not.
*/
pointOnLine: function (x, y) {
return ((x - this.start.x) * (this.end.y - this.end.y) === (this.end.x - this.start.x) * (y - this.end.y));
},
/**
* Tests if the given coordinates fall on this line and within the segment. See pointOnLine to test against just the line.
* @method Phaser.Line#pointOnSegment
* @param {number} x - The line to check against this one.
* @param {number} y - The line to check against this one.
* @return {boolean} True if the point is on the line and segment, false if not.
*/
pointOnSegment: function (x, y) {
var xMin = Math.min(this.start.x, this.end.x);
var xMax = Math.max(this.start.x, this.end.x);
var yMin = Math.min(this.start.y, this.end.y);
var yMax = Math.max(this.start.y, this.end.y);
return (this.pointOnLine(x, y) && (x >= xMin && x &lt;= xMax) && (y >= yMin && y &lt;= yMax));
}
};
/**
* @name Phaser.Line#length
* @property {number} length - Gets the length of the line segment.
* @readonly
*/
Object.defineProperty(Phaser.Line.prototype, "length", {
get: function () {
return Math.sqrt((this.end.x - this.start.x) * (this.end.x - this.start.x) + (this.end.y - this.start.y) * (this.end.y - this.start.y));
}
});
/**
* @name Phaser.Line#angle
* @property {number} angle - Gets the angle of the line.
* @readonly
*/
Object.defineProperty(Phaser.Line.prototype, "angle", {
get: function () {
return Math.atan2(this.end.x - this.start.x, this.end.y - this.start.y);
}
});
/**
* @name Phaser.Line#slope
* @property {number} slope - Gets the slope of the line (y/x).
* @readonly
*/
Object.defineProperty(Phaser.Line.prototype, "slope", {
get: function () {
return (this.end.y - this.start.y) / (this.end.x - this.start.x);
}
});
/**
* @name Phaser.Line#perpSlope
* @property {number} perpSlope - Gets the perpendicular slope of the line (x/y).
* @readonly
*/
Object.defineProperty(Phaser.Line.prototype, "perpSlope", {
get: function () {
return -((this.end.x - this.start.x) / (this.end.y - this.start.y));
}
});
/**
* Checks for intersection between two lines as defined by the given start and end points.
* If asSegment is true it will check for line segment intersection. If asSegment is false it will check for line intersection.
* Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.
* Adapted from code by Keith Hair
*
* @method Phaser.Line.intersectsPoints
* @param {Phaser.Point} a - The start of the first Line to be checked.
* @param {Phaser.Point} b - The end of the first line to be checked.
* @param {Phaser.Point} e - The start of the second Line to be checked.
* @param {Phaser.Point} f - The end of the second line to be checked.
* @param {boolean} [asSegment=true] - If true it will check for segment intersection, otherwise full line intersection.
* @param {Phaser.Point} [result] - A Point object to store the result in, if not given a new one will be created.
* @return {Phaser.Point} The intersection segment of the two lines as a Point, or null if there is no intersection.
*/
Phaser.Line.intersectsPoints = function (a, b, e, f, asSegment, result) {
if (typeof asSegment === 'undefined') { asSegment = true; }
if (typeof result === 'undefined') { result = new Phaser.Point(); }
var a1 = b.y - a.y;
var a2 = f.y - e.y;
var b1 = a.x - b.x;
var b2 = e.x - f.x;
var c1 = (b.x * a.y) - (a.x * b.y);
var c2 = (f.x * e.y) - (e.x * f.y);
var denom = (a1 * b2) - (a2 * b1);
if (denom === 0)
{
return null;
}
result.x = ((b1 * c2) - (b2 * c1)) / denom;
result.y = ((a2 * c1) - (a1 * c2)) / denom;
if (asSegment)
{
if (Math.pow((result.x - b.x) + (result.y - b.y), 2) > Math.pow((a.x - b.x) + (a.y - b.y), 2))
{
return null;
}
if (Math.pow((result.x - a.x) + (result.y - a.y), 2) > Math.pow((a.x - b.x) + (a.y - b.y), 2))
{
return null;
}
if (Math.pow((result.x - f.x) + (result.y - f.y), 2) > Math.pow((e.x - f.x) + (e.y - f.y), 2))
{
return null;
}
if (Math.pow((result.x - e.x) + (result.y - e.y), 2) > Math.pow((e.x - f.x) + (e.y - f.y), 2))
{
return null;
}
}
return result;
};
/**
* Checks for intersection between two lines.
* If asSegment is true it will check for segment intersection.
* If asSegment is false it will check for line intersection.
* Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.
* Adapted from code by Keith Hair
*
* @method Phaser.Line.intersects
* @param {Phaser.Line} a - The first Line to be checked.
* @param {Phaser.Line} b - The second Line to be checked.
* @param {boolean} [asSegment=true] - If true it will check for segment intersection, otherwise full line intersection.
* @param {Phaser.Point} [result] - A Point object to store the result in, if not given a new one will be created.
* @return {Phaser.Point} The intersection segment of the two lines as a Point, or null if there is no intersection.
*/
Phaser.Line.intersects = function (a, b, asSegment, result) {
return Phaser.Line.intersectsPoints(a.start, a.end, b.start, b.end, asSegment, result);
};
</pre>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
<br clear="both">
</div>
</div>
<script src="scripts/sunlight.js"></script>
<script src="scripts/sunlight.javascript.js"></script>
<script src="scripts/sunlight-plugin.doclinks.js"></script>
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
<script src="scripts/sunlight-plugin.menu.js"></script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.scrollTo.js"></script>
<script src="scripts/jquery.localScroll.js"></script>
<script src="scripts/bootstrap-dropdown.js"></script>
<script src="scripts/toc.js"></script>
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
<script>
$( function () {
$( "#toc" ).toc( {
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
</script>
</body>
</html>
+32 -21
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -574,7 +582,10 @@ Phaser.LinkedList.prototype = {
}
};</pre>
};
Phaser.LinkedList.prototype.constructor = Phaser.LinkedList;
</pre>
</article>
</section>
@@ -589,13 +600,13 @@ Phaser.LinkedList.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+114 -66
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -457,7 +465,7 @@ Phaser.Loader = function (game) {
this._fileIndex = 0;
/**
* @property {number} _progressChunk - Indicates assets loading progress. (from 0 to 100)
* @property {number} _progressChunk - Indicates the size of 1 file in terms of a percentage out of 100.
* @private
* @default
*/
@@ -482,15 +490,21 @@ Phaser.Loader = function (game) {
this.hasLoaded = false;
/**
* @property {number} progress - The Load progress percentage value (from 0 to 100)
* @property {number} progress - The rounded load progress percentage value (from 0 to 100)
* @default
*/
this.progress = 0;
/**
* @property {number} progressFloat - The non-rounded load progress value (from 0.0 to 100.0)
* @default
*/
this.progressFloat = 0;
/**
* You can optionally link a sprite to the preloader.
* If you do so the Sprite's width or height will be cropped based on the percentage loaded.
* @property {Description} preloadSprite
* @property {Phaser.Sprite} preloadSprite
* @default
*/
this.preloadSprite = null;
@@ -785,6 +799,45 @@ Phaser.Loader.prototype = {
return this;
},
/**
* Add a custom JSON file to the Loader.
*
* @method Phaser.Loader#json
* @param {string} key - Unique asset key of the json file.
* @param {string} url - URL of the json file.
* @return {Phaser.Loader} This Loader instance.
*/
json: function (key, url) {
this.addToFileList('json', key, url);
return this;
},
/**
* Add a binary file to the Loader. It will be loaded via xhr with a responseType of "arraybuffer". You can specify an optional callback to process the file after load.
* When the callback is called it will be passed 2 parameters: the key of the file and the file data.
* WARNING: If you specify a callback, the file data will be set to whatever your callback returns. So always return the data object, even if you didn't modify it.
*
* @method Phaser.Loader#binary
* @param {string} key - Unique asset key of the binary file.
* @param {string} url - URL of the binary file.
* @param {function} [callback] - Optional callback that will be passed the file after loading, so you can perform additional processing on it.
* @param {function} [callbackContext] - The context under which the callback will be applied. If not specified it will use the callback itself as the context.
* @return {Phaser.Loader} This Loader instance.
*/
binary: function (key, url, callback, callbackContext) {
if (typeof callback === 'undefined') { callback = false; }
if (callback !== false && typeof callbackContext === 'undefined') { callbackContext = callback; }
this.addToFileList('binary', key, url, { callback: callback, callbackContext: callbackContext });
return this;
},
/**
* Add a new sprite sheet to the loader.
@@ -795,38 +848,17 @@ Phaser.Loader.prototype = {
* @param {number} frameWidth - Width of each single frame.
* @param {number} frameHeight - Height of each single frame.
* @param {number} [frameMax=-1] - How many frames in this sprite sheet. If not specified it will divide the whole image into frames.
* @param {number} [margin=0] - If the frames have been drawn with a margin, specify the amount here.
* @param {number} [spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.
* @return {Phaser.Loader} This Loader instance.
*/
spritesheet: function (key, url, frameWidth, frameHeight, frameMax) {
spritesheet: function (key, url, frameWidth, frameHeight, frameMax, margin, spacing) {
if (typeof frameMax === "undefined") { frameMax = -1; }
if (typeof margin === "undefined") { margin = 0; }
if (typeof spacing === "undefined") { spacing = 0; }
this.addToFileList('spritesheet', key, url, { frameWidth: frameWidth, frameHeight: frameHeight, frameMax: frameMax });
return this;
},
/**
* Add a new tile set to the loader. These are used in the rendering of tile maps.
*
* @method Phaser.Loader#tileset
* @param {string} key - Unique asset key of the tileset file.
* @param {string} url - URL of the tileset.
* @param {number} tileWidth - Width of each single tile in pixels.
* @param {number} tileHeight - Height of each single tile in pixels.
* @param {number} [tileMax=-1] - How many tiles in this tileset. If not specified it will divide the whole image into tiles.
* @param {number} [tileMargin=0] - If the tiles have been drawn with a margin, specify the amount here.
* @param {number} [tileSpacing=0] - If the tiles have been drawn with spacing between them, specify the amount here.
* @return {Phaser.Loader} This Loader instance.
*/
tileset: function (key, url, tileWidth, tileHeight, tileMax, tileMargin, tileSpacing) {
if (typeof tileMax === "undefined") { tileMax = -1; }
if (typeof tileMargin === "undefined") { tileMargin = 0; }
if (typeof tileSpacing === "undefined") { tileSpacing = 0; }
this.addToFileList('tileset', key, url, { tileWidth: tileWidth, tileHeight: tileHeight, tileMax: tileMax, tileMargin: tileMargin, tileSpacing: tileSpacing });
this.addToFileList('spritesheet', key, url, { frameWidth: frameWidth, frameHeight: frameHeight, frameMax: frameMax, margin: margin, spacing: spacing });
return this;
@@ -1134,6 +1166,7 @@ Phaser.Loader.prototype = {
}
this.progress = 0;
this.progressFloat = 0;
this.hasLoaded = false;
this.isLoading = true;
@@ -1148,6 +1181,7 @@ Phaser.Loader.prototype = {
else
{
this.progress = 100;
this.progressFloat = 100;
this.hasLoaded = true;
this.onLoadComplete.dispatch();
}
@@ -1178,7 +1212,6 @@ Phaser.Loader.prototype = {
case 'spritesheet':
case 'textureatlas':
case 'bitmapfont':
case 'tileset':
file.data = new Image();
file.data.name = file.key;
file.data.onload = function () {
@@ -1240,12 +1273,12 @@ Phaser.Loader.prototype = {
}
break;
case 'tilemap':
case 'json':
this._xhr.open("GET", this.baseURL + file.url, true);
this._xhr.responseType = "text";
if (file.format === Phaser.Tilemap.TILED_JSON)
if (!file.format || file.format === Phaser.Tilemap.TILED_JSON)
{
this._xhr.onload = function () {
return _this.jsonLoadComplete(_this._fileIndex);
@@ -1267,8 +1300,8 @@ Phaser.Loader.prototype = {
};
this._xhr.send();
break;
case 'text':
case 'script':
this._xhr.open("GET", this.baseURL + file.url, true);
this._xhr.responseType = "text";
this._xhr.onload = function () {
@@ -1280,10 +1313,9 @@ Phaser.Loader.prototype = {
this._xhr.send();
break;
case 'script':
case 'binary':
this._xhr.open("GET", this.baseURL + file.url, true);
this._xhr.responseType = "text";
this._xhr.responseType = "arraybuffer";
this._xhr.onload = function () {
return _this.fileComplete(_this._fileIndex);
};
@@ -1356,7 +1388,6 @@ Phaser.Loader.prototype = {
console.warn('Phaser.Loader fileComplete invalid index ' + index);
return;
}
var file = this._fileList[index];
file.loaded = true;
@@ -1373,12 +1404,7 @@ Phaser.Loader.prototype = {
case 'spritesheet':
this.game.cache.addSpriteSheet(file.key, file.url, file.data, file.frameWidth, file.frameHeight, file.frameMax);
break;
case 'tileset':
this.game.cache.addTileset(file.key, file.url, file.data, file.tileWidth, file.tileHeight, file.tileMax, file.tileMargin, file.tileSpacing);
this.game.cache.addSpriteSheet(file.key, file.url, file.data, file.frameWidth, file.frameHeight, file.frameMax, file.margin, file.spacing);
break;
case 'textureatlas':
@@ -1461,6 +1487,7 @@ Phaser.Loader.prototype = {
if (buffer)
{
that.game.cache.decodedSound(key, buffer);
that.game.sound.onSoundDecode.dispatch(key, that.game.cache.getSound(key));
}
});
}
@@ -1481,10 +1508,24 @@ Phaser.Loader.prototype = {
file.data = document.createElement('script');
file.data.language = 'javascript';
file.data.type = 'text/javascript';
file.data.defer = true;
file.data.defer = false;
file.data.text = this._xhr.responseText;
document.head.appendChild(file.data);
break;
case 'binary':
if (file.callback)
{
file.data = file.callback.call(file.callbackContext, file.key, this._xhr.response);
}
else
{
file.data = this._xhr.response;
}
this.game.cache.addBinary(file.key, file.data);
break;
}
if (loadNext)
@@ -1517,6 +1558,10 @@ Phaser.Loader.prototype = {
{
this.game.cache.addTilemap(file.key, file.url, data, file.format);
}
else if (file.type === 'json')
{
this.game.cache.addText(file.key, file.url, data);
}
else
{
this.game.cache.addTextureAtlas(file.key, file.url, file.data, data, file.format);
@@ -1630,7 +1675,8 @@ Phaser.Loader.prototype = {
*/
nextFile: function (previousIndex, success) {
this.progress = Math.round(this.progress + this._progressChunk);
this.progressFloat += this._progressChunk;
this.progress = Math.round(this.progressFloat);
if (this.progress > 100)
{
@@ -1713,6 +1759,8 @@ Phaser.Loader.prototype = {
}
};
Phaser.Loader.prototype.constructor = Phaser.Loader;
</pre>
</article>
</section>
@@ -1728,13 +1776,13 @@ Phaser.Loader.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+28 -20
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -518,13 +526,13 @@ Phaser.LoaderParser = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+32 -21
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -588,7 +596,10 @@ Phaser.MSPointer.prototype = {
}
};</pre>
};
Phaser.MSPointer.prototype.constructor = Phaser.MSPointer;
</pre>
</article>
</section>
@@ -603,13 +614,13 @@ Phaser.MSPointer.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+205 -46
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -455,7 +463,7 @@ Phaser.Math = {
/**
* a is fuzzyLessThan b if it is less than b + &epsilon;.
* @method Phaser.Math#fuzzyEqual
* @method Phaser.Math#fuzzyLessThan
* @param {number} a
* @param {number} b
* @param {number} epsilon
@@ -750,7 +758,7 @@ Phaser.Math = {
},
/**
* Find the angle of a segment from (x1, y1) -> (x2, y2 ).
* Find the angle of a segment from (x1, y1) -> (x2, y2).
* @method Phaser.Math#angleBetween
* @param {number} x1
* @param {number} y1
@@ -763,24 +771,58 @@ Phaser.Math = {
},
/**
* Set an angle within the bounds of -&pi; to&pi;.
* @method Phaser.Math#normalizeAngle
* @param {number} angle
* @param {boolean} radians - True if angle size is expressed in radians.
* @return {number}
* Reverses an angle.
* @method Phaser.Math#reverseAngle
* @param {number} angleRad - The angle to reverse, in radians.
* @return {number} Returns the reverse angle, in radians.
*/
normalizeAngle: function (angle, radians) {
reverseAngle: function (angleRad) {
return this.normalizeAngle(angleRad + Math.PI, true);
},
if (typeof radians === "undefined") { radians = true; }
/**
* Normalizes an angle to the [0,2pi) range.
* @method Phaser.Math#normalizeAngle
* @param {number} angleRad - The angle to normalize, in radians.
* @return {number} Returns the angle, fit within the [0,2pi] range, in radians.
*/
normalizeAngle: function (angleRad) {
var rd = (radians) ? Math.PI : 180;
return this.wrap(angle, -rd, rd);
angleRad = angleRad % (2 * Math.PI);
return angleRad >= 0 ? angleRad : angleRad + 2 * Math.PI;
},
/**
* Closest angle between two angles from a1 to a2
* absolute value the return for exact angle
* Normalizes a latitude to the [-90,90] range. Latitudes above 90 or below -90 are capped, not wrapped.
* @method Phaser.Math#normalizeLatitude
* @param {number} lat - The latitude to normalize, in degrees.
* @return {number} Returns the latitude, fit within the [-90,90] range.
*/
normalizeLatitude: function (lat) {
return Math.max(-90, Math.min(90, lat));
},
/**
* Normalizes a longitude to the [-180,180] range. Longitudes above 180 or below -180 are wrapped.
* @method Phaser.Math#normalizeLongitude
* @param {number} lng - The longitude to normalize, in degrees.
* @return {number} Returns the longitude, fit within the [-180,180] range.
*/
normalizeLongitude: function (lng) {
if (lng % 360 == 180)
{
return 180;
}
lng = lng % 360;
return lng &lt; -180 ? lng + 360 : lng > 180 ? lng - 360 : lng;
},
/**
* Closest angle between two angles from a1 to a2 absolute value the return for exact angle
* @method Phaser.Math#nearestAngleBetween
* @param {number} a1
* @param {number} a2
@@ -934,13 +976,13 @@ Phaser.Math = {
/**
* Ensures that the value always stays between min and max, by wrapping the value around.
* &lt;p>max should be larger than min, or the function will return 0&lt;/p>
* max should be larger than min, or the function will return 0.
*
* @method Phaser.Math#wrap
* @param value The value to wrap
* @param min The minimum the value is allowed to be
* @param max The maximum the value is allowed to be
* @return {number} The wrapped value
* @param {number} value - The value to wrap.
* @param {number} min - The minimum the value is allowed to be.
* @param {number} max - The maximum the value is allowed to be.
* @return {number} The wrapped value.
*/
wrap: function (value, min, max) {
@@ -1049,7 +1091,7 @@ Phaser.Math = {
},
/**
* Significantly faster version of Math.min
* Updated version of Math.min that can be passed either an array of numbers or the numbers as parameters.
* See http://jsperf.com/math-s-min-max-vs-homemade/5
*
* @method Phaser.Math#min
@@ -1057,15 +1099,113 @@ Phaser.Math = {
*/
min: function () {
for (var i =1 , min = 0, len = arguments.length; i &lt; len; i++)
if (arguments.length === 1 && typeof arguments[0] === 'object')
{
if (arguments[i] &lt; arguments[min])
var data = arguments[0];
}
else
{
var data = arguments;
}
for (var i = 1, min = 0, len = data.length; i &lt; len; i++)
{
if (data[i] &lt; data[min])
{
min = i;
}
}
return arguments[min];
return data[min];
},
/**
* Updated version of Math.max that can be passed either an array of numbers or the numbers as parameters.
*
* @method Phaser.Math#max
* @return {number} The largest value from those given.
*/
max: function () {
if (arguments.length === 1 && typeof arguments[0] === 'object')
{
var data = arguments[0];
}
else
{
var data = arguments;
}
for (var i = 1, max = 0, len = data.length; i &lt; len; i++)
{
if (data[i] > data[max])
{
max = i;
}
}
return data[max];
},
/**
* Updated version of Math.min that can be passed a property and either an array of objects or the objects as parameters.
* It will find the lowest matching property value from the given objects.
*
* @method Phaser.Math#minProperty
* @return {number} The lowest value from those given.
*/
minProperty: function (property) {
if (arguments.length === 2 && typeof arguments[1] === 'object')
{
var data = arguments[1];
}
else
{
var data = arguments.slice(1);
}
for (var i = 1, min = 0, len = data.length; i &lt; len; i++)
{
if (data[i][property] &lt; data[min][property])
{
min = i;
}
}
return data[min][property];
},
/**
* Updated version of Math.max that can be passed a property and either an array of objects or the objects as parameters.
* It will find the largest matching property value from the given objects.
*
* @method Phaser.Math#maxProperty
* @return {number} The largest value from those given.
*/
maxProperty: function (property) {
if (arguments.length === 2 && typeof arguments[1] === 'object')
{
var data = arguments[1];
}
else
{
var data = arguments.slice(1);
}
for (var i = 1, max = 0, len = data.length; i &lt; len; i++)
{
if (data[i][property] > data[max][property])
{
max = i;
}
}
return data[max][property];
},
@@ -1111,7 +1251,7 @@ Phaser.Math = {
},
/**
* Description.
* A Linear Interpolation Method, mostly used by Phaser.Tween.
* @method Phaser.Math#linearInterpolation
* @param {number} v
* @param {number} k
@@ -1138,7 +1278,7 @@ Phaser.Math = {
},
/**
* Description.
* A Bezier Interpolation Method, mostly used by Phaser.Tween.
* @method Phaser.Math#bezierInterpolation
* @param {number} v
* @param {number} k
@@ -1159,7 +1299,7 @@ Phaser.Math = {
},
/**
* Description.
* A Catmull Rom Interpolation Method, mostly used by Phaser.Tween.
* @method Phaser.Math#catmullRomInterpolation
* @param {number} v
* @param {number} k
@@ -1394,7 +1534,7 @@ Phaser.Math = {
* @param {number} y1
* @param {number} x2
* @param {number} y2
* @return {number} The distance between this Point object and the destination Point object.
* @return {number} The distance between the two sets of coordinates.
*/
distance: function (x1, y1, x2, y2) {
@@ -1405,6 +1545,25 @@ Phaser.Math = {
},
/**
* Returns the distance between the two given set of coordinates at the power given.
*
* @method Phaser.Math#distancePow
* @param {number} x1
* @param {number} y1
* @param {number} x2
* @param {number} y2
* @param {number} [pow=2]
* @return {number} The distance between the two sets of coordinates.
*/
distancePow: function (x1, y1, x2, y2, pow) {
if (typeof pow === 'undefined') { pow = 2; }
return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));
},
/**
* Returns the rounded distance between the two given set of coordinates.
*
@@ -1604,13 +1763,13 @@ Phaser.Math = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+32 -21
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -491,7 +499,8 @@ Phaser.Mouse = function (game) {
this.pointerLock = new Phaser.Signal();
/**
* @property {MouseEvent} event - The browser mouse event.
* @property {MouseEvent} event - The browser mouse DOM event. Will be set to null if no mouse event has ever been received.
* @default
*/
this.event = null;
@@ -749,6 +758,8 @@ Phaser.Mouse.prototype = {
}
};
Phaser.Mouse.prototype.constructor = Phaser.Mouse;
</pre>
</article>
</section>
@@ -764,13 +775,13 @@ Phaser.Mouse.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+32 -22
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -551,8 +559,8 @@ Phaser.Net.prototype = {
var output = {};
var keyValues = location.search.substring(1).split('&');
for (var i in keyValues) {
for (var i in keyValues)
{
var key = keyValues[i].split('=');
if (key.length > 1)
@@ -585,6 +593,8 @@ Phaser.Net.prototype = {
}
};
Phaser.Net.prototype.constructor = Phaser.Net;
</pre>
</article>
</section>
@@ -600,13 +610,13 @@ Phaser.Net.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+32 -21
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -423,7 +431,7 @@
<article>
<pre class="sunlight-highlight-javascript linenums">/**
* @author Richard Davey &lt;rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
@@ -499,7 +507,10 @@ Phaser.Particles.prototype = {
}
};</pre>
};
Phaser.Particles.prototype.constructor = Phaser.Particles;
</pre>
</article>
</section>
@@ -514,13 +525,13 @@ Phaser.Particles.prototype = {
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:21 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+49 -38
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -579,10 +587,10 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<td class="type">
<span class="param-type">Array.&lt;number></span>
<span class="param-type"><a href="Array.html">Array</a>.&lt;number></span>
|
<span class="param-type">Array.&lt;string></span>
<span class="param-type"><a href="Array.html">Array</a>.&lt;string></span>
@@ -798,7 +806,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-116">line 116</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-117">line 117</a>
</li></ul></dd>
@@ -1002,7 +1010,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-377">line 377</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-380">line 380</a>
</li></ul></dd>
@@ -1104,7 +1112,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-364">line 364</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-367">line 367</a>
</li></ul></dd>
@@ -1311,7 +1319,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-71">line 71</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-72">line 72</a>
</li></ul></dd>
@@ -1416,7 +1424,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-83">line 83</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-84">line 84</a>
</li></ul></dd>
@@ -1521,7 +1529,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-77">line 77</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-78">line 78</a>
</li></ul></dd>
@@ -1578,7 +1586,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<tr>
<td class="name"><code>looped</code></td>
<td class="name"><code>killOnComplete</code></td>
<td class="type">
@@ -1594,7 +1602,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<td class="description last"><p>The loop state of the Animation.</p></td>
<td class="description last"><p>Should the parent of this Animation be killed when the animation completes?</p></td>
</tr>
@@ -1619,11 +1627,14 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-65">line 65</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-66">line 66</a>
</li></ul></dd>
@@ -1929,7 +1940,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-330">line 330</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-333">line 333</a>
</li></ul></dd>
@@ -2209,7 +2220,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-410">line 410</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-413">line 413</a>
</li></ul></dd>
@@ -2278,7 +2289,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-287">line 287</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-288">line 288</a>
</li></ul></dd>
@@ -2347,7 +2358,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-304">line 304</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-305">line 305</a>
</li></ul></dd>
@@ -2563,7 +2574,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-122">line 122</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-123">line 123</a>
</li></ul></dd>
@@ -2657,7 +2668,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-173">line 173</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-174">line 174</a>
</li></ul></dd>
@@ -2795,7 +2806,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-194">line 194</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-195">line 195</a>
</li></ul></dd>
@@ -2864,7 +2875,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-216">line 216</a>
<a href="Animation.js.html">animation/Animation.js</a>, <a href="Animation.js.html#sunlight-1-line-217">line 217</a>
</li></ul></dd>
@@ -2909,13 +2920,13 @@ You could use this function to generate those by doing: Phaser.Animation.generat
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:26 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:22 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+36 -31
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -762,7 +770,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-368">line 368</a>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-370">line 370</a>
</li></ul></dd>
@@ -864,7 +872,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-314">line 314</a>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-316">line 316</a>
</li></ul></dd>
@@ -966,7 +974,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-397">line 397</a>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-399">line 399</a>
</li></ul></dd>
@@ -1068,7 +1076,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-327">line 327</a>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-329">line 329</a>
</li></ul></dd>
@@ -1377,7 +1385,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-348">line 348</a>
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-350">line 350</a>
</li></ul></dd>
@@ -1696,7 +1704,7 @@ Animations added in this way are played back with the play function.</p>
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -1991,7 +1999,7 @@ Animations added in this way are played back with the play function.</p>
<dt>
<h4 class="name" id="getAnimation"><span class="type-signature"></span>getAnimation<span class="signature">(name)</span><span class="type-signature"> &rarr; {<a href="Phaser.Animation.html">Phaser.Animation</a>|boolean}</span></h4>
<h4 class="name" id="getAnimation"><span class="type-signature"></span>getAnimation<span class="signature">(name)</span><span class="type-signature"> &rarr; {<a href="Phaser.Animation.html">Phaser.Animation</a>}</span></h4>
</dt>
@@ -2106,7 +2114,7 @@ Animations added in this way are played back with the play function.</p>
<div class="param-desc">
<p>The Animation instance, if found, otherwise false.</p>
<p>The Animation instance, if found, otherwise null.</p>
</div>
@@ -2118,9 +2126,6 @@ Animations added in this way are played back with the play function.</p>
<dd>
<span class="param-type"><a href="Phaser.Animation.html">Phaser.Animation</a></span>
|
<span class="param-type">boolean</span>
</dd>
@@ -2801,7 +2806,7 @@ The currentAnim property of the AnimationManager is automatically set to the ani
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -2962,13 +2967,13 @@ The currentAnim property of the AnimationManager is automatically set to the ani
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:26 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:22 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+109 -23
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -659,7 +667,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AnimationParser.js.html">animation/AnimationParser.js</a>, <a href="AnimationParser.js.html#sunlight-1-line-95">line 95</a>
<a href="AnimationParser.js.html">animation/AnimationParser.js</a>, <a href="AnimationParser.js.html#sunlight-1-line-97">line 97</a>
</li></ul></dd>
@@ -846,7 +854,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AnimationParser.js.html">animation/AnimationParser.js</a>, <a href="AnimationParser.js.html#sunlight-1-line-166">line 166</a>
<a href="AnimationParser.js.html">animation/AnimationParser.js</a>, <a href="AnimationParser.js.html#sunlight-1-line-168">line 168</a>
</li></ul></dd>
@@ -897,7 +905,7 @@
<dt>
<h4 class="name" id="spriteSheet"><span class="type-signature">&lt;static> </span>spriteSheet<span class="signature">(game, key, frameWidth, frameHeight, <span class="optional">frameMax</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.FrameData.html">Phaser.FrameData</a>}</span></h4>
<h4 class="name" id="spriteSheet"><span class="type-signature">&lt;static> </span>spriteSheet<span class="signature">(game, key, frameWidth, frameHeight, <span class="optional">frameMax</span>, <span class="optional">margin</span>, <span class="optional">spacing</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.FrameData.html">Phaser.FrameData</a>}</span></h4>
</dt>
@@ -1119,6 +1127,84 @@
</tr>
<tr>
<td class="name"><code>margin</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>If the frames have been drawn with a margin, specify the amount here.</p></td>
</tr>
<tr>
<td class="name"><code>spacing</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>If the frames have been drawn with spacing between them, specify the amount here.</p></td>
</tr>
</tbody>
</table>
@@ -1334,7 +1420,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AnimationParser.js.html">animation/AnimationParser.js</a>, <a href="AnimationParser.js.html#sunlight-1-line-240">line 240</a>
<a href="AnimationParser.js.html">animation/AnimationParser.js</a>, <a href="AnimationParser.js.html#sunlight-1-line-242">line 242</a>
</li></ul></dd>
@@ -1402,13 +1488,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:26 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:22 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+59 -51
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -1940,7 +1948,7 @@ for multiple Sprites. So if you need to dynamically create a Sprite texture then
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-994">line 994</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-996">line 996</a>
</li></ul></dd>
@@ -2815,7 +2823,7 @@ going in the given direction by anticlockwise (defaulting to clockwise).</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-976">line 976</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-978">line 978</a>
</li></ul></dd>
@@ -3034,7 +3042,7 @@ example, the following code defines a black to white vertical gradient ranging f
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -3057,7 +3065,7 @@ example, the following code defines a black to white vertical gradient ranging f
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -3293,7 +3301,7 @@ square to display it:</p>
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -3316,7 +3324,7 @@ square to display it:</p>
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -3645,7 +3653,7 @@ blue radial gradient centered at (100, 100), with a radius of 50, and draws a re
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -3668,7 +3676,7 @@ blue radial gradient centered at (100, 100), with a radius of 50, and draws a re
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -4337,7 +4345,7 @@ blue radial gradient centered at (100, 100), with a radius of 50, and draws a re
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1036">line 1036</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1038">line 1038</a>
</li></ul></dd>
@@ -4406,7 +4414,7 @@ blue radial gradient centered at (100, 100), with a radius of 50, and draws a re
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1072">line 1072</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1074">line 1074</a>
</li></ul></dd>
@@ -4475,7 +4483,7 @@ blue radial gradient centered at (100, 100), with a radius of 50, and draws a re
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-982">line 982</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-984">line 984</a>
</li></ul></dd>
@@ -4544,7 +4552,7 @@ blue radial gradient centered at (100, 100), with a radius of 50, and draws a re
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1012">line 1012</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1014">line 1014</a>
</li></ul></dd>
@@ -5263,7 +5271,7 @@ blue radial gradient centered at (100, 100), with a radius of 50, and draws a re
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1006">line 1006</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1008">line 1008</a>
</li></ul></dd>
@@ -5799,7 +5807,7 @@ Once the gradient is created colors can be inserted using the addColorStop metho
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1096">line 1096</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1098">line 1098</a>
</li></ul></dd>
@@ -5868,7 +5876,7 @@ Once the gradient is created colors can be inserted using the addColorStop metho
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1108">line 1108</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1110">line 1110</a>
</li></ul></dd>
@@ -5937,7 +5945,7 @@ Once the gradient is created colors can be inserted using the addColorStop metho
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1114">line 1114</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1116">line 1116</a>
</li></ul></dd>
@@ -6006,7 +6014,7 @@ Once the gradient is created colors can be inserted using the addColorStop metho
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1078">line 1078</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1080">line 1080</a>
</li></ul></dd>
@@ -6075,7 +6083,7 @@ Once the gradient is created colors can be inserted using the addColorStop metho
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1039">line 1039</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1041">line 1041</a>
</li></ul></dd>
@@ -6354,7 +6362,7 @@ Once the gradient is created colors can be inserted using the addColorStop metho
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1075">line 1075</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1077">line 1077</a>
</li></ul></dd>
@@ -6423,7 +6431,7 @@ Once the gradient is created colors can be inserted using the addColorStop metho
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1018">line 1018</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1020">line 1020</a>
</li></ul></dd>
@@ -7828,7 +7836,7 @@ source-over (default), destination-atop, destination-in, destination-out, destin
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1024">line 1024</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1026">line 1026</a>
</li></ul></dd>
@@ -8625,7 +8633,7 @@ source-over (default), destination-atop, destination-in, destination-out, destin
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1060">line 1060</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1062">line 1062</a>
</li></ul></dd>
@@ -8999,7 +9007,7 @@ source-over (default), destination-atop, destination-in, destination-out, destin
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-964">line 964</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-966">line 966</a>
</li></ul></dd>
@@ -9068,7 +9076,7 @@ source-over (default), destination-atop, destination-in, destination-out, destin
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-970">line 970</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-972">line 972</a>
</li></ul></dd>
@@ -9137,7 +9145,7 @@ source-over (default), destination-atop, destination-in, destination-out, destin
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-988">line 988</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-990">line 990</a>
</li></ul></dd>
@@ -9416,7 +9424,7 @@ source-over (default), destination-atop, destination-in, destination-out, destin
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1000">line 1000</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1002">line 1002</a>
</li></ul></dd>
@@ -9485,7 +9493,7 @@ source-over (default), destination-atop, destination-in, destination-out, destin
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1093">line 1093</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1095">line 1095</a>
</li></ul></dd>
@@ -9926,7 +9934,7 @@ This is called automatically if the BitmapData is being used by a Sprite, otherw
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1030">line 1030</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1032">line 1032</a>
</li></ul></dd>
@@ -10136,7 +10144,7 @@ This is called automatically if the BitmapData is being used by a Sprite, otherw
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1090">line 1090</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1092">line 1092</a>
</li></ul></dd>
@@ -10205,7 +10213,7 @@ This is called automatically if the BitmapData is being used by a Sprite, otherw
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1066">line 1066</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1068">line 1068</a>
</li></ul></dd>
@@ -10274,7 +10282,7 @@ This is called automatically if the BitmapData is being used by a Sprite, otherw
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1054">line 1054</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1056">line 1056</a>
</li></ul></dd>
@@ -11451,7 +11459,7 @@ the stroke style and color in a single line of code like so:</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1048">line 1048</a>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1050">line 1050</a>
</li></ul></dd>
@@ -11939,13 +11947,13 @@ the stroke style and color in a single line of code like so:</p>
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:26 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:22 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+96 -125
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -970,7 +978,7 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-187">line 187</a>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-182">line 182</a>
</li></ul></dd>
@@ -1390,108 +1398,6 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
</dl>
</dd>
<dt>
<h4 class="name" id="renderable"><span class="type-signature"></span>renderable<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>renderable</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>A renderable object will be rendered to the context each frame.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-126">line 126</a>
</li></ul></dd>
</dl>
@@ -1793,7 +1699,7 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-206">line 206</a>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-201">line 201</a>
</li></ul></dd>
@@ -1899,7 +1805,7 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-223">line 223</a>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-218">line 218</a>
</li></ul></dd>
@@ -1922,6 +1828,71 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
<dl>
<dt>
<h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-156">line 156</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="update"><span class="type-signature"></span>update<span class="signature">()</span><span class="type-signature"></span></h4>
@@ -1964,7 +1935,7 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-133">line 133</a>
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-128">line 128</a>
</li></ul></dd>
@@ -2009,13 +1980,13 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:27 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:22 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+788 -384
View File
File diff suppressed because it is too large Load Diff
+556 -778
View File
File diff suppressed because it is too large Load Diff
+214 -35
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -730,7 +738,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-97">line 97</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-100">line 100</a>
</li></ul></dd>
@@ -790,7 +798,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-103">line 103</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-106">line 106</a>
</li></ul></dd>
@@ -850,7 +858,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-109">line 109</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-112">line 112</a>
</li></ul></dd>
@@ -910,7 +918,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-115">line 115</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-118">line 118</a>
</li></ul></dd>
@@ -1231,6 +1239,108 @@ at all then set this to null. The values can be anything and are in World coordi
</dl>
</dd>
<dt>
<h4 class="name" id="displayObject"><span class="type-signature"></span>displayObject<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>displayObject</code></td>
<td class="type">
<span class="param-type">PIXI.DisplayObject</span>
</td>
<td class="description last"><p>The display object to which all game objects are added. Set by World.boot</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-92">line 92</a>
</li></ul></dd>
</dl>
@@ -1430,7 +1540,7 @@ at all then set this to null. The values can be anything and are in World coordi
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-388">line 388</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-402">line 402</a>
</li></ul></dd>
@@ -1770,7 +1880,7 @@ at all then set this to null. The values can be anything and are in World coordi
<p>Camera view.
The view into the world we wish to render (by default the game dimensions).
The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render.
Objects outside of this view are not rendered (unless set to ignore the Camera, i.e. UI?).</p>
Objects outside of this view are not rendered if set to camera cull.</p>
</div>
@@ -2062,7 +2172,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-371">line 371</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-385">line 385</a>
</li></ul></dd>
@@ -2270,7 +2380,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-325">line 325</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-339">line 339</a>
</li></ul></dd>
@@ -2376,7 +2486,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-348">line 348</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-362">line 362</a>
</li></ul></dd>
@@ -2441,7 +2551,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-251">line 251</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-263">line 263</a>
</li></ul></dd>
@@ -2559,7 +2669,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-162">line 162</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-165">line 165</a>
</li></ul></dd>
@@ -2700,7 +2810,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-173">line 173</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-176">line 176</a>
</li></ul></dd>
@@ -2861,7 +2971,76 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-119">line 119</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-122">line 122</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="setBoundsToWorld"><span class="type-signature"></span>setBoundsToWorld<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Update the Camera bounds to match the game world.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-253">line 253</a>
</li></ul></dd>
@@ -3003,7 +3182,7 @@ without having to use game.camera.x and game.camera.y.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-289">line 289</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-301">line 301</a>
</li></ul></dd>
@@ -3144,7 +3323,7 @@ without having to use game.camera.x and game.camera.y.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-309">line 309</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-321">line 321</a>
</li></ul></dd>
@@ -3213,7 +3392,7 @@ without having to use game.camera.x and game.camera.y.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-185">line 185</a>
<a href="Camera.js.html">core/Camera.js</a>, <a href="Camera.js.html#sunlight-1-line-188">line 188</a>
</li></ul></dd>
@@ -3258,13 +3437,13 @@ without having to use game.camera.x and game.camera.y.</p>
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:27 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:23 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+164 -37
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -444,7 +452,7 @@
<div class="description">
<p>The Canvas class handles everything related to the &lt;canvas&gt; tag as a DOM Element, like styles, offset, aspect ratio</p>
<p>The Canvas class handles everything related to creating the <code>canvas</code> DOM tag that Phaser will use, including styles, offset and aspect ratio.</p>
</div>
@@ -523,7 +531,7 @@
<dl>
<dt>
<h4 class="name" id="addToDOM"><span class="type-signature">&lt;static> </span>addToDOM<span class="signature">(canvas, parent, overflowHidden)</span><span class="type-signature"> &rarr; {HTMLCanvasElement}</span></h4>
<h4 class="name" id="addToDOM"><span class="type-signature">&lt;static> </span>addToDOM<span class="signature">(canvas, parent, <span class="optional">overflowHidden</span>)</span><span class="type-signature"> &rarr; {HTMLCanvasElement}</span></h4>
</dt>
@@ -554,8 +562,12 @@ If no parent is given it will be added as a child of the document.body.</p>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
@@ -579,7 +591,19 @@ If no parent is given it will be added as a child of the document.body.</p>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The canvas to set the touch action on.</p></td>
@@ -605,10 +629,22 @@ If no parent is given it will be added as a child of the document.body.</p>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The DOM element to add the canvas to. Defaults to ''.</p></td>
<td class="default">
</td>
<td class="description last"><p>The DOM element to add the canvas to.</p></td>
</tr>
@@ -628,7 +664,23 @@ If no parent is given it will be added as a child of the document.body.</p>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>If set to true it will add the overflow='hidden' style to the parent DOM element.</p></td>
@@ -663,7 +715,7 @@ If no parent is given it will be added as a child of the document.body.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-134">line 134</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-156">line 156</a>
</li></ul></dd>
@@ -714,7 +766,7 @@ If no parent is given it will be added as a child of the document.body.</p>
<dt>
<h4 class="name" id="create"><span class="type-signature">&lt;static> </span>create<span class="signature">(width, height)</span><span class="type-signature"> &rarr; {HTMLCanvasElement}</span></h4>
<h4 class="name" id="create"><span class="type-signature">&lt;static> </span>create<span class="signature">(<span class="optional">width</span>, <span class="optional">height</span>, <span class="optional">id</span>)</span><span class="type-signature"> &rarr; {HTMLCanvasElement}</span></h4>
</dt>
@@ -722,7 +774,7 @@ If no parent is given it will be added as a child of the document.body.</p>
<div class="description">
<p>Creates the &lt;canvas&gt; tag</p>
<p>Creates a <code>canvas</code> DOM element. The element is not automatically added to the document.</p>
</div>
@@ -744,8 +796,12 @@ If no parent is given it will be added as a child of the document.body.</p>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
@@ -769,10 +825,26 @@ If no parent is given it will be added as a child of the document.body.</p>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>The desired width.</p></td>
<td class="default">
256
</td>
<td class="description last"><p>The width of the canvas element.</p></td>
</tr>
@@ -792,10 +864,65 @@ If no parent is given it will be added as a child of the document.body.</p>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>The desired height.</p></td>
<td class="default">
256
</td>
<td class="description last"><p>The height of the canvas element..</p></td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
''
</td>
<td class="description last"><p>If given this will be set as the ID of the canvas element, otherwise no ID will be set.</p></td>
</tr>
@@ -852,7 +979,7 @@ If no parent is given it will be added as a child of the document.body.</p>
<div class="param-desc">
<p>The newly created &lt;canvas&gt; tag.</p>
<p>The newly created canvas element.</p>
</div>
@@ -968,7 +1095,7 @@ If no parent is given it will be added as a child of the document.body.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-61">line 61</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-83">line 83</a>
</li></ul></dd>
@@ -1152,7 +1279,7 @@ If no parent is given it will be added as a child of the document.body.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-37">line 37</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-45">line 45</a>
</li></ul></dd>
@@ -1338,7 +1465,7 @@ If no parent is given it will be added as a child of the document.body.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-72">line 72</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-94">line 94</a>
</li></ul></dd>
@@ -1480,7 +1607,7 @@ Note that if this doesn't given the desired result then see the CanvasUtils.setS
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-245">line 245</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-269">line 269</a>
</li></ul></dd>
@@ -1622,7 +1749,7 @@ Note that if this doesn't given the desired result then see the setSmoothingEnab
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-226">line 226</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-248">line 248</a>
</li></ul></dd>
@@ -1790,7 +1917,7 @@ patchy on earlier browsers, especially on mobile.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-202">line 202</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-224">line 224</a>
</li></ul></dd>
@@ -1974,7 +2101,7 @@ patchy on earlier browsers, especially on mobile.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-90">line 90</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-112">line 112</a>
</li></ul></dd>
@@ -2253,7 +2380,7 @@ patchy on earlier browsers, especially on mobile.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-181">line 181</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-203">line 203</a>
</li></ul></dd>
@@ -2437,7 +2564,7 @@ patchy on earlier browsers, especially on mobile.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-110">line 110</a>
<a href="Canvas.js.html">system/Canvas.js</a>, <a href="Canvas.js.html#sunlight-1-line-132">line 132</a>
</li></ul></dd>
@@ -2505,13 +2632,13 @@ patchy on earlier browsers, especially on mobile.</p>
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:27 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:23 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+60 -32
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -472,6 +480,8 @@
<th>Default</th>
<th class="last">Description</th>
</tr>
@@ -507,6 +517,12 @@
<td class="default">
0
</td>
<td class="description last"><p>The x coordinate of the center of the circle.</p></td>
</tr>
@@ -540,6 +556,12 @@
<td class="default">
0
</td>
<td class="description last"><p>The y coordinate of the center of the circle.</p></td>
</tr>
@@ -573,6 +595,12 @@
<td class="default">
0
</td>
<td class="description last"><p>The diameter of the circle.</p></td>
</tr>
@@ -761,7 +789,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-327">line 327</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-329">line 329</a>
</li></ul></dd>
@@ -867,7 +895,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-304">line 304</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-306">line 306</a>
</li></ul></dd>
@@ -973,7 +1001,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-198">line 198</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-200">line 200</a>
</li></ul></dd>
@@ -1080,7 +1108,7 @@ If set to true it will reset all of the Circle objects properties to 0. A Circle
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-345">line 345</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-347">line 347</a>
</li></ul></dd>
@@ -1134,7 +1162,7 @@ If set to true it will reset all of the Circle objects properties to 0. A Circle
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-238">line 238</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-240">line 240</a>
</li></ul></dd>
@@ -1240,7 +1268,7 @@ If set to true it will reset all of the Circle objects properties to 0. A Circle
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-218">line 218</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-220">line 220</a>
</li></ul></dd>
@@ -1346,7 +1374,7 @@ If set to true it will reset all of the Circle objects properties to 0. A Circle
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-260">line 260</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-262">line 262</a>
</li></ul></dd>
@@ -1452,7 +1480,7 @@ If set to true it will reset all of the Circle objects properties to 0. A Circle
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-282">line 282</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-284">line 284</a>
</li></ul></dd>
@@ -1875,7 +1903,7 @@ If set to true it will reset all of the Circle objects properties to 0. A Circle
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-415">line 415</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-417">line 417</a>
</li></ul></dd>
@@ -2062,7 +2090,7 @@ If set to true it will reset all of the Circle objects properties to 0. A Circle
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-368">line 368</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-370">line 370</a>
</li></ul></dd>
@@ -2226,7 +2254,7 @@ If set to true it will reset all of the Circle objects properties to 0. A Circle
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-392">line 392</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-394">line 394</a>
</li></ul></dd>
@@ -2391,7 +2419,7 @@ This method checks the radius distances between the two Circle objects to see if
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-403">line 403</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-405">line 405</a>
</li></ul></dd>
@@ -2555,7 +2583,7 @@ This method checks the radius distances between the two Circle objects to see if
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-440">line 440</a>
<a href="Circle.js.html">geom/Circle.js</a>, <a href="Circle.js.html#sunlight-1-line-442">line 442</a>
</li></ul></dd>
@@ -4282,13 +4310,13 @@ This method checks the radius distances between the two Circle objects to see if
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:27 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:23 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -3611,13 +3619,13 @@ Set the max value to restrict the maximum color used per channel.</p>
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:27 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:23 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
File diff suppressed because it is too large Load Diff
+699 -61
View File
File diff suppressed because it is too large Load Diff
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -681,13 +689,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:29 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -963,13 +971,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:29 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -573,13 +581,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -587,13 +595,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:29 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+31 -23
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -532,7 +540,7 @@
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -1011,7 +1019,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Filter.js.html">core/Filter.js</a>, <a href="Filter.js.html#sunlight-1-line-136">line 136</a>
<a href="Filter.js.html">core/Filter.js</a>, <a href="Filter.js.html#sunlight-1-line-145">line 145</a>
</li></ul></dd>
@@ -1422,7 +1430,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Filter.js.html">core/Filter.js</a>, <a href="Filter.js.html#sunlight-1-line-120">line 120</a>
<a href="Filter.js.html">core/Filter.js</a>, <a href="Filter.js.html#sunlight-1-line-129">line 129</a>
</li></ul></dd>
@@ -1487,7 +1495,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Filter.js.html">core/Filter.js</a>, <a href="Filter.js.html#sunlight-1-line-108">line 108</a>
<a href="Filter.js.html">core/Filter.js</a>, <a href="Filter.js.html#sunlight-1-line-115">line 115</a>
</li></ul></dd>
@@ -1872,13 +1880,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:29 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -2948,13 +2956,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:29 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+39 -31
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -607,7 +615,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="FrameData.js.html">animation/FrameData.js</a>, <a href="FrameData.js.html#sunlight-1-line-226">line 226</a>
<a href="FrameData.js.html">animation/FrameData.js</a>, <a href="FrameData.js.html#sunlight-1-line-228">line 228</a>
</li></ul></dd>
@@ -1195,7 +1203,7 @@
<dt>
<h4 class="name" id="getFrameIndexes"><span class="type-signature"></span>getFrameIndexes<span class="signature">(frames, <span class="optional">useNumericIndex</span>, <span class="optional">output</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>
<h4 class="name" id="getFrameIndexes"><span class="type-signature"></span>getFrameIndexes<span class="signature">(frames, <span class="optional">useNumericIndex</span>, <span class="optional">output</span>)</span><span class="type-signature"> &rarr; {<a href="Array.html">Array</a>}</span></h4>
</dt>
@@ -1248,7 +1256,7 @@ The frames indexes are returned in the output array, or if none is provided in a
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -1322,7 +1330,7 @@ The frames indexes are returned in the output array, or if none is provided in a
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -1414,7 +1422,7 @@ The frames indexes are returned in the output array, or if none is provided in a
</dt>
<dd>
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
</dd>
@@ -1429,7 +1437,7 @@ The frames indexes are returned in the output array, or if none is provided in a
<dt>
<h4 class="name" id="getFrameRange"><span class="type-signature"></span>getFrameRange<span class="signature">(start, end, <span class="optional">output</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>
<h4 class="name" id="getFrameRange"><span class="type-signature"></span>getFrameRange<span class="signature">(start, end, <span class="optional">output</span>)</span><span class="type-signature"> &rarr; {<a href="Array.html">Array</a>}</span></h4>
</dt>
@@ -1541,7 +1549,7 @@ The frames indexes are returned in the output array, or if none is provided in a
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -1629,7 +1637,7 @@ The frames indexes are returned in the output array, or if none is provided in a
</dt>
<dd>
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
</dd>
@@ -1644,7 +1652,7 @@ The frames indexes are returned in the output array, or if none is provided in a
<dt>
<h4 class="name" id="getFrames"><span class="type-signature"></span>getFrames<span class="signature">(frames, <span class="optional">useNumericIndex</span>, <span class="optional">output</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>
<h4 class="name" id="getFrames"><span class="type-signature"></span>getFrames<span class="signature">(frames, <span class="optional">useNumericIndex</span>, <span class="optional">output</span>)</span><span class="type-signature"> &rarr; {<a href="Array.html">Array</a>}</span></h4>
</dt>
@@ -1697,7 +1705,7 @@ The frames are returned in the output array, or if none is provided in a new Arr
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -1771,7 +1779,7 @@ The frames are returned in the output array, or if none is provided in a new Arr
<td class="type">
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
@@ -1863,7 +1871,7 @@ The frames are returned in the output array, or if none is provided in a new Arr
</dt>
<dd>
<span class="param-type">Array</span>
<span class="param-type"><a href="Array.html">Array</a></span>
</dd>
@@ -1895,13 +1903,13 @@ The frames are returned in the output array, or if none is provided in a new Arr
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:29 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+847 -63
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+100 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -721,6 +729,79 @@
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Destroy this Graphics instance.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Graphics.js.html">gameobjects/Graphics.js</a>, <a href="Graphics.js.html#sunlight-1-line-36">line 36</a>
</li></ul></dd>
</dl>
</dd>
</dl>
@@ -739,13 +820,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:29 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:26 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+1098 -366
View File
File diff suppressed because it is too large Load Diff
+542 -78
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+28 -20
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -2116,7 +2124,7 @@ If the key is up it holds the duration of the previous down session.</p>
<dt>
<h4 class="name" id="justPressed"><span class="type-signature"></span>justPressed<span class="signature">(<span class="optional">duration</span>)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<h4 class="name" id="justReleased"><span class="type-signature"></span>justReleased<span class="signature">(<span class="optional">duration</span>)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
</dt>
@@ -2530,13 +2538,13 @@ If the key is up it holds the duration of the previous down session.</p>
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:30 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:27 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+33 -25
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -1362,7 +1370,7 @@ The Key object can then be polled, have events attached to it, etc.</p>
<td class="description last"><p>The keycode of the key, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR</p></td>
<td class="description last"><p>The keycode of the key, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR</p></td>
</tr>
@@ -1785,7 +1793,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
<td class="description last"><p>The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR</p></td>
<td class="description last"><p>The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR</p></td>
</tr>
@@ -1942,7 +1950,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
</td>
<td class="description last"><p>The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR</p></td>
<td class="description last"><p>The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR</p></td>
</tr>
@@ -2064,7 +2072,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
<dt>
<h4 class="name" id="justPressed"><span class="type-signature"></span>justPressed<span class="signature">(keycode, <span class="optional">duration</span>)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<h4 class="name" id="justReleased"><span class="type-signature"></span>justReleased<span class="signature">(keycode, <span class="optional">duration</span>)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
</dt>
@@ -2138,7 +2146,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
</td>
<td class="description last"><p>The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR</p></td>
<td class="description last"><p>The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR</p></td>
</tr>
@@ -2554,7 +2562,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
<td class="description last"><p>The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACE_BAR</p></td>
<td class="description last"><p>The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR</p></td>
</tr>
@@ -2957,13 +2965,13 @@ This is called automatically by Phaser.Input and should not normally be invoked
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:30 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:27 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
File diff suppressed because it is too large Load Diff
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -1449,13 +1457,13 @@ The function must exist on the member.</p>
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:30 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:27 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+666 -440
View File
File diff suppressed because it is too large Load Diff
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -681,13 +689,13 @@
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:31 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:27 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -1399,13 +1407,13 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:31 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+1294 -289
View File
File diff suppressed because it is too large Load Diff
+44 -33
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -614,7 +622,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-105">line 105</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-106">line 106</a>
</li></ul></dd>
@@ -674,7 +682,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-111">line 111</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-112">line 112</a>
</li></ul></dd>
@@ -734,7 +742,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-99">line 99</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-100">line 100</a>
</li></ul></dd>
@@ -794,7 +802,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-117">line 117</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-118">line 118</a>
</li></ul></dd>
@@ -1278,7 +1286,7 @@
<td class="description last"><p>The browser mouse event.</p></td>
<td class="description last"><p>The browser mouse DOM event. Will be set to null if no mouse event has ever been received.</p></td>
</tr>
@@ -1303,11 +1311,14 @@
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-73">line 73</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-74">line 74</a>
</li></ul></dd>
@@ -2036,7 +2047,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-153">line 153</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-154">line 154</a>
</li></ul></dd>
@@ -2154,7 +2165,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-185">line 185</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-186">line 186</a>
</li></ul></dd>
@@ -2272,7 +2283,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-215">line 215</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-216">line 216</a>
</li></ul></dd>
@@ -2390,7 +2401,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-276">line 276</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-277">line 277</a>
</li></ul></dd>
@@ -2459,7 +2470,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-300">line 300</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-301">line 301</a>
</li></ul></dd>
@@ -2530,7 +2541,7 @@ If the browser successfully enters a locked state the event Phaser.Mouse.pointer
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-247">line 247</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-248">line 248</a>
</li></ul></dd>
@@ -2599,7 +2610,7 @@ If the browser successfully enters a locked state the event Phaser.Mouse.pointer
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-121">line 121</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-122">line 122</a>
</li></ul></dd>
@@ -2668,7 +2679,7 @@ If the browser successfully enters a locked state the event Phaser.Mouse.pointer
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-316">line 316</a>
<a href="Mouse.js.html">input/Mouse.js</a>, <a href="Mouse.js.html#sunlight-1-line-317">line 317</a>
</li></ul></dd>
@@ -2713,13 +2724,13 @@ If the browser successfully enters a locked state the event Phaser.Mouse.pointer
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:31 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
+27 -19
View File
@@ -90,6 +90,10 @@
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.DOMSprite.html">DOMSprite</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
@@ -162,6 +166,14 @@
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
@@ -186,6 +198,10 @@
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
@@ -278,6 +294,10 @@
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
@@ -342,6 +362,10 @@
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
@@ -381,23 +405,7 @@
<ul class="dropdown-menu ">
<li>
<a href="global.html#bottom">bottom</a>
</li>
<li>
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
</li>
<li>
<a href="global.html#render">render</a>
</li>
<li>
<a href="global.html#renderXY">renderXY</a>
</li>
<li>
<a href="global.html#right">right</a>
<a href="global.html#SAT">SAT</a>
</li>
@@ -1343,13 +1351,13 @@ Optionally you can redirect to the new url, or just return it as a string.</p>
<span class="copyright">
Phaser Copyright © 2012-2013 Photon Storm Ltd.
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Thu Nov 28 2013 15:56:31 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Mon Feb 24 2014 01:12:28 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>

Some files were not shown because too many files have changed in this diff Show More