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

Side by Side Diff: samples/solar3d/web/solar.dart

Issue 12317107: ceil/floor/truncate/round return integers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload due to error3 Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/logo/logo.dart ('k') | samples/swarm/Views.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 solar3d; 9 library solar3d;
10 10
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 /** 258 /**
259 * Display the animation's FPS in a div. 259 * Display the animation's FPS in a div.
260 */ 260 */
261 void showFps(num fps) { 261 void showFps(num fps) {
262 if (fpsAverage == null) { 262 if (fpsAverage == null) {
263 fpsAverage = fps; 263 fpsAverage = fps;
264 } 264 }
265 265
266 fpsAverage = fps * 0.05 + fpsAverage * 0.95; 266 fpsAverage = fps * 0.05 + fpsAverage * 0.95;
267 267
268 query("#notes").text = "${fpsAverage.round().toInt()} fps"; 268 query("#notes").text = "${fpsAverage.round()} fps";
269 } 269 }
270 270
271 /** 271 /**
272 * A representation of the solar system. 272 * A representation of the solar system.
273 * 273 *
274 * This class maintains a list of planetary bodies, knows how to draw its 274 * This class maintains a list of planetary bodies, knows how to draw its
275 * background and the planets, and requests that it be redraw at appropriate 275 * background and the planets, and requests that it be redraw at appropriate
276 * intervals using the [Window.requestAnimationFrame] method. 276 * intervals using the [Window.requestAnimationFrame] method.
277 */ 277 */
278 class SolarSystem { 278 class SolarSystem {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 print(log); 526 print(log);
527 } 527 }
528 } 528 }
529 529
530 /** 530 /**
531 * The entry point to the application. 531 * The entry point to the application.
532 */ 532 */
533 void main() { 533 void main() {
534 application.startup('#container'); 534 application.startup('#container');
535 } 535 }
OLDNEW
« no previous file with comments | « samples/logo/logo.dart ('k') | samples/swarm/Views.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698