Commit Graph

117 Commits

Author SHA1 Message Date
Florian Loitsch
728211526a Rename some of the functions from the scheduler.
The names are probably less familiar, but more consistent:
- FrameCallback: a callback that is relative to the frame and wants the
  frame offset (a duration) as argument.
- addXFrameCallback: adds the given callback to the internal lists/maps.
- scheduleXFrameCallback (currently only X = ""): add the callback, but
  also trigger a new frame.
- handleX: the method that is invoked when the event-loop or the frame
  calls into the scheduler.
- ensureXYZ: ensure that the callback happens.
  Unfortunately there is the ambiguity between a "callback": it can be a
  closure, or the action of doing a callback, so we end up with:
  ensureBeginFrameCallback, and ensureEventLoopCallback, where
  "callback" means the action of being called back.
2015-12-02 15:37:11 -08:00
Adam Barth
12304965a4 Add missing import to flutter_sprites 2015-12-02 10:39:20 -08:00
Hixie
a0227cab15 flutter analyze command
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
  pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
  changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
  things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
  upon further reflexion it was determined it didn't work anyway.
  We'll probably have to add better diagnostics here and say to run the
  updater script.
- Remove the native velocity tracker script, since it was testing code
  that has since been removed.

Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
  in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
  strong mode because even though it's not really relevant to our needs,
  it does (more or less accidentally) catch a few things that are
  helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
  platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
  where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
  files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
  identifiers using lowerCamelCase.' lint, to allow one-letter variables
  that use capital letters (e.g. for physics expressions) and to allow
  multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
  incantation and a "#" character:
    // analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
    // analyzer says "..."
  ...then we ignore any errors that have that "..." string in them.
2015-11-12 12:23:29 -08:00
Adam Barth
68eebaa5db Add some basic benchmarks of the Stocks app
- animation_bench.dart. This benchmark measures the full main-thread pipeline
   for ticking the drawer entrance and exit animation.
 - build_bench.dart. This benchmark measures a full app rebuild when there's no
   state change.
 - layout_bench.dart. This benchmark measures a full relayout.
2015-11-10 09:29:37 -08:00
Adam Barth
08539b4e4d Rewire the pubspecs to use local paths
Using local paths ensures that each package sees each other package at HEAD.
2015-11-06 22:46:52 -08:00
Adam Barth
e9cc4d73fe Rev pub spec 2015-11-06 15:39:56 -08:00
Adam Barth
70bd462074 Rev pub specs 2015-11-04 14:49:29 -08:00
Adam Barth
e971f32648 Rev pubspecs 2015-11-02 13:19:55 -08:00
Hixie
fca9b8f3d6 Rev package versions for release.
sky_engine is now at 0.0.45
sky_services is now at 0.0.45
flx is now at 0.0.4
flutter is now at 0.0.15
flutter_sprites is now at 0.0.12
2015-10-29 14:41:56 -07:00
Adam Barth
fab160cfce Rationalize embedder.dart and shell.dart
This patch combines embedder.dart and shell.dart into one thing. We should now
handle a bunch of error cases better.

  * embedder.connectToApplication has moved to shell.connectToApplication,
    matching the rest of the mojo universe.
  * embedder.connecttoService has moved to shell.connnectToService (and merged
    with shell.requestService).
  * shell.requestService is now shell.connectToService, matching the rest of
    the mojo universe.
  * serviceRegistry has moved from embedder.serviceRegistry to a top-level
    getter.

Fixes #1803
2015-10-29 10:47:34 -07:00
Viktor Lidholt
856ee97892 Merge pull request #1863 from vlidholt/master
Adds API documentation to sprite physics
2015-10-28 17:07:02 -07:00
Viktor Lidholt
567b0cf293 Adds API documentation to sprite physics and renames a few private variables for clarity. 2015-10-28 16:51:00 -07:00
Hixie
cbf9eab8fe Rev package versions for release.
sky_engine is now at 0.0.44
sky_services is now at 0.0.44
flx is now at 0.0.3
flutter is now at 0.0.14
flutter_sprites is now at 0.0.11
2015-10-28 14:54:33 -07:00
Adam Barth
02a1ebabd7 Rev pub packages 2015-10-27 20:15:58 -07:00
Viktor Lidholt
fde92a69a5 Improves physics debug drawing 2015-10-27 13:38:52 -07:00
Viktor Lidholt
96689dec7f Fixes issue with physics collision groups 2015-10-27 13:38:20 -07:00
Adam Barth
f35ad64786 Merge pull request #1814 from abarth/fix_right_align
Right-aligned text paints offscreen sometimes
2015-10-26 19:41:24 -07:00
Viktor Lidholt
ddd4ea81ec Fixes inferred type warning 2015-10-26 16:38:14 -07:00
Viktor Lidholt
9e8f901b04 Fixes inferred type warning 2015-10-26 16:32:57 -07:00
Viktor Lidholt
0d61e50119 Fixes warning in sprites 2015-10-26 16:26:48 -07:00
Viktor Lidholt
957061e9ab Adds support for collision categories and masks in sprite physics 2015-10-26 15:49:50 -07:00
Adam Barth
69a0689a33 Right-aligned text paints offscreen sometimes
We were assuming that the text extended from 0.0 to its max content width.
That's not correct for right-aligned text. Instead, we need to layout the text
again at the width we want it to occupy.
2015-10-26 15:49:47 -07:00
Viktor Lidholt
ac2a8a6601 sprite nodes now caches inverse transforms 2015-10-26 13:53:01 -07:00
Viktor Lidholt
4da5aea555 Merge pull request #1797 from vlidholt/master
Adds motors to revolute joints and prismatic joints
2015-10-26 13:28:32 -07:00
Viktor Lidholt
4d76182ba9 Adds motors to revolute joints and prismatic joints 2015-10-26 13:24:08 -07:00
Adam Barth
3154d55ea2 Rev pub packages 2015-10-26 10:42:14 -07:00
Hixie
a6c473ea95 Strong modeify the examples
This makes skyanalyzer also check the examples, and fixes everything it
found there.
2015-10-23 18:13:25 -07:00
Viktor Lidholt
1dbf9bc891 Fixes issue in sprite node 2015-10-23 16:42:27 -07:00
Viktor Lidholt
5a481ed554 Merge pull request #1746 from vlidholt/master
Working node to physics world conversions
2015-10-23 13:48:45 -07:00
Viktor Lidholt
68be30e0ec Removes debug printouts in sprite physics 2015-10-23 13:46:19 -07:00
Viktor Lidholt
3708667308 Fixes sprite physics to work correctly with the node graph
Teleportation for physics bodies works again
2015-10-23 13:31:13 -07:00
Adam Barth
549569637f Rev pub package 2015-10-23 10:15:14 -07:00
Adam Barth
315d77a9ec Rev pub packages and simplify big_red_button 2015-10-23 10:12:02 -07:00
Adam Barth
789031b5bd Rev pub packages 2015-10-21 11:13:12 -07:00
Viktor Lidholt
0382158550 Merge pull request #1697 from vlidholt/master
First pass on sprite physics node hierarchy integration
2015-10-20 16:35:08 -07:00
Adam Barth
af7a54fbba Rev pub packages 2015-10-20 16:23:43 -07:00
Viktor Lidholt
ca724ae151 Adds support for scaling sprite physics groups 2015-10-20 10:47:58 -07:00
Viktor Lidholt
4187bcf90c Adds sprite physics groups 2015-10-20 10:35:40 -07:00
Adam Barth
734240db6d Merge pull request #1678 from abarth/show_color_filter
Show ColorFilter
2015-10-19 13:37:55 -07:00
Adam Barth
4094223378 Show ColorFilter
Instead of requiring clients to use ui.ColorFilter, we show show the
ColorFilter class, similar to what we do for Color.
2015-10-19 13:33:39 -07:00
Viktor Lidholt
6bd4fb8515 Renames PhysicsNode to PhysicsWorld 2015-10-19 13:27:32 -07:00
Viktor Lidholt
0ef9da85e1 Merge pull request #1672 from vlidholt/master
Makes sprite physics bodies scalable
2015-10-19 12:30:02 -07:00
Adam Barth
2aa79d5694 Remove old setFoo functions on Paint
We now just use Dart properties, which is more idiomatic.
2015-10-19 12:21:34 -07:00
Viktor Lidholt
1e228618eb Makes sprite physics bodies scalable 2015-10-19 12:13:00 -07:00
Adam Barth
88bcfa2d79 Rev pub packages 2015-10-19 11:26:31 -07:00
Hixie
4c50643688 Release process rev number updates for stage two 2015-10-16 14:44:02 -07:00
Viktor Lidholt
23bae33077 Adds teleporting methods for moving sprite kinematic physics bodies without assigning velocities 2015-10-16 10:19:25 -07:00
Viktor Lidholt
7febbfc70f Correctly resets targets for kinematic sprite physics bodies 2015-10-16 10:18:35 -07:00
Viktor Lidholt
909c98fa47 Animated sprite physics bodies now correctly transfers energy to dynamic bodies 2015-10-15 17:01:47 -07:00
Viktor Lidholt
46415fa02b Remember last position in sprite physics 2015-10-15 14:43:48 -07:00