| 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 import "dart:math" as Math; | 5 import "dart:math" as Math; |
| 6 import "android_extension.dart"; | 6 import "android_extension.dart"; |
| 7 | 7 |
| 8 const FRAGMENT_PROGRAM = """ | 8 const FRAGMENT_PROGRAM = """ |
| 9 precision mediump float; | 9 precision mediump float; |
| 10 | 10 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 gl.uniform3f(sphere3Center, x3, y3, z3); | 312 gl.uniform3f(sphere3Center, x3, y3, z3); |
| 313 | 313 |
| 314 gl.drawArrays(WebGLRenderingContext.TRIANGLE_STRIP, 0, 4); | 314 gl.drawArrays(WebGLRenderingContext.TRIANGLE_STRIP, 0, 4); |
| 315 | 315 |
| 316 t += 0.03; | 316 t += 0.03; |
| 317 if (t > Math.PI * 200) { | 317 if (t > Math.PI * 200) { |
| 318 t -= Math.PI * 200; | 318 t -= Math.PI * 200; |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 | 321 |
| 322 setup(int w, int h) { | 322 setup(int x, int y, int w, int h) { |
| 323 initShaders(); | 323 initShaders(); |
| 324 gl.clearColor(0.0, 0.0, 0.0, 1.0); | 324 gl.clearColor(0.0, 0.0, 0.0, 1.0); |
| 325 gl.clearDepth(1.0); | 325 gl.clearDepth(1.0); |
| 326 initBuffers(); | 326 initBuffers(); |
| 327 resize(w, h); | 327 resize(w, h); |
| 328 playBackground("music/la_ere_gymnopedie.mp3"); | 328 playBackground("music/la_ere_gymnopedie.mp3"); |
| 329 } | 329 } |
| 330 | 330 |
| 331 resize(int w, int h) { | 331 resize(int w, int h) { |
| 332 width = w; | 332 width = w; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 350 onMotionMove(num when, num x, num y) {} | 350 onMotionMove(num when, num x, num y) {} |
| 351 onMotionCancel(num when, num x, num y) {} | 351 onMotionCancel(num when, num x, num y) {} |
| 352 onMotionOutside(num when, num x, num y) {} | 352 onMotionOutside(num when, num x, num y) {} |
| 353 onMotionPointerDown(num when, num x, num y) {} | 353 onMotionPointerDown(num when, num x, num y) {} |
| 354 onMotionPointerUp(num when, num x, num y) {} | 354 onMotionPointerUp(num when, num x, num y) {} |
| 355 onKeyDown(num when, int flags, int keycode, int metastate, int repeat) {} | 355 onKeyDown(num when, int flags, int keycode, int metastate, int repeat) {} |
| 356 onKeyUp(num when, int flags, int keycode, int metastate, int repeat) {} | 356 onKeyUp(num when, int flags, int keycode, int metastate, int repeat) {} |
| 357 onKeyMultiple(num when, int flags, int keycode, int metastate, int repeat) { | 357 onKeyMultiple(num when, int flags, int keycode, int metastate, int repeat) { |
| 358 } | 358 } |
| 359 | 359 |
| OLD | NEW |