Commit Graph

139 Commits

Author SHA1 Message Date
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
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
567b0cf293 Adds API documentation to sprite physics and renames a few private variables for clarity. 2015-10-28 16:51:00 -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
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
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
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
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
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
Viktor Lidholt
f164289203 Fixes SpriteBox to work better with native points 2015-10-15 13:46:24 -07:00
Viktor Lidholt
79ec74541a Improves sprite physics debug drawing 2015-10-15 10:20:26 -07:00
Viktor Lidholt
5fa5971bf7 Refactors sprite physics debug drawing 2015-10-14 16:30:36 -07:00
Viktor Lidholt
c912ee2301 Fixes touch handling in SpriteBox 2015-10-14 16:28:51 -07:00
Viktor Lidholt
29f2a0f227 Adds missing sprite physics shapes 2015-10-14 12:58:47 -07:00
Adam Barth
a88a85e695 Rename skysprites to flutter_sprites 2015-10-13 16:34:01 -07:00
Adam Barth
89faf21a10 Merge pull request #1596 from abarth/moar_nine
Add a centerSlice parameter to images
2015-10-13 14:24:06 -07:00
Viktor Lidholt
8f65e0cb34 Add callback when physics joints break 2015-10-13 13:51:15 -07:00
Adam Barth
998a066a82 Add a centerSlice parameter to images
This lets you draw nine-patch images.
2015-10-13 13:21:36 -07:00
Viktor Lidholt
2feb51d6bc Adds more joint types to sprite physics 2015-10-13 13:18:30 -07:00
Viktor Lidholt
7c5092f7b1 Adds support for dampening on weld physics joints in sprites 2015-10-13 09:39:53 -07:00
Viktor Lidholt
6488a13315 Adds breakingForce argument to joints constructors in sprite physics 2015-10-12 16:59:58 -07:00
Viktor Lidholt
3784086322 Break sprite physics joints 2015-10-12 16:54:58 -07:00
Viktor Lidholt
2d2b4a8a58 Save list of sprite physics joints 2015-10-12 16:53:41 -07:00
Viktor Lidholt
13ade2c732 Adds check for breaking forces in sprite physics joints 2015-10-12 15:56:11 -07:00
Viktor Lidholt
909716956e Adds pulley joint to sprite physics and makes joint variables final 2015-10-12 15:28:02 -07:00
Viktor Lidholt
26234b1041 Merge pull request #1580 from vlidholt/master
Working joints in sprite physics
2015-10-12 14:10:19 -07:00
Viktor Lidholt
5f907780ff Working joints in sprite physics 2015-10-12 13:39:20 -07:00
Adam Barth
ecce1eb389 Import dart:ui as ui (instead of as sky) 2015-10-09 20:55:54 -07:00
Adam Barth
65eba90843 Rename package:sky to package:flutter 2015-10-09 20:44:52 -07:00
Adam Barth
5b37f8750d Rename dart:sky to dart:ui 2015-10-09 19:27:13 -07:00
Viktor Lidholt
dcad79e239 Adds debug drawing for weld joints in sprite physics 2015-10-09 13:22:12 -07:00
Viktor Lidholt
95a0aceaa1 Adds basic support for joints in sprite physics 2015-10-08 16:12:31 -07:00
Viktor Lidholt
56ac0d9cc7 Adds support for keeping track of contact points in physics 2015-10-08 10:15:32 -07:00
Viktor Lidholt
020e749291 Fixes typo in sprite physics 2015-10-07 14:05:11 -07:00
Viktor Lidholt
c363133da3 Adds support for applying forces and impulses to sprite physics 2015-10-07 13:26:36 -07:00
Viktor Lidholt
b6e12ca9aa Forwards physics body properties to box2d in sprite physics 2015-10-06 10:39:26 -07:00
Viktor Lidholt
5ac4d1ea28 Adds forwarding of properties to box2d in sprite physics 2015-10-06 09:59:16 -07:00
Viktor Lidholt
ff3e636635 Makes physics bodies fixture elements settable 2015-10-05 16:13:32 -07:00
Viktor Lidholt
ab104c809d Handle removal of sprite physics bodies during the physics simulation 2015-10-05 13:47:51 -07:00
Viktor Lidholt
071201a5bb Prevents sprite update methods to be called before the sprite box has been property intialized 2015-10-05 11:24:59 -07:00
Adam Barth
db191e96bd Switch scheduler over to Duration
This patch prepares us to switch to using integers when handing off the
animation time from the engine to the framework.
2015-10-03 13:48:57 -07:00
Viktor Lidholt
48a6cd839a Sprite physics, first iteration 2015-10-02 14:15:14 -07:00
Adam Barth
7662a30f85 Moves from vector_math to vector_math_64
* Moves from vector_math to vector_math_64
* Adds support for Float64List in Dart bindings
2015-10-01 14:46:13 -07:00
Adam Barth
45c906d2ad Make fn3 the default widget framework 2015-10-01 09:48:35 -07:00
Adam Barth
5477d46f19 Port SkySprites and clients to fn3 2015-10-01 09:26:19 -07:00
Viktor Lidholt
0cb811ef06 Renames pointQuickDist in GameMath 2015-09-25 13:12:01 -07:00
Viktor Lidholt
7d71cf06cf Adds documentation and cleans up code 2015-09-23 15:34:06 -07:00
Viktor Lidholt
4bc4c978c9 Merge pull request #1299 from vlidholt/master
Removes artifacts from textured lines in sprites
2015-09-23 11:07:42 -07:00
Viktor Lidholt
ac6cda4d20 Removes some of the artifacts from textured lines 2015-09-23 08:33:48 -07:00
Viktor Lidholt
53f83f795e Adds method for calculating intersection between two lines 2015-09-23 08:31:04 -07:00
Adam Barth
051354ae1d Remove EventDisposition
All the use cases for EventDisposition are now addressed by the gesture
detection system.
2015-09-21 16:45:09 -07:00
Viktor Lidholt
a66a5c4bff Improvements to EffectLine in sprites 2015-09-18 15:58:16 -07:00
Adam Barth
490b22874a SkySprites should import the public libraries
Importing the public libraries caused a name conflict with dart:sky because we
assume people will import dart:sky into a namespace, so I've also changed
skysprites to import dart:sky into a namespace.
2015-09-18 11:19:39 -07:00
Viktor Lidholt
8900b4c8ba Adds TexturedLine and animated EffectLine to sprites 2015-09-17 13:27:43 -07:00
Adam Barth
7064551a45 Move mojo frontend into services.dart
What's important about this code is that it's presenting services outside the
VM, not the particular technology used to present the services.
2015-09-16 19:13:50 -07:00
Adam Barth
945b5bcd64 Remove use of some deprecated functions on sky.Paint
We now expose idiomatic setters for these properties. Eventually we'll remove
the setter functions.
2015-09-13 17:24:15 -07:00
Adam Barth
5108e15ed0 Introduce painting.dart and move painting code to src/painting 2015-09-08 10:36:14 -07:00
Adam Barth
b356d14635 Introduce package:sky/animation.dart
Move the animation libraries into src/animation and change importers to use
package:sky/animation.dart. Also, move scheduler.dart into the animation
library so that the animation library can be self-contained.
2015-09-08 09:44:01 -07:00
Viktor Lidholt
e749bea18c Adds constraint for aligning with another node in sprites 2015-09-03 15:35:47 -07:00
Adam Barth
693ddcd8dd Move widgets and rendering inside src
Code outside of package:sky should import this code using

package:sky/rendering.dart
package:sky/widgets.dart

Moving this code into the "src" directory is a convention that signifies that
and it cleans up the generated dartdoc because the libraries in the src
directory aren't included in the generated documentation. Instead, the classes
are documented in the widgets.dart and rendering.dart libraries.
2015-09-02 13:38:00 -07:00
Viktor Lidholt
ffd3a1b2f2 Fixes issue in sprite constraint 2015-09-02 10:56:44 -07:00
Viktor Lidholt
92236ccfc1 Fixes sprite label so it doesn't use a fixed max width 2015-09-01 16:36:40 -07:00
Viktor Lidholt
3f2369dbe9 Initial support for labels in skysprites 2015-09-01 16:14:53 -07:00
Viktor Lidholt
065673711e Switches to named arguments in sprite constraints 2015-08-26 10:07:24 -07:00
Viktor Lidholt
b244a082ad Fixes issue with inheritance in sprite constraints 2015-08-26 09:54:32 -07:00
Viktor Lidholt
ebeb8e2d42 Moves sky sprites to its own package 2015-08-25 16:08:46 -07:00