25905 Commits

Author SHA1 Message Date
Hans Muller
7af3a32eed Animated selected tab indicator 2015-07-28 17:01:15 -07:00
Matt Perry
3b4093e14e Merge remote-tracking branch 'upstream/master' into performance 2015-07-28 17:23:42 -04:00
Matt Perry
09dc392945 Add an AnimationStatus to AnimationPerformance, and use that in Drawer,
SnackBar, and PopupMenu instead of custom statuses.
2015-07-28 17:23:27 -04:00
Adam Barth
f4750a7d0a Merge pull request #328 from abarth/schedule_build
Move build() off microtasks
2015-07-28 14:06:01 -07:00
Adam Barth
5d15bb5126 Move build() off microtasks
Rather than using a microtask to schedule component build functions, instead
use the scheduler. We now tread building just like layout and painting as a
visual update.
2015-07-28 14:05:21 -07:00
Chinmay Garde
2ed083d265 Move the game Info.plist to the packages directory 2015-07-28 13:32:53 -07:00
Chinmay Garde
cada9213c0 Load SkyX files on iOS where available 2015-07-28 13:27:46 -07:00
Viktor Lidholt
01ac0095e8 Updates startled in game demo to use drawAtlas 2015-07-28 12:49:36 -07:00
Viktor Lidholt
0d7156fc03 Merge pull request #315 from vlidholt/master
Optimizations for sprite code
2015-07-28 12:06:38 -07:00
Matt Perry
b79a73136a Refactor AnimationContainer to support drop-in Intentions.
This lets us be flexible in how to animate the properties of the container.
Currently used by SnackBar with a SlideIn intention.
2015-07-28 14:12:17 -04:00
Hans Muller
6a17d1806d When the selected tab changes in a TabBar for which isScrollable:true, animate the selected tab to the center of the viewport, if that's possible.
Added an optional duration: to Scrollable.scrollTo(newOffset, duration: d) which animates the scroll to newOffset.

Refactored the Scrollable implementation a little to make the roles of the "toEnd" and "toOffset" animations clearer.

_handlePointerDown() now stops both animations.

Similarly, we only call settleScrollOffset() from the cancel gesture handlers if the animations aren't already running.
2015-07-28 10:23:34 -07:00
Viktor Lidholt
b71d0dfbaf Optimizes sprite performance by minimizing the number of calls to action controllers 2015-07-28 10:16:16 -07:00
Viktor Lidholt
bc49645960 Optimizes sprite performance by reusing Paint objects 2015-07-28 10:16:15 -07:00
Viktor Lidholt
0041182dc8 Optimizes sprites by replacing save/restore by caching the total matrix 2015-07-28 10:16:14 -07:00
Adam Barth
54803998a8 Move sky package into sky/packages/sky
This patch makes the sky package match the structure we've adopted for the
other Dart packages we produce from this repo.
2015-07-28 08:42:57 -07:00
Adam Barth
c20659024e Merge pull request #308 from abarth/rm_dart_pkg
Remove DEPS-managed Dart packages
2015-07-27 17:07:54 -07:00
Adam Barth
be52cb8690 Improve init.dart not to assume dart is in your PATH
Instead, use Platform.executable, which is the path to the current `dart`
executable.
2015-07-27 16:56:18 -07:00
Adam Barth
30648059aa Remove DEPS-managed Dart packages
We now use `pub` to manage Dart packages.
2015-07-27 16:54:30 -07:00
Viktor Lidholt
09cfb05908 Merge pull request #300 from vlidholt/master
Optimizations for Particle Systems
2015-07-27 15:42:50 -07:00
Viktor Lidholt
59b0e328e7 Refactors randomizations of color sequences and optimizes particle systems (uses single Paint instance, doesn't compute accelerations unless used, reduces number of created objects, faster color calculations)
Fixes indentation
Optimizes lookup in fast version of atan2 (toInt is faster than floor)
Removes frame rate printout and adds assert
2015-07-27 15:41:08 -07:00
Adam Barth
6d717593bd Pull a newer mojo_services
This patch picks up a new url_loader.mojom interface that is needed to access
the network in production.
2015-07-27 14:04:37 -07:00
Adam Barth
ff1f08333f Merge pull request #297 from abarth/network_nits
Cleanups to network service
2015-07-27 14:04:08 -07:00
Adam Barth
b9e74071d8 Cleanups to network service
This patch contains some minor improvements to the network service:

- We now cache the connection to the network service so we don't need to spin
  it up for each request.
- We now manage the lifetime of NetworkServiceImpl in the same way as other
  services.

Also, update the workbench sky_tools dependency to the latest version.
2015-07-27 13:50:42 -07:00
Adam Barth
7cf81c81ce Merge pull request #294 from abarth/big_red_button
Teach big_red_button how to publish sky, sky_engine, sky_services
2015-07-27 12:22:18 -07:00
Adam Barth
b96512ccef Teach big_red_button how to publish sky, sky_engine, sky_services
This CL makess big_red_button.py work for the sky, sky_engine, sky_services
packages.
2015-07-27 12:21:33 -07:00
Hans Muller
65caad4703 Enable fling scrolling in TabBar 2015-07-27 11:13:37 -07:00
Adam Barth
2c09a98299 Update Sky package version
We need to pull in an updated version of sky_tools to get a version that
doesn't try to gzip everything.
2015-07-27 10:07:41 -07:00
Adam Barth
378b9c2ff5 Merge pull request #292 from abarth/fix_sky_tools
Fix sky_tool's installing of SkyShell.apk
2015-07-27 10:06:53 -07:00
Adam Barth
c420d2c3f4 Fix sky_tool's installing of SkyShell.apk
We were walking over to the realdir too quickly, which meant we lost which
version of the sky_engine package we were supposed to use.
2015-07-27 10:05:16 -07:00
Adam Barth
d1f0a8d1e9 Rev package version 2015-07-27 10:04:07 -07:00
Adam Barth
b45a6442c5 Turn off gzip
This feature appears to be causing problems with OkHTTP's cache.
2015-07-27 10:03:22 -07:00
Adam Barth
ef600e145e Update README.md 2015-07-27 09:47:29 -07:00
Adam Barth
623bc3efd6 Rev Sky package 2015-07-27 09:13:01 -07:00
Hans Muller
7c8bf7e05e Merge pull request #3 from HansMuller/add-bounded-friction-simulation
Added BoundedFrictionSimulation
2015-07-27 09:11:25 -07:00
Hans Muller
ea1a8ee3c2 added BoundedFrictionSimulation 2015-07-27 09:07:06 -07:00
Hixie
60177a71ab Scoped focus, so you can have a dialog with input controls and not lose your focus in the background.
This introduces a GlobalKey registry so that you can tell when a key
has gone away (so you can unfocus dead dialogs).

Also I added an assert that you're not calling setState() during a
build. It turns out that doing so means you have a bug, because since
you're dirty already (you're building), you won't get rebuilt.

The focus code itself is gnarly. It uses a Component and an internal
Inherited TagNode to manage the focus state, and does crazy things
like updating its state during build to pretend retroactively that it
was built with some other state, once someone asks for focus the first
time (i.e. the first time it's examined, so you can't tell that it was
in a different state before). It does this so that it can autofocus
controls which otherwise wouldn't be focused.

This moves all the focus management into Navigator and showDialog(),
so the complexity is all buried deep and not visible to apps,
hopefully.

To do something like two tabs that each have an Input widget that
needs to be focused when you switch panes, you'd need to have two
Focus objects, one in each tab, and you need to set their autofocus to
true (maybe that should be the default?).
2015-07-24 18:18:04 -07:00
Hixie
f13f8894e4 Fix review feedback from previous checkin.
@abarth doesn't like Futures that explicitly point out they're type-unsafe. :-P
2015-07-24 18:08:04 -07:00
Hixie
1b7aa1153e Fix the lerp the RIGHT way. 2015-07-24 18:05:14 -07:00
Ian Hickson
4f9f5656c7 Merge pull request #281 from Hixie/buttons
Fix the crash for buttons.
2015-07-24 17:55:13 -07:00
Hixie
be5545cf28 Fix the crash for buttons.
Turns out there was a typo in lerpColor.

Fixes #277.
2015-07-24 17:44:20 -07:00
Hixie
df7fdb5b12 pushDialog(navigator, (navigator) => new Dialog(...)).then((result) => process(result)); 2015-07-24 17:40:41 -07:00
Hans Muller
66f064eabf spring can be null drag must not be 2015-07-24 15:51:33 -07:00
Collin Jackson
82f5f14b98 Move dialog into its own class 2015-07-24 15:16:40 -07:00
Hans Muller
6c639ee389 optional spring description 2015-07-24 15:15:19 -07:00
Ian Hickson
051655fa6d Merge pull request #278 from Hixie/nav-dialogs
Use the navigator to stack dialogs.
2015-07-24 15:02:20 -07:00
Hixie
db63850e42 Fix test breakage (stocks test imports stocks app differently than a recent checkin expected). 2015-07-24 14:54:56 -07:00
Hixie
ac6342ab8a Use the navigator to stack dialogs.
This removes the need to manually include the dialog builder in the main window's build() function.
It also removes the need to track if a dialog is visible.

Other changes:
- I made dialog.dart a bit more readable.
- I renamed transitionFinished to fullyOpaque since that's what actually matters.
- I made Routes track if they're opaque. Eventually this should probably be more configurable when creating the route.

Directions for Future Research:
- Use this for focus management somehow.
- The popup menu should use something like this.
- We should factor the following out into a showDialog() function that returns a future for the dialog's exit result:
    navigator.push(new DialogRoute(builder: (navigator, route) { ... }));
- Maybe navigator.pop() should take a value to return to that Future.
2015-07-24 14:33:09 -07:00
Adam Barth
c6fe01eda3 Merge pull request #274 from jimsimon/examples-as-libraries
Examples as libraries
2015-07-24 14:23:39 -07:00
Viktor Lidholt
80f8435916 Merge pull request #273 from vlidholt/master
Optimizations for Particle Systems
2015-07-24 13:04:34 -07:00
Viktor Lidholt
45399c7a53 Fixes formatting and abstraction in GameMath 2015-07-24 12:59:08 -07:00