| Index: LayoutTests/fast/workers/resources/parallax.js
|
| diff --git a/LayoutTests/fast/workers/resources/parallax.js b/LayoutTests/fast/workers/resources/parallax.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f584620f82d8289674ce22989ac252531bf1e3a5
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/workers/resources/parallax.js
|
| @@ -0,0 +1,24 @@
|
| +(function(scope) {
|
| + 'use strict';
|
| +
|
| + var tokens = null;
|
| + var scroll = null;
|
| + var transform = null;
|
| +
|
| + function tick(context) {
|
| + var seconds = context.timestamp / 1000.0;
|
| + var matrix = context.getMatrix(transform);
|
| + matrix.m42 = 0.5 * context.getScalar(scroll);
|
| + context.setMatrix(transform, matrix);
|
| + scope.teleportMessage(context, tick);
|
| + }
|
| +
|
| + scope.onmessage = function(e) {
|
| + tokens = e.data;
|
| + scroll = tokens[0];
|
| + transform = tokens[1];
|
| + var context = new TeleportContext(tokens);
|
| + scope.teleportMessage(context, tick);
|
| + };
|
| +
|
| +})(self);
|
|
|