| Index: LayoutTests/fast/workers/resources/teleport.js
|
| diff --git a/LayoutTests/fast/workers/resources/teleport.js b/LayoutTests/fast/workers/resources/teleport.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..164e597a52d44ddf297df6f798daa0f2f4a91ba5
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/workers/resources/teleport.js
|
| @@ -0,0 +1,21 @@
|
| +(function(scope) {
|
| + 'use strict';
|
| +
|
| + var token = null;
|
| +
|
| + // An extremely cheesy animation.
|
| + function tick(context) {
|
| + var seconds = context.timestamp / 1000.0;
|
| + var matrix = context.getMatrix(token);
|
| + matrix.m14 = 200.0 + 100 * Math.sin(seconds);
|
| + context.setMatrix(token, matrix);
|
| + scope.teleportMessage(context, tick);
|
| + }
|
| +
|
| + scope.onmessage = function(e) {
|
| + token = e.data;
|
| + var context = new TeleportContext([token]);
|
| + scope.teleportMessage(context, tick);
|
| + };
|
| +
|
| +})(self);
|
|
|