Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Unified Diff: samples/solar/web/solar.dart

Issue 25808002: Move Rectangle and Point into dart:math. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: samples/solar/web/solar.dart
diff --git a/samples/solar/web/solar.dart b/samples/solar/web/solar.dart
index e4dc6ada1f2bfd401f13e580267e87377c5242b4..a2a7d5568efcc8e9f9035997144e5b6303ab0594 100644
--- a/samples/solar/web/solar.dart
+++ b/samples/solar/web/solar.dart
@@ -48,17 +48,17 @@ class SolarSystem {
// Initialize the planets and start the simulation.
start() {
// Measure the canvas element.
- Rect rect = canvas.parent.client;
+ Rectangle rect = canvas.parent.client;
width = rect.width;
height = rect.height;
canvas.width = width;
- // Create sun.
+ // Create sun.
final mercury = new PlanetaryBody(this, "orange", 0.382, 0.387, 0.241);
final venus = new PlanetaryBody(this, "green", 0.949, 0.723, 0.615);
sun = new PlanetaryBody(this, "#ff2", 14.0)..addPlanet(mercury)
..addPlanet(venus);
-
+
final earth = new PlanetaryBody(this, "#33f", 1.0, 1.0, 1.0);
final moon = new PlanetaryBody(this, "gray", 0.2, 0.14, 0.075);
final mars = new PlanetaryBody(this, "red", 0.532, 1.524, 1.88);
@@ -66,7 +66,7 @@ class SolarSystem {
..addPlanet(mars));
addAsteroidBelt(sun, 150);
-
+
final f = 0.1;
final h = 1 / 1500.0;
final g = 1 / 72.0;

Powered by Google App Engine
This is Rietveld 408576698