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

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

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and keep Backwards-compatibility class Date. Created 7 years, 11 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/solar/web/solar.dart ('k') | samples/swarm/DataSource.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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 document.on.keyDown.add(keydown); 214 document.on.keyDown.add(keydown);
215 document.on.keyUp.add(keyup); 215 document.on.keyUp.add(keyup);
216 document.on.mouseMove.add(mouseMove); 216 document.on.mouseMove.add(mouseMove);
217 window.on.mouseWheel.add(mouseWheel); 217 window.on.mouseWheel.add(mouseWheel);
218 document.on.fullscreenChange.add(fullscreenChange); 218 document.on.fullscreenChange.add(fullscreenChange);
219 } 219 }
220 220
221 num renderTime; 221 num renderTime;
222 222
223 void update(double time) { 223 void update(double time) {
224 num t = new Date.now().millisecondsSinceEpoch; 224 num t = new DateTime.now().millisecondsSinceEpoch;
225 225
226 if (renderTime != null) { 226 if (renderTime != null) {
227 showFps((1000 / (t - renderTime)).round()); 227 showFps((1000 / (t - renderTime)).round());
228 } 228 }
229 229
230 renderTime = t; 230 renderTime = t;
231 231
232 glContext.viewport(0, 0, width, height); 232 glContext.viewport(0, 0, width, height);
233 glContext.clearColor(0.0, 0.0, 0.0, 1.0); 233 glContext.clearColor(0.0, 0.0, 0.0, 1.0);
234 glContext.clearDepth(1.0); 234 glContext.clearDepth(1.0);
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 print(log); 536 print(log);
537 } 537 }
538 } 538 }
539 539
540 /** 540 /**
541 * The entry point to the application. 541 * The entry point to the application.
542 */ 542 */
543 void main() { 543 void main() {
544 application.startup('#container'); 544 application.startup('#container');
545 } 545 }
OLDNEW
« no previous file with comments | « samples/solar/web/solar.dart ('k') | samples/swarm/DataSource.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698