| OLD | NEW |
| (Empty) | |
| 1 (function(scope) { |
| 2 'use strict'; |
| 3 |
| 4 var tokens = null; |
| 5 var scroll = null; |
| 6 var transform = null; |
| 7 |
| 8 function tick(context) { |
| 9 var seconds = context.timestamp / 1000.0; |
| 10 var matrix = context.getMatrix(transform); |
| 11 matrix.m42 = 0.5 * context.getScalar(scroll); |
| 12 context.setMatrix(transform, matrix); |
| 13 scope.teleportMessage(context, tick); |
| 14 } |
| 15 |
| 16 scope.onmessage = function(e) { |
| 17 tokens = e.data; |
| 18 scroll = tokens[0]; |
| 19 transform = tokens[1]; |
| 20 var context = new TeleportContext(tokens); |
| 21 scope.teleportMessage(context, tick); |
| 22 }; |
| 23 |
| 24 })(self); |
| OLD | NEW |