mirror of
https://github.com/wassname/phaser.git
synced 2026-08-04 13:14:14 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de3583db80 | ||
|
|
88f901249a | ||
|
|
f4ff4d88fe | ||
|
|
37323562cd | ||
|
|
f6cc40f025 | ||
|
|
529d210006 | ||
|
|
7b572b9b81 | ||
|
|
43bc0e72f1 | ||
|
|
ad0e53abb9 | ||
|
|
6dca66c501 | ||
|
|
0fbbb887fc | ||
|
|
f9a63a9d2e | ||
|
|
92edaf76ef | ||
|
|
4c48e88fc1 | ||
|
|
59a4e80dc1 | ||
|
|
310eb0a69e | ||
|
|
d5e45c22e9 | ||
|
|
b9deb43c88 | ||
|
|
e95ec9fdbc | ||
|
|
936092cba1 | ||
|
|
0727541e05 | ||
|
|
3c6bee8dda | ||
|
|
6d418ba9c7 | ||
|
|
4b3d282f67 | ||
|
|
232d022aaa | ||
|
|
26415094b6 | ||
|
|
e396b56686 | ||
|
|
47f98ac2bc | ||
|
|
d964ef7d0a | ||
|
|
7db37bf5d5 | ||
|
|
a97357b34e | ||
|
|
e8559fb735 | ||
|
|
58d203619a | ||
|
|
16dc2c1597 | ||
|
|
c57071bd98 | ||
|
|
1f93b62055 | ||
|
|
947985c5b1 | ||
|
|
690bd3e9e2 | ||
|
|
3df4746e8a | ||
|
|
34e5ee3eb8 | ||
|
|
819380d001 | ||
|
|
26459602aa | ||
|
|
79007bc142 | ||
|
|
0641170aab | ||
|
|
d9323de752 | ||
|
|
1d633a55f0 | ||
|
|
3c631768f2 | ||
|
|
59ea6746db | ||
|
|
2a65488eec | ||
|
|
cf3b9ae187 | ||
|
|
10252543f2 | ||
|
|
62da24a7fc | ||
|
|
b0f4ac3bcc | ||
|
|
e9ab2d30b6 | ||
|
|
27bca6a8c2 | ||
|
|
8628c5b2f3 | ||
|
|
e11cae5373 | ||
|
|
c0032e7a58 | ||
|
|
9e5e30bb12 | ||
|
|
03cde81b48 | ||
|
|
b7bb52696f | ||
|
|
df2a048594 | ||
|
|
68d5c73fea | ||
|
|
eddce653e9 | ||
|
|
16fa37081f | ||
|
|
fd68a2fe3a | ||
|
|
e7a9b96d27 | ||
|
|
02b75b9e23 | ||
|
|
0896c2fac7 | ||
|
|
8e77e8cedb | ||
|
|
846e9c5061 | ||
|
|
1af86771ba | ||
|
|
84f0f00f49 | ||
|
|
4502ca1bf6 | ||
|
|
70ad43e71b | ||
|
|
a1ccddcd7e | ||
|
|
82c39d0866 | ||
|
|
45f9db515a | ||
|
|
09d4b2bb8b | ||
|
|
8315973c5d | ||
|
|
28f71ed86d | ||
|
|
3488880956 | ||
|
|
33d47cf9e9 | ||
|
|
cdb1891420 | ||
|
|
30af712d6a | ||
|
|
5e182d317b | ||
|
|
26f2b2a931 | ||
|
|
e5dc16b68d | ||
|
|
27fc447928 | ||
|
|
45b6d5a741 | ||
|
|
13a86765cb | ||
|
|
68b7d22e0d | ||
|
|
6e4e99f436 | ||
|
|
651858372c | ||
|
|
d51a37211c | ||
|
|
5b85c910cb | ||
|
|
e5f52e8ae8 | ||
|
|
82cb66f47b | ||
|
|
9deb5514a2 | ||
|
|
90c09374af | ||
|
|
fbe508ab1b | ||
|
|
dbdb2a2026 | ||
|
|
4432d37e6e | ||
|
|
511858e3f5 | ||
|
|
d37ec40d72 | ||
|
|
f575967840 | ||
|
|
912551a45d | ||
|
|
4505aa50f6 | ||
|
|
45518b3ecd | ||
|
|
3fb2eb23cd | ||
|
|
8b06f9cd86 | ||
|
|
e3aaec8ac0 | ||
|
|
ea9e22f472 | ||
|
|
110ab4e253 | ||
|
|
31b68ac94f | ||
|
|
20108e47f3 | ||
|
|
1370ba52b5 | ||
|
|
b2c49ef853 | ||
|
|
f6af6fe0a3 | ||
|
|
7a0e9a478c | ||
|
|
15a002e720 | ||
|
|
3236ea6b24 | ||
|
|
c9d07c7346 | ||
|
|
a81d22a309 | ||
|
|
128c7143d5 | ||
|
|
971e17fabe | ||
|
|
2532df8793 | ||
|
|
c5840f4f6f | ||
|
|
4e7dabb47e | ||
|
|
47ee5a2c88 | ||
|
|
ca1f24868a | ||
|
|
1f9df6e3f4 | ||
|
|
ac310ab881 | ||
|
|
abdaaa0010 | ||
|
|
58fb248575 | ||
|
|
283e38aaae | ||
|
|
be6489fbc9 | ||
|
|
651737fdd0 | ||
|
|
88ef644d47 | ||
|
|
7c66a6b6cc | ||
|
|
d8bf13eaaa | ||
|
|
bd66be1804 | ||
|
|
01a314018d | ||
|
|
ff7cad102c | ||
|
|
8479e456dd | ||
|
|
b4e767161b | ||
|
|
6cde583e82 | ||
|
|
ab02040bea | ||
|
|
32f5a2fa36 | ||
|
|
011d2d8e05 | ||
|
|
17af96d46a | ||
|
|
bd9898db7e | ||
|
|
befcf74f44 | ||
|
|
e7c2b6ae9c | ||
|
|
71f82477ea | ||
|
|
c6fa2cb7b6 | ||
|
|
35cef4e529 | ||
|
|
0a0e775ea5 | ||
|
|
10d105d5ce | ||
|
|
754219a978 | ||
|
|
5f9acdca4b | ||
|
|
c6c579e6b3 | ||
|
|
c21365703d | ||
|
|
35e61172e1 | ||
|
|
67e2caafbc | ||
|
|
038bca11b2 | ||
|
|
bd9b964710 | ||
|
|
1aabb6b93d | ||
|
|
77a8dc321f | ||
|
|
428e331a11 | ||
|
|
aa3a86df6e | ||
|
|
92033fde7c | ||
|
|
7aa45b5872 | ||
|
|
c3183dcea9 | ||
|
|
f7329e0661 | ||
|
|
5526a7322b | ||
|
|
902ffee808 | ||
|
|
d1cd1df9a5 | ||
|
|
86f6ddcbc8 | ||
|
|
3b87ce9fc9 | ||
|
|
29d7cc36a0 | ||
|
|
ba74bea4b4 | ||
|
|
ce4cf531d4 | ||
|
|
fdbdd81b7b | ||
|
|
2c8077835c | ||
|
|
10f4bc7507 | ||
|
|
923a10ee81 | ||
|
|
167a498a5e | ||
|
|
7acf79338c | ||
|
|
e103d6ae83 | ||
|
|
9a968bc5bb | ||
|
|
0acef49a7c | ||
|
|
5a5d465034 | ||
|
|
6be31e0f69 | ||
|
|
bf72b4d3b0 | ||
|
|
63d90a0176 | ||
|
|
3cbb820349 | ||
|
|
352749e803 | ||
|
|
4c7a4ebf62 | ||
|
|
5cf7ed4fdb | ||
|
|
f991f9cee8 | ||
|
|
b2c680811b | ||
|
|
4ada28ba81 | ||
|
|
55d69e16b6 | ||
|
|
50eee95c99 | ||
|
|
dd7ae12271 | ||
|
|
a0961f27df | ||
|
|
896e9af9f5 | ||
|
|
b8dbb5d125 | ||
|
|
388e42c80a | ||
|
|
7917eac255 | ||
|
|
39cae4cc09 | ||
|
|
03ae324d26 | ||
|
|
a361a18616 | ||
|
|
dd9f533528 | ||
|
|
1b954066a6 | ||
|
|
da5d8c9272 | ||
|
|
215632c0a7 | ||
|
|
9988a2ffbe | ||
|
|
56389fcaf4 | ||
|
|
c74bac3a9c | ||
|
|
9f6cfca9cd | ||
|
|
6805e7264d | ||
|
|
f7202a3ff1 | ||
|
|
fc6ae6a60b | ||
|
|
636b1af25c | ||
|
|
19759699df | ||
|
|
669570c701 | ||
|
|
af5847e8e4 | ||
|
|
2071fc22fc | ||
|
|
55b2dd379a | ||
|
|
3e1207e1a3 | ||
|
|
8ade29d982 | ||
|
|
74e0cfb13a | ||
|
|
13a03f3620 | ||
|
|
886618c056 | ||
|
|
ca3c71e8f5 | ||
|
|
8e289e6b7c | ||
|
|
1f513a333e | ||
|
|
ea3802a556 | ||
|
|
cd314cd03e | ||
|
|
eb3d8241ca | ||
|
|
fe5fdb164c | ||
|
|
2e11801f9f | ||
|
|
f6712da774 | ||
|
|
b48669dded | ||
|
|
8469a9c51e | ||
|
|
b978a2b73b | ||
|
|
c5c754725a | ||
|
|
8f14483b60 | ||
|
|
539dcdd18a | ||
|
|
666df67453 | ||
|
|
42c0bed502 | ||
|
|
3bfea2101a | ||
|
|
f9ee9bfc0e | ||
|
|
2b99cb4be4 | ||
|
|
0256117307 | ||
|
|
0302e05a83 | ||
|
|
d9ffd6afd4 | ||
|
|
f9b82b66db | ||
|
|
efe839978b | ||
|
|
00a9897ae2 | ||
|
|
378ffc7ade | ||
|
|
b2fc6c422a | ||
|
|
f22159e257 | ||
|
|
8da9b67c18 | ||
|
|
780b8a5d6d | ||
|
|
39025c1c2a | ||
|
|
e91d40b9fc | ||
|
|
a9a46bfbbf | ||
|
|
4926fac578 | ||
|
|
2fc5c89c1e | ||
|
|
e8646def64 | ||
|
|
141337bed9 | ||
|
|
f4688241d2 | ||
|
|
86584a636c | ||
|
|
06a17b4b26 | ||
|
|
299115ca5d | ||
|
|
13a2cc2feb | ||
|
|
373b97648d | ||
|
|
a876fdd2b6 | ||
|
|
cbd9b77327 | ||
|
|
d30e2974c4 | ||
|
|
16ae7f3cb7 | ||
|
|
155c863d69 | ||
|
|
82f019d4d2 | ||
|
|
8015194daa | ||
|
|
7d7aa795e7 | ||
|
|
b286093093 | ||
|
|
496639ff25 | ||
|
|
e32c127a97 | ||
|
|
ca297318f0 | ||
|
|
577e3f8506 | ||
|
|
93fcb7acbf | ||
|
|
e620c99479 | ||
|
|
f115a2dbf8 | ||
|
|
9b6bfa5f37 | ||
|
|
40e1b4b9aa | ||
|
|
6ed6820429 | ||
|
|
7ef5ab8c98 | ||
|
|
e43571980d | ||
|
|
b63bd14172 | ||
|
|
a5f2d65d23 | ||
|
|
7ad4164e3a | ||
|
|
ba6863bdf5 | ||
|
|
38bd00b4ed | ||
|
|
3249aa2673 | ||
|
|
4d80d6c9b2 | ||
|
|
04ebae7a9f | ||
|
|
0dab85c853 | ||
|
|
266b62caff | ||
|
|
83cacb93a0 | ||
|
|
8d48576fe2 | ||
|
|
ebe441666c | ||
|
|
254bf67e16 | ||
|
|
f71b8d4df1 | ||
|
|
6a24d6116b | ||
|
|
e4faa34908 | ||
|
|
71b08cafbd | ||
|
|
9dc7c73135 | ||
|
|
e271f69527 | ||
|
|
46cf024a35 | ||
|
|
1d20c07ed9 | ||
|
|
18a07f7a88 | ||
|
|
13fdca9cf5 | ||
|
|
084c4239e5 | ||
|
|
b35da01cfc | ||
|
|
3f99b691c9 | ||
|
|
42cd8bd812 | ||
|
|
789f0bb0a1 | ||
|
|
dfb22f1044 | ||
|
|
8b793cd8d7 | ||
|
|
94d9fa6e77 | ||
|
|
de34a13545 | ||
|
|
35dd98c72f | ||
|
|
06e33bc8e4 | ||
|
|
1eca16a948 | ||
|
|
32bff9e419 | ||
|
|
00664f9e99 | ||
|
|
fa8533f5d1 | ||
|
|
2e576fa9a7 | ||
|
|
19ddad8095 | ||
|
|
9022a2f9d3 | ||
|
|
0e84b7ccc9 | ||
|
|
a5c8b2509c | ||
|
|
c1d60d7e19 | ||
|
|
8678373754 | ||
|
|
e8bac6c8c7 | ||
|
|
4593a42a5b | ||
|
|
3227918c57 | ||
|
|
a96ced0d82 | ||
|
|
cc42a71c66 | ||
|
|
62656783f0 | ||
|
|
7a9508d01d |
@@ -7,6 +7,8 @@ Phaser OSX.sublime-workspace
|
||||
Phaser.sublime-project
|
||||
Phaser.sublime-workspace
|
||||
*.suo
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
|
||||
# Vendors
|
||||
node_modules/
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"globals" : { "Phaser": false, "PIXI": false },
|
||||
// Ignore Environment Globals
|
||||
"browser" : true, // Standard browser globals e.g. `window`, `document`.
|
||||
"couch" : false,
|
||||
"dojo" : false,
|
||||
"jquery" : true,
|
||||
"mootools" : false,
|
||||
"node" : false,
|
||||
"nonstandard" : false,
|
||||
"phantom" : false,
|
||||
"prototypejs" : false,
|
||||
"rhino" : false,
|
||||
"worker" : false,
|
||||
"wsh" : true, // Windows Scripting Host.
|
||||
"yui" : false,
|
||||
|
||||
// Development
|
||||
"debug" : true, // Allow debugger statements e.g. browser breakpoints.
|
||||
"devel" : true, // Allow developments statements e.g. `console.log();`.
|
||||
|
||||
// ECMAScript Support
|
||||
"es3" : true, // Support legacy browser and javascript environments.
|
||||
"esnext" : false, // This option tells JSHint that your code uses ECMAScript 6 specific syntax.
|
||||
"strict" : false, // Require `use strict` pragma in every file.
|
||||
"globalstrict" : false, // Allow global "use strict" (also enables 'strict').
|
||||
|
||||
// Functionality
|
||||
"asi" : true, // Tolerate Automatic Semicolon Insertion (no semicolons).
|
||||
"bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.).
|
||||
"boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
|
||||
"camelcase" : true, // Force all variable names to use either camelCase style or UPPER_CASE with underscores.
|
||||
"curly" : true, // Require {} for every new block or scope.
|
||||
"eqeqeq" : false, // Require triple equals i.e. `===`.
|
||||
"eqnull" : true, // Tolerate use of `== null`.
|
||||
"evil" : false, // Tolerate use of `eval`.
|
||||
"expr" : false, // Tolerate `ExpressionStatement` as Programs.
|
||||
"forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
|
||||
"freeze" : true, // Prohibits overwriting prototypes of native objects such as Array and Date.
|
||||
"funcscope" : true, // This option suppresses warnings about declaring variables inside of control structures while accessing them later from the outside.
|
||||
"immed" : false, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
|
||||
"iterator" : true, // This option suppresses warnings about the __iterator__ property.
|
||||
"lastsemic" : true, // This option suppresses warnings about missing semicolons, but only when the semicolon is omitted for the last statement in a one-line block.
|
||||
"latedef" : false, // Prohipit variable use before definition.
|
||||
"laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
|
||||
"laxcomma" : false, // This option suppresses warnings about comma-first coding style.
|
||||
"loopfunc" : true, // Allow functions to be defined within loops.
|
||||
// "maxcomplexity" : 10, // This option lets you control cyclomatic complexity throughout your code.
|
||||
// "maxdepth" : 2, // This option lets you control how nested do you want your blocks to be.
|
||||
// "maxlen" : 80, // This option lets you set the maximum length of a line.
|
||||
// "maxparams" : 5, // This option lets you set the max number of formal parameters allowed per function.
|
||||
// "maxstatements" : 25, // This option lets you set the max number of statements allowed per function.This option lets you set the max number of formal parameters allowed per function.
|
||||
"moz" : false, // This options tells JSHint that your code uses Mozilla JavaScript extensions.
|
||||
"multistr" : true, // This option suppresses warnings about multi-line strings.
|
||||
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
|
||||
"notypeof" : false, // This option suppresses warnings about invalid typeof operator values.
|
||||
"proto" : true, // This option suppresses warnings about the __proto__ property.
|
||||
"scripturl" : true, // Tolerate script-targeted URLs.
|
||||
"shadow" : true, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
|
||||
"smarttabs" : false, // This option suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only.
|
||||
"supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
|
||||
"undef" : true, // Require all non-global variables be declared before they are used.
|
||||
"unused" : true, // This option warns when you define and never use your variables.
|
||||
"validthis" : true, // This option suppresses warnings about possible strict violations when the code is running in strict mode and you use this in a non-constructor function.
|
||||
|
||||
// Styling
|
||||
"indent" : 4, // Specify indentation spacing
|
||||
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
|
||||
"noempty" : true, // Prohibit use of empty blocks.
|
||||
"nonew" : true, // Prohibit use of constructors for side-effects.
|
||||
"plusplus" : false, // Prohibit use of `++` & `--`.
|
||||
"quotmark" : false, // This option enforces the consistency of quotation marks used throughout your code.
|
||||
"sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
|
||||
"trailing" : true // Prohibit trailing whitespaces.
|
||||
}
|
||||
@@ -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
|
||||
+16
-1
@@ -18,6 +18,7 @@ module.exports = function (grunt) {
|
||||
'src/pixi/core/Matrix.js',
|
||||
'src/pixi/core/Point.js',
|
||||
'src/pixi/core/Rectangle.js',
|
||||
'src/pixi/core/Polygon.js',
|
||||
'src/pixi/display/DisplayObject.js',
|
||||
'src/pixi/display/DisplayObjectContainer.js',
|
||||
'src/pixi/display/Sprite.js',
|
||||
@@ -26,12 +27,16 @@ module.exports = function (grunt) {
|
||||
'src/pixi/extras/Strip.js',
|
||||
'src/pixi/extras/Rope.js',
|
||||
'src/pixi/extras/TilingSprite.js',
|
||||
'src/pixi/filters/AbstractFilter.js',
|
||||
'src/pixi/filters/FilterBlock.js',
|
||||
'src/pixi/filters/MaskFilter.js',
|
||||
'src/pixi/primitives/Graphics.js',
|
||||
'src/pixi/renderers/canvas/CanvasGraphics.js',
|
||||
'src/pixi/renderers/canvas/CanvasRenderer.js',
|
||||
'src/pixi/renderers/webgl/PixiShader.js',
|
||||
'src/pixi/renderers/webgl/PrimitiveShader.js',
|
||||
'src/pixi/renderers/webgl/StripShader.js',
|
||||
'src/pixi/renderers/webgl/WebGLBatch.js',
|
||||
'src/pixi/renderers/webgl/WebGLFilterManager.js',
|
||||
'src/pixi/renderers/webgl/WebGLGraphics.js',
|
||||
'src/pixi/renderers/webgl/WebGLRenderer.js',
|
||||
'src/pixi/renderers/webgl/WebGLRenderGroup.js',
|
||||
@@ -49,6 +54,7 @@ module.exports = function (grunt) {
|
||||
'src/core/LinkedList.js',
|
||||
'src/core/Signal.js',
|
||||
'src/core/SignalBinding.js',
|
||||
'src/core/Filter.js',
|
||||
'src/core/Plugin.js',
|
||||
'src/core/PluginManager.js',
|
||||
'src/core/Stage.js',
|
||||
@@ -63,8 +69,12 @@ 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',
|
||||
'src/gameobjects/Sprite.js',
|
||||
'src/gameobjects/TileSprite.js',
|
||||
'src/gameobjects/Text.js',
|
||||
@@ -82,11 +92,15 @@ module.exports = function (grunt) {
|
||||
'src/geom/Circle.js',
|
||||
'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',
|
||||
@@ -99,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',
|
||||
|
||||
@@ -1,222 +1,139 @@
|
||||

|
||||
|
||||
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.2 - Released: November 1st 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 />
|
||||
Read the [Development Blog](http://www.photonstorm.com)<br />
|
||||
Join the [Forum](http://www.html5gamedevs.com/forum/14-phaser/)<br />
|
||||
Try out 150+ [Phaser Examples](http://gametest.mobi/phaser/examples/)
|
||||
* 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)
|
||||
|
||||
[Un-official Getting Started with Phaser](http://www.antonoffplus.com/coding-an-html5-game-for-30-minutes-or-an-introduction-to-the-phaser-framework)
|
||||
[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.
|
||||
|
||||
[](https://bitdeli.com/free "Bitdeli Badge")
|
||||
|
||||
"Being negative is not how we make progress" - Larry Page, Google
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
|
||||
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.2 - November 1st 2013
|
||||
Version 1.1.6 - "Shienar" - 24th February 2014
|
||||
|
||||
* 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.
|
||||
* New: Added init method to plugins, to be called as they are added to the PluginManager (thanks beeglebug)
|
||||
* New: Physics.Body now has a center property (issue 142, thanks MikeMnD)
|
||||
* New: Lots of fixes across Full Screen Mode support. Input now works, scaling restores properly, world scale is correct and anti-alias support added.
|
||||
* New: Added Group.cursor. This points to the first item added to a Group. You can move the cursor with Group.next() and Group.previous().
|
||||
* New: Added Tween.isTweening(object) to check if an object is currently being tweened or not (thanks mikehamil10)
|
||||
* New: Added getMagnitude, setMagnitude, normalize and isZero methods to Point (thanks beeglebug)
|
||||
* New/Change: Group.callAll now supports nested functions and a context, making it really powerful!
|
||||
* Updated: Fixed a few final bugs in the Sprite body and bounds calculations, in turn this resolved the Tilemap collision issues in the 1.1 release.
|
||||
* Updated: Finished documentation for the Phaser.Button class.
|
||||
* Updated: Fixed the Invaders game sample and enhanced it.
|
||||
* Updated: Fixed the Star Struck game sample and enhanced it.
|
||||
* Updated: If you pause an Animation, when you next play it it'll resume (un-pause itself).
|
||||
* Updated: hexToRGB now accepts short hex codes (#EEE) (thanks beeglebug)
|
||||
* Updated: State functions (preload, update, render, etc) are now passed the current game as a parameter (thanks beeglebug)
|
||||
* Updated: If your game is running in Canvas (not WebGL) you can now set Stage.backgroundColor to rgba style CSS strings, allowing for semi-transparent game backgrounds.
|
||||
* Updated: event.preventDefault() has been added to all Mouse event handlers.
|
||||
* Updated: Sprite.deltaX/Y removed due to non-use. prevX/Y values moved to Sprite._cache.prevX/Y.
|
||||
* Updated: Due to missing extends parameter the Sprite prototype was picking up functions from classes it never meant to (Button, TilemapLayer), now fully isolated.
|
||||
* Fixed issue 135 - Added typeof checks into most ArcadePhysics functions to avoid errors with zero values.
|
||||
* Fixed issue 136 - distanceTo using worldX/Y instead of x/y.
|
||||
* Fixed lots of examples where the cursor keys / space bar were not locked from moving the browser page (if you find any more, please tell us!)
|
||||
* Fixed issue 149 - Starling XML files now load properly again, also created an Example to show use of them (thanks haden)
|
||||
* Fixed an issue where if the Starling XML file didn't contain a frameX/Y value it would crash on import.
|
||||
* Fixed the Multiple Animations Example - it's now a lovely underwater scene :)
|
||||
* Fixed issue 141 - If a Sprite is dragged and you release the Pointer while not over the Sprite, it will think it's still over it (thanks Paratron)
|
||||
* 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.
|
||||
New Examples:
|
||||
|
||||
Version 1.1.1 - October 26th 2013
|
||||
* Added lovely new little mini golf game by jpcloud.
|
||||
|
||||
* 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
|
||||
Updates:
|
||||
|
||||
What's New:
|
||||
* Loader can now load JSON files natively (thanks lucas)
|
||||
* TilemapParser now errors if the tileset isn't the right size
|
||||
|
||||
* JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file and published the API docs to the docs folder.
|
||||
* Brand new Example system (no more php!) and over 150 examples to learn from too.
|
||||
* New TypeScript definitions file generated (in the build folder - thanks to TomTom1229 for manually enhancing this).
|
||||
* New Grunt based build system added (thanks to Florent Cailhol)
|
||||
* New: Phaser.Animation.generateFrameNames - really useful when creating animation data from texture atlases using file names, not indexes.
|
||||
* Added Sprite.play as a handy short-cut to play an animation already loaded onto a Sprite.
|
||||
* Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas.
|
||||
* Added Keyboard.addKey() which creates a new Phaser.Key object that can be polled for updates, pressed states, etc. See the 2 new examples showing use.
|
||||
* Added Button.freezeFrames boolean. Stops the frames being set on mouse events if true.
|
||||
* Extended the Loader 404 error to display the url of the file that didn't load as well as the key.
|
||||
* New: Direction constants have been added to Sprites and adjust based on body motion.
|
||||
* Brand new Sprite.update loop handler. Combined with the transform cache fix and further optimisations this is now much quicker to execute.
|
||||
* Added Keyboard.createCursorKeys() which creates an object with 4 Key objects inside it mapped to up, down, left and right. See the new example in the input folder.
|
||||
* Added Body.skipQuadTree boolean for more fine-grained control over when a body is added to the World QuadTree.
|
||||
* Re-implemented Angular Velocity and Angular Acceleration on the Sprite.body and created 2 new examples to show use.
|
||||
* Added Sprite.fixedToCamera boolean. A Sprite that is fixed to the camera doesn't move with the world, but has its x/y coordinates relative to the top-left of the camera.
|
||||
* Added Group.createMultiple - useful when you need to create a Group of identical sprites for pooling, such as bullets.
|
||||
* Added Group.total. Same as Group.length, but more in line with the rest of the Group naming.
|
||||
* Added Sprite.outOfBoundsKill boolean flag. Will automatically kill a sprite that leaves the game World bounds (off by default).
|
||||
* Lots of changes and fixes in ArcadePhysics, including:
|
||||
* Functions with "mouse" in the title have been updated to "pointer" to more accurately reflect what they do.
|
||||
* New velocity functions: moveToObject, moveToPointer, moveToXY
|
||||
* New acceleration functions: accelerateToObject, accelerateToPointer, accelerateToXY
|
||||
* New distance functions: distanceBetween, distanceToXY, distanceToPointer
|
||||
* New angle functions: angleBetween, angleToXY, angleToPointer
|
||||
* velocityFromAngle and velocityFromRotation added with examples created.
|
||||
* Added killOnComplete parameter to Animation.play. Really useful in situations where you want a Sprite to animate once then kill itself on complete, like an explosion effect.
|
||||
* Added Sprite.loadTexture(key, frame) which allows you to load a new texture set into an existing sprite rather than having to create a new sprite.
|
||||
* Added Sprite.destroy back in again and made it a lot more robust at cleaning up child objects.
|
||||
* Added 'return this' to all the core Loader functions so you can chain load calls if you so wish.
|
||||
* Added Text.destroy() and BitmapText.destroy(), also updated Group.remove to make it more bullet-proof when an element doesn't have any events.
|
||||
* Added Phaser.Utils.shuffle to shuffle an array.
|
||||
* Added Graphics.destroy, x, y and updated angle functions.
|
||||
* Added AnimationManager.refreshFrame - will reset the texture being used for a Sprite (useful after a crop rect clear)
|
||||
* Added Physics.overlap(sprite1, sprite2) for quick body vs. body overlap tests with no separation performed.
|
||||
* On a busy page it's possible for the game to boot with an incorrect stage offset x/y which can cause input events to be calculated wrong. A new property has been added to Stage to combat this issue: Stage.checkOffsetInterval. By default it will check the canvas offset every 2500ms and adjust it accordingly. You can set the value to 'false' to disable the check entirely, or set a higher or lower value. We recommend that you get the value quite low during your games preloader, but once the game has fully loaded hopefully the containing page will have settled down, so it's probably safe to disable the check entirely.
|
||||
* Added Rectangle.floorAll to floor all values in a Rectangle (x, y, width and height).
|
||||
|
||||
What's changed:
|
||||
Bug Fixes:
|
||||
|
||||
* Renamed Phaser.Text.text to Phaser.Text.content to avoid conflict and overwrite from Pixi local var.
|
||||
* Renamed Phaser.Text.style to Phaser.Text.font to avoid conflict and overwrite from Pixi local var.
|
||||
* Phaser.Button now sets useHandCursor to true by default.
|
||||
* Change: When you start a new State all active tweens are now purged.
|
||||
* When the game boots it will now by default disable user-select and touch action events on the game canvas.
|
||||
* Moved LinkedList.dump to Debug.dumpLinkedList(list)
|
||||
* Phaser.Animation.Frame is now Phaser.Frame
|
||||
* Phaser.Animation.FrameData is now Phaser.FrameData
|
||||
* Phaser.Animation.Parser is now Phaser.AnimationParser (also the file has renamed from Parser.js to AnimationParser.js)
|
||||
* Phaser.Loader.Parser is now Phaser.LoaderParser (also the file has renamed from Parser.js to LoaderParser.js)
|
||||
* Change: We've removed the scrollFactor property from all Game Objects. Sorry, but the new Camera system doesn't work with it and it caused all kinds of issues anyway. We will sort out a replacement for it at a later date.
|
||||
* Change: World now extends Phaser.Group. As a result we've updated GameObjectFactory and other classes that linked to it. If you have anywhere in your code that used to reference world.group you can just remove 'group' from that. So before, world.group.add() is now just world.add().
|
||||
* Change: The Camera has been completely revamped. Rather than adjusting the position of all display objects (bad) it now just shifts the position of the single world container (good!), this is much quicker and also stops the game objects positions from self-adjusting all the time, allowing for them to be properly nested with other containers.
|
||||
* Made Sprite.body optional and added in checks, so you can safely null the Sprite body object if using your own physics system and not impact rendering.
|
||||
* Moved the Camera update checks to World.postUpdate, so all the sprites get the correct adjusted camera position.
|
||||
* The default Game.antialias value is now 'true', so graphics will be smoothed automatically in canvas. Disable it via the Game constructor or Canvas utils.
|
||||
* Phaser.Group now automatically calls updateTransform on any child added to it (avoids temp. frame glitches when new objects are rendered on their first frame).
|
||||
* 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)
|
||||
|
||||
What has been updated:
|
||||
|
||||
* Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too.
|
||||
* Updated ArcadePhysics.separateX/Y to use new body system - much better results now.
|
||||
* Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render.
|
||||
* Added Animation.paused - can be set to true/false.
|
||||
* Added support for Body.maxVelocity (thanks cocoademon)
|
||||
* InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call.
|
||||
* Removed the callbackContext parameter from Group.callAll because it's no longer needed.
|
||||
* Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child.
|
||||
* Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg)
|
||||
* World.randomX/Y now returns values anywhere in the world.bounds range (if set, otherwise 0), including negative values.
|
||||
* Updated InputHandler to use Math.round rather than Math.floor when snapping an object during drag.
|
||||
* If you didn't provide the useNumericIndex parameter then AnimationManager.add will set the value by looking at the datatype of the first element in the frames array.
|
||||
* Group.create now sets the visible and alive properties of the Sprite to the same value as the 'exists' parameter.
|
||||
* World.randomX/Y now works with negative World.bounds values.
|
||||
* Tweens .to will now always return the parent (thanks powerfear)
|
||||
* You can now pass a PIXI.Texture to Sprite (you also need to pass a Phaser.Frame as the frame parameter) but this is useful for Sprites sharing joint canvases.
|
||||
* Group.alpha is now exposed publically and changes the Group container object (not the children directly, who can still have their own alpha values)
|
||||
* Device.webGL uses new inspection code to accurately catch more webGL capable devices.
|
||||
* Debug.renderSpriteBody updated to use a the new Sprite.Body.screenX/Y properties.
|
||||
* Additional checks added to AnimationManager.frame/frameName on the given values.
|
||||
* You can now null a Sprite.crop and it will clear down the crop rect area correctly.
|
||||
* Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas.
|
||||
* Animation.generateFrameNames can now work in reverse, so the start/stop values can create frames that increment or decrement respectively.
|
||||
* Loader updated to use xhr.responseText when loading json, csv or text files. xhr.response is still used for Web Audio binary files (thanks bubba)
|
||||
* Input.onDown and onUp events now dispatch the original event that triggered them (i.e. a MouseEvent or TouchEvent) as the 2nd parameter, after the Pointer (thanks rezoner)
|
||||
* Updated Sprite.crop significantly. Values are now cached, stopping constant Texture frame updates and you can do sprite.crop.width++ for example (thanks haden)
|
||||
* Change: Sprite.crop needs to be enabled with sprite.cropEnabled = true.
|
||||
* Sprite.loadTexture now works correctly with static images, RenderTextures and Animations.
|
||||
* Lots of fixes within Sprite.bounds. The bounds is now correct regardless of rotation, anchor or scale of the Sprite or any of its parent objects.
|
||||
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!)
|
||||
|
||||
What has been fixed:
|
||||
You can view the Change Log for all previous versions at https://github.com/photonstorm/phaser/changelog.md
|
||||
|
||||
* QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using localTransform values.
|
||||
* Fixed the Bounce.In and Bounce.InOut tweens (thanks XekeDeath)
|
||||
* Fixed an issue in Animation.update where if the game was paused it would get an insane delta timer throwing a uuid error.
|
||||
* Added PixiPatch.js to patch in a few essential features until Pixi is updated.
|
||||
* Fixed issue in Animation.play where the given frameRate and loop values wouldn't overwrite those set on construction.
|
||||
* Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly.
|
||||
* Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue.
|
||||
* Fixed Particle Emitters when using Emitter width/height (thanks XekeDeath)
|
||||
* Made animation looping more robust when skipping frames (thanks XekeDeath)
|
||||
* Fix for incorrect new particle positioning (issue #73) (thanks cottonflop)
|
||||
* Fixed issue in Sound.play where if you gave a missing marker it would play the whole sound sprite instead.
|
||||
* Button.setFrames will set the current frame based on the button state immediately.
|
||||
* Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox.
|
||||
* Fixed issue causing Keyboard.justPressed to always fire (thanks stemkoski)
|
||||
* Fixed bug in LinkedList#remove that could cause first to point to a dead node (thanks onedayitwillmake)
|
||||
* Fixed Cache.addDefaultImage so the default image works in Canvas as well as WebGL. Updated to a new image (32x32 black square with green outline)
|
||||
* Fixed a bug in the Sprite transform cache check that caused the skew/scale cache to get constantly invalidated - now only updates as needed, significant performance increase!
|
||||
* Fixed typo in StageScaleMode so it's not pageAlignVeritcally any longer, but pageAlignVertically.
|
||||
* Fixed issue in Group.countLiving / countDead where the value was off by one (thanks mjablonski)
|
||||
* Fixed issue with a jittery Camera if you moved a Sprite via velocity instead of x/y placement.
|
||||
* Fixed the RandomDataGenerator.sow method so if you give in the same seed you'll now get the same results (thanks Hsaka)
|
||||
* Fixed Issue #101 (Mouse Button 0 is not recognised, thanks rezoner)
|
||||
* Fixed an issue where creating an animation with just one frame with an index of zero would cause a UUID error (thanks SYNYST3R1)
|
||||
* Fixed Rectangle.union (thanks andron77)
|
||||
* Fixed Sound.resume so it now correctly resumes playback from the point it was paused (fixes issue 51, thanks Yora).
|
||||
* Fixed issue 105 where a dragged object that was destroyed would cause an Input error (thanks onedayitwillmake)
|
||||
* Fixed Issue 111 - calling Kill on a Phaser.Graphics instance causes error on undefined events.
|
||||
* 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.
|
||||
|
||||

|
||||
|
||||
Outstanding Tasks
|
||||
-----------------
|
||||
|
||||
* TODY: Loader conflict if 2 keys are the same even if they are in different packages (i.e. you can't use "title" for both and image and sound file).
|
||||
* TODO: d-pad example (http://www.html5gamedevs.com/topic/1574-gameinputondown-question/)
|
||||
* TODO: more touch input examples (http://www.html5gamedevs.com/topic/1556-mobile-touch-event/)
|
||||
* TODO: Sound.addMarker hh:mm:ss:ms
|
||||
* TODO: swap state (non-destructive shift)
|
||||
* TODO: rotation offset
|
||||
* TODO: Look at HiDPI Canvas settings
|
||||
|
||||
How to Build
|
||||
------------
|
||||
|
||||
A Grunt script has been provided that will build Phaser from source as well as the examples. Run `grunt` in the phaser folder for a list of command-line options.
|
||||
We provide a fully compiled version of Phaser in the `build` directory, in both plain and minified formats.
|
||||
|
||||
We also provide a Grunt script that will build Phaser from source along with all the examples.
|
||||
|
||||
Run `grunt` in the phaser folder for a list of command-line options.
|
||||
|
||||
|
||||
Koding
|
||||
------
|
||||
|
||||
You can [][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 :)
|
||||
|
||||

|
||||
|
||||
|
||||
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
|
||||
------------
|
||||
@@ -225,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 & 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**
|
||||
|
||||
@@ -293,84 +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.
|
||||
|
||||

|
||||
|
||||
|
||||
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:
|
||||
|
||||
* Integration with an advanced physics system. We've been experimenting with p2.js but have yet to conclude our research.
|
||||
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.
|
||||
* A more advanced Particle system, one that can render to a single canvas (rather than spawn hundreds of Sprites), more advanced effects, etc.
|
||||
* 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.
|
||||
* More advanced tile map features. Better support for advanced Tiled features and also I want to add full support for DAME tilemaps.
|
||||
* 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 running through a local web server (to avoid file access permission errors from your browser).
|
||||
|
||||
Browse to the examples folder via your web server.
|
||||
|
||||
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
|
||||
------------
|
||||
|
||||
Phaser is in early stages and although we've still got a lot to add to it, we wanted to get it out there and share it with the world.
|
||||
We now have a full [Contributors Guide][contribute] which goes into the process in more detail, but here are the headlines:
|
||||
|
||||
If you find a bug (highly likely!) then please report it on github or our forum.
|
||||
- If you find a bug then please report it on [GitHub Issues][issues] or our [Support Forum][forum].
|
||||
|
||||
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 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.
|
||||
|
||||
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
|
||||
|
||||
Bugs?
|
||||
-----
|
||||
|
||||
Please add them to the [Issue Tracker][1] with as much info as possible.
|
||||
Please add them to the [Issue Tracker][issues] with as much info as possible, especially source code demonstrating the issue.
|
||||
|
||||

|
||||
|
||||
"Being negative is not how we make progress" - Larry Page, Google
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
The MIT License (MIT)
|
||||
Phaser is released under the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
Copyright (c) 2013 Richard Davey, Photon Storm Ltd.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
[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
|
||||
|
||||
[](https://github.com/igrigorik/ga-beacon)
|
||||
|
||||
+37
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -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
|
||||
|
||||
+149
-121
@@ -1,123 +1,151 @@
|
||||
<?php
|
||||
// All JS files in build order.
|
||||
// Much easier for debugging re: line numbers
|
||||
// All JS files in build order.
|
||||
// Much easier for debugging re: line numbers
|
||||
if (!isset($path))
|
||||
{
|
||||
$path = '..';
|
||||
}
|
||||
|
||||
echo <<<EOL
|
||||
|
||||
<script src="$path/src/Intro.js"></script>
|
||||
<script src="$path/src/pixi/Pixi.js"></script>
|
||||
<script src="$path/src/Phaser.js"></script>
|
||||
<script src="$path/src/utils/Utils.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/core/Matrix.js"></script>
|
||||
<script src="$path/src/pixi/core/Point.js"></script>
|
||||
<script src="$path/src/pixi/core/Rectangle.js"></script>
|
||||
<script src="$path/src/pixi/core/Polygon.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/display/DisplayObject.js"></script>
|
||||
<script src="$path/src/pixi/display/DisplayObjectContainer.js"></script>
|
||||
<script src="$path/src/pixi/display/Sprite.js"></script>
|
||||
<script src="$path/src/pixi/display/Stage.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/extras/CustomRenderable.js"></script>
|
||||
<script src="$path/src/pixi/extras/Strip.js"></script>
|
||||
<script src="$path/src/pixi/extras/Rope.js"></script>
|
||||
<script src="$path/src/pixi/extras/TilingSprite.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/filters/AbstractFilter.js"></script>
|
||||
<script src="$path/src/pixi/filters/FilterBlock.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/primitives/Graphics.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/renderers/canvas/CanvasGraphics.js"></script>
|
||||
<script src="$path/src/pixi/renderers/canvas/CanvasRenderer.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/renderers/webgl/PixiShader.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/PrimitiveShader.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/StripShader.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/WebGLBatch.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/WebGLFilterManager.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/WebGLGraphics.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/WebGLRenderer.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/WebGLRenderGroup.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/WebGLShaders.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/text/BitmapText.js"></script>
|
||||
<script src="$path/src/pixi/text/Text.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/textures/BaseTexture.js"></script>
|
||||
<script src="$path/src/pixi/textures/Texture.js"></script>
|
||||
|
||||
<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/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/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/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/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/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/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/utils/Debug.js"></script>
|
||||
<script src="$path/src/utils/Color.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/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;
|
||||
?>
|
||||
<script src="../src/Intro.js"></script>
|
||||
<script src="../src/pixi/Pixi.js"></script>
|
||||
<script src="../src/Phaser.js"></script>
|
||||
<script src="../src/utils/Utils.js"></script>
|
||||
|
||||
<script src="../src/pixi/core/Matrix.js"></script>
|
||||
<script src="../src/pixi/core/Point.js"></script>
|
||||
<script src="../src/pixi/core/Rectangle.js"></script>
|
||||
<script src="../src/pixi/display/DisplayObject.js"></script>
|
||||
<script src="../src/pixi/display/DisplayObjectContainer.js"></script>
|
||||
<script src="../src/pixi/display/Sprite.js"></script>
|
||||
|
||||
<script src="../src/pixi/display/Stage.js"></script>
|
||||
<script src="../src/pixi/extras/CustomRenderable.js"></script>
|
||||
<script src="../src/pixi/extras/Strip.js"></script>
|
||||
<script src="../src/pixi/extras/Rope.js"></script>
|
||||
|
||||
<script src="../src/pixi/extras/TilingSprite.js"></script>
|
||||
<script src="../src/pixi/filters/FilterBlock.js"></script>
|
||||
<script src="../src/pixi/filters/MaskFilter.js"></script>
|
||||
<script src="../src/pixi/primitives/Graphics.js"></script>
|
||||
<script src="../src/pixi/renderers/canvas/CanvasGraphics.js"></script>
|
||||
<script src="../src/pixi/renderers/canvas/CanvasRenderer.js"></script>
|
||||
<script src="../src/pixi/renderers/webgl/WebGLBatch.js"></script>
|
||||
<script src="../src/pixi/renderers/webgl/WebGLGraphics.js"></script>
|
||||
<script src="../src/pixi/renderers/webgl/WebGLRenderer.js"></script>
|
||||
<script src="../src/pixi/renderers/webgl/WebGLRenderGroup.js"></script>
|
||||
<script src="../src/pixi/renderers/webgl/WebGLShaders.js"></script>
|
||||
<script src="../src/pixi/text/BitmapText.js"></script>
|
||||
<script src="../src/pixi/text/Text.js"></script>
|
||||
<script src="../src/pixi/textures/BaseTexture.js"></script>
|
||||
<script src="../src/pixi/textures/Texture.js"></script>
|
||||
<script src="../src/pixi/textures/RenderTexture.js"></script>
|
||||
<script src="../src/pixi/utils/EventTarget.js"></script>
|
||||
<script src="../src/pixi/utils/Polyk.js"></script>
|
||||
|
||||
<script src="../src/core/Camera.js"></script>
|
||||
<script src="../src/core/State.js"></script>
|
||||
<script src="../src/core/StateManager.js"></script>
|
||||
<script src="../src/core/LinkedList.js"></script>
|
||||
<script src="../src/core/Signal.js"></script>
|
||||
<script src="../src/core/SignalBinding.js"></script>
|
||||
<script src="../src/core/Plugin.js"></script>
|
||||
<script src="../src/core/PluginManager.js"></script>
|
||||
<script src="../src/core/Stage.js"></script>
|
||||
<script src="../src/core/Group.js"></script>
|
||||
<script src="../src/core/World.js"></script>
|
||||
<script src="../src/core/Game.js"></script>
|
||||
|
||||
<script src="../src/input/Input.js"></script>
|
||||
<script src="../src/input/Key.js"></script>
|
||||
<script src="../src/input/Keyboard.js"></script>
|
||||
<script src="../src/input/Mouse.js"></script>
|
||||
<script src="../src/input/MSPointer.js"></script>
|
||||
<script src="../src/input/Pointer.js"></script>
|
||||
<script src="../src/input/Touch.js"></script>
|
||||
<script src="../src/input/InputHandler.js"></script>
|
||||
|
||||
<script src="../src/gameobjects/Events.js"></script>
|
||||
<script src="../src/gameobjects/GameObjectFactory.js"></script>
|
||||
<script src="../src/gameobjects/Sprite.js"></script>
|
||||
<script src="../src/gameobjects/TileSprite.js"></script>
|
||||
<script src="../src/gameobjects/Text.js"></script>
|
||||
<script src="../src/gameobjects/BitmapText.js"></script>
|
||||
<script src="../src/gameobjects/Button.js"></script>
|
||||
<script src="../src/gameobjects/Graphics.js"></script>
|
||||
<script src="../src/gameobjects/RenderTexture.js"></script>
|
||||
|
||||
<script src="../src/system/Canvas.js"></script>
|
||||
<script src="../src/system/StageScaleMode.js"></script>
|
||||
<script src="../src/system/Device.js"></script>
|
||||
<script src="../src/system/RequestAnimationFrame.js"></script>
|
||||
|
||||
<script src="../src/math/RandomDataGenerator.js"></script>
|
||||
<script src="../src/math/Math.js"></script>
|
||||
<script src="../src/math/QuadTree.js"></script>
|
||||
|
||||
<script src="../src/geom/Circle.js"></script>
|
||||
<script src="../src/geom/Point.js"></script>
|
||||
<script src="../src/geom/Rectangle.js"></script>
|
||||
|
||||
<script src="../src/net/Net.js"></script>
|
||||
|
||||
<script src="../src/tween/TweenManager.js"></script>
|
||||
<script src="../src/tween/Tween.js"></script>
|
||||
<script src="../src/tween/Easing.js"></script>
|
||||
|
||||
<script src="../src/time/Time.js"></script>
|
||||
|
||||
<script src="../src/animation/AnimationManager.js"></script>
|
||||
<script src="../src/animation/Animation.js"></script>
|
||||
<script src="../src/animation/Frame.js"></script>
|
||||
<script src="../src/animation/FrameData.js"></script>
|
||||
<script src="../src/animation/AnimationParser.js"></script>
|
||||
|
||||
<script src="../src/loader/Cache.js"></script>
|
||||
<script src="../src/loader/Loader.js"></script>
|
||||
<script src="../src/loader/LoaderParser.js"></script>
|
||||
|
||||
<script src="../src/sound/Sound.js"></script>
|
||||
<script src="../src/sound/SoundManager.js"></script>
|
||||
|
||||
<script src="../src/utils/Debug.js"></script>
|
||||
<script src="../src/utils/Color.js"></script>
|
||||
|
||||
<script src="../src/physics/arcade/ArcadePhysics.js"></script>
|
||||
<script src="../src/physics/arcade/Body.js"></script>
|
||||
|
||||
<script src="../src/particles/Particles.js"></script>
|
||||
<script src="../src/particles/arcade/ArcadeParticles.js"></script>
|
||||
<script src="../src/particles/arcade/Emitter.js"></script>
|
||||
|
||||
<script src="../src/tilemap/Tile.js"></script>
|
||||
<script src="../src/tilemap/Tilemap.js"></script>
|
||||
<script src="../src/tilemap/TilemapLayer.js"></script>
|
||||
<script src="../src/tilemap/TilemapParser.js"></script>
|
||||
<script src="../src/tilemap/Tileset.js"></script>
|
||||
|
||||
<script src="../src/PixiPatch.js"></script>
|
||||
|
||||
Vendored
+2728
-1785
File diff suppressed because it is too large
Load Diff
+24873
-14450
File diff suppressed because it is too large
Load Diff
Vendored
+13
-11
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
jsdocts -d:phaser.d.ts phaser.js
|
||||
+476
-8
@@ -1,7 +1,443 @@
|
||||
Change Log
|
||||
----------
|
||||
==========
|
||||
|
||||
Version 1.0.6 (September 24th 2013)
|
||||
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.
|
||||
* New: Added init method to plugins, to be called as they are added to the PluginManager (thanks beeglebug)
|
||||
* New: Physics.Body now has a center property (issue 142, thanks MikeMnD)
|
||||
* New: Lots of fixes across Full Screen Mode support. Input now works, scaling restores properly, world scale is correct and anti-alias support added.
|
||||
* New: Added Group.cursor. This points to the first item added to a Group. You can move the cursor with Group.next() and Group.previous().
|
||||
* New: Added Tween.isTweening(object) to check if an object is currently being tweened or not (thanks mikehamil10)
|
||||
* New: Added getMagnitude, setMagnitude, normalize and isZero methods to Point (thanks beeglebug)
|
||||
* New/Change: Group.callAll now supports nested functions and a context, making it really powerful!
|
||||
* Updated: Fixed a few final bugs in the Sprite body and bounds calculations, in turn this resolved the Tilemap collision issues in the 1.1 release.
|
||||
* Updated: Finished documentation for the Phaser.Button class.
|
||||
* Updated: Fixed the Invaders game sample and enhanced it.
|
||||
* Updated: Fixed the Star Struck game sample and enhanced it.
|
||||
* Updated: If you pause an Animation, when you next play it it'll resume (un-pause itself).
|
||||
* Updated: hexToRGB now accepts short hex codes (#EEE) (thanks beeglebug)
|
||||
* Updated: State functions (preload, update, render, etc) are now passed the current game as a parameter (thanks beeglebug)
|
||||
* Updated: If your game is running in Canvas (not WebGL) you can now set Stage.backgroundColor to rgba style CSS strings, allowing for semi-transparent game backgrounds.
|
||||
* Updated: event.preventDefault() has been added to all Mouse event handlers.
|
||||
* Updated: Sprite.deltaX/Y removed due to non-use. prevX/Y values moved to Sprite._cache.prevX/Y.
|
||||
* Updated: Due to missing extends parameter the Sprite prototype was picking up functions from classes it never meant to (Button, TilemapLayer), now fully isolated.
|
||||
* Fixed issue 135 - Added typeof checks into most ArcadePhysics functions to avoid errors with zero values.
|
||||
* Fixed issue 136 - distanceTo using worldX/Y instead of x/y.
|
||||
* Fixed lots of examples where the cursor keys / space bar were not locked from moving the browser page (if you find any more, please tell us!)
|
||||
* Fixed issue 149 - Starling XML files now load properly again, also created an Example to show use of them (thanks haden)
|
||||
* Fixed an issue where if the Starling XML file didn't contain a frameX/Y value it would crash on import.
|
||||
* Fixed the Multiple Animations Example - it's now a lovely underwater scene :)
|
||||
* Fixed issue 141 - If a Sprite is dragged and you release the Pointer while not over the Sprite, it will think it's still over it (thanks Paratron)
|
||||
* 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:
|
||||
|
||||
* JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file and published the API docs to the docs folder.
|
||||
* Brand new Example system (no more php!) and over 150 examples to learn from too.
|
||||
* New TypeScript definitions file generated (in the build folder - thanks to TomTom1229 for manually enhancing this).
|
||||
* New Grunt based build system added (thanks to Florent Cailhol)
|
||||
* New: Phaser.Animation.generateFrameNames - really useful when creating animation data from texture atlases using file names, not indexes.
|
||||
* Added Sprite.play as a handy short-cut to play an animation already loaded onto a Sprite.
|
||||
* Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas.
|
||||
* Added Keyboard.addKey() which creates a new Phaser.Key object that can be polled for updates, pressed states, etc. See the 2 new examples showing use.
|
||||
* Added Button.freezeFrames boolean. Stops the frames being set on mouse events if true.
|
||||
* Extended the Loader 404 error to display the url of the file that didn't load as well as the key.
|
||||
* New: Direction constants have been added to Sprites and adjust based on body motion.
|
||||
* Brand new Sprite.update loop handler. Combined with the transform cache fix and further optimisations this is now much quicker to execute.
|
||||
* Added Keyboard.createCursorKeys() which creates an object with 4 Key objects inside it mapped to up, down, left and right. See the new example in the input folder.
|
||||
* Added Body.skipQuadTree boolean for more fine-grained control over when a body is added to the World QuadTree.
|
||||
* Re-implemented Angular Velocity and Angular Acceleration on the Sprite.body and created 2 new examples to show use.
|
||||
* Added Sprite.fixedToCamera boolean. A Sprite that is fixed to the camera doesn't move with the world, but has its x/y coordinates relative to the top-left of the camera.
|
||||
* Added Group.createMultiple - useful when you need to create a Group of identical sprites for pooling, such as bullets.
|
||||
* Added Group.total. Same as Group.length, but more in line with the rest of the Group naming.
|
||||
* Added Sprite.outOfBoundsKill boolean flag. Will automatically kill a sprite that leaves the game World bounds (off by default).
|
||||
* Lots of changes and fixes in ArcadePhysics, including:
|
||||
* Functions with "mouse" in the title have been updated to "pointer" to more accurately reflect what they do.
|
||||
* New velocity functions: moveToObject, moveToPointer, moveToXY
|
||||
* New acceleration functions: accelerateToObject, accelerateToPointer, accelerateToXY
|
||||
* New distance functions: distanceBetween, distanceToXY, distanceToPointer
|
||||
* New angle functions: angleBetween, angleToXY, angleToPointer
|
||||
* velocityFromAngle and velocityFromRotation added with examples created.
|
||||
* Added killOnComplete parameter to Animation.play. Really useful in situations where you want a Sprite to animate once then kill itself on complete, like an explosion effect.
|
||||
* Added Sprite.loadTexture(key, frame) which allows you to load a new texture set into an existing sprite rather than having to create a new sprite.
|
||||
* Added Sprite.destroy back in again and made it a lot more robust at cleaning up child objects.
|
||||
* Added 'return this' to all the core Loader functions so you can chain load calls if you so wish.
|
||||
* Added Text.destroy() and BitmapText.destroy(), also updated Group.remove to make it more bullet-proof when an element doesn't have any events.
|
||||
* Added Phaser.Utils.shuffle to shuffle an array.
|
||||
* Added Graphics.destroy, x, y and updated angle functions.
|
||||
* Added AnimationManager.refreshFrame - will reset the texture being used for a Sprite (useful after a crop rect clear)
|
||||
* Added Physics.overlap(sprite1, sprite2) for quick body vs. body overlap tests with no separation performed.
|
||||
* On a busy page it's possible for the game to boot with an incorrect stage offset x/y which can cause input events to be calculated wrong. A new property has been added to Stage to combat this issue: Stage.checkOffsetInterval. By default it will check the canvas offset every 2500ms and adjust it accordingly. You can set the value to 'false' to disable the check entirely, or set a higher or lower value. We recommend that you get the value quite low during your games preloader, but once the game has fully loaded hopefully the containing page will have settled down, so it's probably safe to disable the check entirely.
|
||||
* Added Rectangle.floorAll to floor all values in a Rectangle (x, y, width and height).
|
||||
|
||||
What's changed:
|
||||
|
||||
* Renamed Phaser.Text.text to Phaser.Text.content to avoid conflict and overwrite from Pixi local var.
|
||||
* Renamed Phaser.Text.style to Phaser.Text.font to avoid conflict and overwrite from Pixi local var.
|
||||
* Phaser.Button now sets useHandCursor to true by default.
|
||||
* Change: When you start a new State all active tweens are now purged.
|
||||
* When the game boots it will now by default disable user-select and touch action events on the game canvas.
|
||||
* Moved LinkedList.dump to Debug.dumpLinkedList(list)
|
||||
* Phaser.Animation.Frame is now Phaser.Frame
|
||||
* Phaser.Animation.FrameData is now Phaser.FrameData
|
||||
* Phaser.Animation.Parser is now Phaser.AnimationParser (also the file has renamed from Parser.js to AnimationParser.js)
|
||||
* Phaser.Loader.Parser is now Phaser.LoaderParser (also the file has renamed from Parser.js to LoaderParser.js)
|
||||
* Change: We've removed the scrollFactor property from all Game Objects. Sorry, but the new Camera system doesn't work with it and it caused all kinds of issues anyway. We will sort out a replacement for it at a later date.
|
||||
* Change: World now extends Phaser.Group. As a result we've updated GameObjectFactory and other classes that linked to it. If you have anywhere in your code that used to reference world.group you can just remove 'group' from that. So before, world.group.add() is now just world.add().
|
||||
* Change: The Camera has been completely revamped. Rather than adjusting the position of all display objects (bad) it now just shifts the position of the single world container (good!), this is much quicker and also stops the game objects positions from self-adjusting all the time, allowing for them to be properly nested with other containers.
|
||||
* Made Sprite.body optional and added in checks, so you can safely null the Sprite body object if using your own physics system and not impact rendering.
|
||||
* Moved the Camera update checks to World.postUpdate, so all the sprites get the correct adjusted camera position.
|
||||
* The default Game.antialias value is now 'true', so graphics will be smoothed automatically in canvas. Disable it via the Game constructor or Canvas utils.
|
||||
* Phaser.Group now automatically calls updateTransform on any child added to it (avoids temp. frame glitches when new objects are rendered on their first frame).
|
||||
|
||||
What has been updated:
|
||||
|
||||
* Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too.
|
||||
* Updated ArcadePhysics.separateX/Y to use new body system - much better results now.
|
||||
* Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render.
|
||||
* Added Animation.paused - can be set to true/false.
|
||||
* Added support for Body.maxVelocity (thanks cocoademon)
|
||||
* InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call.
|
||||
* Removed the callbackContext parameter from Group.callAll because it's no longer needed.
|
||||
* Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child.
|
||||
* Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg)
|
||||
* World.randomX/Y now returns values anywhere in the world.bounds range (if set, otherwise 0), including negative values.
|
||||
* Updated InputHandler to use Math.round rather than Math.floor when snapping an object during drag.
|
||||
* If you didn't provide the useNumericIndex parameter then AnimationManager.add will set the value by looking at the datatype of the first element in the frames array.
|
||||
* Group.create now sets the visible and alive properties of the Sprite to the same value as the 'exists' parameter.
|
||||
* World.randomX/Y now works with negative World.bounds values.
|
||||
* Tweens .to will now always return the parent (thanks powerfear)
|
||||
* You can now pass a PIXI.Texture to Sprite (you also need to pass a Phaser.Frame as the frame parameter) but this is useful for Sprites sharing joint canvases.
|
||||
* Group.alpha is now exposed publically and changes the Group container object (not the children directly, who can still have their own alpha values)
|
||||
* Device.webGL uses new inspection code to accurately catch more webGL capable devices.
|
||||
* Debug.renderSpriteBody updated to use a the new Sprite.Body.screenX/Y properties.
|
||||
* Additional checks added to AnimationManager.frame/frameName on the given values.
|
||||
* You can now null a Sprite.crop and it will clear down the crop rect area correctly.
|
||||
* Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas.
|
||||
* Animation.generateFrameNames can now work in reverse, so the start/stop values can create frames that increment or decrement respectively.
|
||||
* Loader updated to use xhr.responseText when loading json, csv or text files. xhr.response is still used for Web Audio binary files (thanks bubba)
|
||||
* Input.onDown and onUp events now dispatch the original event that triggered them (i.e. a MouseEvent or TouchEvent) as the 2nd parameter, after the Pointer (thanks rezoner)
|
||||
* Updated Sprite.crop significantly. Values are now cached, stopping constant Texture frame updates and you can do sprite.crop.width++ for example (thanks haden)
|
||||
* Change: Sprite.crop needs to be enabled with sprite.cropEnabled = true.
|
||||
* Sprite.loadTexture now works correctly with static images, RenderTextures and Animations.
|
||||
* Lots of fixes within Sprite.bounds. The bounds is now correct regardless of rotation, anchor or scale of the Sprite or any of its parent objects.
|
||||
|
||||
What has been fixed:
|
||||
|
||||
* QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using localTransform values.
|
||||
* Fixed the Bounce.In and Bounce.InOut tweens (thanks XekeDeath)
|
||||
* Fixed an issue in Animation.update where if the game was paused it would get an insane delta timer throwing a uuid error.
|
||||
* Added PixiPatch.js to patch in a few essential features until Pixi is updated.
|
||||
* Fixed issue in Animation.play where the given frameRate and loop values wouldn't overwrite those set on construction.
|
||||
* Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly.
|
||||
* Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue.
|
||||
* Fixed Particle Emitters when using Emitter width/height (thanks XekeDeath)
|
||||
* Made animation looping more robust when skipping frames (thanks XekeDeath)
|
||||
* Fix for incorrect new particle positioning (issue #73) (thanks cottonflop)
|
||||
* Fixed issue in Sound.play where if you gave a missing marker it would play the whole sound sprite instead.
|
||||
* Button.setFrames will set the current frame based on the button state immediately.
|
||||
* Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox.
|
||||
* Fixed issue causing Keyboard.justPressed to always fire (thanks stemkoski)
|
||||
* Fixed bug in LinkedList#remove that could cause first to point to a dead node (thanks onedayitwillmake)
|
||||
* Fixed Cache.addDefaultImage so the default image works in Canvas as well as WebGL. Updated to a new image (32x32 black square with green outline)
|
||||
* Fixed a bug in the Sprite transform cache check that caused the skew/scale cache to get constantly invalidated - now only updates as needed, significant performance increase!
|
||||
* Fixed typo in StageScaleMode so it's not pageAlignVeritcally any longer, but pageAlignVertically.
|
||||
* Fixed issue in Group.countLiving / countDead where the value was off by one (thanks mjablonski)
|
||||
* Fixed issue with a jittery Camera if you moved a Sprite via velocity instead of x/y placement.
|
||||
* Fixed the RandomDataGenerator.sow method so if you give in the same seed you'll now get the same results (thanks Hsaka)
|
||||
* Fixed Issue #101 (Mouse Button 0 is not recognised, thanks rezoner)
|
||||
* Fixed an issue where creating an animation with just one frame with an index of zero would cause a UUID error (thanks SYNYST3R1)
|
||||
* Fixed Rectangle.union (thanks andron77)
|
||||
* Fixed Sound.resume so it now correctly resumes playback from the point it was paused (fixes issue 51, thanks Yora).
|
||||
* Fixed issue 105 where a dragged object that was destroyed would cause an Input error (thanks onedayitwillmake)
|
||||
* Fixed Issue 111 - calling Kill on a Phaser.Graphics instance causes error on undefined events.
|
||||
* 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
|
||||
-----------------------------------
|
||||
|
||||
* 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.
|
||||
@@ -17,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.
|
||||
@@ -36,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.
|
||||
@@ -47,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.
|
||||
@@ -55,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.
|
||||
@@ -67,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.
|
||||
@@ -75,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.
|
||||
@@ -184,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).
|
||||
@@ -271,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.
|
||||
@@ -305,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
|
||||
@@ -317,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)
|
||||
@@ -335,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.
|
||||
@@ -343,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)
|
||||
@@ -354,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!
|
||||
@@ -364,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
|
||||
|
||||
+90
-31
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -402,13 +454,13 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Sprite} _parent - A reference to the parent Sprite that owns this Animation.
|
||||
* @private
|
||||
*/
|
||||
this._parent = parent;
|
||||
this._parent = parent;
|
||||
|
||||
/**
|
||||
* @property {Phaser.FrameData} _frameData - The FrameData the Animation uses.
|
||||
@@ -422,24 +474,25 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
this.name = name;
|
||||
|
||||
/**
|
||||
* @property {object} _frames
|
||||
* @property {array} _frames
|
||||
* @private
|
||||
*/
|
||||
this._frames = [];
|
||||
this._frames = [];
|
||||
this._frames = this._frames.concat(frames);
|
||||
|
||||
/**
|
||||
* @property {number} delay - The delay in ms between each frame of the Animation.
|
||||
*/
|
||||
this.delay = 1000 / delay;
|
||||
this.delay = 1000 / delay;
|
||||
|
||||
/**
|
||||
* @property {boolean} looped - The loop state of the Animation.
|
||||
*/
|
||||
this.looped = looped;
|
||||
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;
|
||||
|
||||
@@ -447,13 +500,13 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
* @property {boolean} isFinished - The finished state of the Animation. Set to true once playback completes, false during playback.
|
||||
* @default
|
||||
*/
|
||||
this.isFinished = false;
|
||||
this.isFinished = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} isPlaying - The playing state of the Animation. Set to false once playback completes, true during playback.
|
||||
* @default
|
||||
*/
|
||||
this.isPlaying = false;
|
||||
this.isPlaying = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} isPaused - The paused state of the Animation.
|
||||
@@ -473,7 +526,7 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._frameIndex = 0;
|
||||
this._frameIndex = 0;
|
||||
|
||||
/**
|
||||
* @property {number} _frameDiff
|
||||
@@ -492,8 +545,8 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
/**
|
||||
* @property {Phaser.Frame} currentFrame - The currently displayed frame of the Animation.
|
||||
*/
|
||||
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
|
||||
|
||||
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
|
||||
|
||||
};
|
||||
|
||||
Phaser.Animation.prototype = {
|
||||
@@ -538,7 +591,7 @@ Phaser.Animation.prototype = {
|
||||
this._frameIndex = 0;
|
||||
|
||||
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
|
||||
if (this._parent.events)
|
||||
{
|
||||
@@ -605,7 +658,7 @@ Phaser.Animation.prototype = {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.isPlaying == true && this.game.time.now >= this._timeNextFrame)
|
||||
if (this.isPlaying === true && this.game.time.now >= this._timeNextFrame)
|
||||
{
|
||||
this._frameSkip = 1;
|
||||
|
||||
@@ -649,7 +702,11 @@ Phaser.Animation.prototype = {
|
||||
else
|
||||
{
|
||||
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
|
||||
if (this.currentFrame)
|
||||
{
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -702,11 +759,13 @@ 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.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Animation.prototype, "paused", {
|
||||
Object.defineProperty(Phaser.Animation.prototype, 'paused', {
|
||||
|
||||
get: function () {
|
||||
|
||||
@@ -741,7 +800,7 @@ Object.defineProperty(Phaser.Animation.prototype, "paused", {
|
||||
* @property {number} frameTotal - The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(Phaser.Animation.prototype, "frameTotal", {
|
||||
Object.defineProperty(Phaser.Animation.prototype, 'frameTotal', {
|
||||
|
||||
get: function () {
|
||||
return this._frames.length;
|
||||
@@ -753,7 +812,7 @@ Object.defineProperty(Phaser.Animation.prototype, "frameTotal", {
|
||||
* @name Phaser.Animation#frame
|
||||
* @property {number} frame - Gets or sets the current frame index and updates the Texture Cache for display.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Animation.prototype, "frame", {
|
||||
Object.defineProperty(Phaser.Animation.prototype, 'frame', {
|
||||
|
||||
get: function () {
|
||||
|
||||
@@ -775,7 +834,7 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", {
|
||||
if (this.currentFrame !== null)
|
||||
{
|
||||
this._frameIndex = value;
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -858,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+291
-216
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -396,49 +448,49 @@ Phaser.AnimationManager = function (sprite) {
|
||||
/**
|
||||
* @property {Phaser.Sprite} sprite - A reference to the parent Sprite that owns this AnimationManager.
|
||||
*/
|
||||
this.sprite = sprite;
|
||||
this.sprite = sprite;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = sprite.game;
|
||||
this.game = sprite.game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Frame} currentFrame - The currently displayed Frame of animation, if any.
|
||||
* @default
|
||||
*/
|
||||
this.currentFrame = null;
|
||||
|
||||
/**
|
||||
* @property {boolean} updateIfVisible - Should the animation data continue to update even if the Sprite.visible is set to false.
|
||||
* @default
|
||||
*/
|
||||
this.updateIfVisible = true;
|
||||
/**
|
||||
* @property {Phaser.Frame} currentFrame - The currently displayed Frame of animation, if any.
|
||||
* @default
|
||||
*/
|
||||
this.currentFrame = null;
|
||||
|
||||
/**
|
||||
* @property {boolean} updateIfVisible - Should the animation data continue to update even if the Sprite.visible is set to false.
|
||||
* @default
|
||||
*/
|
||||
this.updateIfVisible = true;
|
||||
|
||||
/**
|
||||
* @property {boolean} isLoaded - Set to true once animation data has been loaded.
|
||||
* @default
|
||||
*/
|
||||
this.isLoaded = false;
|
||||
/**
|
||||
* @property {boolean} isLoaded - Set to true once animation data has been loaded.
|
||||
* @default
|
||||
*/
|
||||
this.isLoaded = false;
|
||||
|
||||
/**
|
||||
* @property {Phaser.FrameData} _frameData - A temp. var for holding the currently playing Animations FrameData.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._frameData = null;
|
||||
/**
|
||||
* @property {Phaser.FrameData} _frameData - A temp. var for holding the currently playing Animations FrameData.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._frameData = null;
|
||||
|
||||
/**
|
||||
* @property {object} _anims - An internal object that stores all of the Animation instances.
|
||||
* @private
|
||||
*/
|
||||
this._anims = {};
|
||||
/**
|
||||
* @property {object} _anims - An internal object that stores all of the Animation instances.
|
||||
* @private
|
||||
*/
|
||||
this._anims = {};
|
||||
|
||||
/**
|
||||
* @property {object} _outputFrames - An internal object to help avoid gc.
|
||||
* @private
|
||||
*/
|
||||
this._outputFrames = [];
|
||||
/**
|
||||
* @property {object} _outputFrames - An internal object to help avoid gc.
|
||||
* @private
|
||||
*/
|
||||
this._outputFrames = [];
|
||||
|
||||
};
|
||||
|
||||
@@ -452,205 +504,226 @@ Phaser.AnimationManager.prototype = {
|
||||
* @private
|
||||
* @param {Phaser.FrameData} frameData - The FrameData set to load.
|
||||
*/
|
||||
loadFrameData: function (frameData) {
|
||||
loadFrameData: function (frameData) {
|
||||
|
||||
this._frameData = frameData;
|
||||
this.frame = 0;
|
||||
this.isLoaded = true;
|
||||
this._frameData = frameData;
|
||||
this.frame = 0;
|
||||
this.isLoaded = true;
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds a new animation under the given key. Optionally set the frames, frame rate and loop.
|
||||
* Animations added in this way are played back with the play function.
|
||||
*
|
||||
/**
|
||||
* Adds a new animation under the given key. Optionally set the frames, frame rate and loop.
|
||||
* Animations added in this way are played back with the play function.
|
||||
*
|
||||
* @method Phaser.AnimationManager#add
|
||||
* @param {string} name - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
|
||||
* @param {Array} [frames=null] - An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.
|
||||
* @param {number} [frameRate=60] - The speed at which the animation should play. The speed is given in frames per second.
|
||||
* @param {boolean} [loop=false] - Whether or not the animation is looped or just plays once.
|
||||
* @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings?
|
||||
* @return {Phaser.Animation} The Animation object that was created.
|
||||
*/
|
||||
add: function (name, frames, frameRate, loop, useNumericIndex) {
|
||||
* @param {string} name - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
|
||||
* @param {Array} [frames=null] - An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.
|
||||
* @param {number} [frameRate=60] - The speed at which the animation should play. The speed is given in frames per second.
|
||||
* @param {boolean} [loop=false] - Whether or not the animation is looped or just plays once.
|
||||
* @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings?
|
||||
* @return {Phaser.Animation} The Animation object that was created.
|
||||
*/
|
||||
add: function (name, frames, frameRate, loop, useNumericIndex) {
|
||||
|
||||
if (this._frameData == null)
|
||||
{
|
||||
console.warn('No FrameData available for Phaser.Animation ' + name);
|
||||
return;
|
||||
}
|
||||
if (this._frameData == null)
|
||||
{
|
||||
console.warn('No FrameData available for Phaser.Animation ' + name);
|
||||
return;
|
||||
}
|
||||
|
||||
frameRate = frameRate || 60;
|
||||
frameRate = frameRate || 60;
|
||||
|
||||
if (typeof loop === 'undefined') { loop = false; }
|
||||
if (typeof loop === 'undefined') { loop = false; }
|
||||
|
||||
// If they didn't set the useNumericIndex then let's at least try and guess it
|
||||
if (typeof useNumericIndex === 'undefined')
|
||||
{
|
||||
if (frames && typeof frames[0] === 'number')
|
||||
{
|
||||
useNumericIndex = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
useNumericIndex = false;
|
||||
}
|
||||
}
|
||||
// If they didn't set the useNumericIndex then let's at least try and guess it
|
||||
if (typeof useNumericIndex === 'undefined')
|
||||
{
|
||||
if (frames && typeof frames[0] === 'number')
|
||||
{
|
||||
useNumericIndex = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
useNumericIndex = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Create the signals the AnimationManager will emit
|
||||
if (this.sprite.events.onAnimationStart == null)
|
||||
{
|
||||
this.sprite.events.onAnimationStart = new Phaser.Signal();
|
||||
this.sprite.events.onAnimationComplete = new Phaser.Signal();
|
||||
this.sprite.events.onAnimationLoop = new Phaser.Signal();
|
||||
}
|
||||
// Create the signals the AnimationManager will emit
|
||||
if (this.sprite.events.onAnimationStart == null)
|
||||
{
|
||||
this.sprite.events.onAnimationStart = new Phaser.Signal();
|
||||
this.sprite.events.onAnimationComplete = new Phaser.Signal();
|
||||
this.sprite.events.onAnimationLoop = new Phaser.Signal();
|
||||
}
|
||||
|
||||
this._outputFrames.length = 0;
|
||||
this._outputFrames.length = 0;
|
||||
|
||||
this._frameData.getFrameIndexes(frames, useNumericIndex, this._outputFrames);
|
||||
this._frameData.getFrameIndexes(frames, useNumericIndex, this._outputFrames);
|
||||
|
||||
this._anims[name] = new Phaser.Animation(this.game, this.sprite, name, this._frameData, this._outputFrames, frameRate, loop);
|
||||
this.currentAnim = this._anims[name];
|
||||
this.currentFrame = this.currentAnim.currentFrame;
|
||||
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
this._anims[name] = new Phaser.Animation(this.game, this.sprite, name, this._frameData, this._outputFrames, frameRate, loop);
|
||||
this.currentAnim = this._anims[name];
|
||||
this.currentFrame = this.currentAnim.currentFrame;
|
||||
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
|
||||
return this._anims[name];
|
||||
return this._anims[name];
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Check whether the frames in the given array are valid and exist.
|
||||
*
|
||||
/**
|
||||
* Check whether the frames in the given array are valid and exist.
|
||||
*
|
||||
* @method Phaser.AnimationManager#validateFrames
|
||||
* @param {Array} frames - An array of frames to be validated.
|
||||
* @param {boolean} [useNumericIndex=true] - Validate the frames based on their numeric index (true) or string index (false)
|
||||
* @return {boolean} True if all given Frames are valid, otherwise false.
|
||||
*/
|
||||
validateFrames: function (frames, useNumericIndex) {
|
||||
* @param {Array} frames - An array of frames to be validated.
|
||||
* @param {boolean} [useNumericIndex=true] - Validate the frames based on their numeric index (true) or string index (false)
|
||||
* @return {boolean} True if all given Frames are valid, otherwise false.
|
||||
*/
|
||||
validateFrames: function (frames, useNumericIndex) {
|
||||
|
||||
if (typeof useNumericIndex == 'undefined') { useNumericIndex = true; }
|
||||
if (typeof useNumericIndex == 'undefined') { useNumericIndex = true; }
|
||||
|
||||
for (var i = 0; i < frames.length; i++)
|
||||
{
|
||||
if (useNumericIndex == true)
|
||||
{
|
||||
if (frames[i] > this._frameData.total)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this._frameData.checkFrameName(frames[i]) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < frames.length; i++)
|
||||
{
|
||||
if (useNumericIndex === true)
|
||||
{
|
||||
if (frames[i] > this._frameData.total)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this._frameData.checkFrameName(frames[i]) === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
|
||||
* If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.
|
||||
*
|
||||
* @method Phaser.AnimationManager#play
|
||||
* @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump".
|
||||
/**
|
||||
* Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
|
||||
* If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.
|
||||
*
|
||||
* @method Phaser.AnimationManager#play
|
||||
* @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump".
|
||||
* @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
|
||||
* @param {boolean} [loop=false] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
|
||||
* @param {boolean} [killOnComplete=false] - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.
|
||||
* @return {Phaser.Animation} A reference to playing Animation instance.
|
||||
*/
|
||||
play: function (name, frameRate, loop, killOnComplete) {
|
||||
*/
|
||||
play: function (name, frameRate, loop, killOnComplete) {
|
||||
|
||||
if (this._anims[name])
|
||||
{
|
||||
if (this.currentAnim == this._anims[name])
|
||||
{
|
||||
if (this.currentAnim.isPlaying == false)
|
||||
{
|
||||
this.currentAnim.paused = false;
|
||||
return this.currentAnim.play(frameRate, loop, killOnComplete);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.currentAnim = this._anims[name];
|
||||
this.currentAnim.paused = false;
|
||||
return this.currentAnim.play(frameRate, loop, killOnComplete);
|
||||
}
|
||||
}
|
||||
if (this._anims[name])
|
||||
{
|
||||
if (this.currentAnim == this._anims[name])
|
||||
{
|
||||
if (this.currentAnim.isPlaying === false)
|
||||
{
|
||||
this.currentAnim.paused = false;
|
||||
return this.currentAnim.play(frameRate, loop, killOnComplete);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.currentAnim = this._anims[name];
|
||||
this.currentAnim.paused = false;
|
||||
return this.currentAnim.play(frameRate, loop, killOnComplete);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped.
|
||||
* The currentAnim property of the AnimationManager is automatically set to the animation given.
|
||||
*
|
||||
* @method Phaser.AnimationManager#stop
|
||||
* @param {string} [name=null] - The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.
|
||||
* @param {boolean} [resetFrame=false] - When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)
|
||||
*/
|
||||
stop: function (name, resetFrame) {
|
||||
/**
|
||||
* Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped.
|
||||
* The currentAnim property of the AnimationManager is automatically set to the animation given.
|
||||
*
|
||||
* @method Phaser.AnimationManager#stop
|
||||
* @param {string} [name=null] - The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.
|
||||
* @param {boolean} [resetFrame=false] - When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)
|
||||
*/
|
||||
stop: function (name, resetFrame) {
|
||||
|
||||
if (typeof resetFrame == 'undefined') { resetFrame = false; }
|
||||
if (typeof resetFrame == 'undefined') { resetFrame = false; }
|
||||
|
||||
if (typeof name == 'string')
|
||||
{
|
||||
if (this._anims[name])
|
||||
{
|
||||
this.currentAnim = this._anims[name];
|
||||
this.currentAnim.stop(resetFrame);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.currentAnim)
|
||||
{
|
||||
this.currentAnim.stop(resetFrame);
|
||||
}
|
||||
}
|
||||
if (typeof name == 'string')
|
||||
{
|
||||
if (this._anims[name])
|
||||
{
|
||||
this.currentAnim = this._anims[name];
|
||||
this.currentAnim.stop(resetFrame);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.currentAnim)
|
||||
{
|
||||
this.currentAnim.stop(resetFrame);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events.
|
||||
*
|
||||
* @method Phaser.AnimationManager#update
|
||||
* @protected
|
||||
/**
|
||||
* The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events.
|
||||
*
|
||||
* @method Phaser.AnimationManager#update
|
||||
* @protected
|
||||
* @return {boolean} True if a new animation frame has been set, otherwise false.
|
||||
*/
|
||||
update: function () {
|
||||
*/
|
||||
update: function () {
|
||||
|
||||
if (this.updateIfVisible && this.sprite.visible == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this.updateIfVisible && this.sprite.visible === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.currentAnim && this.currentAnim.update() == true)
|
||||
{
|
||||
this.currentFrame = this.currentAnim.currentFrame;
|
||||
this.sprite.currentFrame = this.currentFrame;
|
||||
return true;
|
||||
}
|
||||
if (this.currentAnim && this.currentAnim.update() === true)
|
||||
{
|
||||
this.currentFrame = this.currentAnim.currentFrame;
|
||||
this.sprite.currentFrame = this.currentFrame;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return false;
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an animation that was previously added by name.
|
||||
*
|
||||
* @method Phaser.AnimationManager#getAnimation
|
||||
* @param {string} name - The name of the animation to be returned, e.g. "fire".
|
||||
* @return {Phaser.Animation} The Animation instance, if found, otherwise null.
|
||||
*/
|
||||
getAnimation: function (name) {
|
||||
|
||||
if (typeof name == 'string')
|
||||
{
|
||||
if (this._anims[name])
|
||||
{
|
||||
return this._anims[name];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the current frame data back to the parent Sprite and also resets the texture data.
|
||||
*
|
||||
* @method Phaser.AnimationManager#refreshFrame
|
||||
*/
|
||||
refreshFrame: function () {
|
||||
refreshFrame: function () {
|
||||
|
||||
this.sprite.currentFrame = this.currentFrame;
|
||||
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation.
|
||||
@@ -669,12 +742,14 @@ Phaser.AnimationManager.prototype = {
|
||||
|
||||
};
|
||||
|
||||
Phaser.AnimationManager.prototype.constructor = Phaser.AnimationManager;
|
||||
|
||||
/**
|
||||
* @name Phaser.AnimationManager#frameData
|
||||
* @property {Phaser.FrameData} frameData - The current animations FrameData.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", {
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, 'frameData', {
|
||||
|
||||
get: function () {
|
||||
return this._frameData;
|
||||
@@ -687,7 +762,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", {
|
||||
* @property {number} frameTotal - The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", {
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, 'frameTotal', {
|
||||
|
||||
get: function () {
|
||||
|
||||
@@ -707,7 +782,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", {
|
||||
* @name Phaser.AnimationManager#paused
|
||||
* @property {boolean} paused - Gets and sets the paused state of the current animation.
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "paused", {
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, 'paused', {
|
||||
|
||||
get: function () {
|
||||
|
||||
@@ -727,15 +802,15 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "paused", {
|
||||
* @name Phaser.AnimationManager#frame
|
||||
* @property {number} frame - Gets or sets the current frame index and updates the Texture Cache for display.
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frame", {
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, 'frame', {
|
||||
|
||||
get: function () {
|
||||
|
||||
if (this.currentFrame)
|
||||
{
|
||||
return this._frameIndex;
|
||||
}
|
||||
|
||||
if (this.currentFrame)
|
||||
{
|
||||
return this._frameIndex;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
@@ -745,7 +820,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", {
|
||||
this.currentFrame = this._frameData.getFrame(value);
|
||||
this._frameIndex = value;
|
||||
this.sprite.currentFrame = this.currentFrame;
|
||||
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -756,14 +831,14 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", {
|
||||
* @name Phaser.AnimationManager#frameName
|
||||
* @property {string} frameName - Gets or sets the current frame name and updates the Texture Cache for display.
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", {
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, 'frameName', {
|
||||
|
||||
get: function () {
|
||||
|
||||
if (this.currentFrame)
|
||||
{
|
||||
return this.currentFrame.name;
|
||||
}
|
||||
if (this.currentFrame)
|
||||
{
|
||||
return this.currentFrame.name;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -774,11 +849,11 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", {
|
||||
this.currentFrame = this._frameData.getFrameByName(value);
|
||||
this._frameIndex = this.currentFrame.index;
|
||||
this.sprite.currentFrame = this.currentFrame;
|
||||
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.warn("Cannot set frameName: " + value);
|
||||
console.warn('Cannot set frameName: ' + value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -798,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+104
-49
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -399,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);
|
||||
@@ -434,7 +488,7 @@ Phaser.AnimationParser = {
|
||||
}
|
||||
|
||||
// Zero or smaller than frame sizes?
|
||||
if (width == 0 || height == 0 || width < frameWidth || height < frameHeight || total === 0)
|
||||
if (width === 0 || height === 0 || width < frameWidth || height < frameHeight || total === 0)
|
||||
{
|
||||
console.warn("Phaser.AnimationParser.spriteSheet: width/height zero or width/height < given frameWidth/frameHeight");
|
||||
return null;
|
||||
@@ -442,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 < total; i++)
|
||||
{
|
||||
@@ -458,12 +512,12 @@ Phaser.AnimationParser = {
|
||||
height: frameHeight
|
||||
});
|
||||
|
||||
x += frameWidth;
|
||||
x += frameWidth + spacing;
|
||||
|
||||
if (x === width)
|
||||
{
|
||||
x = 0;
|
||||
y += frameHeight;
|
||||
x = margin;
|
||||
y += frameHeight + spacing;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,13 +557,13 @@ Phaser.AnimationParser = {
|
||||
|
||||
newFrame = data.addFrame(new Phaser.Frame(
|
||||
i,
|
||||
frames[i].frame.x,
|
||||
frames[i].frame.y,
|
||||
frames[i].frame.w,
|
||||
frames[i].frame.h,
|
||||
frames[i].filename,
|
||||
frames[i].frame.x,
|
||||
frames[i].frame.y,
|
||||
frames[i].frame.w,
|
||||
frames[i].frame.h,
|
||||
frames[i].filename,
|
||||
uuid
|
||||
));
|
||||
));
|
||||
|
||||
PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
|
||||
x: frames[i].frame.x,
|
||||
@@ -521,12 +575,12 @@ Phaser.AnimationParser = {
|
||||
if (frames[i].trimmed)
|
||||
{
|
||||
newFrame.setTrim(
|
||||
frames[i].trimmed,
|
||||
frames[i].sourceSize.w,
|
||||
frames[i].sourceSize.h,
|
||||
frames[i].spriteSourceSize.x,
|
||||
frames[i].spriteSourceSize.y,
|
||||
frames[i].spriteSourceSize.w,
|
||||
frames[i].trimmed,
|
||||
frames[i].sourceSize.w,
|
||||
frames[i].sourceSize.h,
|
||||
frames[i].spriteSourceSize.x,
|
||||
frames[i].spriteSourceSize.y,
|
||||
frames[i].spriteSourceSize.w,
|
||||
frames[i].spriteSourceSize.h
|
||||
);
|
||||
|
||||
@@ -575,10 +629,10 @@ Phaser.AnimationParser = {
|
||||
|
||||
newFrame = data.addFrame(new Phaser.Frame(
|
||||
i,
|
||||
frames[key].frame.x,
|
||||
frames[key].frame.y,
|
||||
frames[key].frame.w,
|
||||
frames[key].frame.h,
|
||||
frames[key].frame.x,
|
||||
frames[key].frame.y,
|
||||
frames[key].frame.w,
|
||||
frames[key].frame.h,
|
||||
key,
|
||||
uuid
|
||||
));
|
||||
@@ -593,12 +647,12 @@ Phaser.AnimationParser = {
|
||||
if (frames[key].trimmed)
|
||||
{
|
||||
newFrame.setTrim(
|
||||
frames[key].trimmed,
|
||||
frames[key].sourceSize.w,
|
||||
frames[key].sourceSize.h,
|
||||
frames[key].spriteSourceSize.x,
|
||||
frames[key].spriteSourceSize.y,
|
||||
frames[key].spriteSourceSize.w,
|
||||
frames[key].trimmed,
|
||||
frames[key].sourceSize.w,
|
||||
frames[key].sourceSize.h,
|
||||
frames[key].spriteSourceSize.x,
|
||||
frames[key].spriteSourceSize.y,
|
||||
frames[key].spriteSourceSize.w,
|
||||
frames[key].spriteSourceSize.h
|
||||
);
|
||||
|
||||
@@ -640,6 +694,7 @@ Phaser.AnimationParser = {
|
||||
var newFrame;
|
||||
|
||||
var uuid;
|
||||
var name;
|
||||
var frame;
|
||||
var x;
|
||||
var y;
|
||||
@@ -657,20 +712,20 @@ Phaser.AnimationParser = {
|
||||
frame = frames[i].attributes;
|
||||
|
||||
name = frame.name.nodeValue;
|
||||
x = parseInt(frame.x.nodeValue);
|
||||
y = parseInt(frame.y.nodeValue);
|
||||
width = parseInt(frame.width.nodeValue);
|
||||
height = parseInt(frame.height.nodeValue);
|
||||
x = parseInt(frame.x.nodeValue, 10);
|
||||
y = parseInt(frame.y.nodeValue, 10);
|
||||
width = parseInt(frame.width.nodeValue, 10);
|
||||
height = parseInt(frame.height.nodeValue, 10);
|
||||
|
||||
frameX = null;
|
||||
frameY = null;
|
||||
|
||||
if (frame.frameX)
|
||||
{
|
||||
frameX = Math.abs(parseInt(frame.frameX.nodeValue));
|
||||
frameY = Math.abs(parseInt(frame.frameY.nodeValue));
|
||||
frameWidth = parseInt(frame.frameWidth.nodeValue);
|
||||
frameHeight = parseInt(frame.frameHeight.nodeValue);
|
||||
frameX = Math.abs(parseInt(frame.frameX.nodeValue, 10));
|
||||
frameY = Math.abs(parseInt(frame.frameY.nodeValue, 10));
|
||||
frameWidth = parseInt(frame.frameWidth.nodeValue, 10);
|
||||
frameHeight = parseInt(frame.frameHeight.nodeValue, 10);
|
||||
}
|
||||
|
||||
newFrame = data.addFrame(new Phaser.Frame(i, x, y, width, height, name, uuid));
|
||||
@@ -716,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+755
-680
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+146
-90
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,16 +431,21 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a new `BitmapText` object. BitmapText work by taking a texture file and an XML file that describes the font layout.
|
||||
* On Windows you can use the free app BMFont: http://www.angelcode.com/products/bmfont/
|
||||
* On OS X we recommend Glyph Designer: http://www.71squared.com/en/glyphdesigner
|
||||
* Creates a new BitmapText object.
|
||||
*
|
||||
* @class Phaser.BitmapText
|
||||
*
|
||||
* @classdesc BitmapText objects work by taking a texture file and an XML file that describes the font layout.
|
||||
*
|
||||
* On Windows you can use the free app BMFont: http://www.angelcode.com/products/bmfont/
|
||||
*
|
||||
* On OS X we recommend Glyph Designer: http://www.71squared.com/en/glyphdesigner
|
||||
*
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {number} x - X position of the new bitmapText object.
|
||||
@@ -400,100 +457,103 @@ Phaser.BitmapText = function (game, x, y, text, style) {
|
||||
|
||||
x = x || 0;
|
||||
y = y || 0;
|
||||
|
||||
text = text || '';
|
||||
style = style || '';
|
||||
|
||||
/**
|
||||
* @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
||||
/**
|
||||
* @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.
|
||||
* @default
|
||||
*/
|
||||
this.alive = true;
|
||||
|
||||
/**
|
||||
* @property {Description} group - Description.
|
||||
* @default
|
||||
*/
|
||||
this.group = null;
|
||||
|
||||
/**
|
||||
* @property {string} name - Description.
|
||||
* @default
|
||||
*/
|
||||
this.name = '';
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
PIXI.BitmapText.call(this, text, style);
|
||||
/**
|
||||
* @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
||||
/**
|
||||
* @property {Description} type - Description.
|
||||
* @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.
|
||||
* @default
|
||||
*/
|
||||
this.alive = true;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Group} group - The parent Group of this BitmapText.
|
||||
*/
|
||||
this.group = null;
|
||||
|
||||
/**
|
||||
* @property {string} name - The user defined name given to this BitmapText.
|
||||
* @default
|
||||
*/
|
||||
this.name = '';
|
||||
|
||||
/**
|
||||
* @property {number} type - The const type of this object.
|
||||
* @readonly
|
||||
*/
|
||||
this.type = Phaser.BITMAPTEXT;
|
||||
|
||||
/**
|
||||
* @property {number} position.x - Description.
|
||||
*/
|
||||
PIXI.BitmapText.call(this, text, style);
|
||||
|
||||
/**
|
||||
* @property {number} position.x - The x position of this object.
|
||||
*/
|
||||
this.position.x = x;
|
||||
|
||||
/**
|
||||
* @property {number} position.y - Description.
|
||||
*/
|
||||
/**
|
||||
* @property {number} position.y - The y position of this object.
|
||||
*/
|
||||
this.position.y = y;
|
||||
|
||||
// Replaces the PIXI.Point with a slightly more flexible one
|
||||
/**
|
||||
* @property {Phaser.Point} anchor - Description.
|
||||
*/
|
||||
/**
|
||||
* The anchor sets the origin point of the texture.
|
||||
* The default is 0,0 this means the textures origin is the top left
|
||||
* Setting than anchor to 0.5,0.5 means the textures origin is centered
|
||||
* Setting the anchor to 1,1 would mean the textures origin points will be the bottom right
|
||||
*
|
||||
* @property {Phaser.Point} anchor - The anchor around which rotation and scaling takes place.
|
||||
*/
|
||||
this.anchor = new Phaser.Point();
|
||||
|
||||
/**
|
||||
* @property {Phaser.Point} scale - Description.
|
||||
*/
|
||||
/**
|
||||
* @property {Phaser.Point} scale - The scale of the object when rendered. By default it's set to 1 (no scale). You can modify it via scale.x or scale.y or scale.setTo(x, y). A value of 1 means no change to the scale, 0.5 means "half the size", 2 means "twice the size", etc.
|
||||
*/
|
||||
this.scale = new Phaser.Point(1, 1);
|
||||
|
||||
// A mini cache for storing all of the calculated values
|
||||
/**
|
||||
* @property {function} _cache - Description.
|
||||
* @private
|
||||
*/
|
||||
this._cache = {
|
||||
/**
|
||||
* @property {object} _cache - A mini cache for storing all of the calculated values.
|
||||
* @private
|
||||
*/
|
||||
this._cache = {
|
||||
|
||||
dirty: false,
|
||||
|
||||
// Transform cache
|
||||
a00: 1, a01: 0, a02: x, a10: 0, a11: 1, a12: y, id: 1,
|
||||
a00: 1,
|
||||
a01: 0,
|
||||
a02: x,
|
||||
a10: 0,
|
||||
a11: 1,
|
||||
a12: y,
|
||||
id: 1,
|
||||
|
||||
// The previous calculated position
|
||||
x: -1, y: -1,
|
||||
x: -1,
|
||||
y: -1,
|
||||
|
||||
// The actual scale values based on the worldTransform
|
||||
scaleX: 1, scaleY: 1
|
||||
scaleX: 1,
|
||||
scaleY: 1
|
||||
|
||||
};
|
||||
|
||||
this._cache.x = this.x;
|
||||
this._cache.y = this.y;
|
||||
|
||||
/**
|
||||
* @property {boolean} renderable - Description.
|
||||
* @private
|
||||
*/
|
||||
this.renderable = true;
|
||||
|
||||
};
|
||||
|
||||
Phaser.BitmapText.prototype = Object.create(PIXI.BitmapText.prototype);
|
||||
// Phaser.BitmapText.prototype = Phaser.Utils.extend(true, PIXI.BitmapText.prototype);
|
||||
Phaser.BitmapText.prototype.constructor = Phaser.BitmapText;
|
||||
|
||||
/**
|
||||
@@ -519,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() {
|
||||
|
||||
@@ -534,7 +594,7 @@ Phaser.BitmapText.prototype.destroy = function() {
|
||||
this.group.remove(this);
|
||||
}
|
||||
|
||||
if (this.canvas.parentNode)
|
||||
if (this.canvas && this.canvas.parentNode)
|
||||
{
|
||||
this.canvas.parentNode.removeChild(this.canvas);
|
||||
}
|
||||
@@ -551,11 +611,11 @@ Phaser.BitmapText.prototype.destroy = function() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get
|
||||
* @returns {Description}
|
||||
*//**
|
||||
* Set
|
||||
* @param {Description} value - Description
|
||||
* Indicates the rotation of the BitmapText, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
|
||||
* Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
|
||||
* If you wish to work in radians instead of degrees use the property Sprite.rotation instead.
|
||||
* @name Phaser.BitmapText#angle
|
||||
* @property {number} angle - Gets or sets the angle of rotation in degrees.
|
||||
*/
|
||||
Object.defineProperty(Phaser.BitmapText.prototype, 'angle', {
|
||||
|
||||
@@ -570,11 +630,9 @@ Object.defineProperty(Phaser.BitmapText.prototype, 'angle', {
|
||||
});
|
||||
|
||||
/**
|
||||
* Get
|
||||
* @returns {Description}
|
||||
*//**
|
||||
* Set
|
||||
* @param {Description} value - Description
|
||||
* The x coordinate of this object in world space.
|
||||
* @name Phaser.BitmapText#x
|
||||
* @property {number} x - The x coordinate of this object in world space.
|
||||
*/
|
||||
Object.defineProperty(Phaser.BitmapText.prototype, 'x', {
|
||||
|
||||
@@ -589,11 +647,9 @@ Object.defineProperty(Phaser.BitmapText.prototype, 'x', {
|
||||
});
|
||||
|
||||
/**
|
||||
* Get
|
||||
* @returns {Description}
|
||||
*//**
|
||||
* Set
|
||||
* @param {Description} value - Description
|
||||
* The y coordinate of this object in world space.
|
||||
* @name Phaser.BitmapText#y
|
||||
* @property {number} y - The y coordinate of this object in world space.
|
||||
*/
|
||||
Object.defineProperty(Phaser.BitmapText.prototype, 'y', {
|
||||
|
||||
@@ -621,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+1379
-432
File diff suppressed because it is too large
Load Diff
-1068
File diff suppressed because it is too large
Load Diff
+330
-163
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,32 +431,36 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically. The four states a Button responds to are:
|
||||
* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'.
|
||||
* 'Out' - when the Pointer that was previously over the Button moves out of it.
|
||||
* 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse.
|
||||
* 'Up' - when the Pointer that was pressed down on the Button is released again.
|
||||
* @class Phaser.Button
|
||||
*
|
||||
* @classdesc Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically. The four states a Button responds to are:
|
||||
*
|
||||
* * 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'.
|
||||
* * 'Out' - when the Pointer that was previously over the Button moves out of it.
|
||||
* * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse.
|
||||
* * 'Up' - when the Pointer that was pressed down on the Button is released again.
|
||||
*
|
||||
* You can set a unique texture frame and Sound for any of these states.
|
||||
*
|
||||
* @class Phaser.Button
|
||||
* @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;
|
||||
@@ -412,67 +468,67 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame,
|
||||
callback = callback || null;
|
||||
callbackContext = callbackContext || this;
|
||||
|
||||
Phaser.Sprite.call(this, game, x, y, key, outFrame);
|
||||
Phaser.Sprite.call(this, game, x, y, key, outFrame);
|
||||
|
||||
/**
|
||||
* @property {number} type - The Phaser Object Type.
|
||||
*/
|
||||
/**
|
||||
* @property {number} type - The Phaser Object Type.
|
||||
*/
|
||||
this.type = Phaser.BUTTON;
|
||||
|
||||
/**
|
||||
* @property {string} _onOverFrameName - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {string} _onOverFrameName - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onOverFrameName = null;
|
||||
|
||||
/**
|
||||
* @property {string} _onOutFrameName - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {string} _onOutFrameName - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onOutFrameName = null;
|
||||
|
||||
/**
|
||||
* @property {string} _onDownFrameName - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {string} _onDownFrameName - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onDownFrameName = null;
|
||||
|
||||
/**
|
||||
* @property {string} _onUpFrameName - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {string} _onUpFrameName - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onUpFrameName = null;
|
||||
|
||||
/**
|
||||
* @property {number} _onOverFrameID - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {number} _onOverFrameID - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onOverFrameID = null;
|
||||
|
||||
/**
|
||||
* @property {number} _onOutFrameID - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {number} _onOutFrameID - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onOutFrameID = null;
|
||||
|
||||
/**
|
||||
* @property {number} _onDownFrameID - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {number} _onDownFrameID - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onDownFrameID = null;
|
||||
|
||||
/**
|
||||
* @property {number} _onUpFrameID - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {number} _onUpFrameID - Internal variable.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onUpFrameID = null;
|
||||
|
||||
/**
|
||||
@@ -523,32 +579,39 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame,
|
||||
*/
|
||||
this.onUpSoundMarker = '';
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onInputOver - The Signal (or event) dispatched when this Button is in an Over state.
|
||||
*/
|
||||
this.onInputOver = new Phaser.Signal;
|
||||
/**
|
||||
* @property {Phaser.Signal} onInputOver - The Signal (or event) dispatched when this Button is in an Over state.
|
||||
*/
|
||||
this.onInputOver = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onInputOut - The Signal (or event) dispatched when this Button is in an Out state.
|
||||
*/
|
||||
this.onInputOut = new Phaser.Signal;
|
||||
/**
|
||||
* @property {Phaser.Signal} onInputOut - The Signal (or event) dispatched when this Button is in an Out state.
|
||||
*/
|
||||
this.onInputOut = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onInputDown - The Signal (or event) dispatched when this Button is in an Down state.
|
||||
*/
|
||||
this.onInputDown = new Phaser.Signal;
|
||||
/**
|
||||
* @property {Phaser.Signal} onInputDown - The Signal (or event) dispatched when this Button is in an Down state.
|
||||
*/
|
||||
this.onInputDown = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onInputUp - The Signal (or event) dispatched when this Button is in an Up state.
|
||||
*/
|
||||
this.onInputUp = new Phaser.Signal;
|
||||
/**
|
||||
* @property {Phaser.Signal} onInputUp - The Signal (or event) dispatched when this Button is in an Up state.
|
||||
*/
|
||||
this.onInputUp = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @property {boolean} freezeFrames - When true the Button will cease to change texture frame on all events (over, out, up, down).
|
||||
*/
|
||||
this.freezeFrames = false;
|
||||
|
||||
this.setFrames(overFrame, outFrame, downFrame);
|
||||
/**
|
||||
* 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 = false;
|
||||
|
||||
this.setFrames(overFrame, outFrame, downFrame, upFrame);
|
||||
|
||||
if (callback !== null)
|
||||
{
|
||||
@@ -570,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)
|
||||
{
|
||||
@@ -607,9 +693,8 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
|
||||
if (typeof outFrame === 'string')
|
||||
{
|
||||
this._onOutFrameName = outFrame;
|
||||
this._onUpFrameName = outFrame;
|
||||
|
||||
if (this.input.pointerOver() == false)
|
||||
if (this.input.pointerOver() === false)
|
||||
{
|
||||
this.frameName = outFrame;
|
||||
}
|
||||
@@ -617,9 +702,8 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
|
||||
else
|
||||
{
|
||||
this._onOutFrameID = outFrame;
|
||||
this._onUpFrameID = outFrame;
|
||||
|
||||
if (this.input.pointerOver() == false)
|
||||
if (this.input.pointerOver() === false)
|
||||
{
|
||||
this.frame = outFrame;
|
||||
}
|
||||
@@ -632,7 +716,7 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
|
||||
{
|
||||
this._onDownFrameName = downFrame;
|
||||
|
||||
if (this.input.pointerOver())
|
||||
if (this.input.pointerDown())
|
||||
{
|
||||
this.frameName = downFrame;
|
||||
}
|
||||
@@ -641,13 +725,35 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
|
||||
{
|
||||
this._onDownFrameID = downFrame;
|
||||
|
||||
if (this.input.pointerOver())
|
||||
if (this.input.pointerDown())
|
||||
{
|
||||
this.frame = 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -669,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);
|
||||
|
||||
}
|
||||
|
||||
@@ -723,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.
|
||||
@@ -770,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.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)
|
||||
@@ -806,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.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)
|
||||
@@ -838,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.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)
|
||||
@@ -870,13 +958,101 @@ 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) {
|
||||
Phaser.Button.prototype.onInputUpHandler = function (sprite, pointer, isOver) {
|
||||
|
||||
if (this.freezeFrames == false)
|
||||
if (this.onUpSound)
|
||||
{
|
||||
this.onUpSound.play(this.onUpSoundMarker);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
else if (this._onOutFrameID != null)
|
||||
{
|
||||
this.frame = this._onOutFrameID;
|
||||
}
|
||||
}
|
||||
else if (newState === 3)
|
||||
{
|
||||
// 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;
|
||||
@@ -887,15 +1063,6 @@ Phaser.Button.prototype.onInputUpHandler = function (pointer) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.onUpSound)
|
||||
{
|
||||
this.onUpSound.play(this.onUpSoundMarker);
|
||||
}
|
||||
|
||||
if (this.onInputUp)
|
||||
{
|
||||
this.onInputUp.dispatch(this, pointer);
|
||||
}
|
||||
};
|
||||
</pre>
|
||||
</article>
|
||||
@@ -912,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+322
-218
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,74 +431,80 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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.
|
||||
*/
|
||||
Phaser.Cache = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = game;
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {object} game - Canvas key-value container.
|
||||
* @private
|
||||
*/
|
||||
/**
|
||||
* @property {object} game - Canvas key-value container.
|
||||
* @private
|
||||
*/
|
||||
this._canvases = {};
|
||||
|
||||
/**
|
||||
* @property {object} _images - Image key-value container.
|
||||
* @private
|
||||
*/
|
||||
* @property {object} _images - Image key-value container.
|
||||
* @private
|
||||
*/
|
||||
this._images = {};
|
||||
|
||||
/**
|
||||
* @property {object} _textures - RenderTexture key-value container.
|
||||
* @private
|
||||
*/
|
||||
* @property {object} _textures - RenderTexture key-value container.
|
||||
* @private
|
||||
*/
|
||||
this._textures = {};
|
||||
|
||||
/**
|
||||
* @property {object} _sounds - Sound key-value container.
|
||||
* @private
|
||||
*/
|
||||
* @property {object} _sounds - Sound key-value container.
|
||||
* @private
|
||||
*/
|
||||
this._sounds = {};
|
||||
|
||||
/**
|
||||
* @property {object} _text - Text key-value container.
|
||||
* @private
|
||||
*/
|
||||
* @property {object} _text - Text key-value container.
|
||||
* @private
|
||||
*/
|
||||
this._text = {};
|
||||
|
||||
/**
|
||||
* @property {object} _tilemaps - Tilemap key-value container.
|
||||
* @private
|
||||
*/
|
||||
* @property {object} _tilemaps - Tilemap key-value container.
|
||||
* @private
|
||||
*/
|
||||
this._tilemaps = {};
|
||||
|
||||
/**
|
||||
* @property {object} _tilesets - Tileset key-value container.
|
||||
* @property {object} _binary - Binary file key-value container.
|
||||
* @private
|
||||
*/
|
||||
this._tilesets = {};
|
||||
|
||||
this.addDefaultImage();
|
||||
this._binary = {};
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onSoundUnlock - Description.
|
||||
*/
|
||||
this.onSoundUnlock = new Phaser.Signal;
|
||||
* @property {object} _bitmapDatas - BitmapData key-value container.
|
||||
* @private
|
||||
*/
|
||||
this._bitmapDatas = {};
|
||||
|
||||
this.addDefaultImage();
|
||||
this.addMissingImage();
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onSoundUnlock - This event is dispatched when the sound system is unlocked via a touch event on cellular devices.
|
||||
*/
|
||||
this.onSoundUnlock = new Phaser.Signal();
|
||||
|
||||
};
|
||||
|
||||
@@ -465,12 +523,39 @@ 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
|
||||
* @param {string} key - Asset key for this BitmapData.
|
||||
* @param {Phaser.BitmapData} bitmapData - The BitmapData object to be addded to the cache.
|
||||
* @return {Phaser.BitmapData} The BitmapData object to be addded to the cache.
|
||||
*/
|
||||
addBitmapData: function (key, bitmapData) {
|
||||
|
||||
this._bitmapDatas[key] = bitmapData;
|
||||
|
||||
return bitmapData;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Add a new Phaser.RenderTexture in to the cache.
|
||||
*
|
||||
* @method Phaser.Cache#addRenderTexture
|
||||
* @param {string} key - The unique key by which you will reference this object.
|
||||
* @param {Phaser.Texture} textue - The texture to use as the base of the RenderTexture.
|
||||
* @param {Phaser.Texture} texture - The texture to use as the base of the RenderTexture.
|
||||
*/
|
||||
addRenderTexture: function (key, texture) {
|
||||
|
||||
@@ -489,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);
|
||||
|
||||
},
|
||||
|
||||
@@ -532,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);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -597,14 +658,14 @@ Phaser.Cache.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds a default image to be used when a key is wrong / missing. Is mapped to the key __default.
|
||||
* Adds a default image to be used in special cases such as WebGL Filters. Is mapped to the key __default.
|
||||
*
|
||||
* @method Phaser.Cache#addDefaultImage
|
||||
*/
|
||||
addDefaultImage: function () {
|
||||
|
||||
var img = new Image();
|
||||
img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==";
|
||||
img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg==";
|
||||
|
||||
this._images['__default'] = { url: null, data: img, spriteSheet: false };
|
||||
this._images['__default'].frame = new Phaser.Frame(0, 0, 0, 32, 32, '', '');
|
||||
@@ -614,6 +675,24 @@ Phaser.Cache.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds an image to be used when a key is wrong / missing. Is mapped to the key __missing.
|
||||
*
|
||||
* @method Phaser.Cache#addMissingImage
|
||||
*/
|
||||
addMissingImage: function () {
|
||||
|
||||
var img = new Image();
|
||||
img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==";
|
||||
|
||||
this._images['__missing'] = { url: null, data: img, spriteSheet: false };
|
||||
this._images['__missing'].frame = new Phaser.Frame(0, 0, 0, 32, 32, '', '');
|
||||
|
||||
PIXI.BaseTextureCache['__missing'] = new PIXI.BaseTexture(img);
|
||||
PIXI.TextureCache['__missing'] = new PIXI.Texture(PIXI.BaseTextureCache['__missing']);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Add a new text data.
|
||||
*
|
||||
@@ -621,7 +700,7 @@ Phaser.Cache.prototype = {
|
||||
* @param {string} key - Asset key for the text data.
|
||||
* @param {string} url - URL of this text data file.
|
||||
* @param {object} data - Extra text data.
|
||||
*/
|
||||
*/
|
||||
addText: function (key, url, data) {
|
||||
|
||||
this._text[key] = {
|
||||
@@ -665,7 +744,6 @@ Phaser.Cache.prototype = {
|
||||
webAudio = webAudio || true;
|
||||
audioTag = audioTag || false;
|
||||
|
||||
var locked = this.game.sound.touchLocked;
|
||||
var decoded = false;
|
||||
|
||||
if (audioTag)
|
||||
@@ -673,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.
|
||||
*/
|
||||
@@ -699,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.
|
||||
*/
|
||||
@@ -714,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.
|
||||
*/
|
||||
@@ -727,13 +808,13 @@ Phaser.Cache.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Add a new decoded sound.
|
||||
/**
|
||||
* Add a new decoded sound.
|
||||
*
|
||||
* @method Phaser.Cache#decodedSound
|
||||
* @param {string} key - Asset key for the sound.
|
||||
* @param {object} data - Extra sound data.
|
||||
*/
|
||||
* @param {string} key - Asset key for the sound.
|
||||
* @param {object} data - Extra sound data.
|
||||
*/
|
||||
decodedSound: function (key, data) {
|
||||
|
||||
this._sounds[key].data = data;
|
||||
@@ -742,30 +823,53 @@ Phaser.Cache.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get acanvas object from the cache by its key.
|
||||
/**
|
||||
* 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) {
|
||||
|
||||
if (this._canvases[key])
|
||||
{
|
||||
return this._canvases[key].canvas;
|
||||
}
|
||||
else
|
||||
{
|
||||
console.warn('Phaser.Cache.getCanvas: Invalid key: "' + key + '"');
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get a BitmapData object from the cache by its key.
|
||||
*
|
||||
* @method Phaser.Cache#getBitmapData
|
||||
* @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) {
|
||||
|
||||
if (this._bitmapDatas[key])
|
||||
{
|
||||
return this._bitmapDatas[key];
|
||||
}
|
||||
else
|
||||
{
|
||||
console.warn('Phaser.Cache.getBitmapData: Invalid key: "' + key + '"');
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
|
||||
if (this._images[key])
|
||||
@@ -777,65 +881,32 @@ Phaser.Cache.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get image data by key.
|
||||
/**
|
||||
* 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) {
|
||||
|
||||
if (this._images[key])
|
||||
{
|
||||
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) {
|
||||
|
||||
@@ -843,17 +914,20 @@ Phaser.Cache.prototype = {
|
||||
{
|
||||
return this._tilemaps[key];
|
||||
}
|
||||
else
|
||||
{
|
||||
console.warn('Phaser.Cache.getTilemapData: Invalid key: "' + key + '"');
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Get frame data by key.
|
||||
/**
|
||||
* 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) {
|
||||
|
||||
if (this._images[key] && this._images[key].frameData)
|
||||
@@ -868,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) {
|
||||
|
||||
@@ -885,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) {
|
||||
|
||||
@@ -902,12 +976,12 @@ 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) {
|
||||
|
||||
if (this._images[key] && this._images[key].spriteSheet == false)
|
||||
if (this._images[key] && this._images[key].spriteSheet === false)
|
||||
{
|
||||
return this._images[key].frame;
|
||||
}
|
||||
@@ -916,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) {
|
||||
|
||||
@@ -936,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) {
|
||||
|
||||
@@ -945,54 +1019,60 @@ Phaser.Cache.prototype = {
|
||||
{
|
||||
return this._textures[key];
|
||||
}
|
||||
|
||||
return null;
|
||||
else
|
||||
{
|
||||
console.warn('Phaser.Cache.getTexture: Invalid key: "' + key + '"');
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get sound by key.
|
||||
/**
|
||||
* 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) {
|
||||
|
||||
if (this._sounds[key])
|
||||
{
|
||||
return this._sounds[key];
|
||||
}
|
||||
|
||||
return null;
|
||||
else
|
||||
{
|
||||
console.warn('Phaser.Cache.getSound: Invalid key: "' + key + '"');
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get sound data by key.
|
||||
/**
|
||||
* 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) {
|
||||
|
||||
if (this._sounds[key])
|
||||
{
|
||||
return this._sounds[key].data;
|
||||
}
|
||||
|
||||
return null;
|
||||
else
|
||||
{
|
||||
console.warn('Phaser.Cache.getSoundData: Invalid key: "' + key + '"');
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if the given sound has finished decoding.
|
||||
/**
|
||||
* Check if the given sound has finished decoding.
|
||||
*
|
||||
* @method Phaser.Cache#isSoundDecoded
|
||||
* @param {string} key - Asset key of the sound you want.
|
||||
* @return {boolean} The decoded state of the Sound object.
|
||||
*/
|
||||
* @param {string} key - Asset key of the sound in the Cache.
|
||||
* @return {boolean} The decoded state of the Sound object.
|
||||
*/
|
||||
isSoundDecoded: function (key) {
|
||||
|
||||
if (this._sounds[key])
|
||||
@@ -1002,26 +1082,26 @@ 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.
|
||||
/**
|
||||
* 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.
|
||||
* @return {boolean} True if the sound is decoded and the device is not touch locked.
|
||||
*/
|
||||
* @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) {
|
||||
|
||||
return (this._sounds[key] && this._sounds[key].decoded && this.game.sound.touchLocked == false);
|
||||
return (this._sounds[key] && this._sounds[key].decoded && this.game.sound.touchLocked === false);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Check whether an image asset is sprite sheet or not.
|
||||
/**
|
||||
* Check whether an image asset is sprite sheet or not.
|
||||
*
|
||||
* @method Phaser.Cache#isSpriteSheet
|
||||
* @param {string} key - Asset key of the sprite sheet you want.
|
||||
* @return {boolean} True if the image is a sprite sheet.
|
||||
*/
|
||||
* @param {string} key - Asset key of the sprite sheet you want.
|
||||
* @return {boolean} True if the image is a sprite sheet.
|
||||
*/
|
||||
isSpriteSheet: function (key) {
|
||||
|
||||
if (this._images[key])
|
||||
@@ -1033,21 +1113,43 @@ Phaser.Cache.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get text data by key.
|
||||
/**
|
||||
* 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) {
|
||||
|
||||
if (this._text[key])
|
||||
{
|
||||
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 + '"');
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -1065,7 +1167,7 @@ Phaser.Cache.prototype = {
|
||||
|
||||
for (var item in array)
|
||||
{
|
||||
if (item !== '__default')
|
||||
if (item !== '__default' && item !== '__missing')
|
||||
{
|
||||
output.push(item);
|
||||
}
|
||||
@@ -1075,42 +1177,42 @@ Phaser.Cache.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an array containing all of the keys of Images in the Cache.
|
||||
/**
|
||||
* Returns an array containing all of the keys of Images in the Cache.
|
||||
*
|
||||
* @method Phaser.Cache#getImageKeys
|
||||
* @return {Array} The string based keys in the Cache.
|
||||
*/
|
||||
* @return {Array} The string based keys in the Cache.
|
||||
*/
|
||||
getImageKeys: function () {
|
||||
return this.getKeys(this._images);
|
||||
return this.getKeys(this._images);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an array containing all of the keys of Sounds in the Cache.
|
||||
/**
|
||||
* Returns an array containing all of the keys of Sounds in the Cache.
|
||||
*
|
||||
* @method Phaser.Cache#getSoundKeys
|
||||
* @return {Array} The string based keys in the Cache.
|
||||
*/
|
||||
* @return {Array} The string based keys in the Cache.
|
||||
*/
|
||||
getSoundKeys: function () {
|
||||
return this.getKeys(this._sounds);
|
||||
return this.getKeys(this._sounds);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an array containing all of the keys of Text Files in the Cache.
|
||||
/**
|
||||
* Returns an array containing all of the keys of Text Files in the Cache.
|
||||
*
|
||||
* @method Phaser.Cache#getTextKeys
|
||||
* @return {Array} The string based keys in the Cache.
|
||||
*/
|
||||
* @return {Array} The string based keys in the Cache.
|
||||
*/
|
||||
getTextKeys: function () {
|
||||
return this.getKeys(this._text);
|
||||
return this.getKeys(this._text);
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes a canvas from the cache.
|
||||
/**
|
||||
* Removes a canvas from the cache.
|
||||
*
|
||||
* @method Phaser.Cache#removeCanvas
|
||||
* @method Phaser.Cache#removeCanvas
|
||||
* @param {string} key - Key of the asset you want to remove.
|
||||
*/
|
||||
*/
|
||||
removeCanvas: function (key) {
|
||||
delete this._canvases[key];
|
||||
},
|
||||
@@ -1145,11 +1247,11 @@ Phaser.Cache.prototype = {
|
||||
delete this._text[key];
|
||||
},
|
||||
|
||||
/**
|
||||
* Clears the cache. Removes every local cache object reference.
|
||||
/**
|
||||
* Clears the cache. Removes every local cache object reference.
|
||||
*
|
||||
* @method Phaser.Cache#destroy
|
||||
*/
|
||||
* @method Phaser.Cache#destroy
|
||||
*/
|
||||
destroy: function () {
|
||||
|
||||
for (var item in this._canvases)
|
||||
@@ -1174,6 +1276,8 @@ Phaser.Cache.prototype = {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Cache.prototype.constructor = Phaser.Cache;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -1189,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+125
-56
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -398,35 +450,35 @@
|
||||
*/
|
||||
Phaser.Camera = function (game, id, x, y, width, height) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.World} world - A reference to the game world.
|
||||
*/
|
||||
this.world = game.world;
|
||||
/**
|
||||
* @property {Phaser.World} world - A reference to the game world.
|
||||
*/
|
||||
this.world = game.world;
|
||||
|
||||
/**
|
||||
* @property {number} id - Reserved for future multiple camera set-ups.
|
||||
* @default
|
||||
*/
|
||||
this.id = 0;
|
||||
/**
|
||||
* @property {number} id - Reserved for future multiple camera set-ups.
|
||||
* @default
|
||||
*/
|
||||
this.id = 0;
|
||||
|
||||
/**
|
||||
* Camera view.
|
||||
* The view into the world we wish to render (by default the game dimensions).
|
||||
/**
|
||||
* 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?).
|
||||
* @property {Phaser.Rectangle} view
|
||||
*/
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* @property {Phaser.Rectangle} screenView - Used by Sprites to work out Camera culling.
|
||||
*/
|
||||
this.screenView = new Phaser.Rectangle(x, y, width, height);
|
||||
* @property {Phaser.Rectangle} screenView - Used by Sprites to work out Camera culling.
|
||||
*/
|
||||
this.screenView = new Phaser.Rectangle(x, y, width, height);
|
||||
|
||||
/**
|
||||
* The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World.
|
||||
@@ -437,36 +489,39 @@ Phaser.Camera = function (game, id, x, y, width, height) {
|
||||
this.bounds = new Phaser.Rectangle(x, y, width, height);
|
||||
|
||||
/**
|
||||
* @property {Phaser.Rectangle} deadzone - Moving inside this Rectangle will not cause camera moving.
|
||||
*/
|
||||
* @property {Phaser.Rectangle} deadzone - Moving inside this Rectangle will not cause camera moving.
|
||||
*/
|
||||
this.deadzone = null;
|
||||
|
||||
/**
|
||||
* @property {boolean} visible - Whether this camera is visible or not.
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {boolean} visible - Whether this camera is visible or not.
|
||||
* @default
|
||||
*/
|
||||
this.visible = true;
|
||||
|
||||
/**
|
||||
* @property {boolean} atLimit - Whether this camera is flush with the World Bounds or not.
|
||||
/**
|
||||
* @property {boolean} atLimit - Whether this camera is flush with the World Bounds or not.
|
||||
*/
|
||||
this.atLimit = { x: false, y: false };
|
||||
|
||||
/**
|
||||
* @property {Phaser.Sprite} target - If the camera is tracking a Sprite, this is a reference to it, otherwise null.
|
||||
/**
|
||||
* @property {Phaser.Sprite} target - If the camera is tracking a Sprite, this is a reference to it, otherwise null.
|
||||
* @default
|
||||
*/
|
||||
this.target = null;
|
||||
|
||||
/**
|
||||
* @property {number} edge - Edge property.
|
||||
/**
|
||||
* @property {number} edge - Edge property.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._edge = 0;
|
||||
|
||||
/**
|
||||
* @property {PIXI.DisplayObject} displayObject - The display object to which all game objects are added. Set by World.boot
|
||||
*/
|
||||
this.displayObject = null;
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -495,7 +550,7 @@ Phaser.Camera.FOLLOW_TOPDOWN_TIGHT = 3;
|
||||
|
||||
Phaser.Camera.prototype = {
|
||||
|
||||
/**
|
||||
/**
|
||||
* Tells this camera which sprite to follow.
|
||||
* @method Phaser.Camera#follow
|
||||
* @param {Phaser.Sprite} target - The object you want the camera to track. Set to null to not follow anything.
|
||||
@@ -528,6 +583,9 @@ Phaser.Camera.prototype = {
|
||||
break;
|
||||
|
||||
case Phaser.Camera.FOLLOW_LOCKON:
|
||||
this.deadzone = null;
|
||||
break;
|
||||
|
||||
default:
|
||||
this.deadzone = null;
|
||||
break;
|
||||
@@ -546,7 +604,7 @@ Phaser.Camera.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Move the camera focus on a location instantly.
|
||||
* @method Phaser.Camera#focusOnXY
|
||||
* @param {number} x - X position.
|
||||
@@ -558,7 +616,7 @@ Phaser.Camera.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Update focusing and scrolling.
|
||||
* @method Phaser.Camera#update
|
||||
*/
|
||||
@@ -579,6 +637,11 @@ Phaser.Camera.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Internal method
|
||||
* @method Phaser.Camera#updateTarget
|
||||
* @private
|
||||
*/
|
||||
updateTarget: function () {
|
||||
|
||||
if (this.deadzone)
|
||||
@@ -618,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);
|
||||
|
||||
},
|
||||
|
||||
@@ -640,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 < this.bounds.top)
|
||||
@@ -652,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();
|
||||
@@ -698,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
|
||||
@@ -727,7 +796,7 @@ Object.defineProperty(Phaser.Camera.prototype, "x", {
|
||||
* @property {number} y - Gets or sets the cameras y position.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Camera.prototype, "y", {
|
||||
|
||||
|
||||
get: function () {
|
||||
return this.view.y;
|
||||
},
|
||||
@@ -792,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+123
-41
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,12 +431,12 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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 <canvas> 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
|
||||
@@ -392,21 +444,29 @@
|
||||
Phaser.Canvas = {
|
||||
|
||||
/**
|
||||
* Creates the <canvas> 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 <canvas> 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;
|
||||
@@ -419,16 +479,30 @@ Phaser.Canvas = {
|
||||
* @param {HTMLElement} element - The targeted element that we want to retrieve the offset.
|
||||
* @param {Phaser.Point} [point] - The point we want to take the x/y values of the offset.
|
||||
* @return {Phaser.Point} - A point objet with the offsetX and Y as its properties.
|
||||
*/
|
||||
*/
|
||||
getOffset: function (element, point) {
|
||||
|
||||
point = point || new Phaser.Point;
|
||||
point = point || new Phaser.Point();
|
||||
|
||||
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;
|
||||
@@ -443,7 +517,7 @@ Phaser.Canvas = {
|
||||
* @method Phaser.Canvas.getAspectRatio
|
||||
* @param {HTMLCanvasElement} canvas - The canvas to get the aspect ratio from.
|
||||
* @return {number} The ratio between canvas' width and height.
|
||||
*/
|
||||
*/
|
||||
getAspectRatio: function (canvas) {
|
||||
return canvas.width / canvas.height;
|
||||
},
|
||||
@@ -516,37 +590,43 @@ Phaser.Canvas = {
|
||||
*
|
||||
* @method Phaser.Canvas.addToDOM
|
||||
* @param {HTMLCanvasElement} canvas - The canvas to set the touch action on.
|
||||
* @param {string} 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) {
|
||||
|
||||
parent = parent || '';
|
||||
var target;
|
||||
|
||||
if (typeof overflowHidden === 'undefined') { overflowHidden = true; }
|
||||
|
||||
if (parent !== '')
|
||||
if (parent)
|
||||
{
|
||||
if (document.getElementById(parent))
|
||||
if (typeof parent === 'string')
|
||||
{
|
||||
document.getElementById(parent).appendChild(canvas);
|
||||
// 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)
|
||||
{
|
||||
document.getElementById(parent).style.overflow = 'hidden';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
document.body.appendChild(canvas);
|
||||
}
|
||||
}
|
||||
else
|
||||
// Fallback, covers an invalid ID and a non HTMLelement object
|
||||
if (!target)
|
||||
{
|
||||
document.body.appendChild(canvas);
|
||||
target = document.body;
|
||||
}
|
||||
|
||||
if (overflowHidden && target.style)
|
||||
{
|
||||
target.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
target.appendChild(canvas);
|
||||
|
||||
return canvas;
|
||||
|
||||
},
|
||||
@@ -606,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;
|
||||
@@ -648,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+95
-36
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -388,11 +440,11 @@
|
||||
* @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) {
|
||||
|
||||
x = x || 0;
|
||||
@@ -401,26 +453,26 @@ Phaser.Circle = function (x, y, diameter) {
|
||||
|
||||
/**
|
||||
* @property {number} x - The x coordinate of the center of the circle.
|
||||
**/
|
||||
*/
|
||||
this.x = x;
|
||||
|
||||
/**
|
||||
* @property {number} y - The y coordinate of the center of the circle.
|
||||
**/
|
||||
*/
|
||||
this.y = y;
|
||||
|
||||
/**
|
||||
* @property {number} _diameter - The diameter of the circle.
|
||||
* @private
|
||||
**/
|
||||
*/
|
||||
this._diameter = diameter;
|
||||
|
||||
if (diameter > 0)
|
||||
{
|
||||
/**
|
||||
* @property {number} _radius - The radius of the circle.
|
||||
* @private
|
||||
**/
|
||||
/**
|
||||
* @property {number} _radius - The radius of the circle.
|
||||
* @private
|
||||
*/
|
||||
this._radius = diameter * 0.5;
|
||||
}
|
||||
else
|
||||
@@ -436,7 +488,7 @@ Phaser.Circle.prototype = {
|
||||
* The circumference of the circle.
|
||||
* @method Phaser.Circle#circumference
|
||||
* @return {number}
|
||||
**/
|
||||
*/
|
||||
circumference: function () {
|
||||
return 2 * (Math.PI * this._radius);
|
||||
},
|
||||
@@ -448,7 +500,7 @@ Phaser.Circle.prototype = {
|
||||
* @param {number} y - The y coordinate of the center of the circle.
|
||||
* @param {number} diameter - The diameter of the circle in pixels.
|
||||
* @return {Circle} This circle object.
|
||||
**/
|
||||
*/
|
||||
setTo: function (x, y, diameter) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
@@ -462,7 +514,7 @@ Phaser.Circle.prototype = {
|
||||
* @method Phaser.Circle#copyFrom
|
||||
* @param {any} source - The object to copy from.
|
||||
* @return {Circle} This Circle object.
|
||||
**/
|
||||
*/
|
||||
copyFrom: function (source) {
|
||||
return this.setTo(source.x, source.y, source.diameter);
|
||||
},
|
||||
@@ -472,11 +524,11 @@ Phaser.Circle.prototype = {
|
||||
* @method Phaser.Circle#copyTo
|
||||
* @param {any} dest - The object to copy to.
|
||||
* @return {Object} This dest object.
|
||||
**/
|
||||
*/
|
||||
copyTo: function(dest) {
|
||||
dest[x] = this.x;
|
||||
dest[y] = this.y;
|
||||
dest[diameter] = this._diameter;
|
||||
dest.x = this.x;
|
||||
dest.y = this.y;
|
||||
dest.diameter = this._diameter;
|
||||
return dest;
|
||||
},
|
||||
|
||||
@@ -513,7 +565,7 @@ Phaser.Circle.prototype = {
|
||||
|
||||
if (typeof out === "undefined") { out = new Phaser.Circle(); }
|
||||
|
||||
return out.setTo(a.x, a.y, a.diameter);
|
||||
return out.setTo(this.x, this.y, this.diameter);
|
||||
|
||||
},
|
||||
|
||||
@@ -546,7 +598,7 @@ Phaser.Circle.prototype = {
|
||||
* @param {number} dx - Moves the x value of the Circle object by this amount.
|
||||
* @param {number} dy - Moves the y value of the Circle object by this amount.
|
||||
* @return {Circle} This Circle object.
|
||||
**/
|
||||
*/
|
||||
offset: function (dx, dy) {
|
||||
this.x += dx;
|
||||
this.y += dy;
|
||||
@@ -558,7 +610,7 @@ Phaser.Circle.prototype = {
|
||||
* @method Phaser.Circle#offsetPoint
|
||||
* @param {Point} point A Point object to use to offset this Circle object (or any valid object with exposed x and y properties).
|
||||
* @return {Circle} This Circle object.
|
||||
**/
|
||||
*/
|
||||
offsetPoint: function (point) {
|
||||
return this.offset(point.x, point.y);
|
||||
},
|
||||
@@ -567,13 +619,15 @@ Phaser.Circle.prototype = {
|
||||
* Returns a string representation of this object.
|
||||
* @method Phaser.Circle#toString
|
||||
* @return {string} a string representation of the instance.
|
||||
**/
|
||||
*/
|
||||
toString: function () {
|
||||
return "[{Phaser.Circle (x=" + this.x + " y=" + this.y + " diameter=" + this.diameter + " radius=" + this.radius + ")}]";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
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
|
||||
@@ -730,11 +784,16 @@ Object.defineProperty(Phaser.Circle.prototype, "area", {
|
||||
Object.defineProperty(Phaser.Circle.prototype, "empty", {
|
||||
|
||||
get: function () {
|
||||
return (this._diameter == 0);
|
||||
return (this._diameter === 0);
|
||||
},
|
||||
|
||||
set: function (value) {
|
||||
this.setTo(0, 0, 0);
|
||||
|
||||
if (value === true)
|
||||
{
|
||||
this.setTo(0, 0, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
@@ -862,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+113
-42
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -394,6 +446,7 @@ Phaser.Color = {
|
||||
* Given an alpha and 3 color values this will return an integer representation of it.
|
||||
*
|
||||
* @method Phaser.Color.getColor32
|
||||
* @static
|
||||
* @param {number} alpha - The Alpha value (between 0 and 255).
|
||||
* @param {number} red - The Red channel value (between 0 and 255).
|
||||
* @param {number} green - The Green channel value (between 0 and 255).
|
||||
@@ -408,6 +461,7 @@ Phaser.Color = {
|
||||
* Given 3 color values this will return an integer representation of it.
|
||||
*
|
||||
* @method Phaser.Color.getColor
|
||||
* @static
|
||||
* @param {number} red - The Red channel value (between 0 and 255).
|
||||
* @param {number} green - The Green channel value (between 0 and 255).
|
||||
* @param {number} blue - The Blue channel value (between 0 and 255).
|
||||
@@ -418,17 +472,19 @@ Phaser.Color = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Converts the given hex string into an object containing the RGB values.
|
||||
* Converts the given hex string into an integer color value.
|
||||
*
|
||||
* @method Phaser.Color.hexToRGB
|
||||
* @static
|
||||
* @param {string} h - The string hex color to convert.
|
||||
* @returns {object} An object with 3 properties: r,g and b.
|
||||
* @returns {number} The rgb color value.
|
||||
*/
|
||||
hexToRGB: function (h) {
|
||||
|
||||
var hex16 = (h.charAt(0) == "#") ? h.substring(1, 7) : h;
|
||||
|
||||
if (hex16.length==3) {
|
||||
if (hex16.length==3)
|
||||
{
|
||||
hex16 = hex16.charAt(0) + hex16.charAt(0) + hex16.charAt(1) + hex16.charAt(1) + hex16.charAt(2) + hex16.charAt(2);
|
||||
}
|
||||
|
||||
@@ -445,6 +501,7 @@ Phaser.Color = {
|
||||
* RGB format information and HSL information. Each section starts on a newline, 3 lines in total.
|
||||
*
|
||||
* @method Phaser.Color.getColorInfo
|
||||
* @static
|
||||
* @param {number} color - A color value in the format 0xAARRGGBB.
|
||||
* @returns {string} String containing the 3 lines of information.
|
||||
*/
|
||||
@@ -453,13 +510,13 @@ Phaser.Color = {
|
||||
var argb = Phaser.Color.getRGB(color);
|
||||
var hsl = Phaser.Color.RGBtoHSV(color);
|
||||
|
||||
// Hex format
|
||||
// Hex format
|
||||
var result = Phaser.Color.RGBtoHexstring(color) + "\n";
|
||||
|
||||
// RGB format
|
||||
// RGB format
|
||||
result = result.concat("Alpha: " + argb.alpha + " Red: " + argb.red + " Green: " + argb.green + " Blue: " + argb.blue) + "\n";
|
||||
|
||||
// HSL info
|
||||
// HSL info
|
||||
result = result.concat("Hue: " + hsl.hue + " Saturation: " + hsl.saturation + " Lightnes: " + hsl.lightness);
|
||||
|
||||
return result;
|
||||
@@ -470,6 +527,7 @@ Phaser.Color = {
|
||||
* Return a string representation of the color in the format 0xAARRGGBB.
|
||||
*
|
||||
* @method Phaser.Color.RGBtoHexstring
|
||||
* @static
|
||||
* @param {number} color - The color to get the string representation for
|
||||
* @returns {string} A string of length 10 characters in the format 0xAARRGGBB
|
||||
*/
|
||||
@@ -485,6 +543,7 @@ Phaser.Color = {
|
||||
* Return a string representation of the color in the format #RRGGBB.
|
||||
*
|
||||
* @method Phaser.Color.RGBtoWebstring
|
||||
* @static
|
||||
* @param {number} color - The color to get the string representation for.
|
||||
* @returns {string} A string of length 10 characters in the format 0xAARRGGBB.
|
||||
*/
|
||||
@@ -500,6 +559,7 @@ Phaser.Color = {
|
||||
* Return a string containing a hex representation of the given color.
|
||||
*
|
||||
* @method Phaser.Color.colorToHexstring
|
||||
* @static
|
||||
* @param {number} color - The color channel to get the hex value for, must be a value between 0 and 255).
|
||||
* @returns {string} A string of length 2 characters, i.e. 255 = FF, 0 = 00.
|
||||
*/
|
||||
@@ -516,11 +576,12 @@ Phaser.Color = {
|
||||
/**
|
||||
* Interpolates the two given colours based on the supplied step and currentStep properties.
|
||||
* @method Phaser.Color.interpolateColor
|
||||
* @param {number} color1 - Description.
|
||||
* @param {number} color2 - Description.
|
||||
* @param {number} steps - Description.
|
||||
* @param {number} currentStep - Description.
|
||||
* @param {number} alpha - Description.
|
||||
* @static
|
||||
* @param {number} color1 - The first color value.
|
||||
* @param {number} color2 - The second color value.
|
||||
* @param {number} steps - The number of steps to run the interpolation over.
|
||||
* @param {number} currentStep - The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.
|
||||
* @param {number} alpha - The alpha of the returned color.
|
||||
* @returns {number} The interpolated color value.
|
||||
*/
|
||||
interpolateColor: function (color1, color2, steps, currentStep, alpha) {
|
||||
@@ -540,12 +601,13 @@ Phaser.Color = {
|
||||
/**
|
||||
* Interpolates the two given colours based on the supplied step and currentStep properties.
|
||||
* @method Phaser.Color.interpolateColorWithRGB
|
||||
* @param {number} color - Description.
|
||||
* @param {number} r - Description.
|
||||
* @param {number} g - Description.
|
||||
* @param {number} b - Description.
|
||||
* @param {number} steps - Description.
|
||||
* @param {number} currentStep - Description.
|
||||
* @static
|
||||
* @param {number} color - The first color value.
|
||||
* @param {number} r - The red color value, between 0 and 0xFF (255).
|
||||
* @param {number} g - The green color value, between 0 and 0xFF (255).
|
||||
* @param {number} b - The blue color value, between 0 and 0xFF (255).
|
||||
* @param {number} steps - The number of steps to run the interpolation over.
|
||||
* @param {number} currentStep - The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.
|
||||
* @returns {number} The interpolated color value.
|
||||
*/
|
||||
interpolateColorWithRGB: function (color, r, g, b, steps, currentStep) {
|
||||
@@ -562,14 +624,15 @@ Phaser.Color = {
|
||||
/**
|
||||
* Interpolates the two given colours based on the supplied step and currentStep properties.
|
||||
* @method Phaser.Color.interpolateRGB
|
||||
* @param {number} r1 - Description.
|
||||
* @param {number} g1 - Description.
|
||||
* @param {number} b1 - Description.
|
||||
* @param {number} r2 - Description.
|
||||
* @param {number} g2 - Description.
|
||||
* @param {number} b2 - Description.
|
||||
* @param {number} steps - Description.
|
||||
* @param {number} currentStep - Description.
|
||||
* @static
|
||||
* @param {number} r1 - The red color value, between 0 and 0xFF (255).
|
||||
* @param {number} g1 - The green color value, between 0 and 0xFF (255).
|
||||
* @param {number} b1 - The blue color value, between 0 and 0xFF (255).
|
||||
* @param {number} r2 - The red color value, between 0 and 0xFF (255).
|
||||
* @param {number} g2 - The green color value, between 0 and 0xFF (255).
|
||||
* @param {number} b2 - The blue color value, between 0 and 0xFF (255).
|
||||
* @param {number} steps - The number of steps to run the interpolation over.
|
||||
* @param {number} currentStep - The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.
|
||||
* @returns {number} The interpolated color value.
|
||||
*/
|
||||
interpolateRGB: function (r1, g1, b1, r2, g2, b2, steps, currentStep) {
|
||||
@@ -584,10 +647,11 @@ Phaser.Color = {
|
||||
|
||||
/**
|
||||
* Returns a random color value between black and white
|
||||
* <p>Set the min value to start each channel from the given offset.</p>
|
||||
* <p>Set the max value to restrict the maximum color used per channel</p>
|
||||
* Set the min value to start each channel from the given offset.
|
||||
* Set the max value to restrict the maximum color used per channel.
|
||||
*
|
||||
* @method Phaser.Color.getRandomColor
|
||||
* @static
|
||||
* @param {number} min - The lowest value to use for the color.
|
||||
* @param {number} max - The highest value to use for the color.
|
||||
* @param {number} alpha - The alpha value of the returning color (default 255 = fully opaque).
|
||||
@@ -599,7 +663,7 @@ Phaser.Color = {
|
||||
if (typeof max === "undefined") { max = 255; }
|
||||
if (typeof alpha === "undefined") { alpha = 255; }
|
||||
|
||||
// Sanity checks
|
||||
// Sanity checks
|
||||
if (max > 255) {
|
||||
return Phaser.Color.getColor(255, 255, 255);
|
||||
}
|
||||
@@ -619,9 +683,10 @@ Phaser.Color = {
|
||||
/**
|
||||
* Return the component parts of a color as an Object with the properties alpha, red, green, blue
|
||||
*
|
||||
* <p>Alpha will only be set if it exist in the given color (0xAARRGGBB)</p>
|
||||
* Alpha will only be set if it exist in the given color (0xAARRGGBB)
|
||||
*
|
||||
* @method Phaser.Color.getRGB
|
||||
* @static
|
||||
* @param {number} color - Color in RGB (0xRRGGBB) or ARGB format (0xAARRGGBB).
|
||||
* @returns {object} An Object with properties: alpha, red, green, blue.
|
||||
*/
|
||||
@@ -639,6 +704,7 @@ Phaser.Color = {
|
||||
/**
|
||||
* Returns a CSS friendly string value from the given color.
|
||||
* @method Phaser.Color.getWebRGB
|
||||
* @static
|
||||
* @param {number} color
|
||||
* @returns {string}A string in the format: 'rgba(r,g,b,a)'
|
||||
*/
|
||||
@@ -657,6 +723,7 @@ Phaser.Color = {
|
||||
* Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255.
|
||||
*
|
||||
* @method Phaser.Color.getAlpha
|
||||
* @static
|
||||
* @param {number} color - In the format 0xAARRGGBB.
|
||||
* @returns {number} The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)).
|
||||
*/
|
||||
@@ -668,6 +735,7 @@ Phaser.Color = {
|
||||
* Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1.
|
||||
*
|
||||
* @method Phaser.Color.getAlphaFloat
|
||||
* @static
|
||||
* @param {number} color - In the format 0xAARRGGBB.
|
||||
* @returns {number} The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)).
|
||||
*/
|
||||
@@ -679,6 +747,7 @@ Phaser.Color = {
|
||||
* Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255.
|
||||
*
|
||||
* @method Phaser.Color.getRed
|
||||
* @static
|
||||
* @param {number} color In the format 0xAARRGGBB.
|
||||
* @returns {number} The Red component of the color, will be between 0 and 255 (0 being no color, 255 full Red).
|
||||
*/
|
||||
@@ -690,6 +759,7 @@ Phaser.Color = {
|
||||
* Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255.
|
||||
*
|
||||
* @method Phaser.Color.getGreen
|
||||
* @static
|
||||
* @param {number} color - In the format 0xAARRGGBB.
|
||||
* @returns {number} The Green component of the color, will be between 0 and 255 (0 being no color, 255 full Green).
|
||||
*/
|
||||
@@ -701,13 +771,14 @@ Phaser.Color = {
|
||||
* Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255.
|
||||
*
|
||||
* @method Phaser.Color.getBlue
|
||||
* @static
|
||||
* @param {number} color - In the format 0xAARRGGBB.
|
||||
* @returns {number} The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue).
|
||||
*/
|
||||
getBlue: function (color) {
|
||||
return color & 0xFF;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
</pre>
|
||||
</article>
|
||||
@@ -724,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
@@ -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 <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>
|
||||
+335
-243
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -394,47 +446,52 @@
|
||||
Phaser.Utils.Debug = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Context} context - The canvas context on which to render the debug information.
|
||||
*/
|
||||
/**
|
||||
* @property {Context} context - The canvas context on which to render the debug information.
|
||||
*/
|
||||
this.context = game.context;
|
||||
|
||||
/**
|
||||
* @property {string} font - The font that the debug information is rendered in.
|
||||
* @default '14px Courier'
|
||||
*/
|
||||
/**
|
||||
* @property {string} font - The font that the debug information is rendered in.
|
||||
* @default '14px Courier'
|
||||
*/
|
||||
this.font = '14px Courier';
|
||||
|
||||
/**
|
||||
* @property {number} lineHeight - The line height between the debug text.
|
||||
*/
|
||||
/**
|
||||
* @property {number} columnWidth - The spacing between columns.
|
||||
*/
|
||||
this.columnWidth = 100;
|
||||
|
||||
/**
|
||||
* @property {number} lineHeight - The line height between the debug text.
|
||||
*/
|
||||
this.lineHeight = 16;
|
||||
|
||||
/**
|
||||
* @property {boolean} renderShadow - Should the text be rendered with a slight shadow? Makes it easier to read on different types of background.
|
||||
*/
|
||||
/**
|
||||
* @property {boolean} renderShadow - Should the text be rendered with a slight shadow? Makes it easier to read on different types of background.
|
||||
*/
|
||||
this.renderShadow = true;
|
||||
|
||||
/**
|
||||
* @property {Context} currentX - The current X position the debug information will be rendered at.
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {Context} currentX - The current X position the debug information will be rendered at.
|
||||
* @default
|
||||
*/
|
||||
this.currentX = 0;
|
||||
|
||||
/**
|
||||
* @property {number} currentY - The current Y position the debug information will be rendered at.
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {number} currentY - The current Y position the debug information will be rendered at.
|
||||
* @default
|
||||
*/
|
||||
this.currentY = 0;
|
||||
|
||||
/**
|
||||
* @property {number} currentAlpha - The current alpha the debug information will be rendered at.
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {number} currentAlpha - The current alpha the debug information will be rendered at.
|
||||
* @default
|
||||
*/
|
||||
this.currentAlpha = 1;
|
||||
|
||||
};
|
||||
@@ -444,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)
|
||||
{
|
||||
@@ -457,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;
|
||||
@@ -479,7 +539,6 @@ Phaser.Utils.Debug.prototype = {
|
||||
*/
|
||||
stop: function () {
|
||||
|
||||
|
||||
this.context.restore();
|
||||
this.context.globalAlpha = this.currentAlpha;
|
||||
|
||||
@@ -489,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) {
|
||||
|
||||
@@ -499,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)
|
||||
{
|
||||
@@ -522,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 < 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
|
||||
@@ -563,13 +646,13 @@ Phaser.Utils.Debug.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Renders the corners and point information of the given Sprite.
|
||||
* @method Phaser.Utils.Debug#renderSpriteCorners
|
||||
* @param {Phaser.Sprite} sprite - The sprite to be rendered.
|
||||
* @param {boolean} [showText=false] - If true the x/y coordinates of each point will be rendered.
|
||||
* @param {boolean} [showBounds=false] - If true the bounds will be rendered over the top of the sprite.
|
||||
* @param {string} [color='rgb(255,0,255)'] - The color the text is rendered in.
|
||||
*/
|
||||
* Renders the corners and point information of the given Sprite.
|
||||
* @method Phaser.Utils.Debug#renderSpriteCorners
|
||||
* @param {Phaser.Sprite} sprite - The sprite to be rendered.
|
||||
* @param {boolean} [showText=false] - If true the x/y coordinates of each point will be rendered.
|
||||
* @param {boolean} [showBounds=false] - If true the bounds will be rendered over the top of the sprite.
|
||||
* @param {string} [color='rgb(255,0,255)'] - The color the text is rendered in.
|
||||
*/
|
||||
renderSpriteCorners: function (sprite, showText, showBounds, color) {
|
||||
|
||||
if (this.context == null)
|
||||
@@ -686,7 +769,7 @@ Phaser.Utils.Debug.prototype = {
|
||||
|
||||
/**
|
||||
* Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.
|
||||
* @method Phaser.Utils.Debug#renderDebug
|
||||
* @method Phaser.Utils.Debug#renderPointer
|
||||
* @param {Phaser.Pointer} pointer - Description.
|
||||
* @param {boolean} [hideIfUp=false] - Doesn't render the circle if the pointer is up.
|
||||
* @param {string} [downColor='rgba(0,255,0,0.5)'] - The color the circle is rendered in if down.
|
||||
@@ -705,7 +788,7 @@ Phaser.Utils.Debug.prototype = {
|
||||
upColor = upColor || 'rgba(255,0,0,0.5)';
|
||||
color = color || 'rgb(255,255,255)';
|
||||
|
||||
if (hideIfUp == true && pointer.isUp == true)
|
||||
if (hideIfUp === true && pointer.isUp === true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -751,7 +834,7 @@ Phaser.Utils.Debug.prototype = {
|
||||
* @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).
|
||||
*/
|
||||
*/
|
||||
renderSpriteInputInfo: function (sprite, x, y, color) {
|
||||
|
||||
color = color || 'rgb(255,255,255)';
|
||||
@@ -767,25 +850,27 @@ Phaser.Utils.Debug.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Render Sprite collision.
|
||||
* @method Phaser.Utils.Debug#renderSpriteCollision
|
||||
* @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.
|
||||
* 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();
|
||||
|
||||
},
|
||||
@@ -848,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();
|
||||
@@ -866,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)
|
||||
@@ -934,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)
|
||||
{
|
||||
@@ -965,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();
|
||||
|
||||
},
|
||||
@@ -999,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();
|
||||
|
||||
@@ -1158,7 +1226,7 @@ Phaser.Utils.Debug.prototype = {
|
||||
* @param {number} y - Y position of the debug info to be rendered.
|
||||
* @param {string} [color] - Color of the debug info to be rendered (format is css color string).
|
||||
* @param {string} font - The font of text to draw.
|
||||
*/
|
||||
*/
|
||||
renderText: function (text, x, y, color, font) {
|
||||
|
||||
if (this.context == null)
|
||||
@@ -1178,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 < 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 < 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 < 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>
|
||||
@@ -1273,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+232
-44
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -413,6 +465,18 @@ Phaser.Device = function () {
|
||||
*/
|
||||
this.iOS = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} cocoonJS - Is the game running under CocoonJS?
|
||||
* @default
|
||||
*/
|
||||
this.cocoonJS = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} ejecta - Is the game running under Ejecta?
|
||||
* @default
|
||||
*/
|
||||
this.ejecta = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} android - Is running on android?
|
||||
* @default
|
||||
@@ -505,69 +569,110 @@ Phaser.Device = function () {
|
||||
*/
|
||||
this.pointerLock = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} typedArray - Does the browser support TypedArrays?
|
||||
* @default
|
||||
*/
|
||||
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
|
||||
|
||||
/**
|
||||
* @property {boolean} arora - Is running in arora?
|
||||
* @property {boolean} arora - Set to true if running in Arora.
|
||||
* @default
|
||||
*/
|
||||
this.arora = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} chrome - Is running in chrome?
|
||||
* @property {boolean} chrome - Set to true if running in Chrome.
|
||||
* @default
|
||||
*/
|
||||
this.chrome = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} epiphany - Is running in epiphany?
|
||||
* @property {boolean} epiphany - Set to true if running in Epiphany.
|
||||
* @default
|
||||
*/
|
||||
this.epiphany = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} firefox - Is running in firefox?
|
||||
* @property {boolean} firefox - Set to true if running in Firefox.
|
||||
* @default
|
||||
*/
|
||||
this.firefox = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} ie - Is running in ie?
|
||||
* @property {boolean} ie - Set to true if running in Internet Explorer.
|
||||
* @default
|
||||
*/
|
||||
this.ie = false;
|
||||
|
||||
/**
|
||||
* @property {number} ieVersion - Version of ie?
|
||||
* @property {number} ieVersion - If running in Internet Explorer this will contain the major version number.
|
||||
* @default
|
||||
*/
|
||||
this.ieVersion = 0;
|
||||
|
||||
/**
|
||||
* @property {boolean} mobileSafari - Is running in mobileSafari?
|
||||
* @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
|
||||
*/
|
||||
this.mobileSafari = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} midori - Is running in midori?
|
||||
* @property {boolean} midori - Set to true if running in Midori.
|
||||
* @default
|
||||
*/
|
||||
this.midori = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} opera - Is running in opera?
|
||||
* @property {boolean} opera - Set to true if running in Opera.
|
||||
* @default
|
||||
*/
|
||||
this.opera = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} safari - Is running in safari?
|
||||
* @property {boolean} safari - Set to true if running in Safari.
|
||||
* @default
|
||||
*/
|
||||
this.safari = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView
|
||||
* @default
|
||||
*/
|
||||
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
|
||||
|
||||
/**
|
||||
@@ -605,6 +710,7 @@ Phaser.Device = function () {
|
||||
* @default
|
||||
*/
|
||||
this.wav = false;
|
||||
|
||||
/**
|
||||
* Can this device play m4a files?
|
||||
* @property {boolean} m4a - True if this device can play m4a files.
|
||||
@@ -644,6 +750,12 @@ Phaser.Device = function () {
|
||||
*/
|
||||
this.pixelRatio = 0;
|
||||
|
||||
/**
|
||||
* @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)
|
||||
* @default
|
||||
*/
|
||||
this.littleEndian = false;
|
||||
|
||||
// Run the checks
|
||||
this._checkAudio();
|
||||
this._checkBrowser();
|
||||
@@ -665,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;
|
||||
}
|
||||
|
||||
@@ -715,16 +839,20 @@ Phaser.Device.prototype = {
|
||||
|
||||
this.worker = !!window['Worker'];
|
||||
|
||||
if ('ontouchstart' in document.documentElement || window.navigator.msPointerEnabled) {
|
||||
if ('ontouchstart' in document.documentElement || (window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 1))
|
||||
{
|
||||
this.touch = true;
|
||||
}
|
||||
|
||||
if (window.navigator.msPointerEnabled) {
|
||||
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;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -736,32 +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);
|
||||
} else if (/Midori/.test(ua)) {
|
||||
this.ieVersion = parseInt(RegExp.$1, 10);
|
||||
}
|
||||
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'])
|
||||
{
|
||||
this.cocoonJS = true;
|
||||
}
|
||||
|
||||
if (typeof window.ejecta !== "undefined")
|
||||
{
|
||||
this.ejecta = true;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -823,6 +989,24 @@ Phaser.Device.prototype = {
|
||||
this.iPhone4 = (this.pixelRatio == 2 && this.iPhone);
|
||||
this.iPad = navigator.userAgent.toLowerCase().indexOf('ipad') != -1;
|
||||
|
||||
if (typeof Int8Array !== 'undefined')
|
||||
{
|
||||
this.littleEndian = new Int8Array(new Int16Array([1]).buffer)[0] > 0;
|
||||
this.typedArray = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.littleEndian = false;
|
||||
this.typedArray = false;
|
||||
}
|
||||
|
||||
navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;
|
||||
|
||||
if (navigator.vibrate)
|
||||
{
|
||||
this.vibration = true;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -845,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]);
|
||||
}
|
||||
@@ -920,6 +1106,8 @@ Phaser.Device.prototype = {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Device.prototype.constructor = Phaser.Device;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -935,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+440
-386
File diff suppressed because it is too large
Load Diff
+224
-213
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -401,40 +453,40 @@
|
||||
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
|
||||
*/
|
||||
this.maxParticles = maxParticles || 50;
|
||||
this.maxParticles = maxParticles || 50;
|
||||
|
||||
Phaser.Group.call(this, game);
|
||||
Phaser.Group.call(this, game);
|
||||
|
||||
/**
|
||||
* @property {string} name - Description.
|
||||
*/
|
||||
* @property {string} name - Description.
|
||||
*/
|
||||
this.name = 'emitter' + this.game.particles.ID++;
|
||||
|
||||
/**
|
||||
* @property {Description} type - Description.
|
||||
*/
|
||||
* @property {number} type - Internal Phaser Type value.
|
||||
* @protected
|
||||
*/
|
||||
this.type = Phaser.EMITTER;
|
||||
|
||||
/**
|
||||
* @property {number} x - The X position of the top left corner of the emitter in world space.
|
||||
* @default
|
||||
*/
|
||||
* @property {number} x - The X position of the top left corner of the emitter in world space.
|
||||
* @default
|
||||
*/
|
||||
this.x = 0;
|
||||
|
||||
/**
|
||||
* @property {number} y - The Y position of the top left corner of emitter in world space.
|
||||
* @default
|
||||
*/
|
||||
* @property {number} y - The Y position of the top left corner of emitter in world space.
|
||||
* @default
|
||||
*/
|
||||
this.y = 0;
|
||||
|
||||
/**
|
||||
* @property {number} width - The width of the emitter. Particles can be randomly generated from anywhere within this box.
|
||||
* @default
|
||||
*/
|
||||
* @property {number} width - The width of the emitter. Particles can be randomly generated from anywhere within this box.
|
||||
* @default
|
||||
*/
|
||||
this.width = 1;
|
||||
|
||||
/**
|
||||
@@ -444,160 +496,134 @@ 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
|
||||
* @default
|
||||
*/
|
||||
* @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
|
||||
* @default
|
||||
*/
|
||||
* @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
|
||||
* @default
|
||||
*/
|
||||
* @property {number} maxRotation - The maximum possible angular velocity of a particle.
|
||||
* @default
|
||||
*/
|
||||
this.maxRotation = 360;
|
||||
|
||||
/**
|
||||
* Sets the <code>gravity.y</code> of each particle to this value on launch.
|
||||
* @property {number} gravity
|
||||
* @default
|
||||
*/
|
||||
this.gravity = 2;
|
||||
* @property {number} gravity - Sets the `body.gravity.y` of each particle sprite to this value on launch.
|
||||
* @default
|
||||
*/
|
||||
this.gravity = 100;
|
||||
|
||||
/**
|
||||
* Set your own particle class type here.
|
||||
* @property {Description} particleClass
|
||||
* @default
|
||||
*/
|
||||
* @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
|
||||
*/
|
||||
this.particleDrag = new Phaser.Point();
|
||||
* @property {number} particleFriction - The friction component of particles launched from the emitter.
|
||||
* @default
|
||||
*/
|
||||
this.particleFriction = 0;
|
||||
|
||||
/**
|
||||
* The angular drag component of particles launched from the emitter if they are rotating.
|
||||
* @property {number} angularDrag
|
||||
* @default
|
||||
*/
|
||||
* @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
|
||||
* @default
|
||||
*/
|
||||
* @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
|
||||
* @default
|
||||
*/
|
||||
* @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
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
* @property {number} _quantity - Internal helper for deciding how many particles to launch.
|
||||
* @private
|
||||
*/
|
||||
this._quantity = 0;
|
||||
|
||||
/**
|
||||
* Internal helper for deciding when to launch particles or kill them.
|
||||
* @property {number} _timer
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {number} _timer - Internal helper for deciding when to launch particles or kill them.
|
||||
* @private
|
||||
*/
|
||||
this._timer = 0;
|
||||
|
||||
/**
|
||||
* Internal counter for figuring out how many particles to launch.
|
||||
* @property {number} _counter
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
* @property {number} _counter - Internal counter for figuring out how many particles to launch.
|
||||
* @private
|
||||
*/
|
||||
this._counter = 0;
|
||||
|
||||
/**
|
||||
* Internal helper for the style of particle emission (all at once, or one at a time).
|
||||
* @property {boolean} _explode
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
* @property {boolean} _explode - Internal helper for the style of particle emission (all at once, or one at a time).
|
||||
* @private
|
||||
*/
|
||||
this._explode = true;
|
||||
|
||||
/**
|
||||
* Determines whether the emitter is currently emitting particles.
|
||||
* It is totally safe to directly toggle this.
|
||||
* @property {boolean} on
|
||||
* @default
|
||||
*/
|
||||
* @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
|
||||
* @default
|
||||
*/
|
||||
* @property {boolean} exists - Determines whether the emitter is being updated by the core game loop.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
||||
/**
|
||||
* The point the particles are emitted from.
|
||||
* Emitter.x and Emitter.y control the containers location, which updates all current particles
|
||||
* Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.
|
||||
* @property {boolean} emitX
|
||||
*/
|
||||
* The point the particles are emitted from.
|
||||
* Emitter.x and Emitter.y control the containers location, which updates all current particles
|
||||
* Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.
|
||||
* @property {boolean} emitX
|
||||
*/
|
||||
this.emitX = x;
|
||||
|
||||
/**
|
||||
* The point the particles are emitted from.
|
||||
* Emitter.x and Emitter.y control the containers location, which updates all current particles
|
||||
* Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.
|
||||
* @property {boolean} emitY
|
||||
*/
|
||||
* The point the particles are emitted from.
|
||||
* Emitter.x and Emitter.y control the containers location, which updates all current particles
|
||||
* Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.
|
||||
* @property {boolean} emitY
|
||||
*/
|
||||
this.emitY = y;
|
||||
|
||||
|
||||
};
|
||||
|
||||
Phaser.Particles.Arcade.Emitter.prototype = Object.create(Phaser.Group.prototype);
|
||||
@@ -613,12 +639,12 @@ Phaser.Particles.Arcade.Emitter.prototype.update = function () {
|
||||
{
|
||||
if (this._explode)
|
||||
{
|
||||
this._counter = 0;
|
||||
this._counter = 0;
|
||||
|
||||
do
|
||||
{
|
||||
this.emitParticle();
|
||||
this._counter++;
|
||||
this.emitParticle();
|
||||
this._counter++;
|
||||
}
|
||||
while (this._counter < this._quantity);
|
||||
|
||||
@@ -626,22 +652,22 @@ Phaser.Particles.Arcade.Emitter.prototype.update = function () {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.game.time.now >= this._timer)
|
||||
{
|
||||
if (this.game.time.now >= this._timer)
|
||||
{
|
||||
this.emitParticle();
|
||||
|
||||
this._counter++;
|
||||
|
||||
this._counter++;
|
||||
|
||||
if (this._quantity > 0)
|
||||
{
|
||||
if (this._counter >= this._quantity)
|
||||
{
|
||||
this.on = false;
|
||||
}
|
||||
if (this._counter >= this._quantity)
|
||||
{
|
||||
this.on = false;
|
||||
}
|
||||
}
|
||||
|
||||
this._timer = this.game.time.now + this.frequency;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -651,62 +677,54 @@ 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 < 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);
|
||||
}
|
||||
|
||||
particle = new Phaser.Sprite(this.game, 0, 0, rndKey, rndFrame);
|
||||
}
|
||||
else
|
||||
{
|
||||
// else
|
||||
// {
|
||||
// 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;
|
||||
@@ -726,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;
|
||||
@@ -738,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 <code>Object.reset()</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;
|
||||
@@ -750,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();
|
||||
|
||||
@@ -796,25 +805,25 @@ 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);
|
||||
|
||||
if (particle == null)
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.width > 1 || this.height > 1)
|
||||
{
|
||||
particle.reset(this.game.rnd.integerInRange(this.left, this.right), this.game.rnd.integerInRange(this.top, this.bottom));
|
||||
particle.reset(this.game.rnd.integerInRange(this.left, this.right), this.game.rnd.integerInRange(this.top, this.bottom));
|
||||
}
|
||||
else
|
||||
{
|
||||
particle.reset(this.emitX, this.emitY);
|
||||
particle.reset(this.emitX, this.emitY);
|
||||
}
|
||||
|
||||
particle.lifespan = this.lifespan;
|
||||
@@ -856,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;
|
||||
|
||||
}
|
||||
@@ -865,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) {
|
||||
|
||||
@@ -878,13 +886,13 @@ 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) {
|
||||
|
||||
min = min || 0;
|
||||
max = max || 0;
|
||||
min = min || 0;
|
||||
max = max || 0;
|
||||
|
||||
this.minParticleSpeed.x = min;
|
||||
this.maxParticleSpeed.x = max;
|
||||
@@ -894,13 +902,13 @@ 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) {
|
||||
|
||||
min = min || 0;
|
||||
max = max || 0;
|
||||
min = min || 0;
|
||||
max = max || 0;
|
||||
|
||||
this.minParticleSpeed.y = min;
|
||||
this.maxParticleSpeed.y = max;
|
||||
@@ -910,13 +918,13 @@ 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) {
|
||||
|
||||
min = min || 0;
|
||||
max = max || 0;
|
||||
min = min || 0;
|
||||
max = max || 0;
|
||||
|
||||
this.minRotation = min;
|
||||
this.maxRotation = max;
|
||||
@@ -924,14 +932,17 @@ Phaser.Particles.Arcade.Emitter.prototype.setRotation = function (min, max) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the emitter's midpoint to match the midpoint of a <code>Object</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 <code>Object</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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1067,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+116
-49
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,27 +431,36 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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 Events component is a collection of events fired by the parent game object and its components.
|
||||
*
|
||||
* @class Phaser.Events
|
||||
*
|
||||
* @classdesc The Events component is a collection of events fired by the parent game object.
|
||||
*
|
||||
* For example to tell when a Sprite has been added to a new group:
|
||||
*
|
||||
* ```sprite.events.onAddedToGroup.add(yourFunction, this);```
|
||||
*
|
||||
* Where `yourFunction` is the function you want called when this event occurs.
|
||||
*
|
||||
* Note that the Input related events only exist if the Sprite has had `inputEnabled` set to `true`.
|
||||
*
|
||||
* @constructor
|
||||
*
|
||||
* @param {Phaser.Sprite} sprite - A reference to Description.
|
||||
*/
|
||||
Phaser.Events = function (sprite) {
|
||||
|
||||
this.parent = sprite;
|
||||
this.onAddedToGroup = new Phaser.Signal;
|
||||
this.onRemovedFromGroup = new Phaser.Signal;
|
||||
this.onKilled = new Phaser.Signal;
|
||||
this.onRevived = new Phaser.Signal;
|
||||
this.onOutOfBounds = new Phaser.Signal;
|
||||
|
||||
this.parent = sprite;
|
||||
|
||||
this.onAddedToGroup = new Phaser.Signal();
|
||||
this.onRemovedFromGroup = new Phaser.Signal();
|
||||
this.onKilled = new Phaser.Signal();
|
||||
this.onRevived = new Phaser.Signal();
|
||||
this.onOutOfBounds = new Phaser.Signal();
|
||||
|
||||
this.onInputOver = null;
|
||||
this.onInputOut = null;
|
||||
@@ -408,43 +469,49 @@ Phaser.Events = function (sprite) {
|
||||
this.onDragStart = null;
|
||||
this.onDragStop = null;
|
||||
|
||||
this.onAnimationStart = null;
|
||||
this.onAnimationComplete = null;
|
||||
this.onAnimationLoop = null;
|
||||
this.onAnimationStart = null;
|
||||
this.onAnimationComplete = null;
|
||||
this.onAnimationLoop = null;
|
||||
|
||||
this.onBeginContact = null;
|
||||
this.onEndContact = null;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Events.prototype = {
|
||||
|
||||
destroy: function () {
|
||||
destroy: function () {
|
||||
|
||||
this.parent = null;
|
||||
this.onAddedToGroup.dispose();
|
||||
this.onRemovedFromGroup.dispose();
|
||||
this.onKilled.dispose();
|
||||
this.onRevived.dispose();
|
||||
this.onOutOfBounds.dispose();
|
||||
this.parent = null;
|
||||
this.onAddedToGroup.dispose();
|
||||
this.onRemovedFromGroup.dispose();
|
||||
this.onKilled.dispose();
|
||||
this.onRevived.dispose();
|
||||
this.onOutOfBounds.dispose();
|
||||
|
||||
if (this.onInputOver)
|
||||
{
|
||||
this.onInputOver.dispose();
|
||||
this.onInputOut.dispose();
|
||||
this.onInputDown.dispose();
|
||||
this.onInputUp.dispose();
|
||||
this.onDragStart.dispose();
|
||||
this.onDragStop.dispose();
|
||||
}
|
||||
if (this.onInputOver)
|
||||
{
|
||||
this.onInputOver.dispose();
|
||||
this.onInputOut.dispose();
|
||||
this.onInputDown.dispose();
|
||||
this.onInputUp.dispose();
|
||||
this.onDragStart.dispose();
|
||||
this.onDragStop.dispose();
|
||||
}
|
||||
|
||||
if (this.onAnimationStart)
|
||||
{
|
||||
this.onAnimationStart.dispose();
|
||||
this.onAnimationComplete.dispose();
|
||||
this.onAnimationLoop.dispose();
|
||||
}
|
||||
if (this.onAnimationStart)
|
||||
{
|
||||
this.onAnimationStart.dispose();
|
||||
this.onAnimationComplete.dispose();
|
||||
this.onAnimationLoop.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};</pre>
|
||||
};
|
||||
|
||||
Phaser.Events.prototype.constructor = Phaser.Events;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
@@ -459,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
@@ -0,0 +1,652 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Phaser Source: core/Filter.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: core/Filter.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is a base Filter template to use for any Phaser filter development.
|
||||
*
|
||||
* @class Phaser.Filter
|
||||
* @classdesc Phaser - Filter
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {Object} uniforms - Uniform mappings object
|
||||
* @param {Array} fragmentSrc - The fragment shader code.
|
||||
*/
|
||||
Phaser.Filter = function (game, uniforms, fragmentSrc) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {number} type - The const type of this object, either Phaser.WEBGL_FILTER or Phaser.CANVAS_FILTER.
|
||||
* @default
|
||||
*/
|
||||
this.type = Phaser.WEBGL_FILTER;
|
||||
|
||||
/**
|
||||
* An array of passes - some filters contain a few steps this array simply stores the steps in a linear fashion.
|
||||
* For example the blur filter has two passes blurX and blurY.
|
||||
* @property {array} passes - An array of filter objects.
|
||||
* @private
|
||||
*/
|
||||
this.passes = [this];
|
||||
|
||||
/**
|
||||
* @property {boolean} dirty - Internal PIXI var.
|
||||
* @default
|
||||
*/
|
||||
this.dirty = true;
|
||||
|
||||
/**
|
||||
* @property {number} padding - Internal PIXI var.
|
||||
* @default
|
||||
*/
|
||||
this.padding = 0;
|
||||
|
||||
/**
|
||||
* @property {object} uniforms - Default uniform mappings.
|
||||
*/
|
||||
this.uniforms = {
|
||||
|
||||
time: { type: '1f', value: 0 },
|
||||
resolution: { type: '2f', value: { x: 256, y: 256 }},
|
||||
mouse: { type: '2f', value: { x: 0.0, y: 0.0 }}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @property {array} fragmentSrc - The fragment shader code.
|
||||
*/
|
||||
this.fragmentSrc = fragmentSrc || [];
|
||||
|
||||
};
|
||||
|
||||
Phaser.Filter.prototype = {
|
||||
|
||||
/**
|
||||
* Should be over-ridden.
|
||||
* @method Phaser.Filter#init
|
||||
*/
|
||||
init: function () {
|
||||
// This should be over-ridden. Will receive a variable number of arguments.
|
||||
},
|
||||
|
||||
/**
|
||||
* Set the resolution uniforms on the filter.
|
||||
* @method Phaser.Filter#setResolution
|
||||
* @param {number} width - The width of the display.
|
||||
* @param {number} height - The height of the display.
|
||||
*/
|
||||
setResolution: function (width, height) {
|
||||
|
||||
this.uniforms.resolution.value.x = width;
|
||||
this.uniforms.resolution.value.y = height;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the filter.
|
||||
* @method Phaser.Filter#update
|
||||
* @param {Phaser.Pointer} [pointer] - A Pointer object to use for the filter. The coordinates are mapped to the mouse uniform.
|
||||
*/
|
||||
update: function (pointer) {
|
||||
|
||||
if (typeof pointer !== 'undefined')
|
||||
{
|
||||
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();
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Clear down this Filter and null out references
|
||||
* @method Phaser.Filter#destroy
|
||||
*/
|
||||
destroy: function () {
|
||||
|
||||
this.game = null;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Filter.prototype.constructor = Phaser.Filter;
|
||||
|
||||
/**
|
||||
* @name Phaser.Filter#width
|
||||
* @property {number} width - The width (resolution uniform)
|
||||
*/
|
||||
Object.defineProperty(Phaser.Filter.prototype, 'width', {
|
||||
|
||||
get: function() {
|
||||
return this.uniforms.resolution.value.x;
|
||||
},
|
||||
|
||||
set: function(value) {
|
||||
this.uniforms.resolution.value.x = value;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* @name Phaser.Filter#height
|
||||
* @property {number} height - The height (resolution uniform)
|
||||
*/
|
||||
Object.defineProperty(Phaser.Filter.prototype, 'height', {
|
||||
|
||||
get: function() {
|
||||
return this.uniforms.resolution.value.y;
|
||||
},
|
||||
|
||||
set: function(value) {
|
||||
this.uniforms.resolution.value.y = value;
|
||||
}
|
||||
|
||||
});
|
||||
</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>
|
||||
+160
-106
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -398,124 +450,124 @@
|
||||
*/
|
||||
Phaser.Frame = function (index, x, y, width, height, name, uuid) {
|
||||
|
||||
/**
|
||||
* @property {number} index - The index of this Frame within the FrameData set it is being added to.
|
||||
*/
|
||||
this.index = index;
|
||||
|
||||
/**
|
||||
* @property {number} x - X position within the image to cut from.
|
||||
*/
|
||||
this.x = x;
|
||||
/**
|
||||
* @property {number} index - The index of this Frame within the FrameData set it is being added to.
|
||||
*/
|
||||
this.index = index;
|
||||
|
||||
/**
|
||||
* @property {number} x - X position within the image to cut from.
|
||||
*/
|
||||
this.x = x;
|
||||
|
||||
/**
|
||||
* @property {number} y - Y position within the image to cut from.
|
||||
*/
|
||||
this.y = y;
|
||||
/**
|
||||
* @property {number} y - Y position within the image to cut from.
|
||||
*/
|
||||
this.y = y;
|
||||
|
||||
/**
|
||||
* @property {number} width - Width of the frame.
|
||||
*/
|
||||
this.width = width;
|
||||
/**
|
||||
* @property {number} width - Width of the frame.
|
||||
*/
|
||||
this.width = width;
|
||||
|
||||
/**
|
||||
* @property {number} height - Height of the frame.
|
||||
*/
|
||||
this.height = height;
|
||||
/**
|
||||
* @property {number} height - Height of the frame.
|
||||
*/
|
||||
this.height = height;
|
||||
|
||||
/**
|
||||
* @property {string} name - Useful for Texture Atlas files (is set to the filename value).
|
||||
*/
|
||||
this.name = name;
|
||||
/**
|
||||
* @property {string} name - Useful for Texture Atlas files (is set to the filename value).
|
||||
*/
|
||||
this.name = name;
|
||||
|
||||
/**
|
||||
* @property {string} uuid - A link to the PIXI.TextureCache entry.
|
||||
*/
|
||||
this.uuid = uuid;
|
||||
/**
|
||||
* @property {string} uuid - A link to the PIXI.TextureCache entry.
|
||||
*/
|
||||
this.uuid = uuid;
|
||||
|
||||
/**
|
||||
* @property {number} centerX - Center X position within the image to cut from.
|
||||
*/
|
||||
/**
|
||||
* @property {number} centerX - Center X position within the image to cut from.
|
||||
*/
|
||||
this.centerX = Math.floor(width / 2);
|
||||
|
||||
/**
|
||||
* @property {number} centerY - Center Y position within the image to cut from.
|
||||
*/
|
||||
/**
|
||||
* @property {number} centerY - Center Y position within the image to cut from.
|
||||
*/
|
||||
this.centerY = Math.floor(height / 2);
|
||||
|
||||
/**
|
||||
* @property {number} distance - The distance from the top left to the bottom-right of this Frame.
|
||||
*/
|
||||
this.distance = Phaser.Math.distance(0, 0, width, height);
|
||||
/**
|
||||
* @property {number} distance - The distance from the top left to the bottom-right of this Frame.
|
||||
*/
|
||||
this.distance = Phaser.Math.distance(0, 0, width, height);
|
||||
|
||||
/**
|
||||
* @property {boolean} rotated - Rotated? (not yet implemented)
|
||||
* @default
|
||||
*/
|
||||
this.rotated = false;
|
||||
/**
|
||||
* @property {boolean} rotated - Rotated? (not yet implemented)
|
||||
* @default
|
||||
*/
|
||||
this.rotated = false;
|
||||
|
||||
/**
|
||||
* @property {string} rotationDirection - Either 'cw' or 'ccw', rotation is always 90 degrees.
|
||||
* @default 'cw'
|
||||
*/
|
||||
this.rotationDirection = 'cw';
|
||||
/**
|
||||
* @property {string} rotationDirection - Either 'cw' or 'ccw', rotation is always 90 degrees.
|
||||
* @default 'cw'
|
||||
*/
|
||||
this.rotationDirection = 'cw';
|
||||
|
||||
/**
|
||||
* @property {boolean} trimmed - Was it trimmed when packed?
|
||||
* @default
|
||||
*/
|
||||
this.trimmed = false;
|
||||
/**
|
||||
* @property {boolean} trimmed - Was it trimmed when packed?
|
||||
* @default
|
||||
*/
|
||||
this.trimmed = false;
|
||||
|
||||
/**
|
||||
* @property {number} sourceSizeW - Width of the original sprite.
|
||||
*/
|
||||
/**
|
||||
* @property {number} sourceSizeW - Width of the original sprite.
|
||||
*/
|
||||
this.sourceSizeW = width;
|
||||
|
||||
/**
|
||||
* @property {number} sourceSizeH - Height of the original sprite.
|
||||
*/
|
||||
/**
|
||||
* @property {number} sourceSizeH - Height of the original sprite.
|
||||
*/
|
||||
this.sourceSizeH = height;
|
||||
|
||||
/**
|
||||
* @property {number} spriteSourceSizeX - X position of the trimmed sprite inside original sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeX = 0;
|
||||
/**
|
||||
* @property {number} spriteSourceSizeX - X position of the trimmed sprite inside original sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeX = 0;
|
||||
|
||||
/**
|
||||
* @property {number} spriteSourceSizeY - Y position of the trimmed sprite inside original sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeY = 0;
|
||||
/**
|
||||
* @property {number} spriteSourceSizeY - Y position of the trimmed sprite inside original sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeY = 0;
|
||||
|
||||
/**
|
||||
* @property {number} spriteSourceSizeW - Width of the trimmed sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeW = 0;
|
||||
/**
|
||||
* @property {number} spriteSourceSizeW - Width of the trimmed sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeW = 0;
|
||||
|
||||
/**
|
||||
* @property {number} spriteSourceSizeH - Height of the trimmed sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeH = 0;
|
||||
/**
|
||||
* @property {number} spriteSourceSizeH - Height of the trimmed sprite.
|
||||
* @default
|
||||
*/
|
||||
this.spriteSourceSizeH = 0;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Frame.prototype = {
|
||||
|
||||
/**
|
||||
* If the frame was trimmed when added to the Texture Atlas this records the trim and source data.
|
||||
*
|
||||
* @method Phaser.Frame#setTrim
|
||||
* @param {boolean} trimmed - If this frame was trimmed or not.
|
||||
* @param {number} actualWidth - The width of the frame before being trimmed.
|
||||
* @param {number} actualHeight - The height of the frame before being trimmed.
|
||||
* @param {number} destX - The destination X position of the trimmed frame for display.
|
||||
* @param {number} destY - The destination Y position of the trimmed frame for display.
|
||||
* @param {number} destWidth - The destination width of the trimmed frame for display.
|
||||
* @param {number} destHeight - The destination height of the trimmed frame for display.
|
||||
*/
|
||||
/**
|
||||
* If the frame was trimmed when added to the Texture Atlas this records the trim and source data.
|
||||
*
|
||||
* @method Phaser.Frame#setTrim
|
||||
* @param {boolean} trimmed - If this frame was trimmed or not.
|
||||
* @param {number} actualWidth - The width of the frame before being trimmed.
|
||||
* @param {number} actualHeight - The height of the frame before being trimmed.
|
||||
* @param {number} destX - The destination X position of the trimmed frame for display.
|
||||
* @param {number} destY - The destination Y position of the trimmed frame for display.
|
||||
* @param {number} destWidth - The destination width of the trimmed frame for display.
|
||||
* @param {number} destHeight - The destination height of the trimmed frame for display.
|
||||
*/
|
||||
setTrim: function (trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight) {
|
||||
|
||||
this.trimmed = trimmed;
|
||||
@@ -526,8 +578,8 @@ Phaser.Frame.prototype = {
|
||||
this.height = actualHeight;
|
||||
this.sourceSizeW = actualWidth;
|
||||
this.sourceSizeH = actualHeight;
|
||||
this.centerX = Math.floor(actualWidth / 2);
|
||||
this.centerY = Math.floor(actualHeight / 2);
|
||||
this.centerX = Math.floor(actualWidth / 2);
|
||||
this.centerY = Math.floor(actualHeight / 2);
|
||||
this.spriteSourceSizeX = destX;
|
||||
this.spriteSourceSizeY = destY;
|
||||
this.spriteSourceSizeW = destWidth;
|
||||
@@ -537,6 +589,8 @@ Phaser.Frame.prototype = {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Frame.prototype.constructor = Phaser.Frame;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -552,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+90
-36
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -391,17 +443,17 @@
|
||||
*/
|
||||
Phaser.FrameData = function () {
|
||||
|
||||
/**
|
||||
* @property {Array} _frames - Local array of frames.
|
||||
* @private
|
||||
*/
|
||||
/**
|
||||
* @property {Array} _frames - Local array of frames.
|
||||
* @private
|
||||
*/
|
||||
this._frames = [];
|
||||
|
||||
|
||||
/**
|
||||
* @property {Array} _frameNames - Local array of frame names for name to index conversions.
|
||||
* @private
|
||||
*/
|
||||
/**
|
||||
* @property {Array} _frameNames - Local array of frame names for name to index conversions.
|
||||
* @private
|
||||
*/
|
||||
this._frameNames = [];
|
||||
|
||||
};
|
||||
@@ -430,13 +482,13 @@ Phaser.FrameData.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Get a Frame by its numerical index.
|
||||
/**
|
||||
* Get a Frame by its numerical index.
|
||||
*
|
||||
* @method Phaser.FrameData#getFrame
|
||||
* @param {number} index - The index of the frame you want to get.
|
||||
* @return {Phaser.Frame} The frame, if found.
|
||||
*/
|
||||
* @param {number} index - The index of the frame you want to get.
|
||||
* @return {Phaser.Frame} The frame, if found.
|
||||
*/
|
||||
getFrame: function (index) {
|
||||
|
||||
if (this._frames.length > index)
|
||||
@@ -484,15 +536,15 @@ Phaser.FrameData.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a range of frames based on the given start and end frame indexes and returns them in an Array.
|
||||
/**
|
||||
* Returns a range of frames based on the given start and end frame indexes and returns them in an Array.
|
||||
*
|
||||
* @method Phaser.FrameData#getFrameRange
|
||||
* @param {number} start - The starting frame index.
|
||||
* @param {number} end - The ending frame index.
|
||||
* @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created.
|
||||
* @return {Array} An array of Frames between the start and end index values, or an empty array if none were found.
|
||||
*/
|
||||
* @param {number} end - The ending frame index.
|
||||
* @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created.
|
||||
* @return {Array} An array of Frames between the start and end index values, or an empty array if none were found.
|
||||
*/
|
||||
getFrameRange: function (start, end, output) {
|
||||
|
||||
if (typeof output === "undefined") { output = []; }
|
||||
@@ -506,8 +558,8 @@ Phaser.FrameData.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns all of the Frames in this FrameData set where the frame index is found in the input array.
|
||||
/**
|
||||
* Returns all of the Frames in this FrameData set where the frame index is found in the input array.
|
||||
* The frames are returned in the output array, or if none is provided in a new Array object.
|
||||
*
|
||||
* @method Phaser.FrameData#getFrames
|
||||
@@ -515,13 +567,13 @@ Phaser.FrameData.prototype = {
|
||||
* @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false)
|
||||
* @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created.
|
||||
* @return {Array} An array of all Frames in this FrameData set matching the given names or IDs.
|
||||
*/
|
||||
*/
|
||||
getFrames: function (frames, useNumericIndex, output) {
|
||||
|
||||
if (typeof useNumericIndex === "undefined") { useNumericIndex = true; }
|
||||
if (typeof output === "undefined") { output = []; }
|
||||
|
||||
if (typeof frames === "undefined" || frames.length == 0)
|
||||
if (typeof frames === "undefined" || frames.length === 0)
|
||||
{
|
||||
// No input array, so we loop through all frames
|
||||
for (var i = 0; i < this._frames.length; i++)
|
||||
@@ -568,7 +620,7 @@ Phaser.FrameData.prototype = {
|
||||
if (typeof useNumericIndex === "undefined") { useNumericIndex = true; }
|
||||
if (typeof output === "undefined") { output = []; }
|
||||
|
||||
if (typeof frames === "undefined" || frames.length == 0)
|
||||
if (typeof frames === "undefined" || frames.length === 0)
|
||||
{
|
||||
// No frames array, so we loop through all frames
|
||||
for (var i = 0, len = this._frames.length; i < len; i++)
|
||||
@@ -602,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.
|
||||
@@ -629,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+606
-324
File diff suppressed because it is too large
Load Diff
+198
-101
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -393,14 +445,14 @@
|
||||
Phaser.GameObjectFactory = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.World} world - A reference to the game world.
|
||||
*/
|
||||
this.world = this.game.world;
|
||||
* @property {Phaser.World} world - A reference to the game world.
|
||||
*/
|
||||
this.world = this.game.world;
|
||||
|
||||
};
|
||||
|
||||
@@ -418,7 +470,7 @@ Phaser.GameObjectFactory.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Create a new Sprite with specific position and sprite sheet key.
|
||||
*
|
||||
* @method Phaser.GameObjectFactory#sprite
|
||||
@@ -426,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
|
||||
@@ -468,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) {
|
||||
@@ -479,56 +535,78 @@ 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.
|
||||
* @param {number} volume - The volume at which the sound will be played.
|
||||
* @param {boolean} loop - Whether or not the sound will loop.
|
||||
* @return {Phaser.Sound} The newly created text object.
|
||||
*/
|
||||
audio: function (key, volume, loop) {
|
||||
* @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.
|
||||
*/
|
||||
audio: function (key, volume, loop, connect) {
|
||||
|
||||
return this.game.sound.add(key, volume, loop);
|
||||
return this.game.sound.add(key, volume, loop, connect);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a new <code>TileSprite</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.
|
||||
* @param {number} y - Y position of the new tileSprite.
|
||||
* @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.
|
||||
* @return {Phaser.TileSprite} The newly created tileSprite object.
|
||||
*/
|
||||
tileSprite: function (x, y, width, height, key, frame) {
|
||||
* @param {number} x - X position of the new tileSprite.
|
||||
* @param {number} y - Y position of the new tileSprite.
|
||||
* @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 {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, 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 <code>Text</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.
|
||||
* @return {Phaser.Text} The newly created text object.
|
||||
*/
|
||||
text: function (x, y, text, style) {
|
||||
* @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, 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 <code>Button</code> object.
|
||||
* Creates a new Button object.
|
||||
*
|
||||
* @method Phaser.GameObjectFactory#button
|
||||
* @param {number} [x] X position of the new button object.
|
||||
@@ -539,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 <code>Graphics</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.
|
||||
* @return {Phaser.Graphics} The newly created graphics object.
|
||||
*/
|
||||
graphics: function (x, y) {
|
||||
* @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, 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));
|
||||
|
||||
},
|
||||
|
||||
@@ -579,16 +664,19 @@ Phaser.GameObjectFactory.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* * Create a new <code>BitmapText</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));
|
||||
|
||||
@@ -598,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);
|
||||
|
||||
},
|
||||
|
||||
@@ -653,9 +713,46 @@ Phaser.GameObjectFactory.prototype = {
|
||||
|
||||
return texture;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @param {number} [height=256] - The height of the BitmapData in pixels.
|
||||
* @return {Phaser.BitmapData} The newly created BitmapData object.
|
||||
*/
|
||||
bitmapData: function (width, height) {
|
||||
|
||||
return new Phaser.BitmapData(this.game, width, height);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* A WebGL shader/filter that can be applied to Sprites.
|
||||
*
|
||||
* @method Phaser.GameObjectFactory#filter
|
||||
* @param {string} filter - The name of the filter you wish to create, for example HueRotate or SineWave.
|
||||
* @param {any} - Whatever parameters are needed to be passed to the filter init function.
|
||||
* @return {Phaser.Filter} The newly created Phaser.Filter object.
|
||||
*/
|
||||
filter: function (filter) {
|
||||
|
||||
var args = Array.prototype.splice.call(arguments, 1);
|
||||
|
||||
var filter = new Phaser.Filter[filter](this.game);
|
||||
|
||||
filter.init.apply(filter, args);
|
||||
|
||||
return filter;
|
||||
|
||||
}
|
||||
|
||||
};</pre>
|
||||
};
|
||||
|
||||
Phaser.GameObjectFactory.prototype.constructor = Phaser.GameObjectFactory;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
@@ -670,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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 <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 < 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 < 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>
|
||||
+87
-18
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,12 +431,12 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a new <code>Graphics</code> object.
|
||||
* Creates a new `Graphics` object.
|
||||
*
|
||||
* @class Phaser.Graphics
|
||||
* @constructor
|
||||
@@ -400,21 +452,22 @@ Phaser.Graphics = function (game, x, y) {
|
||||
PIXI.Graphics.call(this);
|
||||
|
||||
/**
|
||||
* @property {Description} type - Description.
|
||||
* @property {number} type - The Phaser Object Type.
|
||||
*/
|
||||
this.type = Phaser.GRAPHICS;
|
||||
|
||||
this.position.x = x;
|
||||
this.position.y = y;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Graphics.prototype = Object.create(PIXI.Graphics.prototype);
|
||||
Phaser.Graphics.prototype.constructor = Phaser.Graphics;
|
||||
|
||||
// Add our own custom methods
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* Destroy this Graphics instance.
|
||||
*
|
||||
* @method Phaser.Sprite.prototype.destroy
|
||||
* @method Phaser.Graphics.prototype.destroy
|
||||
*/
|
||||
Phaser.Graphics.prototype.destroy = function() {
|
||||
|
||||
@@ -429,6 +482,22 @@ Phaser.Graphics.prototype.destroy = function() {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Draws a {Phaser.Polygon} or a {PIXI.Polygon} filled
|
||||
*/
|
||||
Phaser.Graphics.prototype.drawPolygon = function (poly) {
|
||||
|
||||
this.moveTo(poly.points[0].x, poly.points[0].y);
|
||||
|
||||
for (var i = 1; i < poly.points.length; i += 1)
|
||||
{
|
||||
this.lineTo(poly.points[i].x, poly.points[i].y);
|
||||
}
|
||||
|
||||
this.lineTo(poly.points[0].x, poly.points[0].y);
|
||||
|
||||
}
|
||||
|
||||
Object.defineProperty(Phaser.Graphics.prototype, 'angle', {
|
||||
|
||||
get: function() {
|
||||
@@ -479,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+1223
-1021
File diff suppressed because it is too large
Load Diff
+173
-89
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,37 +431,47 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructor for Phaser Input.
|
||||
* Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer.
|
||||
* The Input manager is updated automatically by the core game loop.
|
||||
*
|
||||
* @class Phaser.Input
|
||||
* @classdesc A game specific Input manager that looks after the mouse, keyboard and touch objects.
|
||||
* This is updated by the core game loop.
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - Current game instance.
|
||||
*/
|
||||
Phaser.Input = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Description} hitCanvas - Description.
|
||||
/**
|
||||
* @property {HTMLCanvasElement} hitCanvas - The canvas to which single pixels are drawn in order to perform pixel-perfect hit detection.
|
||||
* @default
|
||||
*/
|
||||
*/
|
||||
this.hitCanvas = null;
|
||||
|
||||
/**
|
||||
* @property {Description} hitContext - Description.
|
||||
* @default
|
||||
*/
|
||||
/**
|
||||
* @property {CanvasRenderingContext2D} hitContext - The context of the pixel perfect hit canvas.
|
||||
* @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;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -432,11 +494,6 @@ Phaser.Input.MOUSE_TOUCH_COMBINE = 2;
|
||||
|
||||
Phaser.Input.prototype = {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game
|
||||
*/
|
||||
game: null,
|
||||
|
||||
/**
|
||||
* How often should the input pointers be checked for updates?
|
||||
* A value of 0 means every single frame (60fps), a value of 1 means every other frame (30fps) and so on.
|
||||
@@ -446,31 +503,28 @@ Phaser.Input.prototype = {
|
||||
pollRate: 0,
|
||||
|
||||
/**
|
||||
* @property {number} _pollCounter - Description.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
* @property {number} _pollCounter - Internal var holding the current poll counter.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
_pollCounter: 0,
|
||||
|
||||
/**
|
||||
* A vector object representing the previous position of the Pointer.
|
||||
* @property {Vec2} vector
|
||||
* @property {Phaser.Point} _oldPosition - A point object representing the previous position of the Pointer.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
_oldPosition: null,
|
||||
|
||||
/**
|
||||
* X coordinate of the most recent Pointer event
|
||||
* @property {number} _x
|
||||
* @property {number} _x - x coordinate of the most recent Pointer event
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
_x: 0,
|
||||
|
||||
/**
|
||||
* Y coordinate of the most recent Pointer event
|
||||
* @property {number} _y
|
||||
* @property {number} _y - Y coordinate of the most recent Pointer event
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
@@ -491,17 +545,14 @@ Phaser.Input.prototype = {
|
||||
multiInputOverride: Phaser.Input.MOUSE_TOUCH_COMBINE,
|
||||
|
||||
/**
|
||||
* A vector object representing the current position of the Pointer.
|
||||
* @property {Phaser.Point} position
|
||||
* @property {Phaser.Point} position - A point object representing the current position of the Pointer.
|
||||
* @default
|
||||
*/
|
||||
position: null,
|
||||
|
||||
/**
|
||||
* A vector object representing the speed of the Pointer. Only really useful in single Pointer games,
|
||||
* otherwise see the Pointer objects directly.
|
||||
* A point object representing the speed of the Pointer. Only really useful in single Pointer games, otherwise see the Pointer objects directly.
|
||||
* @property {Phaser.Point} speed
|
||||
* @default
|
||||
*/
|
||||
speed: null,
|
||||
|
||||
@@ -509,7 +560,6 @@ Phaser.Input.prototype = {
|
||||
* A Circle object centered on the x/y screen coordinates of the Input.
|
||||
* Default size of 44px (Apples recommended "finger tip" size) but can be changed to anything.
|
||||
* @property {Phaser.Circle} circle
|
||||
* @default
|
||||
*/
|
||||
circle: null,
|
||||
|
||||
@@ -517,7 +567,6 @@ Phaser.Input.prototype = {
|
||||
* The scale by which all input coordinates are multiplied, calculated by the StageScaleMode.
|
||||
* In an un-scaled game the values will be x: 1 and y: 1.
|
||||
* @property {Phaser.Point} scale
|
||||
* @default
|
||||
*/
|
||||
scale: null,
|
||||
|
||||
@@ -646,7 +695,7 @@ Phaser.Input.prototype = {
|
||||
/**
|
||||
* A Pointer object
|
||||
* @property {Phaser.Pointer} pointer9
|
||||
*/
|
||||
*/
|
||||
pointer9: null,
|
||||
|
||||
/**
|
||||
@@ -698,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
|
||||
@@ -732,40 +788,41 @@ Phaser.Input.prototype = {
|
||||
*/
|
||||
interactiveItems: new Phaser.LinkedList(),
|
||||
|
||||
/**
|
||||
/**
|
||||
* Starts the Input Manager running.
|
||||
* @method Phaser.Input#boot
|
||||
* @protected
|
||||
*/
|
||||
boot: function () {
|
||||
|
||||
this.mousePointer = new Phaser.Pointer(this.game, 0);
|
||||
this.pointer1 = new Phaser.Pointer(this.game, 1);
|
||||
this.pointer2 = new Phaser.Pointer(this.game, 2);
|
||||
this.mousePointer = new Phaser.Pointer(this.game, 0);
|
||||
this.pointer1 = new Phaser.Pointer(this.game, 1);
|
||||
this.pointer2 = new Phaser.Pointer(this.game, 2);
|
||||
|
||||
this.mouse = new Phaser.Mouse(this.game);
|
||||
this.keyboard = new Phaser.Keyboard(this.game);
|
||||
this.touch = new Phaser.Touch(this.game);
|
||||
this.mspointer = new Phaser.MSPointer(this.game);
|
||||
this.mouse = new Phaser.Mouse(this.game);
|
||||
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();
|
||||
this.onTap = new Phaser.Signal();
|
||||
this.onHold = new Phaser.Signal();
|
||||
this.onDown = new Phaser.Signal();
|
||||
this.onUp = new Phaser.Signal();
|
||||
this.onTap = new Phaser.Signal();
|
||||
this.onHold = new Phaser.Signal();
|
||||
|
||||
this.scale = new Phaser.Point(1, 1);
|
||||
this.speed = new Phaser.Point();
|
||||
this.position = new Phaser.Point();
|
||||
this._oldPosition = new Phaser.Point();
|
||||
this.scale = new Phaser.Point(1, 1);
|
||||
this.speed = new Phaser.Point();
|
||||
this.position = new Phaser.Point();
|
||||
this._oldPosition = new Phaser.Point();
|
||||
|
||||
this.circle = new Phaser.Circle(0, 0, 44);
|
||||
this.circle = new Phaser.Circle(0, 0, 44);
|
||||
|
||||
this.activePointer = this.mousePointer;
|
||||
this.currentPointers = 0;
|
||||
this.activePointer = this.mousePointer;
|
||||
this.currentPointers = 0;
|
||||
|
||||
this.hitCanvas = document.createElement('canvas');
|
||||
this.hitCanvas.width = 1;
|
||||
this.hitCanvas.height = 1;
|
||||
this.hitCanvas = document.createElement('canvas');
|
||||
this.hitCanvas.width = 1;
|
||||
this.hitCanvas.height = 1;
|
||||
this.hitContext = this.hitCanvas.getContext('2d');
|
||||
|
||||
this.mouse.start();
|
||||
@@ -786,10 +843,28 @@ 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;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Add a new Pointer object to the Input Manager. By default Input creates 3 pointer objects: mousePointer, pointer1 and pointer2.
|
||||
* If you need more then use this to create a new one, up to a maximum of 10.
|
||||
* @method Phaser.Input#addPointer
|
||||
@@ -807,7 +882,7 @@ Phaser.Input.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (next == 0)
|
||||
if (next === 0)
|
||||
{
|
||||
console.warn("You can only have 10 Pointer objects");
|
||||
return null;
|
||||
@@ -820,7 +895,7 @@ Phaser.Input.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Updates the Input Manager. Called by the core Game loop.
|
||||
* @method Phaser.Input#update
|
||||
* @protected
|
||||
@@ -839,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();
|
||||
|
||||
@@ -854,14 +931,14 @@ Phaser.Input.prototype = {
|
||||
this._pollCounter = 0;
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Reset all of the Pointers and Input states
|
||||
* @method Phaser.Input#reset
|
||||
* @param {boolean} hard - A soft reset (hard = false) won't reset any Signals that might be bound. A hard reset will.
|
||||
*/
|
||||
reset: function (hard) {
|
||||
|
||||
if (this.game.isBooted == false)
|
||||
if (this.game.isBooted === false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -870,6 +947,7 @@ Phaser.Input.prototype = {
|
||||
|
||||
this.keyboard.reset();
|
||||
this.mousePointer.reset();
|
||||
this.gamepad.reset();
|
||||
|
||||
for (var i = 1; i <= 10; i++)
|
||||
{
|
||||
@@ -880,9 +958,13 @@ Phaser.Input.prototype = {
|
||||
}
|
||||
|
||||
this.currentPointers = 0;
|
||||
this.game.stage.canvas.style.cursor = "default";
|
||||
|
||||
if (hard == true)
|
||||
if (this.game.canvas.style.cursor !== 'none')
|
||||
{
|
||||
this.game.canvas.style.cursor = 'default';
|
||||
}
|
||||
|
||||
if (hard === true)
|
||||
{
|
||||
this.onDown.dispose();
|
||||
this.onUp.dispose();
|
||||
@@ -913,7 +995,7 @@ Phaser.Input.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Find the first free Pointer object and start it, passing in the event data. This is called automatically by Phaser.Touch and Phaser.MSPointer.
|
||||
* @method Phaser.Input#startPointer
|
||||
* @param {Any} event - The event data from the Touch event.
|
||||
@@ -926,11 +1008,11 @@ Phaser.Input.prototype = {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (this.pointer1.active == false)
|
||||
if (this.pointer1.active === false)
|
||||
{
|
||||
return this.pointer1.start(event);
|
||||
}
|
||||
else if (this.pointer2.active == false)
|
||||
else if (this.pointer2.active === false)
|
||||
{
|
||||
return this.pointer2.start(event);
|
||||
}
|
||||
@@ -938,7 +1020,7 @@ Phaser.Input.prototype = {
|
||||
{
|
||||
for (var i = 3; i <= 10; i++)
|
||||
{
|
||||
if (this['pointer' + i] && this['pointer' + i].active == false)
|
||||
if (this['pointer' + i] && this['pointer' + i].active === false)
|
||||
{
|
||||
return this['pointer' + i].start(event);
|
||||
}
|
||||
@@ -949,7 +1031,7 @@ Phaser.Input.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Updates the matching Pointer object, passing in the event data. This is called automatically and should not normally need to be invoked.
|
||||
* @method Phaser.Input#updatePointer
|
||||
* @param {Any} event - The event data from the Touch event.
|
||||
@@ -980,7 +1062,7 @@ Phaser.Input.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Stops the matching Pointer object, passing in the event data.
|
||||
* @method Phaser.Input#stopPointer
|
||||
* @param {Any} event - The event data from the Touch event.
|
||||
@@ -1011,7 +1093,7 @@ Phaser.Input.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Get the next Pointer object whos active property matches the given state
|
||||
* @method Phaser.Input#getPointer
|
||||
* @param {boolean} state - The state the Pointer should be in (false for inactive, true for active).
|
||||
@@ -1044,7 +1126,7 @@ Phaser.Input.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Get the Pointer object whos identified property matches the given identifier value.
|
||||
* @method Phaser.Input#getPointerFromIdentifier
|
||||
* @param {number} identifier - The Pointer.identifier value to search for.
|
||||
@@ -1077,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
|
||||
@@ -1172,7 +1256,7 @@ Object.defineProperty(Phaser.Input.prototype, "totalActivePointers", {
|
||||
Object.defineProperty(Phaser.Input.prototype, "worldX", {
|
||||
|
||||
get: function () {
|
||||
return this.game.camera.view.x + this.x;
|
||||
return this.game.camera.view.x + this.x;
|
||||
}
|
||||
|
||||
});
|
||||
@@ -1185,7 +1269,7 @@ Object.defineProperty(Phaser.Input.prototype, "worldX", {
|
||||
Object.defineProperty(Phaser.Input.prototype, "worldY", {
|
||||
|
||||
get: function () {
|
||||
return this.game.camera.view.y + this.y;
|
||||
return this.game.camera.view.y + this.y;
|
||||
}
|
||||
|
||||
});
|
||||
@@ -1204,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+572
-396
File diff suppressed because it is too large
Load Diff
+78
-8
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,7 +405,7 @@
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li>
|
||||
<a href="global.html#bottom">bottom</a>
|
||||
<a href="global.html#hex2rgb">hex2rgb</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
@@ -353,7 +413,11 @@
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#right">right</a>
|
||||
<a href="global.html#x">x</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#y">y</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,16 +443,18 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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 - http://www.phaser.io
|
||||
*
|
||||
* v1.1.2 - Released November 1st 2013.
|
||||
* v1.1.4 - Released February 5th 2014.
|
||||
*
|
||||
* By Richard Davey http://www.photonstorm.com @photonstorm
|
||||
*
|
||||
@@ -397,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)<br />
|
||||
* Follow on [Twitter](https://twitter.com/photonstorm)<br />
|
||||
* Join the [Forum](http://www.html5gamedevs.com/forum/14-phaser/)<br />
|
||||
* Try out 210+ [Phaser Examples](http://examples.phaser.io)<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."
|
||||
@@ -421,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+136
-82
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -392,87 +444,87 @@
|
||||
*/
|
||||
Phaser.Key = function (game, keycode) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {boolean} isDown - The "down" state of the key.
|
||||
* @default
|
||||
*/
|
||||
this.isDown = false;
|
||||
/**
|
||||
* @property {boolean} isDown - The "down" state of the key.
|
||||
* @default
|
||||
*/
|
||||
this.isDown = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} isUp - The "up" state of the key.
|
||||
* @default
|
||||
*/
|
||||
this.isUp = false;
|
||||
/**
|
||||
* @property {boolean} isUp - The "up" state of the key.
|
||||
* @default
|
||||
*/
|
||||
this.isUp = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} altKey - The down state of the ALT key, if pressed at the same time as this key.
|
||||
* @default
|
||||
*/
|
||||
this.altKey = false;
|
||||
/**
|
||||
* @property {boolean} altKey - The down state of the ALT key, if pressed at the same time as this key.
|
||||
* @default
|
||||
*/
|
||||
this.altKey = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} ctrlKey - The down state of the CTRL key, if pressed at the same time as this key.
|
||||
* @default
|
||||
*/
|
||||
this.ctrlKey = false;
|
||||
/**
|
||||
* @property {boolean} ctrlKey - The down state of the CTRL key, if pressed at the same time as this key.
|
||||
* @default
|
||||
*/
|
||||
this.ctrlKey = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} shiftKey - The down state of the SHIFT key, if pressed at the same time as this key.
|
||||
* @default
|
||||
*/
|
||||
this.shiftKey = false;
|
||||
/**
|
||||
* @property {boolean} shiftKey - The down state of the SHIFT key, if pressed at the same time as this key.
|
||||
* @default
|
||||
*/
|
||||
this.shiftKey = false;
|
||||
|
||||
/**
|
||||
* @property {number} timeDown - The timestamp when the key was last pressed down.
|
||||
* @default
|
||||
*/
|
||||
this.timeDown = 0;
|
||||
/**
|
||||
* @property {number} timeDown - The timestamp when the key was last pressed down.
|
||||
* @default
|
||||
*/
|
||||
this.timeDown = 0;
|
||||
|
||||
/**
|
||||
* If the key is down this value holds the duration of that key press and is constantly updated.
|
||||
* If the key is up it holds the duration of the previous down session.
|
||||
* @property {number} duration - The number of milliseconds this key has been held down for.
|
||||
* @default
|
||||
*/
|
||||
this.duration = 0;
|
||||
/**
|
||||
* If the key is down this value holds the duration of that key press and is constantly updated.
|
||||
* If the key is up it holds the duration of the previous down session.
|
||||
* @property {number} duration - The number of milliseconds this key has been held down for.
|
||||
* @default
|
||||
*/
|
||||
this.duration = 0;
|
||||
|
||||
/**
|
||||
* @property {number} timeUp - The timestamp when the key was last released.
|
||||
* @default
|
||||
*/
|
||||
this.timeUp = 0;
|
||||
/**
|
||||
* @property {number} timeUp - The timestamp when the key was last released.
|
||||
* @default
|
||||
*/
|
||||
this.timeUp = 0;
|
||||
|
||||
/**
|
||||
* @property {number} repeats - If a key is held down this holds down the number of times the key has 'repeated'.
|
||||
* @default
|
||||
*/
|
||||
this.repeats = 0;
|
||||
/**
|
||||
* @property {number} repeats - If a key is held down this holds down the number of times the key has 'repeated'.
|
||||
* @default
|
||||
*/
|
||||
this.repeats = 0;
|
||||
|
||||
/**
|
||||
* @property {number} keyCode - The keycode of this key.
|
||||
*/
|
||||
this.keyCode = keycode;
|
||||
/**
|
||||
* @property {number} keyCode - The keycode of this key.
|
||||
*/
|
||||
this.keyCode = keycode;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onDown - This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).
|
||||
*/
|
||||
/**
|
||||
* @property {Phaser.Signal} onDown - This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).
|
||||
*/
|
||||
this.onDown = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} onUp - This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).
|
||||
*/
|
||||
/**
|
||||
* @property {Phaser.Signal} onUp - This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).
|
||||
*/
|
||||
this.onUp = new Phaser.Signal();
|
||||
|
||||
|
||||
};
|
||||
|
||||
Phaser.Key.prototype = {
|
||||
|
||||
/**
|
||||
/**
|
||||
* Called automatically by Phaser.Keyboard.
|
||||
* @method Phaser.Key#processKeyDown
|
||||
* @param {KeyboardEvent} event.
|
||||
@@ -503,7 +555,7 @@ Phaser.Key.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Called automatically by Phaser.Keyboard.
|
||||
* @method Phaser.Key#processKeyUp
|
||||
* @param {KeyboardEvent} event.
|
||||
@@ -519,8 +571,8 @@ Phaser.Key.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)
|
||||
/**
|
||||
* 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.Key#justPressed
|
||||
* @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.
|
||||
@@ -533,9 +585,9 @@ 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
|
||||
/**
|
||||
* 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#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.
|
||||
*/
|
||||
@@ -543,11 +595,13 @@ Phaser.Key.prototype = {
|
||||
|
||||
if (typeof duration === "undefined") { duration = 250; }
|
||||
|
||||
return (this.isDown == false && (this.game.time.now - this.timeUp < duration));
|
||||
return (this.isDown === false && (this.game.time.now - this.timeUp < duration));
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Key.prototype.constructor = Phaser.Key;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -563,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 Fri Nov 01 2013 18:16:08 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
-61
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,41 +431,40 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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 - Keyboard constructor.
|
||||
* The Keyboard class handles looking after keyboard input for your game. It will recognise and respond to key presses and dispatch the required events.
|
||||
*
|
||||
* @class Phaser.Keyboard
|
||||
* @classdesc A Keyboard object Description.
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
Phaser.Keyboard = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Description} _keys - Description.
|
||||
* @private
|
||||
*/
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {object} _keys - The object the key values are stored in.
|
||||
* @private
|
||||
*/
|
||||
this._keys = {};
|
||||
|
||||
/**
|
||||
* @property {Description} _hotkeys - Description.
|
||||
* @property {object} _hotkeys - The object the hot keys are stored in.
|
||||
* @private
|
||||
*/
|
||||
this._hotkeys = {};
|
||||
|
||||
/**
|
||||
* @property {Description} _capture - Description.
|
||||
* @private
|
||||
*/
|
||||
/**
|
||||
* @property {object} _capture - The object the key capture values are stored in.
|
||||
* @private
|
||||
*/
|
||||
this._capture = {};
|
||||
|
||||
/**
|
||||
@@ -451,7 +502,7 @@ Phaser.Keyboard = function (game) {
|
||||
* @property {function} onUpCallback - This callback is invoked every time a key is released.
|
||||
*/
|
||||
this.onUpCallback = null;
|
||||
|
||||
|
||||
};
|
||||
|
||||
Phaser.Keyboard.prototype = {
|
||||
@@ -480,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) {
|
||||
@@ -497,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) {
|
||||
|
||||
@@ -513,10 +564,10 @@ Phaser.Keyboard.prototype = {
|
||||
*/
|
||||
createCursorKeys: function () {
|
||||
|
||||
return {
|
||||
up: this.addKey(Phaser.Keyboard.UP),
|
||||
down: this.addKey(Phaser.Keyboard.DOWN),
|
||||
left: this.addKey(Phaser.Keyboard.LEFT),
|
||||
return {
|
||||
up: this.addKey(Phaser.Keyboard.UP),
|
||||
down: this.addKey(Phaser.Keyboard.DOWN),
|
||||
left: this.addKey(Phaser.Keyboard.LEFT),
|
||||
right: this.addKey(Phaser.Keyboard.RIGHT)
|
||||
}
|
||||
|
||||
@@ -540,8 +591,8 @@ Phaser.Keyboard.prototype = {
|
||||
return _this.processKeyUp(event);
|
||||
};
|
||||
|
||||
document.body.addEventListener('keydown', this._onKeyDown, false);
|
||||
document.body.addEventListener('keyup', this._onKeyUp, false);
|
||||
window.addEventListener('keydown', this._onKeyDown, false);
|
||||
window.addEventListener('keyup', this._onKeyUp, false);
|
||||
|
||||
},
|
||||
|
||||
@@ -552,12 +603,12 @@ Phaser.Keyboard.prototype = {
|
||||
*/
|
||||
stop: function () {
|
||||
|
||||
document.body.removeEventListener('keydown', this._onKeyDown);
|
||||
document.body.removeEventListener('keyup', this._onKeyUp);
|
||||
window.removeEventListener('keydown', this._onKeyDown);
|
||||
window.removeEventListener('keyup', this._onKeyUp);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* By default when a key is pressed Phaser will not stop the event from propagating up to the browser.
|
||||
* There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.
|
||||
* You can use addKeyCapture to consume the keyboard event for specific keys so it doesn't bubble up to the the browser.
|
||||
@@ -580,9 +631,9 @@ Phaser.Keyboard.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes an existing key capture.
|
||||
* @method Phaser.Keyboard#removeKeyCapture
|
||||
/**
|
||||
* Removes an existing key capture.
|
||||
* @method Phaser.Keyboard#removeKeyCapture
|
||||
* @param {number} keycode
|
||||
*/
|
||||
removeKeyCapture: function (keycode) {
|
||||
@@ -591,9 +642,9 @@ Phaser.Keyboard.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Clear all set key captures.
|
||||
* @method Phaser.Keyboard#clearCaptures
|
||||
/**
|
||||
* Clear all set key captures.
|
||||
* @method Phaser.Keyboard#clearCaptures
|
||||
*/
|
||||
clearCaptures: function () {
|
||||
|
||||
@@ -601,12 +652,12 @@ Phaser.Keyboard.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Process the keydown event.
|
||||
* @method Phaser.Keyboard#processKeyDown
|
||||
/**
|
||||
* Process the keydown event.
|
||||
* @method Phaser.Keyboard#processKeyDown
|
||||
* @param {KeyboardEvent} event
|
||||
* @protected
|
||||
*/
|
||||
*/
|
||||
processKeyDown: function (event) {
|
||||
|
||||
if (this.game.input.disabled || this.disabled)
|
||||
@@ -657,9 +708,9 @@ Phaser.Keyboard.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Process the keyup event.
|
||||
* @method Phaser.Keyboard#processKeyUp
|
||||
/**
|
||||
* Process the keyup event.
|
||||
* @method Phaser.Keyboard#processKeyUp
|
||||
* @param {KeyboardEvent} event
|
||||
* @protected
|
||||
*/
|
||||
@@ -703,9 +754,9 @@ Phaser.Keyboard.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Reset the "isDown" state of all keys.
|
||||
* @method Phaser.Keyboard#reset
|
||||
/**
|
||||
* Reset the "isDown" state of all keys.
|
||||
* @method Phaser.Keyboard#reset
|
||||
*/
|
||||
reset: function () {
|
||||
|
||||
@@ -719,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.
|
||||
*/
|
||||
@@ -738,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.
|
||||
*/
|
||||
@@ -759,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) {
|
||||
@@ -769,12 +820,14 @@ Phaser.Keyboard.prototype = {
|
||||
return this._keys[keycode].isDown;
|
||||
}
|
||||
|
||||
return false;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Keyboard.prototype.constructor = Phaser.Keyboard;
|
||||
|
||||
Phaser.Keyboard.A = "A".charCodeAt(0);
|
||||
Phaser.Keyboard.B = "B".charCodeAt(0);
|
||||
Phaser.Keyboard.C = "C".charCodeAt(0);
|
||||
@@ -888,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
@@ -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 <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 <= xMax) && (y >= yMin && y <= 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>
|
||||
+153
-98
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -392,145 +444,148 @@
|
||||
Phaser.LinkedList = function () {
|
||||
|
||||
/**
|
||||
* @property {object} next - Next element in the list.
|
||||
* @default
|
||||
*/
|
||||
* @property {object} next - Next element in the list.
|
||||
* @default
|
||||
*/
|
||||
this.next = null;
|
||||
|
||||
/**
|
||||
* @property {object} prev - Previous element in the list.
|
||||
* @default
|
||||
*/
|
||||
* @property {object} prev - Previous element in the list.
|
||||
* @default
|
||||
*/
|
||||
this.prev = null;
|
||||
|
||||
/**
|
||||
* @property {object} first - First element in the list.
|
||||
* @default
|
||||
*/
|
||||
* @property {object} first - First element in the list.
|
||||
* @default
|
||||
*/
|
||||
this.first = null;
|
||||
|
||||
/**
|
||||
* @property {object} last - Last element in the list.
|
||||
* @default
|
||||
*/
|
||||
* @property {object} last - Last element in the list.
|
||||
* @default
|
||||
*/
|
||||
this.last = null;
|
||||
|
||||
/**
|
||||
* @property {object} game - Number of elements in the list.
|
||||
* @default
|
||||
*/
|
||||
* @property {object} game - Number of elements in the list.
|
||||
* @default
|
||||
*/
|
||||
this.total = 0;
|
||||
|
||||
};
|
||||
|
||||
Phaser.LinkedList.prototype = {
|
||||
|
||||
/**
|
||||
/**
|
||||
* Adds a new element to this linked list.
|
||||
*
|
||||
* @method Phaser.LinkedList#add
|
||||
* @param {object} child - The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through.
|
||||
* @return {object} The child that was added.
|
||||
*
|
||||
* @method Phaser.LinkedList#add
|
||||
* @param {object} child - The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through.
|
||||
* @return {object} The child that was added.
|
||||
*/
|
||||
add: function (child) {
|
||||
|
||||
// If the list is empty
|
||||
if (this.total == 0 && this.first == null && this.last == null)
|
||||
{
|
||||
this.first = child;
|
||||
this.last = child;
|
||||
this.next = child;
|
||||
child.prev = this;
|
||||
this.total++;
|
||||
return child;
|
||||
}
|
||||
// If the list is empty
|
||||
if (this.total === 0 && this.first == null && this.last == null)
|
||||
{
|
||||
this.first = child;
|
||||
this.last = child;
|
||||
this.next = child;
|
||||
child.prev = this;
|
||||
this.total++;
|
||||
return child;
|
||||
}
|
||||
|
||||
// Get gets appended to the end of the list, regardless of anything, and it won't have any children of its own (non-nested list)
|
||||
this.last.next = child;
|
||||
// Get gets appended to the end of the list, regardless of anything, and it won't have any children of its own (non-nested list)
|
||||
this.last.next = child;
|
||||
|
||||
child.prev = this.last;
|
||||
child.prev = this.last;
|
||||
|
||||
this.last = child;
|
||||
this.last = child;
|
||||
|
||||
this.total++;
|
||||
this.total++;
|
||||
|
||||
return child;
|
||||
return child;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Removes the given element from this linked list if it exists.
|
||||
*
|
||||
* @method Phaser.LinkedList#remove
|
||||
* @param {object} child - The child to be removed from the list.
|
||||
*
|
||||
* @method Phaser.LinkedList#remove
|
||||
* @param {object} child - The child to be removed from the list.
|
||||
*/
|
||||
remove: function (child) {
|
||||
|
||||
if (child == this.first)
|
||||
{
|
||||
// It was 'first', make 'first' point to first.next
|
||||
this.first = this.first.next;
|
||||
}
|
||||
else if (child == this.last)
|
||||
{
|
||||
// It was 'last', make 'last' point to last.prev
|
||||
this.last = this.last.prev;
|
||||
}
|
||||
if (child == this.first)
|
||||
{
|
||||
// It was 'first', make 'first' point to first.next
|
||||
this.first = this.first.next;
|
||||
}
|
||||
else if (child == this.last)
|
||||
{
|
||||
// It was 'last', make 'last' point to last.prev
|
||||
this.last = this.last.prev;
|
||||
}
|
||||
|
||||
if (child.prev)
|
||||
{
|
||||
// make child.prev.next point to childs.next instead of child
|
||||
child.prev.next = child.next;
|
||||
}
|
||||
if (child.prev)
|
||||
{
|
||||
// make child.prev.next point to childs.next instead of child
|
||||
child.prev.next = child.next;
|
||||
}
|
||||
|
||||
if (child.next)
|
||||
{
|
||||
// make child.next.prev point to child.prev instead of child
|
||||
child.next.prev = child.prev;
|
||||
}
|
||||
if (child.next)
|
||||
{
|
||||
// make child.next.prev point to child.prev instead of child
|
||||
child.next.prev = child.prev;
|
||||
}
|
||||
|
||||
child.next = child.prev = null;
|
||||
child.next = child.prev = null;
|
||||
|
||||
if (this.first == null )
|
||||
{
|
||||
this.last = null;
|
||||
}
|
||||
if (this.first == null )
|
||||
{
|
||||
this.last = null;
|
||||
}
|
||||
|
||||
this.total--;
|
||||
this.total--;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Calls a function on all members of this list, using the member as the context for the callback.
|
||||
* The function must exist on the member.
|
||||
*
|
||||
* @method Phaser.LinkedList#callAll
|
||||
* @param {function} callback - The function to call.
|
||||
*
|
||||
* @method Phaser.LinkedList#callAll
|
||||
* @param {function} callback - The function to call.
|
||||
*/
|
||||
callAll: function (callback) {
|
||||
|
||||
if (!this.first || !this.last)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!this.first || !this.last)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var entity = this.first;
|
||||
|
||||
do
|
||||
{
|
||||
if (entity && entity[callback])
|
||||
{
|
||||
entity[callback].call(entity);
|
||||
}
|
||||
var entity = this.first;
|
||||
|
||||
do
|
||||
{
|
||||
if (entity && entity[callback])
|
||||
{
|
||||
entity[callback].call(entity);
|
||||
}
|
||||
|
||||
entity = entity.next;
|
||||
entity = entity.next;
|
||||
|
||||
}
|
||||
while(entity != this.last.next)
|
||||
}
|
||||
while(entity != this.last.next)
|
||||
|
||||
}
|
||||
|
||||
};</pre>
|
||||
};
|
||||
|
||||
Phaser.LinkedList.prototype.constructor = Phaser.LinkedList;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
@@ -545,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+1339
-1062
File diff suppressed because it is too large
Load Diff
+71
-19
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -389,14 +441,14 @@
|
||||
* @class Phaser.LoaderParser
|
||||
*/
|
||||
Phaser.LoaderParser = {
|
||||
|
||||
|
||||
/**
|
||||
* Parse frame data from an XML file.
|
||||
* @method Phaser.LoaderParser.bitmapFont
|
||||
* @param {object} xml - XML data you want to parse.
|
||||
* @return {FrameData} Generated FrameData object.
|
||||
*/
|
||||
bitmapFont: function (game, xml, cacheKey) {
|
||||
bitmapFont: function (game, xml, cacheKey) {
|
||||
|
||||
// Malformed?
|
||||
if (!xml.getElementsByTagName('font'))
|
||||
@@ -429,8 +481,8 @@ Phaser.LoaderParser = {
|
||||
height: parseInt(letters[i].attributes.getNamedItem("height").nodeValue, 10)
|
||||
};
|
||||
|
||||
// Note: This means you can only have 1 BitmapFont loaded at once!
|
||||
// Need to replace this with our own handler soon.
|
||||
// Note: This means you can only have 1 BitmapFont loaded at once!
|
||||
// Need to replace this with our own handler soon.
|
||||
PIXI.TextureCache[charCode] = new PIXI.Texture(texture, textureRect);
|
||||
|
||||
data.chars[charCode] = {
|
||||
@@ -448,9 +500,9 @@ Phaser.LoaderParser = {
|
||||
|
||||
for (i = 0; i < kernings.length; i++)
|
||||
{
|
||||
var first = parseInt(kernings[i].attributes.getNamedItem("first").nodeValue, 10);
|
||||
var second = parseInt(kernings[i].attributes.getNamedItem("second").nodeValue, 10);
|
||||
var amount = parseInt(kernings[i].attributes.getNamedItem("amount").nodeValue, 10);
|
||||
var first = parseInt(kernings[i].attributes.getNamedItem("first").nodeValue, 10);
|
||||
var second = parseInt(kernings[i].attributes.getNamedItem("second").nodeValue, 10);
|
||||
var amount = parseInt(kernings[i].attributes.getNamedItem("amount").nodeValue, 10);
|
||||
|
||||
data.chars[second].kerning[first] = amount;
|
||||
}
|
||||
@@ -474,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+101
-61
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -395,33 +447,15 @@
|
||||
*/
|
||||
Phaser.MSPointer = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} callbackContext - Description.
|
||||
*/
|
||||
this.callbackContext = this.game;
|
||||
|
||||
/**
|
||||
* @property {Description} mouseDownCallback - Description.
|
||||
* @default
|
||||
*/
|
||||
this.mouseDownCallback = null;
|
||||
|
||||
/**
|
||||
* @property {Description} mouseMoveCallback - Description.
|
||||
* @default
|
||||
*/
|
||||
this.mouseMoveCallback = null;
|
||||
|
||||
/**
|
||||
* @property {Description} mouseUpCallback - Description.
|
||||
* @default
|
||||
*/
|
||||
this.mouseUpCallback = null;
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Object} callbackContext - The context under which callbacks are called (defaults to game).
|
||||
*/
|
||||
this.callbackContext = this.game;
|
||||
|
||||
/**
|
||||
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||
@@ -430,26 +464,20 @@ Phaser.MSPointer = function (game) {
|
||||
this.disabled = false;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {Description} _onMSPointerDown
|
||||
* @property {function} _onMSPointerDown - Internal function to handle MSPointer events.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onMSPointerDown = null;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {Description} _onMSPointerMove
|
||||
* @property {function} _onMSPointerMove - Internal function to handle MSPointer events.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onMSPointerMove = null;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {Description} _onMSPointerUp
|
||||
* @property {function} _onMSPointerUp - Internal function to handle MSPointer events.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._onMSPointerUp = null;
|
||||
|
||||
@@ -457,7 +485,7 @@ Phaser.MSPointer = function (game) {
|
||||
|
||||
Phaser.MSPointer.prototype = {
|
||||
|
||||
/**
|
||||
/**
|
||||
* Starts the event listeners running.
|
||||
* @method Phaser.MSPointer#start
|
||||
*/
|
||||
@@ -465,7 +493,7 @@ Phaser.MSPointer.prototype = {
|
||||
|
||||
var _this = this;
|
||||
|
||||
if (this.game.device.mspointer == true)
|
||||
if (this.game.device.mspointer === true)
|
||||
{
|
||||
this._onMSPointerDown = function (event) {
|
||||
return _this.onPointerDown(event);
|
||||
@@ -483,6 +511,11 @@ Phaser.MSPointer.prototype = {
|
||||
this.game.renderer.view.addEventListener('MSPointerMove', this._onMSPointerMove, false);
|
||||
this.game.renderer.view.addEventListener('MSPointerUp', this._onMSPointerUp, false);
|
||||
|
||||
// IE11+ uses non-prefix events
|
||||
this.game.renderer.view.addEventListener('pointerDown', this._onMSPointerDown, false);
|
||||
this.game.renderer.view.addEventListener('pointerMove', this._onMSPointerMove, false);
|
||||
this.game.renderer.view.addEventListener('pointerUp', this._onMSPointerUp, false);
|
||||
|
||||
this.game.renderer.view.style['-ms-content-zooming'] = 'none';
|
||||
this.game.renderer.view.style['-ms-touch-action'] = 'none';
|
||||
|
||||
@@ -491,10 +524,10 @@ Phaser.MSPointer.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* The function that handles the PointerDown event.
|
||||
* @method Phaser.MSPointer#onPointerDown
|
||||
* @param {Any} event
|
||||
**/
|
||||
* @param {PointerEvent} event
|
||||
*/
|
||||
onPointerDown: function (event) {
|
||||
|
||||
if (this.game.input.disabled || this.disabled)
|
||||
@@ -510,10 +543,10 @@ Phaser.MSPointer.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* The function that handles the PointerMove event.
|
||||
* @method Phaser.MSPointer#onPointerMove
|
||||
* @param {Any} event
|
||||
**/
|
||||
* @param {PointerEvent } event
|
||||
*/
|
||||
onPointerMove: function (event) {
|
||||
|
||||
if (this.game.input.disabled || this.disabled)
|
||||
@@ -529,10 +562,10 @@ Phaser.MSPointer.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* The function that handles the PointerUp event.
|
||||
* @method Phaser.MSPointer#onPointerUp
|
||||
* @param {Any} event
|
||||
**/
|
||||
* @param {PointerEvent} event
|
||||
*/
|
||||
onPointerUp: function (event) {
|
||||
|
||||
if (this.game.input.disabled || this.disabled)
|
||||
@@ -547,7 +580,7 @@ Phaser.MSPointer.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Stop the event listeners.
|
||||
* @method Phaser.MSPointer#stop
|
||||
*/
|
||||
@@ -557,9 +590,16 @@ Phaser.MSPointer.prototype = {
|
||||
this.game.stage.canvas.removeEventListener('MSPointerMove', this._onMSPointerMove);
|
||||
this.game.stage.canvas.removeEventListener('MSPointerUp', this._onMSPointerUp);
|
||||
|
||||
this.game.stage.canvas.removeEventListener('pointerDown', this._onMSPointerDown);
|
||||
this.game.stage.canvas.removeEventListener('pointerMove', this._onMSPointerMove);
|
||||
this.game.stage.canvas.removeEventListener('pointerUp', this._onMSPointerUp);
|
||||
|
||||
}
|
||||
|
||||
};</pre>
|
||||
};
|
||||
|
||||
Phaser.MSPointer.prototype.constructor = Phaser.MSPointer;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
@@ -574,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+660
-459
File diff suppressed because it is too large
Load Diff
+204
-85
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,64 +431,105 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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 - Mouse constructor.
|
||||
* Phaser.Mouse is responsible for handling all aspects of mouse interaction with the browser. It captures and processes mouse events.
|
||||
*
|
||||
* @class Phaser.Mouse
|
||||
* @classdesc The Mouse class
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
Phaser.Mouse = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - Local reference to game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Object} callbackContext - Description.
|
||||
*/
|
||||
this.callbackContext = this.game;
|
||||
|
||||
/**
|
||||
* @property {Description} mouseDownCallback - Description.
|
||||
* @default
|
||||
*/
|
||||
this.mouseDownCallback = null;
|
||||
|
||||
/**
|
||||
* @property {Description} mouseMoveCallback - Description.
|
||||
* @default
|
||||
*/
|
||||
this.mouseMoveCallback = null;
|
||||
|
||||
/**
|
||||
* @property {Description} mouseUpCallback - Description.
|
||||
* @default
|
||||
*/
|
||||
this.mouseUpCallback = null;
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Object} callbackContext - The context under which callbacks are called.
|
||||
*/
|
||||
this.callbackContext = this.game;
|
||||
|
||||
/**
|
||||
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||
* @property {boolean} disabled
|
||||
* @property {function} mouseDownCallback - A callback that can be fired when the mouse is pressed down.
|
||||
*/
|
||||
this.mouseDownCallback = null;
|
||||
|
||||
/**
|
||||
* @property {function} mouseMoveCallback - A callback that can be fired when the mouse is moved while pressed down.
|
||||
*/
|
||||
this.mouseMoveCallback = null;
|
||||
|
||||
/**
|
||||
* @property {function} mouseUpCallback - A callback that can be fired when the mouse is released from a pressed down state.
|
||||
*/
|
||||
this.mouseUpCallback = null;
|
||||
|
||||
/**
|
||||
* @property {boolean} capture - If true the DOM mouse events will have event.preventDefault applied to them, if false they will propogate fully.
|
||||
*/
|
||||
this.capture = false;
|
||||
|
||||
/**
|
||||
* @property {number} button- The type of click, either: Phaser.Mouse.NO_BUTTON, Phaser.Mouse.LEFT_BUTTON, Phaser.Mouse.MIDDLE_BUTTON or Phaser.Mouse.RIGHT_BUTTON.
|
||||
* @default
|
||||
*/
|
||||
this.button = -1;
|
||||
|
||||
/**
|
||||
* @property {boolean} disabled - You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||
* @default
|
||||
*/
|
||||
this.disabled = false;
|
||||
|
||||
/**
|
||||
* If the mouse has been Pointer Locked successfully this will be set to true.
|
||||
* @property {boolean} locked
|
||||
* @property {boolean} locked - If the mouse has been Pointer Locked successfully this will be set to true.
|
||||
* @default
|
||||
*/
|
||||
this.locked = false;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Signal} pointerLock - This event is dispatched when the browser enters or leaves pointer lock state.
|
||||
* @default
|
||||
*/
|
||||
this.pointerLock = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* @property {function} _onMouseDown - Internal event handler reference.
|
||||
* @private
|
||||
*/
|
||||
this._onMouseDown = null;
|
||||
|
||||
/**
|
||||
* @property {function} _onMouseMove - Internal event handler reference.
|
||||
* @private
|
||||
*/
|
||||
this._onMouseMove = null;
|
||||
|
||||
/**
|
||||
* @property {function} _onMouseUp - Internal event handler reference.
|
||||
* @private
|
||||
*/
|
||||
this._onMouseUp = null;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @type {number}
|
||||
*/
|
||||
Phaser.Mouse.NO_BUTTON = -1;
|
||||
|
||||
/**
|
||||
* @constant
|
||||
* @type {number}
|
||||
@@ -457,7 +550,7 @@ Phaser.Mouse.RIGHT_BUTTON = 2;
|
||||
|
||||
Phaser.Mouse.prototype = {
|
||||
|
||||
/**
|
||||
/**
|
||||
* Starts the event listeners running.
|
||||
* @method Phaser.Mouse#start
|
||||
*/
|
||||
@@ -465,7 +558,7 @@ Phaser.Mouse.prototype = {
|
||||
|
||||
var _this = this;
|
||||
|
||||
if (this.game.device.android && this.game.device.chrome == false)
|
||||
if (this.game.device.android && this.game.device.chrome === false)
|
||||
{
|
||||
// Android stock browser fires mouse events even if you preventDefault on the touchStart, so ...
|
||||
return;
|
||||
@@ -483,20 +576,27 @@ Phaser.Mouse.prototype = {
|
||||
return _this.onMouseUp(event);
|
||||
};
|
||||
|
||||
this.game.renderer.view.addEventListener('mousedown', this._onMouseDown, true);
|
||||
this.game.renderer.view.addEventListener('mousemove', this._onMouseMove, true);
|
||||
this.game.renderer.view.addEventListener('mouseup', this._onMouseUp, true);
|
||||
document.addEventListener('mousedown', this._onMouseDown, true);
|
||||
document.addEventListener('mousemove', this._onMouseMove, true);
|
||||
document.addEventListener('mouseup', this._onMouseUp, true);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @method Phaser.Mouse#onMouseDown
|
||||
* @param {MouseEvent} event
|
||||
/**
|
||||
* The internal method that handles the mouse down event from the browser.
|
||||
* @method Phaser.Mouse#onMouseDown
|
||||
* @param {MouseEvent} event - The native event from the browser. This gets stored in Mouse.event.
|
||||
*/
|
||||
onMouseDown: function (event) {
|
||||
|
||||
event.preventDefault();
|
||||
this.event = event;
|
||||
|
||||
if (this.capture)
|
||||
{
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
this.button = event.which;
|
||||
|
||||
if (this.mouseDownCallback)
|
||||
{
|
||||
@@ -514,14 +614,19 @@ Phaser.Mouse.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Description
|
||||
* @method Phaser.Mouse#onMouseMove
|
||||
* @param {MouseEvent} event
|
||||
/**
|
||||
* The internal method that handles the mouse move event from the browser.
|
||||
* @method Phaser.Mouse#onMouseMove
|
||||
* @param {MouseEvent} event - The native event from the browser. This gets stored in Mouse.event.
|
||||
*/
|
||||
onMouseMove: function (event) {
|
||||
|
||||
event.preventDefault();
|
||||
this.event = event;
|
||||
|
||||
if (this.capture)
|
||||
{
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (this.mouseMoveCallback)
|
||||
{
|
||||
@@ -539,14 +644,21 @@ Phaser.Mouse.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @method Phaser.Mouse#onMouseUp
|
||||
* @param {MouseEvent} event
|
||||
/**
|
||||
* The internal method that handles the mouse up event from the browser.
|
||||
* @method Phaser.Mouse#onMouseUp
|
||||
* @param {MouseEvent} event - The native event from the browser. This gets stored in Mouse.event.
|
||||
*/
|
||||
onMouseUp: function (event) {
|
||||
|
||||
event.preventDefault();
|
||||
this.event = event;
|
||||
|
||||
if (this.capture)
|
||||
{
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
this.button = Phaser.Mouse.NO_BUTTON;
|
||||
|
||||
if (this.mouseUpCallback)
|
||||
{
|
||||
@@ -565,8 +677,10 @@ Phaser.Mouse.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @method Phaser.Mouse#requestPointerLock
|
||||
* If the browser supports it you can request that the pointer be locked to the browser window.
|
||||
* This is classically known as 'FPS controls', where the pointer can't leave the browser until the user presses an exit key.
|
||||
* If the browser successfully enters a locked state the event Phaser.Mouse.pointerLock will be dispatched and the first parameter will be 'true'.
|
||||
* @method Phaser.Mouse#requestPointerLock
|
||||
*/
|
||||
requestPointerLock: function () {
|
||||
|
||||
@@ -584,17 +698,17 @@ Phaser.Mouse.prototype = {
|
||||
return _this.pointerLockChange(event);
|
||||
};
|
||||
|
||||
document.addEventListener('pointerlockchange', this._pointerLockChange, false);
|
||||
document.addEventListener('mozpointerlockchange', this._pointerLockChange, false);
|
||||
document.addEventListener('webkitpointerlockchange', this._pointerLockChange, false);
|
||||
document.addEventListener('pointerlockchange', this._pointerLockChange, true);
|
||||
document.addEventListener('mozpointerlockchange', this._pointerLockChange, true);
|
||||
document.addEventListener('webkitpointerlockchange', this._pointerLockChange, true);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @method Phaser.Mouse#pointerLockChange
|
||||
* @param {MouseEvent} event
|
||||
/**
|
||||
* Internal pointerLockChange handler.
|
||||
* @method Phaser.Mouse#pointerLockChange
|
||||
* @param {pointerlockchange} event - The native event from the browser. This gets stored in Mouse.event.
|
||||
*/
|
||||
pointerLockChange: function (event) {
|
||||
|
||||
@@ -604,18 +718,20 @@ Phaser.Mouse.prototype = {
|
||||
{
|
||||
// Pointer was successfully locked
|
||||
this.locked = true;
|
||||
this.pointerLock.dispatch(true, event);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pointer was unlocked
|
||||
this.locked = false;
|
||||
this.pointerLock.dispatch(false, event);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @method Phaser.Mouse#releasePointerLock
|
||||
/**
|
||||
* Internal release pointer lock handler.
|
||||
* @method Phaser.Mouse#releasePointerLock
|
||||
*/
|
||||
releasePointerLock: function () {
|
||||
|
||||
@@ -623,25 +739,28 @@ Phaser.Mouse.prototype = {
|
||||
|
||||
document.exitPointerLock();
|
||||
|
||||
document.removeEventListener('pointerlockchange', this._pointerLockChange);
|
||||
document.removeEventListener('mozpointerlockchange', this._pointerLockChange);
|
||||
document.removeEventListener('webkitpointerlockchange', this._pointerLockChange);
|
||||
document.removeEventListener('pointerlockchange', this._pointerLockChange, true);
|
||||
document.removeEventListener('mozpointerlockchange', this._pointerLockChange, true);
|
||||
document.removeEventListener('webkitpointerlockchange', this._pointerLockChange, true);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* Stop the event listeners.
|
||||
* @method Phaser.Mouse#stop
|
||||
*/
|
||||
stop: function () {
|
||||
|
||||
this.game.stage.canvas.removeEventListener('mousedown', this._onMouseDown);
|
||||
this.game.stage.canvas.removeEventListener('mousemove', this._onMouseMove);
|
||||
this.game.stage.canvas.removeEventListener('mouseup', this._onMouseUp);
|
||||
document.removeEventListener('mousedown', this._onMouseDown, true);
|
||||
document.removeEventListener('mousemove', this._onMouseMove, true);
|
||||
document.removeEventListener('mouseup', this._onMouseUp, true);
|
||||
|
||||
}
|
||||
|
||||
};</pre>
|
||||
};
|
||||
|
||||
Phaser.Mouse.prototype.constructor = Phaser.Mouse;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
@@ -656,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+190
-140
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,172 +431,170 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Description of Phaser.Net
|
||||
* Phaser.Net handles browser URL related tasks such as checking host names, domain names and query string manipulation.
|
||||
*
|
||||
* @class Phaser.Net
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
*/
|
||||
Phaser.Net = function (game) {
|
||||
|
||||
this.game = game;
|
||||
|
||||
this.game = game;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Net.prototype = {
|
||||
|
||||
/**
|
||||
* Returns the hostname given by the browser.
|
||||
*
|
||||
* @method Phaser.Net#getHostName
|
||||
* @return {string}
|
||||
*/
|
||||
getHostName: function () {
|
||||
/**
|
||||
* Returns the hostname given by the browser.
|
||||
*
|
||||
* @method Phaser.Net#getHostName
|
||||
* @return {string}
|
||||
*/
|
||||
getHostName: function () {
|
||||
|
||||
if (window.location && window.location.hostname) {
|
||||
return window.location.hostname;
|
||||
}
|
||||
if (window.location && window.location.hostname) {
|
||||
return window.location.hostname;
|
||||
}
|
||||
|
||||
return null;
|
||||
return null;
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Compares the given domain name against the hostname of the browser containing the game.
|
||||
* If the domain name is found it returns true.
|
||||
* You can specify a part of a domain, for example 'google' would match 'google.com', 'google.co.uk', etc.
|
||||
* Do not include 'http://' at the start.
|
||||
*
|
||||
* @method Phaser.Net#checkDomainName
|
||||
* @param {string} domain
|
||||
* @return {boolean}
|
||||
*/
|
||||
checkDomainName: function (domain) {
|
||||
return window.location.hostname.indexOf(domain) !== -1;
|
||||
},
|
||||
/**
|
||||
* Compares the given domain name against the hostname of the browser containing the game.
|
||||
* If the domain name is found it returns true.
|
||||
* You can specify a part of a domain, for example 'google' would match 'google.com', 'google.co.uk', etc.
|
||||
* Do not include 'http://' at the start.
|
||||
*
|
||||
* @method Phaser.Net#checkDomainName
|
||||
* @param {string} domain
|
||||
* @return {boolean} true if the given domain fragment can be found in the window.location.hostname
|
||||
*/
|
||||
checkDomainName: function (domain) {
|
||||
return window.location.hostname.indexOf(domain) !== -1;
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates a value on the Query String and returns it in full.
|
||||
* If the value doesn't already exist it is set.
|
||||
* If the value exists it is replaced with the new value given. If you don't provide a new value it is removed from the query string.
|
||||
* Optionally you can redirect to the new url, or just return it as a string.
|
||||
*
|
||||
* @method Phaser.Net#updateQueryString
|
||||
* @param {string} key - The querystring key to update.
|
||||
* @param {string} value - The new value to be set. If it already exists it will be replaced.
|
||||
* @param {boolean} redirect - If true the browser will issue a redirect to the url with the new querystring.
|
||||
* @param {string} url - The URL to modify. If none is given it uses window.location.href.
|
||||
* @return {string} If redirect is false then the modified url and query string is returned.
|
||||
*/
|
||||
updateQueryString: function (key, value, redirect, url) {
|
||||
/**
|
||||
* Updates a value on the Query String and returns it in full.
|
||||
* If the value doesn't already exist it is set.
|
||||
* If the value exists it is replaced with the new value given. If you don't provide a new value it is removed from the query string.
|
||||
* Optionally you can redirect to the new url, or just return it as a string.
|
||||
*
|
||||
* @method Phaser.Net#updateQueryString
|
||||
* @param {string} key - The querystring key to update.
|
||||
* @param {string} value - The new value to be set. If it already exists it will be replaced.
|
||||
* @param {boolean} redirect - If true the browser will issue a redirect to the url with the new querystring.
|
||||
* @param {string} url - The URL to modify. If none is given it uses window.location.href.
|
||||
* @return {string} If redirect is false then the modified url and query string is returned.
|
||||
*/
|
||||
updateQueryString: function (key, value, redirect, url) {
|
||||
|
||||
if (typeof redirect === "undefined") { redirect = false; }
|
||||
if (typeof url === "undefined") { url = ''; }
|
||||
if (typeof redirect === "undefined") { redirect = false; }
|
||||
if (typeof url === "undefined" || url === '') { url = window.location.href; }
|
||||
|
||||
if (url == '') {
|
||||
url = window.location.href;
|
||||
}
|
||||
var output = '';
|
||||
var re = new RegExp("([?|&])" + key + "=.*?(&|#|$)(.*)", "gi");
|
||||
|
||||
if (re.test(url))
|
||||
{
|
||||
if (typeof value !== 'undefined' && value !== null)
|
||||
{
|
||||
output = url.replace(re, '$1' + key + "=" + value + '$2$3');
|
||||
}
|
||||
else
|
||||
{
|
||||
output = url.replace(re, '$1$3').replace(/(&|\?)$/, '');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (typeof value !== 'undefined' && value !== null)
|
||||
{
|
||||
var separator = url.indexOf('?') !== -1 ? '&' : '?';
|
||||
var hash = url.split('#');
|
||||
url = hash[0] + separator + key + '=' + value;
|
||||
|
||||
var output = '';
|
||||
var re = new RegExp("([?|&])" + key + "=.*?(&|#|$)(.*)", "gi");
|
||||
|
||||
if (re.test(url))
|
||||
{
|
||||
if (typeof value !== 'undefined' && value !== null)
|
||||
{
|
||||
output = url.replace(re, '$1' + key + "=" + value + '$2$3');
|
||||
}
|
||||
else
|
||||
{
|
||||
output = url.replace(re, '$1$3').replace(/(&|\?)$/, '');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (typeof value !== 'undefined' && value !== null)
|
||||
{
|
||||
var separator = url.indexOf('?') !== -1 ? '&' : '?';
|
||||
var hash = url.split('#');
|
||||
url = hash[0] + separator + key + '=' + value;
|
||||
if (hash[1]) {
|
||||
url += '#' + hash[1];
|
||||
}
|
||||
|
||||
if (hash[1]) {
|
||||
url += '#' + hash[1];
|
||||
}
|
||||
output = url;
|
||||
|
||||
output = url;
|
||||
}
|
||||
else
|
||||
{
|
||||
output = url;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
output = url;
|
||||
}
|
||||
}
|
||||
if (redirect)
|
||||
{
|
||||
window.location.href = output;
|
||||
}
|
||||
else
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
if (redirect)
|
||||
{
|
||||
window.location.href = output;
|
||||
}
|
||||
else
|
||||
{
|
||||
return output;
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* Returns the Query String as an object.
|
||||
* If you specify a parameter it will return just the value of that parameter, should it exist.
|
||||
*
|
||||
* @method Phaser.Net#getQueryString
|
||||
* @param {string} [parameter=''] - If specified this will return just the value for that key.
|
||||
* @return {string|object} An object containing the key value pairs found in the query string or just the value if a parameter was given.
|
||||
*/
|
||||
getQueryString: function (parameter) {
|
||||
|
||||
/**
|
||||
* Returns the Query String as an object.
|
||||
* If you specify a parameter it will return just the value of that parameter, should it exist.
|
||||
*
|
||||
* @method Phaser.Net#getQueryString
|
||||
* @param {string} [parameter=''] - If specified this will return just the value for that key.
|
||||
* @return {string|object} An object containing the key value pairs found in the query string or just the value if a parameter was given.
|
||||
*/
|
||||
getQueryString: function (parameter) {
|
||||
if (typeof parameter === "undefined") { parameter = ''; }
|
||||
|
||||
if (typeof parameter === "undefined") { parameter = ''; }
|
||||
var output = {};
|
||||
var keyValues = location.search.substring(1).split('&');
|
||||
|
||||
var output = {};
|
||||
var keyValues = location.search.substring(1).split('&');
|
||||
for (var i in keyValues)
|
||||
{
|
||||
var key = keyValues[i].split('=');
|
||||
|
||||
for (var i in keyValues) {
|
||||
if (key.length > 1)
|
||||
{
|
||||
if (parameter && parameter == this.decodeURI(key[0]))
|
||||
{
|
||||
return this.decodeURI(key[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
output[this.decodeURI(key[0])] = this.decodeURI(key[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var key = keyValues[i].split('=');
|
||||
return output;
|
||||
|
||||
if (key.length > 1)
|
||||
{
|
||||
if (parameter && parameter == this.decodeURI(key[0]))
|
||||
{
|
||||
return this.decodeURI(key[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
output[this.decodeURI(key[0])] = this.decodeURI(key[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
return output;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the Query String as an object.
|
||||
* If you specify a parameter it will return just the value of that parameter, should it exist.
|
||||
*
|
||||
* @method Phaser.Net#decodeURI
|
||||
* @param {string} value - The URI component to be decoded.
|
||||
* @return {string} The decoded value.
|
||||
*/
|
||||
decodeURI: function (value) {
|
||||
return decodeURIComponent(value.replace(/\+/g, " "));
|
||||
}
|
||||
/**
|
||||
* Returns the Query String as an object.
|
||||
* If you specify a parameter it will return just the value of that parameter, should it exist.
|
||||
*
|
||||
* @method Phaser.Net#decodeURI
|
||||
* @param {string} value - The URI component to be decoded.
|
||||
* @return {string} The decoded value.
|
||||
*/
|
||||
decodeURI: function (value) {
|
||||
return decodeURIComponent(value.replace(/\+/g, " "));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Net.prototype.constructor = Phaser.Net;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -560,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 Fri Nov 01 2013 18:16:08 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
-54
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -379,7 +431,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <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}
|
||||
*/
|
||||
|
||||
@@ -393,64 +445,72 @@
|
||||
*/
|
||||
Phaser.Particles = function (game) {
|
||||
|
||||
/**
|
||||
* @property {Description} emitters - Description.
|
||||
*/
|
||||
this.emitters = {};
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {number} ID - Description.
|
||||
* @default
|
||||
*/
|
||||
this.ID = 0;
|
||||
/**
|
||||
* @property {object} emitters - Internal emitters store.
|
||||
*/
|
||||
this.emitters = {};
|
||||
|
||||
/**
|
||||
* @property {number} ID -
|
||||
* @default
|
||||
*/
|
||||
this.ID = 0;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Particles.prototype = {
|
||||
|
||||
/**
|
||||
* Adds a new Particle Emitter to the Particle Manager.
|
||||
* @method Phaser.Particles#add
|
||||
* @param {Phaser.Emitter} emitter - Description.
|
||||
* @return {Phaser.Emitter} The emitter that was added.
|
||||
*/
|
||||
add: function (emitter) {
|
||||
/**
|
||||
* Adds a new Particle Emitter to the Particle Manager.
|
||||
* @method Phaser.Particles#add
|
||||
* @param {Phaser.Emitter} emitter - The emitter to be added to the particle manager.
|
||||
* @return {Phaser.Emitter} The emitter that was added.
|
||||
*/
|
||||
add: function (emitter) {
|
||||
|
||||
this.emitters[emitter.name] = emitter;
|
||||
this.emitters[emitter.name] = emitter;
|
||||
|
||||
return emitter;
|
||||
return emitter;
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes an existing Particle Emitter from the Particle Manager.
|
||||
* @method Phaser.Particles#remove
|
||||
* @param {Phaser.Emitter} emitter - The emitter to remove.
|
||||
*/
|
||||
remove: function (emitter) {
|
||||
/**
|
||||
* Removes an existing Particle Emitter from the Particle Manager.
|
||||
* @method Phaser.Particles#remove
|
||||
* @param {Phaser.Emitter} emitter - The emitter to remove.
|
||||
*/
|
||||
remove: function (emitter) {
|
||||
|
||||
delete this.emitters[emitter.name];
|
||||
delete this.emitters[emitter.name];
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Called by the core game loop. Updates all Emitters who have their exists value set to true.
|
||||
* @method Phaser.Particles#update
|
||||
* @protected
|
||||
*/
|
||||
update: function () {
|
||||
/**
|
||||
* Called by the core game loop. Updates all Emitters who have their exists value set to true.
|
||||
* @method Phaser.Particles#update
|
||||
* @protected
|
||||
*/
|
||||
update: function () {
|
||||
|
||||
for (var key in this.emitters)
|
||||
{
|
||||
if (this.emitters[key].exists)
|
||||
{
|
||||
this.emitters[key].update();
|
||||
}
|
||||
}
|
||||
for (var key in this.emitters)
|
||||
{
|
||||
if (this.emitters[key].exists)
|
||||
{
|
||||
this.emitters[key].update();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};</pre>
|
||||
};
|
||||
|
||||
Phaser.Particles.prototype.constructor = Phaser.Particles;
|
||||
</pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
@@ -465,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 Fri Nov 01 2013 18:16:08 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>
|
||||
|
||||
+85
-30
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -535,10 +587,10 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Array.<number></span>
|
||||
<span class="param-type"><a href="Array.html">Array</a>.<number></span>
|
||||
|
|
||||
|
||||
<span class="param-type">Array.<string></span>
|
||||
<span class="param-type"><a href="Array.html">Array</a>.<string></span>
|
||||
|
||||
|
||||
|
||||
@@ -754,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>
|
||||
|
||||
|
||||
@@ -958,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-373">line 373</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>
|
||||
|
||||
|
||||
@@ -1060,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-360">line 360</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>
|
||||
|
||||
|
||||
@@ -1267,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>
|
||||
|
||||
|
||||
@@ -1372,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>
|
||||
|
||||
|
||||
@@ -1477,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>
|
||||
|
||||
|
||||
@@ -1534,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">
|
||||
@@ -1550,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>
|
||||
|
||||
|
||||
@@ -1575,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>
|
||||
|
||||
|
||||
@@ -1885,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-326">line 326</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>
|
||||
|
||||
|
||||
@@ -2165,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-406">line 406</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>
|
||||
|
||||
|
||||
@@ -2234,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-283">line 283</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>
|
||||
|
||||
|
||||
@@ -2303,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-300">line 300</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>
|
||||
|
||||
|
||||
@@ -2519,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>
|
||||
|
||||
|
||||
@@ -2613,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>
|
||||
|
||||
|
||||
@@ -2751,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>
|
||||
|
||||
|
||||
@@ -2820,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>
|
||||
|
||||
|
||||
@@ -2865,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 Fri Nov 01 2013 18:16:09 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -718,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-347">line 347</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>
|
||||
|
||||
|
||||
@@ -820,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-293">line 293</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>
|
||||
|
||||
|
||||
@@ -922,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-376">line 376</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>
|
||||
|
||||
|
||||
@@ -1024,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-306">line 306</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>
|
||||
|
||||
|
||||
@@ -1333,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-327">line 327</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>
|
||||
|
||||
|
||||
@@ -1652,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>
|
||||
|
||||
|
||||
|
||||
@@ -1919,7 +1971,7 @@ Animations added in this way are played back with the play function.</p>
|
||||
|
||||
<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-276">line 276</a>
|
||||
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-297">line 297</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1942,6 +1994,147 @@ Animations added in this way are played back with the play function.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="getAnimation"><span class="type-signature"></span>getAnimation<span class="signature">(name)</span><span class="type-signature"> → {<a href="Phaser.Animation.html">Phaser.Animation</a>}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Returns an animation that was previously added by name.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>name</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The name of the animation to be returned, e.g. "fire".</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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-264">line 264</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
<p>The Animation instance, if found, otherwise null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="Phaser.Animation.html">Phaser.Animation</a></span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@@ -2263,7 +2456,7 @@ If the requested animation is already playing this request will be ignored. If y
|
||||
|
||||
<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-264">line 264</a>
|
||||
<a href="AnimationManager.js.html">animation/AnimationManager.js</a>, <a href="AnimationManager.js.html#sunlight-1-line-285">line 285</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2613,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>
|
||||
|
||||
|
||||
|
||||
@@ -2774,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 Fri Nov 01 2013 18:16:09 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -615,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>
|
||||
|
||||
|
||||
@@ -802,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>
|
||||
|
||||
|
||||
@@ -853,7 +905,7 @@
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="spriteSheet"><span class="type-signature"><static> </span>spriteSheet<span class="signature">(game, key, frameWidth, frameHeight, <span class="optional">frameMax</span>)</span><span class="type-signature"> → {<a href="Phaser.FrameData.html">Phaser.FrameData</a>}</span></h4>
|
||||
<h4 class="name" id="spriteSheet"><span class="type-signature"><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"> → {<a href="Phaser.FrameData.html">Phaser.FrameData</a>}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -1075,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">
|
||||
|
||||
<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">
|
||||
|
||||
<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>
|
||||
|
||||
@@ -1290,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>
|
||||
|
||||
|
||||
@@ -1358,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 Fri Nov 01 2013 18:16:09 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>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+477
-36
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -383,7 +435,9 @@
|
||||
BitmapText
|
||||
</h2>
|
||||
|
||||
<div class="class-description"><p>Phaser.BitmapText</p></div>
|
||||
<div class="class-description"><p>BitmapText objects work by taking a texture file and an XML file that describes the font layout.</p>
|
||||
<p>On Windows you can use the free app BMFont: <a href="http://www.angelcode.com/products/bmfont/">http://www.angelcode.com/products/bmfont/</a></p>
|
||||
<p>On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphdesigner">http://www.71squared.com/en/glyphdesigner</a></p></div>
|
||||
|
||||
</header>
|
||||
|
||||
@@ -402,9 +456,7 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Creates a new <code>BitmapText</code> object. BitmapText work by taking a texture file and an XML file that describes the font layout.
|
||||
On Windows you can use the free app BMFont: <a href="http://www.angelcode.com/products/bmfont/">http://www.angelcode.com/products/bmfont/</a>
|
||||
On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphdesigner">http://www.71squared.com/en/glyphdesigner</a></p>
|
||||
<p>Creates a new BitmapText object.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -578,7 +630,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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-20">line 20</a>
|
||||
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-25">line 25</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -709,7 +761,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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-38">line 38</a>
|
||||
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -733,6 +785,13 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<div class="description">
|
||||
<p>The anchor sets the origin point of the texture.
|
||||
The default is 0,0 this means the textures origin is the top left
|
||||
Setting than anchor to 0.5,0.5 means the textures origin is centered
|
||||
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -782,7 +841,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The anchor around which rotation and scaling takes place.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -811,7 +870,115 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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-78">line 78</a>
|
||||
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-86">line 86</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="angle"><span class="type-signature"></span>angle<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates the rotation of the BitmapText, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
|
||||
Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
|
||||
If you wish to work in radians instead of degrees use the property Sprite.rotation instead.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>angle</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Gets or sets the angle of rotation in degrees.</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-182">line 182</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -916,7 +1083,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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-32">line 32</a>
|
||||
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-41">line 41</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1018,7 +1185,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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-55">line 55</a>
|
||||
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-35">line 35</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1081,7 +1248,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Description</span>
|
||||
<span class="param-type"><a href="Phaser.Group.html">Phaser.Group</a></span>
|
||||
|
||||
|
||||
|
||||
@@ -1091,7 +1258,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The parent Group of this BitmapText.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1116,14 +1283,11 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
|
||||
|
||||
<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="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-44">line 44</a>
|
||||
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-52">line 52</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1196,7 +1360,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The user defined name given to this BitmapText.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1225,7 +1389,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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-50">line 50</a>
|
||||
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-58">line 58</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1298,7 +1462,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The scale of the object when rendered. By default it's set to 1 (no scale). You can modify it via scale.x or scale.y or scale.setTo(x, y). A value of 1 means no change to the scale, 0.5 means "half the size", 2 means "twice the size", etc.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1327,7 +1491,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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-83">line 83</a>
|
||||
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-91">line 91</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1345,7 +1509,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="type"><span class="type-signature"><readonly> </span>type<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -1390,7 +1554,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Description</span>
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
@@ -1400,7 +1564,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The const type of this object.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1429,7 +1593,219 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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-62">line 62</a>
|
||||
<a href="BitmapText.js.html">gameobjects/BitmapText.js</a>, <a href="BitmapText.js.html#sunlight-1-line-64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="x"><span class="type-signature"></span>x<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<div class="description">
|
||||
<p>The x coordinate of this object in world space.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>x</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The x coordinate of this object in world space.</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-201">line 201</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="y"><span class="type-signature"></span>y<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<div class="description">
|
||||
<p>The y coordinate of this object in world space.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>y</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The y coordinate of this object in world space.</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-218">line 218</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1452,6 +1828,71 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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>
|
||||
|
||||
@@ -1494,7 +1935,7 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
<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-120">line 120</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>
|
||||
|
||||
|
||||
@@ -1539,13 +1980,13 @@ On OS X we recommend Glyph Designer: <a href="http://www.71squared.com/en/glyphd
|
||||
|
||||
|
||||
<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 Fri Nov 01 2013 18:16:09 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>
|
||||
|
||||
+661
-106
File diff suppressed because it is too large
Load Diff
+968
-772
File diff suppressed because it is too large
Load Diff
+250
-27
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -686,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>
|
||||
|
||||
|
||||
@@ -746,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>
|
||||
|
||||
|
||||
@@ -806,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>
|
||||
|
||||
|
||||
@@ -866,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>
|
||||
|
||||
|
||||
@@ -1187,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>
|
||||
|
||||
|
||||
@@ -1386,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-385">line 385</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>
|
||||
|
||||
|
||||
@@ -1726,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>
|
||||
|
||||
|
||||
@@ -2018,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-368">line 368</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>
|
||||
|
||||
|
||||
@@ -2226,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-322">line 322</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>
|
||||
|
||||
|
||||
@@ -2332,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-345">line 345</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>
|
||||
|
||||
|
||||
@@ -2397,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-248">line 248</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>
|
||||
|
||||
|
||||
@@ -2515,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-159">line 159</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>
|
||||
|
||||
|
||||
@@ -2656,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-170">line 170</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>
|
||||
|
||||
|
||||
@@ -2817,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>
|
||||
|
||||
|
||||
@@ -2959,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-286">line 286</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>
|
||||
|
||||
|
||||
@@ -3100,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-306">line 306</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>
|
||||
|
||||
|
||||
@@ -3169,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-182">line 182</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>
|
||||
|
||||
|
||||
@@ -3214,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 Fri Nov 01 2013 18:16:09 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>
|
||||
|
||||
+203
-29
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -400,7 +452,7 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>The Canvas class handles everything related to the <canvas> 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>
|
||||
|
||||
|
||||
@@ -479,7 +531,7 @@
|
||||
<dl>
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="addToDOM"><span class="type-signature"><static> </span>addToDOM<span class="signature">(canvas, parent, overflowHidden)</span><span class="type-signature"> → {HTMLCanvasElement}</span></h4>
|
||||
<h4 class="name" id="addToDOM"><span class="type-signature"><static> </span>addToDOM<span class="signature">(canvas, parent, <span class="optional">overflowHidden</span>)</span><span class="type-signature"> → {HTMLCanvasElement}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -510,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>
|
||||
@@ -535,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>
|
||||
@@ -552,16 +620,31 @@ If no parent is given it will be added as a child of the document.body.</p>
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">HTMLElement</span>
|
||||
|
||||
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
@@ -581,7 +664,23 @@ If no parent is given it will be added as a child of the document.body.</p>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<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>
|
||||
@@ -616,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>
|
||||
|
||||
|
||||
@@ -667,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"><static> </span>create<span class="signature">(width, height)</span><span class="type-signature"> → {HTMLCanvasElement}</span></h4>
|
||||
<h4 class="name" id="create"><span class="type-signature"><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"> → {HTMLCanvasElement}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -675,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 <canvas> tag</p>
|
||||
<p>Creates a <code>canvas</code> DOM element. The element is not automatically added to the document.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -697,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>
|
||||
@@ -722,10 +825,26 @@ If no parent is given it will be added as a child of the document.body.</p>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -745,10 +864,65 @@ If no parent is given it will be added as a child of the document.body.</p>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<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">
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -805,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 <canvas> tag.</p>
|
||||
<p>The newly created canvas element.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -921,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>
|
||||
|
||||
|
||||
@@ -1105,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>
|
||||
|
||||
|
||||
@@ -1291,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>
|
||||
|
||||
|
||||
@@ -1433,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-239">line 239</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>
|
||||
|
||||
|
||||
@@ -1575,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-220">line 220</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>
|
||||
|
||||
|
||||
@@ -1743,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-196">line 196</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>
|
||||
|
||||
|
||||
@@ -1927,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>
|
||||
|
||||
|
||||
@@ -2206,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-175">line 175</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>
|
||||
|
||||
|
||||
@@ -2390,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>
|
||||
|
||||
|
||||
@@ -2458,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 Fri Nov 01 2013 18:16:09 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>
|
||||
|
||||
+96
-24
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -428,6 +480,8 @@
|
||||
|
||||
|
||||
|
||||
<th>Default</th>
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
@@ -463,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>
|
||||
@@ -496,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>
|
||||
@@ -529,6 +595,12 @@
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
0
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last"><p>The diameter of the circle.</p></td>
|
||||
</tr>
|
||||
@@ -717,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>
|
||||
|
||||
|
||||
@@ -823,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>
|
||||
|
||||
|
||||
@@ -929,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>
|
||||
|
||||
|
||||
@@ -1036,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>
|
||||
|
||||
|
||||
@@ -1090,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>
|
||||
|
||||
|
||||
@@ -1196,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>
|
||||
|
||||
|
||||
@@ -1302,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>
|
||||
|
||||
|
||||
@@ -1408,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>
|
||||
|
||||
|
||||
@@ -1831,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-410">line 410</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>
|
||||
|
||||
|
||||
@@ -2018,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-363">line 363</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>
|
||||
|
||||
|
||||
@@ -2182,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-387">line 387</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>
|
||||
|
||||
|
||||
@@ -2347,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-398">line 398</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>
|
||||
|
||||
|
||||
@@ -2511,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-435">line 435</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>
|
||||
|
||||
|
||||
@@ -4238,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 Fri Nov 01 2013 18:16:10 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>
|
||||
|
||||
+107
-55
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-120">line 120</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-127">line 127</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-277">line 277</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-291">line 291</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-288">line 288</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-303">line 303</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -992,7 +1044,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-321">line 321</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-339">line 339</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1179,7 +1231,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-28">line 28</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-29">line 29</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1531,7 +1583,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-64">line 64</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-68">line 68</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1672,7 +1724,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-310">line 310</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-327">line 327</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1731,9 +1783,9 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Returns a random color value between black and white</p>
|
||||
<p><p>Set the min value to start each channel from the given offset.</p>
|
||||
<p>Set the max value to restrict the maximum color used per channel</p></p>
|
||||
<p>Returns a random color value between black and white
|
||||
Set the min value to start each channel from the given offset.
|
||||
Set the max value to restrict the maximum color used per channel.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1861,7 +1913,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-206">line 206</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-217">line 217</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2002,7 +2054,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-299">line 299</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-315">line 315</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2062,7 +2114,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<div class="description">
|
||||
<p>Return the component parts of a color as an Object with the properties alpha, red, green, blue</p>
|
||||
<p><p>Alpha will only be set if it exist in the given color (0xAARRGGBB)</p></p>
|
||||
<p>Alpha will only be set if it exist in the given color (0xAARRGGBB)</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2144,7 +2196,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-240">line 240</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-252">line 252</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2285,7 +2337,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-260">line 260</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-273">line 273</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2336,7 +2388,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="hexToRGB"><span class="type-signature"><static> </span>hexToRGB<span class="signature">(h)</span><span class="type-signature"> → {object}</span></h4>
|
||||
<h4 class="name" id="hexToRGB"><span class="type-signature"><static> </span>hexToRGB<span class="signature">(h)</span><span class="type-signature"> → {number}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -2344,7 +2396,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Converts the given hex string into an object containing the RGB values.</p>
|
||||
<p>Converts the given hex string into an integer color value.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2426,7 +2478,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-41">line 41</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-43">line 43</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2451,7 +2503,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
<p>An object with 3 properties: r,g and b.</p>
|
||||
<p>The rgb color value.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2462,7 +2514,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">object</span>
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -2535,7 +2587,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The first color value.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2558,7 +2610,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The second color value.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2581,7 +2633,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The number of steps to run the interpolation over.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2604,7 +2656,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2627,7 +2679,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The alpha of the returned color.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2659,7 +2711,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-137">line 137</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-145">line 145</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2768,7 +2820,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The first color value.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2791,7 +2843,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The red color value, between 0 and 0xFF (255).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2814,7 +2866,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The green color value, between 0 and 0xFF (255).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2837,7 +2889,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The blue color value, between 0 and 0xFF (255).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2860,7 +2912,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The number of steps to run the interpolation over.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2883,7 +2935,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2915,7 +2967,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-161">line 161</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-170">line 170</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3024,7 +3076,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The red color value, between 0 and 0xFF (255).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -3047,7 +3099,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The green color value, between 0 and 0xFF (255).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -3070,7 +3122,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The blue color value, between 0 and 0xFF (255).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -3093,7 +3145,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The red color value, between 0 and 0xFF (255).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -3116,7 +3168,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The green color value, between 0 and 0xFF (255).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -3139,7 +3191,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The blue color value, between 0 and 0xFF (255).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -3162,7 +3214,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The number of steps to run the interpolation over.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -3185,7 +3237,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -3217,7 +3269,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-183">line 183</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-193">line 193</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3358,7 +3410,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-90">line 90</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-95">line 95</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3499,7 +3551,7 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-105">line 105</a>
|
||||
<a href="Color.js.html">utils/Color.js</a>, <a href="Color.js.html#sunlight-1-line-111">line 111</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3567,13 +3619,13 @@ RGB format information and HSL information. Each section starts on a newline, 3
|
||||
|
||||
|
||||
<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 Fri Nov 01 2013 18:16:10 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
+1162
-60
File diff suppressed because it is too large
Load Diff
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-444">line 444</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-446">line 446</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-451">line 451</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-453">line 453</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-479">line 479</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-481">line 481</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-465">line 465</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-467">line 467</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:10 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-496">line 496</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-498">line 498</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-503">line 503</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-505">line 505</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-545">line 545</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-547">line 547</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-516">line 516</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-518">line 518</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:10 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-331">line 331</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-333">line 333</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-338">line 338</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-340">line 340</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-364">line 364</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-366">line 366</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-351">line 351</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-353">line 353</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:10 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-85">line 85</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-87">line 87</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-92">line 92</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-94">line 94</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-118">line 118</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-120">line 120</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-105">line 105</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-107">line 107</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:10 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-380">line 380</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-382">line 382</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-387">line 387</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-389">line 389</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-423">line 423</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-425">line 425</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-405">line 405</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-407">line 407</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:10 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-280">line 280</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-282">line 282</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-287">line 287</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-289">line 289</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-313">line 313</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-315">line 315</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-300">line 300</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-302">line 302</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:10 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-14">line 14</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-16">line 16</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-21">line 21</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-23">line 23</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -637,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 Fri Nov 01 2013 18:16:11 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-36">line 36</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-38">line 38</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-43">line 43</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-45">line 45</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-69">line 69</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-71">line 71</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-56">line 56</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-58">line 58</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:11 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-134">line 134</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-136">line 136</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-141">line 141</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-143">line 143</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-167">line 167</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-169">line 169</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-154">line 154</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-156">line 156</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:11 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-183">line 183</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-185">line 185</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-190">line 190</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-192">line 192</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-216">line 216</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-218">line 218</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-203">line 203</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-205">line 205</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:11 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>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-232">line 232</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-234">line 234</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -569,7 +621,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-239">line 239</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-241">line 241</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -710,7 +762,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-265">line 265</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-267">line 267</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -851,7 +903,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-252">line 252</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-254">line 254</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -919,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 Fri Nov 01 2013 18:16:11 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>
|
||||
|
||||
+64
-12
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -433,7 +485,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-3">line 3</a>
|
||||
<a href="Easing.js.html">tween/Easing.js</a>, <a href="Easing.js.html#sunlight-1-line-5">line 5</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -529,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 Fri Nov 01 2013 18:16:10 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>
|
||||
|
||||
+69
-17
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -383,7 +435,11 @@
|
||||
Events
|
||||
</h2>
|
||||
|
||||
<div class="class-description"><p>Phaser.Events</p></div>
|
||||
<div class="class-description"><p>The Events component is a collection of events fired by the parent game object.</p>
|
||||
<p>For example to tell when a Sprite has been added to a new group:</p>
|
||||
<p><code>sprite.events.onAddedToGroup.add(yourFunction, this);</code></p>
|
||||
<p>Where <code>yourFunction</code> is the function you want called when this event occurs.</p>
|
||||
<p>Note that the Input related events only exist if the Sprite has had <code>inputEnabled</code> set to <code>true</code>.</p></div>
|
||||
|
||||
</header>
|
||||
|
||||
@@ -401,10 +457,6 @@
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>The Events component is a collection of events fired by the parent game object and its components.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -484,7 +536,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Events.js.html">gameobjects/Events.js</a>, <a href="Events.js.html#sunlight-1-line-16">line 16</a>
|
||||
<a href="Events.js.html">gameobjects/Events.js</a>, <a href="Events.js.html#sunlight-1-line-24">line 24</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -543,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 Fri Nov 01 2013 18:16:11 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>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+63
-11
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2904,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 Fri Nov 01 2013 18:16:11 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>
|
||||
|
||||
+75
-23
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -563,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>
|
||||
|
||||
|
||||
@@ -1151,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"> → {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"> → {<a href="Array.html">Array</a>}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -1204,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>
|
||||
|
||||
|
||||
|
||||
@@ -1278,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>
|
||||
|
||||
|
||||
|
||||
@@ -1370,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>
|
||||
@@ -1385,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"> → {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"> → {<a href="Array.html">Array</a>}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -1497,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>
|
||||
|
||||
|
||||
|
||||
@@ -1585,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>
|
||||
@@ -1600,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"> → {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"> → {<a href="Array.html">Array</a>}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -1653,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>
|
||||
|
||||
|
||||
|
||||
@@ -1727,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>
|
||||
|
||||
|
||||
|
||||
@@ -1819,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>
|
||||
@@ -1851,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 Fri Nov 01 2013 18:16:11 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>
|
||||
|
||||
+885
-57
File diff suppressed because it is too large
Load Diff
+1235
-446
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
+139
-14
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -402,7 +454,7 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Creates a new <code>Graphics</code> object.</p>
|
||||
<p>Creates a new <code>Graphics</code> object.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -619,7 +671,7 @@
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Description</span>
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
@@ -629,7 +681,7 @@
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The Phaser Object Type.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -677,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>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -695,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 Fri Nov 01 2013 18:16:12 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>
|
||||
|
||||
+1915
-212
File diff suppressed because it is too large
Load Diff
+490
-98
File diff suppressed because it is too large
Load Diff
+1012
-792
File diff suppressed because it is too large
Load Diff
+64
-12
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2072,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"> → {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"> → {boolean}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -2486,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 Fri Nov 01 2013 18:16:12 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>
|
||||
|
||||
+92
-40
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -383,7 +435,7 @@
|
||||
Keyboard
|
||||
</h2>
|
||||
|
||||
<div class="class-description"><p>A Keyboard object Description.</p></div>
|
||||
<div class="class-description"><p>Phaser.Keyboard</p></div>
|
||||
|
||||
</header>
|
||||
|
||||
@@ -402,7 +454,7 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Phaser - Keyboard constructor.</p>
|
||||
<p>The Keyboard class handles looking after keyboard input for your game. It will recognise and respond to key presses and dispatch the required events.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -484,7 +536,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-15">line 15</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-14">line 14</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -612,7 +664,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-64">line 64</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-63">line 63</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -721,7 +773,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-45">line 45</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-44">line 44</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -823,7 +875,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-20">line 20</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-19">line 19</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -925,7 +977,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-69">line 69</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-68">line 68</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1027,7 +1079,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-74">line 74</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-73">line 73</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1231,7 +1283,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-80">line 80</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-79">line 79</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1318,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>
|
||||
|
||||
|
||||
@@ -1350,7 +1402,7 @@ The Key object can then be polled, have events attached to it, etc.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-99">line 99</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-98">line 98</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1494,7 +1546,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-181">line 181</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-180">line 180</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1563,7 +1615,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-215">line 215</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-214">line 214</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1632,7 +1684,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-129">line 129</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-128">line 128</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1741,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>
|
||||
|
||||
|
||||
@@ -1773,7 +1825,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-380">line 380</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-379">line 379</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1898,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>
|
||||
|
||||
|
||||
@@ -1969,7 +2021,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-340">line 340</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-339">line 339</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2020,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"> → {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"> → {boolean}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -2094,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>
|
||||
|
||||
|
||||
@@ -2165,7 +2217,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-360">line 360</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-359">line 359</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2306,7 +2358,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-225">line 225</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-224">line 224</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2424,7 +2476,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-281">line 281</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-280">line 280</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2510,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>
|
||||
|
||||
|
||||
@@ -2542,7 +2594,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-117">line 117</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-116">line 116</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2660,7 +2712,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-204">line 204</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-203">line 203</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2729,7 +2781,7 @@ Pass in either a single keycode or an array/hash of keycodes.</p>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-327">line 327</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-326">line 326</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2799,7 +2851,7 @@ This is called automatically by Phaser.Input and should not normally be invoked
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-146">line 146</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-145">line 145</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2868,7 +2920,7 @@ This is called automatically by Phaser.Input and should not normally be invoked
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-169">line 169</a>
|
||||
<a href="Keyboard.js.html">input/Keyboard.js</a>, <a href="Keyboard.js.html#sunlight-1-line-168">line 168</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2913,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 Fri Nov 01 2013 18:16:12 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
+63
-11
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -1405,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 Fri Nov 01 2013 18:16:12 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>
|
||||
|
||||
+2203
-773
File diff suppressed because it is too large
Load Diff
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -637,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 Fri Nov 01 2013 18:16:13 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>
|
||||
|
||||
+192
-455
@@ -54,6 +54,10 @@
|
||||
<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>
|
||||
@@ -86,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>
|
||||
@@ -138,6 +146,10 @@
|
||||
<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>
|
||||
@@ -154,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>
|
||||
@@ -178,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>
|
||||
@@ -242,6 +266,10 @@
|
||||
<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>
|
||||
@@ -266,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>
|
||||
@@ -298,6 +330,26 @@
|
||||
<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>
|
||||
@@ -306,6 +358,14 @@
|
||||
<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>
|
||||
@@ -345,15 +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#right">right</a>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -575,7 +627,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
|
||||
<span class="param-type">Object</span>
|
||||
|
||||
|
||||
|
||||
@@ -585,7 +637,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
<td class="description last"><p>The context under which callbacks are called (defaults to game).</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -720,7 +772,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-51">line 51</a>
|
||||
<a href="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-33">line 33</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -793,7 +845,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Local reference to game.</p></td>
|
||||
<td class="description last"><p>A reference to the currently running game.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -831,321 +883,6 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="mouseDownCallback"><span class="type-signature"></span>mouseDownCallback<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>mouseDownCallback</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Description</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-33">line 33</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="mouseMoveCallback"><span class="type-signature"></span>mouseMoveCallback<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>mouseMoveCallback</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Description</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-39">line 39</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="mouseUpCallback"><span class="type-signature"></span>mouseUpCallback<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>mouseUpCallback</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Description</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Description.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-45">line 45</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
@@ -1169,7 +906,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Description.</p>
|
||||
<p>The function that handles the PointerDown event.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1209,7 +946,125 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Any</span>
|
||||
<span class="param-type">PointerEvent</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-95">line 95</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="onPointerMove"><span class="type-signature"></span>onPointerMove<span class="signature">(event)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>The function that handles the PointerMove event.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>event</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">PointerEvent</span>
|
||||
|
||||
|
||||
|
||||
@@ -1279,7 +1134,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="onPointerMove"><span class="type-signature"></span>onPointerMove<span class="signature">(event)</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="onPointerUp"><span class="type-signature"></span>onPointerUp<span class="signature">(event)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
@@ -1287,7 +1142,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Description.</p>
|
||||
<p>The function that handles the PointerUp event.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1327,7 +1182,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Any</span>
|
||||
<span class="param-type">PointerEvent</span>
|
||||
|
||||
|
||||
|
||||
@@ -1392,124 +1247,6 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="onPointerUp"><span class="type-signature"></span>onPointerUp<span class="signature">(event)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Description.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>event</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Any</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-152">line 152</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@@ -1556,7 +1293,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-81">line 81</a>
|
||||
<a href="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-57">line 57</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1625,7 +1362,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-171">line 171</a>
|
||||
<a href="MSPointer.js.html">input/MSPointer.js</a>, <a href="MSPointer.js.html#sunlight-1-line-152">line 152</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1670,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 Fri Nov 01 2013 18:16:13 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
Reference in New Issue
Block a user