Commit Graph

633 Commits

Author SHA1 Message Date
Viktor Lidholt
d7a7a2ed29 Merge pull request #859 from vlidholt/master
Adds power ups to demo game
2015-08-26 12:46:50 -07:00
Viktor Lidholt
3464bd18d0 Adds power ups to demo game, and some minor refactoring to support the addition 2015-08-26 12:41:21 -07:00
Adam Barth
fd3884b473 Turn big_circle.dart into a test
Fixes #829
2015-08-26 11:10:16 -07:00
Adam Barth
1a15cb2d27 Merge pull request #854 from abarth/sector_broken
Sector demo is broken because of compositor changes
2015-08-26 11:02:51 -07:00
Adam Barth
2e2fa94e1b Sector demo is broken because of compositor changes
We need to implement visitChildren for the RenderObjects in the sector demo.
Also, add a test.

Fixes #790
2015-08-26 10:58:30 -07:00
Viktor Lidholt
51f3fdcb1f Merge pull request #851 from vlidholt/master
Fixes issues in sprite constraints
2015-08-26 10:42:20 -07:00
Collin Jackson
a1bafaa317 Merge pull request #838 from collinjackson/improve_date_picker
Add date picker to widgets library and teach fitness app to use it
2015-08-26 10:28:27 -07:00
Viktor Lidholt
1bb647e67f Splits up demo game into multiple files for better readability 2015-08-26 10:22:09 -07:00
Viktor Lidholt
e2af762e76 Updates demo game to work with new constraints api 2015-08-26 10:07:59 -07:00
Hixie
ce28a7176e Replace Flex to Row and Column in tests and examples.
This still leaves Flex and FlexDirection available. At some point once
people have transitioned to Row/Column we should rename Flex to _Flex
and stop reexporting FlexDirection from basic.dart.
2015-08-26 09:05:14 -07:00
Collin Jackson
f164e560c3 Add date picker to widgets library and teach fitness app to use it
Also, add an example for the date picker
2015-08-25 16:41:11 -07:00
Ian Fischer
46e3c47f6c Merge pull request #840 from iansf/change_fitness_app_id
Change Fitness app id
2015-08-25 16:40:10 -07:00
Ian Fischer
36ef15325e Change Fitness bundle id to be compatible with signing with Google’s keys. 2015-08-25 16:24:28 -07:00
Viktor Lidholt
32aa4628e1 Merge pull request #835 from vlidholt/master
Moves sky sprites to its own package
2015-08-25 16:12:30 -07:00
Viktor Lidholt
ebeb8e2d42 Moves sky sprites to its own package 2015-08-25 16:08:46 -07:00
Viktor Lidholt
a2286ee7a1 Merge pull request #826 from vlidholt/master
Updates to demo game
2015-08-25 15:33:49 -07:00
Viktor Lidholt
59817111f0 Fixes nits 2015-08-25 15:30:45 -07:00
Eric Seidel
1813170a23 Roll APK versions in preparation for releases
@abarth
2015-08-25 15:12:38 -07:00
Viktor Lidholt
dec2689c07 Adds swarms of enemies to demo game 2015-08-25 14:49:54 -07:00
Viktor Lidholt
dcd17aefd6 Adds constraint for rotating a node towards another node 2015-08-25 14:47:56 -07:00
Viktor Lidholt
dc3159316e Makes the spline tension editable in sprites 2015-08-25 14:45:44 -07:00
Eric Seidel
1c9837630d Make 'save failed' snackbar show up
SnackBar's crash if you fail to provide a showing bool.

I tried to edit it in the framework, but this seemed easier for now.

The snackbar still shows behind the keyboard unfortunately.
https://github.com/domokit/sky_engine/issues/810

@collinjackson
2015-08-25 13:39:27 -07:00
Eric Seidel
19f62a35a9 Move Fitness.app to the latest playfair
@collinjackson
2015-08-25 13:32:28 -07:00
Eric Seidel
5ad78bd3bc Hack around Fitness.app crashing if it can't load data
I'm not sure this is the correct approach, but it
at least mitigates https://github.com/domokit/sky_engine/issues/804
for now.

I also made it not crash if you haven't set a goalWeight.

@collinjackson
2015-08-25 13:09:50 -07:00
Viktor Lidholt
bc62a243f5 Removes old code from demo game 2015-08-25 10:14:26 -07:00
Viktor Lidholt
af6372fd0e Removes custom joystick code and adds a new moving enemy to demo game 2015-08-25 09:28:58 -07:00
Viktor Lidholt
51715d304f Adds base rotation property to rotate-to-movement constraint 2015-08-25 09:28:58 -07:00
Viktor Lidholt
9fc36fe794 Adds virtual joystick to games library 2015-08-25 09:28:58 -07:00
Viktor Lidholt
119a652d17 Minor code cleanup 2015-08-24 16:41:05 -07:00
Viktor Lidholt
840dfae937 Adds support for spline actions and constraints on nodes 2015-08-24 16:08:23 -07:00
Viktor Lidholt
a78370fe9c New game demo, initial version 2015-08-24 16:07:25 -07:00
Adam Barth
d35d580cdb Merge pull request #780 from abarth/mimic_improvements
Mimic should track Mimicable more completely
2015-08-24 15:11:34 -07:00
Adam Barth
7077b1b3d0 Mimic should track Mimicable more completely
We now have Mimic tracking Mimicable through tree structure changes and while
moving around the screen.

Fixes #751 and #756
2015-08-24 15:11:18 -07:00
Hans Muller
c21fcf6210 Support ScrollableLists that wrap
Adds itemsWrap:bool (default false) to ScrollableList and PageableList. If itemsWrap is true then scrolling past the last item wraps around to the first. Similarly, scrolling before the first item wraps around to the last.

Added abstract ExtentScrollBehavior of ScrollBehavior. Renamed fields called contentsExtents to contentExtent, containerExtents to containerExtent, contentSize to contentExtent, etc.

BoundedBehavior is now a subclass of ExtentScrollBehavior.

Added UnboundedBehavior subclass of ExtentScrollBehvaior; contentExtent and maxScrollOffset are double.INFINITY, minScrollExtent is double.NEGATIVE_INFINITY.
2015-08-24 13:22:08 -07:00
Adam Barth
627b049216 Address review comments from #767
Mostly formating and removing arguments with default values.
2015-08-22 11:25:53 -07:00
Adam Barth
5d99f31c04 Merge pull request #767 from abarth/modernize_drawer_item
DrawerItem, DrawerHeader should take a child instead of children
2015-08-22 08:46:12 -07:00
Adam Barth
2873880f50 Fix analyzer warnings 2015-08-22 08:24:02 -07:00
Adam Barth
18248543cb DrawerItem, DrawerHeader should take a child instead of children
These widgets were designed in CSS where you need to specify a layout model for
your children. This patch updates them to the modern style of just taking a
unique child.

Fixes #755
2015-08-22 08:19:38 -07:00
Adam Barth
b61fe238f5 Rename syncFields to syncConstructorArguments 2015-08-21 17:21:42 -07:00
Collin Jackson
ca42e8865d Merge pull request #747 from collinjackson/fitness_loading
Don’t flash a message while fitness data is loading
2015-08-21 16:21:05 -07:00
Adam Barth
010589be9e Rename all the scrollable classes
Block -> BlockBody
ScrollableBlock -> Block
FixedHeightScrollable -> ScrollableWidgetList
VariableHeightScrollable -> ScrollableMixedWidgetList
BlockViewport -> MixedViewport
2015-08-21 14:39:41 -07:00
Adam Barth
51c7194075 Add SetRequestedOrientation to Activity service
Fixes #743
2015-08-21 12:49:49 -07:00
Collin Jackson
d75fb40585 Don’t flash a message while fitness data is loading 2015-08-21 11:19:26 -07:00
Adam Barth
e95aee2715 Add the ability to draw borders on circles
We now support uniform borders on circular box decorations.

Fixes #741
2015-08-21 10:48:28 -07:00
Collin Jackson
d77d7b4893 Add goal weight indicator line to fitness chart 2015-08-20 11:45:31 -07:00
Collin Jackson
1217f3b5e7 Merge pull request #713 from collinjackson/goalweight
Support for saving goal weight
2015-08-20 11:44:48 -07:00
Adam Barth
de966121c8 Merge pull request #714 from abarth/stack_squish
Stack squishes positioned elements near the edge
2015-08-20 11:25:35 -07:00
Adam Barth
f7aa83238f Stack squishes positioned elements near the edge
When laying out positioned children inside a stack, we should give them
unbounded constraints because if they draw outside of the stack, we'll just
clip them.
2015-08-20 11:15:15 -07:00
Collin Jackson
3e3f6242e3 Support for goal weight saving 2015-08-20 11:02:00 -07:00
Collin Jackson
5829688125 Merge pull request #691 from collinjackson/settings_save
Add support for saving settings in fitness app
2015-08-20 10:57:31 -07:00
Collin Jackson
c890dde70a Split fitness app’s UserData into UserData and UserDataImpl 2015-08-20 10:54:48 -07:00
Adam Barth
eb1b0333e9 Key should be const
For great constness.

Fixes #693
2015-08-20 09:50:51 -07:00
Hans Muller
d662f7e6d2 Handle changes to scrollDirection in ScrollableList et al
Changed the pageable_list.dart example: tapping on the toolbar changes
the scroll direction. This exposed some problems:

- Scrollable.syncFields() didn't update scrollDirection
- Viewport updated its RenderObject fields in the wrong order
- FixedHeightScrollable scrollDirection changes didn't update the scrollBehavior

There may be similar problems with VariableHeightList and ScrollableViewport.
I will fix those in a separate CL.
2015-08-20 08:24:16 -07:00
Collin Jackson
09216794e7 Add support for saving settings in fitness app 2015-08-19 12:12:33 -07:00
Hans Muller
cf164071c7 Dismissable: correct handling of a drag that ends with a fling 2015-08-19 10:48:26 -07:00
Hans Muller
7782a11534 Adds PageableList, other scrolling related changes and fixes
- PageableList extends ScrollableList
One fixed width or height item is visible and centered at a
time. Fling and drag gestures scroll to the next/previous item.

- Scrollable.scrollTo(), Scrollable.scrollBy(), ensureWidgetIsVisible() API changed
The named animation parameter for these methods was replaced by
duration and curve. All of the methods now return a Future. The Future
completes when the scroll does.

This change eliminates the need for Scrollable to temporarily take ownership
of a ValueAnimation object (see #645).

- Using Future.then() instead of an AnimationPerformance status listener
In ensure_visible.dart _handleTap() uses ensureWidgetIsVisible() to
center the card roughly as before and then. When the implicit scroll
animation is complete, it changes the centered card's label font. The
change is made when the Future returned by ensureWidgetIsVisible()
completes.

- FixedHeightScrollable's itemHeight parameter is now itemExtent
If scrollDirection is ScrollDirection.vertical (the default) then itemExtent should
be the height of each item; otherwise it should be the width of each item.

Replaced _velocityForFlingGesture() in scrollable.dart with Scrollable._eventVelocity()
The original version clamped pixels/ms against pixels/sec constants. The new version
also deals with scrollDirection.

- Plumbed scrollDirection though FixedHeightScrollable and ScrollableList

Both classes should now support horizontal scrolling.
2015-08-19 10:14:21 -07:00
Adam Barth
194c616b2a Update playfair revision
... and reattach fitness to the build. We detached fitness from the build
because it was seeing an old version of playfair that didn't work with the most
recent version of the Sky package.
2015-08-19 09:05:30 -07:00
Adam Barth
de5cb2579f Temporary build fix
Unhook fitness from the build to work around build break in playfair. We
updated the Sky package in an incompatible way, which means we need to roll in
a new playfair package to build fitness.
2015-08-18 21:50:29 -07:00
Adam Barth
dea3a0922c Add package:sky/rendering.dart
Similar to widgets.dart, rendering.dart exports the entire rendering layer.
Also, update the examples to use rendering.dart and widgets.dart. Also clean up
some exports so that the examples have more sensible imports.
2015-08-18 21:39:51 -07:00
Adam Barth
50bfdedbf4 Split box.dart into many files
Sadly, box.dart has grown much longer than 1000 lines. This patch splits it up
into several files based on the class hierarchy. Fortunately, many of these
classes are loosely coupled to each other.
2015-08-18 20:55:32 -07:00
Collin Jackson
429c39455d Request gridlines for fitness chart 2015-08-18 15:15:49 -07:00
Adam Barth
39ca4fa1ce Merge pull request #672 from abarth/render_image_fit
Apply ImageFit and ImageRepeat to RenderImage
2015-08-18 11:12:00 -07:00
Adam Barth
0ad2c11cc6 Apply ImageFit and ImageRepeat to RenderImage
These properties should apply to foreground images as well as background
images. Also, rename these types from BackgroundFit and BackgroundRepeat
because they apply to things other than backgrounds.
2015-08-18 11:11:31 -07:00
Viktor Lidholt
d9c743e1c5 Fixes loading of assets in demo game 2015-08-18 10:33:34 -07:00
Viktor Lidholt
882f32bb95 Merge pull request #666 from vlidholt/master
Adds bounce and elastic easing to animation curves
2015-08-18 09:37:02 -07:00
Eric Seidel
db3d632a5a Add release notes for SkyDemo.apk 0.0.23 2015-08-17 18:00:10 -07:00
Eric Seidel
f714ec6bca Add release notes for Fitness 0.0.3
@collinjackson
2015-08-17 17:51:50 -07:00
Eric Seidel
b3947162ff Make Asteroids.apk use background music from its bundle
This was the last instance of loading assets off of Github.

@abarth
2015-08-17 17:10:38 -07:00
Viktor Lidholt
9cb2cdacba Updates demo game to use curves from the animation package 2015-08-17 17:07:55 -07:00
Eric Seidel
67c481b2ef Teach Asteroids Sounds how to load from AssetBundle
@abarth
2015-08-17 16:07:08 -07:00
Eric Seidel
74a14d2aca Merge pull request #659 from eseidelGoogle/analyzer
Fix analyzer warnings
2015-08-17 14:34:54 -07:00
Eric Seidel
d5fe622a22 Fix analyzer warnings
We had a remarkable number of analyzer failures.

I'll fix the bots to analyze across the whole project
in a follow-up patch, that should prevent this
in the future.

@abarth
2015-08-17 14:32:29 -07:00
Adam Barth
91a783bf62 Rename Widget.root to Widget.renderObject
The name `root` is confusing because this value isn't the root of anything.
It's just the associated `RenderObject` instance.
2015-08-17 14:15:26 -07:00
Adam Barth
46fc8e6a21 Merge pull request #653 from abarth/drag_target
Add support for drag-and-drop
2015-08-17 14:06:35 -07:00
Adam Barth
ac0ec3221b Add support for drag-and-drop
Widgets that want to receive drops should include a DropTarget in their build.
Currently there's no widget for initiating a drag. Components can use the
DragController directly. In the future, we'll probably want to add a Draggable
that knows how to do some of this work automatically.

Fixes #612
2015-08-17 14:06:19 -07:00
Viktor Lidholt
f49a490dc0 Adds SoundManager class 2015-08-17 12:49:32 -07:00
Eric Seidel
f19fee31e2 Roll Fitness and SkyDemo in preparation for release
@abarth
2015-08-17 12:46:30 -07:00
Viktor Lidholt
23aabee8ae Merge pull request #638 from vlidholt/master
Adds a new ActionDelay class to sprites
2015-08-17 12:43:30 -07:00
Viktor Lidholt
d028875510 Adds a new ActionDelay class to sprites 2015-08-17 09:23:13 -07:00
Chinmay Garde
6794429ec5 Merge pull request #624 from chinmaygarde/master
Add iOS sky_app target for the fitness app example
2015-08-14 15:34:48 -07:00
Chinmay Garde
99b68e3139 Add iOS sky_app target for the fitness app example 2015-08-14 15:07:20 -07:00
Adam Barth
6efbcdc975 Add haptic and aural feedback service
And use the service in mine_digger to notify the user when they flag a bomb.
2015-08-14 12:46:04 -07:00
mpcomplete
0c05c97e20 Merge pull request #597 from mpcomplete/value.animation
Add a ValueAnimation helper class for AnimationPerfomance.
2015-08-14 12:03:27 -04:00
Viktor Lidholt
d89e5e4d90 Merge pull request #607 from vlidholt/master
Updates to game sound API
2015-08-13 16:35:58 -07:00
Hans Muller
babe380f0d Adds CicularProgressIndicator and LinearProgressIndicator
Setting a ProgressIndicator's value to null (the default) makes it an "indeterminate progress" or activity indicator.

The indeterminate animations for both kinds of progress bars are essentially the same and wrong vis the Material Design spec, http://www.google.com/design/spec/components/progress-activity.html. I'll improve conformity with the visual design in a future CL.
2015-08-13 16:15:21 -07:00
Viktor Lidholt
e17f6b7b06 Adds background music for demo game 2015-08-13 16:00:29 -07:00
Viktor Lidholt
4530e45710 Unifies interfaces for SoundTrackPlayer and SoundEffectPlayer 2015-08-13 16:00:29 -07:00
Viktor Lidholt
a750da5606 Adds a SoundTrackPlayer class 2015-08-13 16:00:29 -07:00
Viktor Lidholt
3d31273e65 Rename SoundCompleteCallback to SoundEffectStreamCallback 2015-08-13 16:00:29 -07:00
Viktor Lidholt
fa82f1a6e1 Refactors names of sound effect classes 2015-08-13 16:00:29 -07:00
Viktor Lidholt
6895312218 Removes the ability to jump to different positions in sound effects (this isn't supported on Android) 2015-08-13 16:00:29 -07:00
Matt Perry
82d84c766f Add a ValueAnimation helper class for AnimationPerfomance.
Used for AnimationPerformance with a single AnimatedValue<T> variable.
2015-08-13 17:29:32 -04:00
Viktor Lidholt
4b462bab5d Adds sounds to demo game bundle 2015-08-13 12:57:07 -07:00
Viktor Lidholt
b529445fae Adds sounds to demo game 2015-08-13 12:35:32 -07:00
Viktor Lidholt
86a8e06a90 Adds sound support to sprite api 2015-08-13 12:35:32 -07:00
Viktor Lidholt
5cf3b58f66 Merge pull request #577 from vlidholt/master
Fixes issue in sprite
2015-08-13 12:33:40 -07:00
Adam Barth
c80603cf0e Add PaintingContext which has-a sky.Canvas instead of is-a sky.Canvas
We'll need this for compositing because we need to switch out the sky.Canvas
when we switch compositing layers.
2015-08-13 10:18:33 -07:00
Collin Jackson
98d4c3af12 Add weight chart to fitness app 2015-08-12 14:50:50 -07:00
Viktor Lidholt
d8c1d99c25 Fixes issue in sprite 2015-08-12 10:25:55 -07:00
Hans Muller
16ffdc67a6 Merge pull request #572 from HansMuller/ensure-visible
Adds ensureWidgetIsVisible() function to scrollable.dart
2015-08-11 16:51:24 -07:00