Commit graph

100 commits

Author SHA1 Message Date
photonstorm
cd7e4abecf Add jsdocs. 2014-09-04 05:04:54 +01:00
Richard Davey
42f19f4978 Phaser.Canvas.setImageRenderingCrisp now sets image-rendering: pixelated, perfect for pixel art and which is now supported in Chrome 38. 2014-09-03 22:16:03 +01:00
photonstorm
804eea9ca3 Optimised BitmapData.copy and refactoring continues. 2014-09-03 20:56:31 +01:00
photonstorm
1a60d641b1 Canvas.removeFromDOM(canvas) will remove a canvas element from the DOM.
Game.destroy now removes the games canvas element from the DOM.
2014-09-01 02:38:21 +01:00
photonstorm
4d0cae0e2d jshint fixes for CocoonJS.App and continuing work on the new ScaleManager. 2014-08-31 10:17:02 +01:00
photonstorm
3e1eb10673 First pass at fully resizable canvas tracking and parenting. 2014-08-31 10:17:02 +01:00
Dan Cox
3f7f6fac2c Adjustment for JSLint 2014-08-29 22:33:33 -04:00
Dan Cox
c1872356fe Detect CocoonJS.App
There's a bit of a story behind this, but I'll try to keep it short.

While I've been working on a patch to detect Cordova's 'pause' and 'resume' events for Phaser.Stage's checkVisibilityChange(), I came across this [thread] (http://www.html5gamedevs.com/topic/8834-cocoonjs-pause-game-on-app-switch/) over on the forum. My hope, at the time, was that someone else would come along and write this patch and I could use their work to finish my own code. But, since that hasn't happened yet (and might never), I'm sending in this PR first for the check that establishes a 'game.device.cocoonJSApp' boolean that I plan to use later.
2014-08-29 20:58:19 -04:00
Richard Davey
3a9f869882 Merge pull request #1129 from videlais/patch-2
Device detection of Node-Webkit
2014-08-28 04:37:58 +01:00
photonstorm
ec687868de Input.setMoveCallback has been removed due to deprecation.
BitmapData.refreshBuffer has been removed and replaced with BitmapData.update.
BitmapData.drawSprite has been removed due to deprecation. Use BitmapData.draw instead.
Pointer.moveCallback has been removed due to deprecation.
SinglePad.addButton has been removed due to deprecation.
P2.Body.loadData has been removed due to deprecation.
P2.World.defaultFriction and defaultRestitution have been removed due to deprecation.
Canvas.create noCocoon parameter has been removed due to deprecation.
Color.getColorInfo, RGBtoHexstring, RGBtoWebstring and colorToHexstring has been removed due to deprecation.
2014-08-28 03:40:59 +01:00
Dan Cox
a0840274f7 Tests for both Node and Node-Webkit 2014-08-27 22:00:14 -04:00
Richard Davey
ee579c2b0d Merge pull request #989 from lucbloom/android-stock-browser
Android stock browser check
2014-08-28 02:01:25 +01:00
Dan Cox
2065c3a77a Fixed trailing whitespace 2014-08-21 20:37:27 -04:00
Dan Cox
fa0fa860c0 Device detection of Node-Webkit
Because the user-agent string can be (easily changed) [https://github.com/rogerwang/node-webkit/wiki/Manifest-format#user-agent], one of the few ways to detect Node-Webkit is to look for the 'process' object and require() function. If they exist, Node support was enabled and 'process.version' will have the version of Node.js used to create the project.

However, if Node is (disabled) [https://github.com/rogerwang/node-webkit/wiki/Manifest-format#nodejs], the 'process' object won't exist and the project will be executed as if it was in a single instance of a browser anyway.
2014-08-21 17:37:51 -04:00
Dan Cox
d54725212f Device detection of Apache Cordova
Simple check if "window.cordova" is defined for device detection of Phaser running (most likely) under Apache Cordova.
2014-08-11 12:33:06 -04:00
Alvin
79166bb268 Fixed #1078 chromeOS no belongs to desktops 2014-08-06 14:08:38 +02:00
Richard Davey
0c4c43be1e Merge pull request #1080 from lucbloom/detect-kindle
Added a UA string test for Kindle
2014-08-03 11:00:40 +01:00
Luc Bloom
84cf835e83 Added a UA string test for Kindle
Also added PS Vita so the “silk” detection doesn’t confuse that one.
2014-07-31 15:40:59 +02:00
Txus Ordorika
b952884d9d Fix for scale issues in CocoonJS using webgl renderer and screencanvas 2014-07-23 17:16:25 +02:00
Luc Bloom
4183237fb3 Android stock browser check
This is a class-static function of Phaser.Device to check wether we’re
running on an Android Stock browser. Autors might want to scale down on
effects and switch to the CANVAS rendering method on those devices.
Usage: var defaultRenderingMode = Phaser.Device.isAndroidStockBrowser()
? Phaser.CANVAS : Phaser.AUTO;
2014-07-10 18:00:29 +02:00
photonstorm
757136bf4f Device.mobileSafari was no longer detecting Mobile Safari, now fixed (thanks @Zammy, #927) 2014-07-01 19:19:49 +01:00
photonstorm
db22b019be Swapped the ScaleManager creation order in Game, so both start and stop fullScreen requests work now. 2014-07-01 16:50:33 +01:00
photonstorm
d2fc42520b stopFullScreen has been changed to run against document instead of the canvas since the cancelFullScreen method is created on the document (thanks @j0hnskot, #863) 2014-07-01 15:46:32 +01:00
photonstorm
917c7491cd Canvas.create has deprecated the noCocoon parameter as it's no longer required. The parameter is still in the signature, but no longer used in the method. 2014-05-30 02:03:07 +01:00
Joe Flowers
821da772aa Updates Silk UA test to avoid Safari conflict 2014-05-08 00:28:27 -04:00
photonstorm
11ca2deaf6 Finally - fully working setHSL and shiftHSL. 2014-04-25 02:45:35 +01:00
photonstorm
c88fa2bd91 Loads of BitmapData updates. More details soon. 2014-04-24 03:49:49 +01:00
photonstorm
0f1e0a3d4e Updated the Device little / big endianess check. 2014-04-23 23:35:36 +01:00
photonstorm
055cb8058d Device.crosswalk detects if your game is running under Intels Crosswalk XDK. 2014-04-14 16:40:14 +01:00
Christian Wesselhoeft
61f18b675c Trim trailing whitespace. 2014-03-25 14:56:04 -07:00
photonstorm
a7ff5f884c Added basic Webcam plugin.
Added Device.getUserMedia detection.
Updated config.php so you can toggle physics engines on/off via flags.
Updated Gruntfile.js so it builds a Phaser + Pixi but no Physics libs.
2014-03-18 15:14:28 +00:00
photonstorm
3ebd0d9303 Updated Device.isConsoleOpen as it no longer works in Chrome. Revised code and documentation accordingly (fix #593)
Revised p2 clear process.
2014-03-17 19:39:56 +00:00
photonstorm
db88bd2f22 Fixed the IE11 version check (fixes #579) 2014-03-16 00:39:42 +00:00
photonstorm
c8e63582a4 Lots of small tweaks to pass jshint. 2014-03-13 16:49:52 +00:00
photonstorm
7ff4e51ab1 Time.reset does a removeAll on any Timers.
Device no longer things a Windows Phone or Windows Tablet are desktop devices (thanks wombatbuddy, fixes #506)
2014-03-02 10:56:39 +00:00
photonstorm
09d4a35b7f Fixed issue where Phaser.Canvas.create would always make a screencanvas for CocoonJS, but that should only happen once. New parameter toggles it. 2014-02-28 03:55:06 +00:00
photonstorm
34ee2b0b20 Fixed issue with CocoonJS detection in Device.
Fixed docs issue in Tilemap.
Created landscape pointer test, confirmed working fine (issue #276)
2014-02-28 03:09:04 +00:00
photonstorm
db090601b8 The Timer will no longer create negative ticks during game boot, no matter how small the Timer delay is (fixes #366) 2014-02-26 19:52:23 +00:00
photonstorm
db2e3733c2 Fullscreen mode now uses window.outerWidth/Height when using EXACT_FIT as the scale mode, which fixes input coordinate errors (fixes #232)
Fullscreen mode now works in Internet Explorer and uses the new fullscreen non-prefix call.
2014-02-25 21:16:56 +00:00
photonstorm
13c99f3491 Phaser.StageScaleMode has been renamed to ScaleManager and moved from the system folder to the core folder. It's still available under game.scale.
If your game references the old Phaser.StageScaleMode consts like SHOW_ALL you need to update them to Phaser.ScaleManager, i.e. Phaser.ScaleManager.SHOW_ALL.
All of the Project Templates have been updated to reflect the above change.
2014-02-25 14:46:48 +00:00
photonstorm
a1b502fc06 Stage.smoothed allows you to set if sprites will be smoothed when rendered. Set to false if you're using pixel art in your game. Default is true. Works in Canvas and WebGL. Setting the game anti-aliased parameter now works properly too.
Sprite.smoothed and Image.smoothed allows you to set per-Sprite smoothing, perfect if you just want to keep a few sprites smoothed (or not).
Fixes #381.
2014-02-25 04:41:57 +00:00
photonstorm
36df5516dd Fixed full-screen anti-alias issue (#478). 2014-02-24 20:33:22 +00:00
photonstorm
4ad7b304c6 Added Game configuration option: forceSetTimeOut 2014-02-20 01:31:13 +00:00
photonstorm
d057a9fe11 Device, Canvas and GamePad classes all updated for better CocoonJS support (thanks Videlais) 2014-02-19 02:45:42 +00:00
photonstorm
e9fb8f6389 Updates across the board moving Stage.canvas to Game.canvas 2014-02-13 12:55:58 +00:00
photonstorm
0786e86ee5 Stage.scale has been moved to Game.scale. The same game scaling properties exist as before, but now accessed via Game.scale instead.
Stage.aspectRatio has been moved to StageScaleMode.sourceAspectRatio (so now game.scale.sourceAspectRatio)
Stage.scaleMode has been moved to StageScaleMode.scaleMode (so now game.scale.scaleMode)
Stage.fullScreenScaleMode has been moved to StageScaleMode.fullScreenScaleMode (so now game.scale.fullScreenScaleMode)
Stage.canvas has been removed. It was only ever an alias for Game.canvas anyway, so access it via that instead.
2014-02-13 12:50:10 +00:00
photonstorm
f6113ac6c4 Physics World events added.
Group has new 'addToWorld' parameter, which fulfills the same function as the old useStage.
Stage now extends PIXI.Stage rather than owns one.
2014-02-12 19:45:09 +00:00
photonstorm
d2366d5fa5 Fix for issue #376 - IE11 didn't populate the Device.ieVersion value. Now extracted from Trident revision, but still use Device.trident instead for IE11+ checks. 2014-02-10 02:23:45 +00:00
photonstorm
0896c2fac7 Updating copyright year and README. 2014-02-05 16:54:59 +00:00
photonstorm
dbdb2a2026 Adjusted delta timer cap and fixed some typos and more examples. 2014-01-27 17:08:20 +00:00