| 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 solar3d; | 9 library solar3d; |
| 10 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 futures.add(textureManager.load('uranus_diffuse.jpg')); | 96 futures.add(textureManager.load('uranus_diffuse.jpg')); |
| 97 futures.add(textureManager.load('neptune_diffuse.jpg')); | 97 futures.add(textureManager.load('neptune_diffuse.jpg')); |
| 98 futures.add(textureManager.loadCube('Sky', [ | 98 futures.add(textureManager.loadCube('Sky', [ |
| 99 'positiveX.jpg', | 99 'positiveX.jpg', |
| 100 'negativeX.jpg', | 100 'negativeX.jpg', |
| 101 'positiveY.jpg', | 101 'positiveY.jpg', |
| 102 'negativeY.jpg', | 102 'negativeY.jpg', |
| 103 'positiveZ.jpg', | 103 'positiveZ.jpg', |
| 104 'negativeZ.jpg', | 104 'negativeZ.jpg', |
| 105 ])); | 105 ])); |
| 106 return Futures.wait(futures); | 106 return Future.wait(futures); |
| 107 } | 107 } |
| 108 | 108 |
| 109 bool get _fullScreened => canvas == document.webkitFullscreenElement; | 109 bool get _fullScreened => canvas == document.webkitFullscreenElement; |
| 110 | 110 |
| 111 void clicked(Event event) { | 111 void clicked(Event event) { |
| 112 canvas.webkitRequestPointerLock(); | 112 canvas.webkitRequestPointerLock(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 /* Returns true if the pointer is owned by our canvas element */ | 115 /* Returns true if the pointer is owned by our canvas element */ |
| 116 bool get _pointerLocked => canvas == document.webkitPointerLockElement; | 116 bool get _pointerLocked => canvas == document.webkitPointerLockElement; |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |