Commit Graph

13 Commits

Author SHA1 Message Date
Viktor Lidholt
43d97f6903 Correctly handle touches together with zPosition
Renames hitTest to isPointInside

Refactor sorting of children in nodes

Fixes zPosition in sprites and hides internal methods

Adds scaleX / scaleY properties

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1190393004.
2015-06-19 11:15:58 -07:00
Viktor Lidholt
b06190fb7b Adds a SpriteWidget and simplifies sample game setup
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1197493002.
2015-06-19 09:14:12 -07:00
Viktor Lidholt
627aeff31a Optimizes sprite transformations for box to node
Enabling/disabling of handling multiple pointers
Adds basic touch handling

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1179413009.
2015-06-18 15:29:26 -07:00
Viktor Lidholt
6c7a619f99 Updates game for new AppView API
Deletes old test game

Demo game is now playable

Updates demo game with steering and changes in sprites

Fixes smaller bugs in sprites

Refactor class names in game demo

Strips Box2D from game

Fixes ordering in game node

Adds frameRate property to SpriteBox and improves update methods.

Fixes node to box transformations for hit tests

Fixes minor code issues

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1179333002.
2015-06-15 09:11:16 -07:00
Viktor Lidholt
dcb0fa4312 Adds hit tests and transformations between coordinate systems in sprites
Sprite nodes use Point instead of Vector2

Updates sprite test app

Refactors accounting for pivot points in sprites

Adds abstract NodeWithSize class in Sprites.

Refactors SpriteNode to Sprite

Refactors TransformNode to Node (may need to find another name as it conflicts with Sky's Node).

Sprite system now uses and caches transformation matrices.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1180703002.
2015-06-11 08:44:22 -07:00
Adam Barth
ac7f2ff860 Ink splashes should start at the touch point
Previously, they always started at the center of the RenderInkWell. Now we
remember the local coordinates we computed during the hit test and provide that
information when handling the event.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1180553002.
2015-06-10 13:55:20 -07:00
Viktor Lidholt
3260d9988d Adds support for zOrder and references to parent nodes in sprites, also start of new test app.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1177563004.
2015-06-10 09:21:01 -07:00
Viktor Lidholt
824a66399e Adds a spaceship and (somewhat crappy) controls to the example game.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1151793003
2015-06-04 17:14:46 -07:00
Hixie
b7c588661c Rename "BorderSide.None" to "BorderSide.none", since it's a constant, and change the sky.Size.infinite() constructor to a constant.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1158263005
2015-06-04 16:17:20 -07:00
Adam Barth
9bdb39d0ec Fix build after hixie's rename
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1164073002
2015-06-04 10:49:05 -07:00
Adam Barth
e99c880bc2 Fix gesture events in fn2
This CL makes gesture events work again in fn2.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1146923005
2015-06-03 16:06:15 -07:00
Viktor Lidholt
006da931cf Sky example game enhancements, adds preloading of images and adds transform modes to SpriteBox
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1149183004
2015-06-03 15:05:55 -07:00
Viktor Lidholt
3118a6fba1 Initial version of working game with Box2D, images, nodes and sprites.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1161023006
2015-06-02 15:09:01 -07:00