| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * A solar system visualization. | 6 * A solar system visualization. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #library("solar"); | 9 #library("solar"); |
| 10 | 10 |
| 11 #import("dart:html"); | 11 #import("dart:html"); |
| 12 #import("dart:math", prefix: "Math"); |
| 12 | 13 |
| 13 /** | 14 /** |
| 14 * The entry point to the application. | 15 * The entry point to the application. |
| 15 */ | 16 */ |
| 16 void main() { | 17 void main() { |
| 17 var solarSystem = new SolarSystem(query("#container")); | 18 var solarSystem = new SolarSystem(query("#container")); |
| 18 | 19 |
| 19 solarSystem.start(); | 20 solarSystem.start(); |
| 20 } | 21 } |
| 21 | 22 |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 } else { | 261 } else { |
| 261 num angle = solarSystem.renderTime * orbitSpeed; | 262 num angle = solarSystem.renderTime * orbitSpeed; |
| 262 | 263 |
| 263 return new Point( | 264 return new Point( |
| 264 orbitRadius * Math.cos(angle) + x, | 265 orbitRadius * Math.cos(angle) + x, |
| 265 orbitRadius * Math.sin(angle) + y); | 266 orbitRadius * Math.sin(angle) + y); |
| 266 } | 267 } |
| 267 } | 268 } |
| 268 | 269 |
| 269 } | 270 } |
| OLD | NEW |