| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2009, Google Inc. | 2 Copyright 2009, Google Inc. |
| 3 All rights reserved. | 3 All rights reserved. |
| 4 | 4 |
| 5 Redistribution and use in source and binary forms, with or without | 5 Redistribution and use in source and binary forms, with or without |
| 6 modification, are permitted provided that the following conditions are | 6 modification, are permitted provided that the following conditions are |
| 7 met: | 7 met: |
| 8 | 8 |
| 9 * Redistributions of source code must retain the above copyright | 9 * Redistributions of source code must retain the above copyright |
| 10 notice, this list of conditions and the following disclaimer. | 10 notice, this list of conditions and the following disclaimer. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 switch (keyChar) { | 192 switch (keyChar) { |
| 193 case 'p': | 193 case 'p': |
| 194 triggerPoof(); | 194 triggerPoof(); |
| 195 break; | 195 break; |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 | 198 |
| 199 function onKeyDown(event) { | 199 function onKeyDown(event) { |
| 200 event = event || window.event; | 200 event = event || window.event; |
| 201 g_keyDown[event.keyCode] = true; | 201 g_keyDown[o3djs.event.getEventKeyChar(event)] = true; |
| 202 } | 202 } |
| 203 | 203 |
| 204 function onKeyUp(event) { | 204 function onKeyUp(event) { |
| 205 event = event || window.event; | 205 event = event || window.event; |
| 206 g_keyDown[event.keyCode] = false; | 206 g_keyDown[o3djs.event.getEventKeyChar(event)] = false; |
| 207 } | 207 } |
| 208 | 208 |
| 209 function setupFlame() { | 209 function setupFlame() { |
| 210 var transform = g_pack.createObject('Transform'); | 210 var transform = g_pack.createObject('Transform'); |
| 211 transform.parent = g_client.root; | 211 transform.parent = g_client.root; |
| 212 transform.translate(-300, 0, 0); | 212 transform.translate(-300, 0, 0); |
| 213 | 213 |
| 214 var emitter = g_particleSystem.createParticleEmitter(); | 214 var emitter = g_particleSystem.createParticleEmitter(); |
| 215 g_emitters.push(emitter); | 215 g_emitters.push(emitter); |
| 216 emitter.setState(o3djs.particles.ParticleStateIds.ADD); | 216 emitter.setState(o3djs.particles.ParticleStateIds.ADD); |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 <body onload="init();" onunload="unload();"> | 584 <body onload="init();" onunload="unload();"> |
| 585 <h1>Particles</h1> | 585 <h1>Particles</h1> |
| 586 <br/> | 586 <br/> |
| 587 <!-- Start of O3D plugin --> | 587 <!-- Start of O3D plugin --> |
| 588 <div id="o3d" style="width: 800px; height: 600px;"></div> | 588 <div id="o3d" style="width: 800px; height: 600px;"></div> |
| 589 <!-- End of O3D plugin --> | 589 <!-- End of O3D plugin --> |
| 590 Press 'P' to make a poof.<br/> | 590 Press 'P' to make a poof.<br/> |
| 591 Hold 'T' to make a trail. | 591 Hold 'T' to make a trail. |
| 592 </body> | 592 </body> |
| 593 </html> | 593 </html> |
| OLD | NEW |