| Index: LayoutTests/fast/workers/resources/parallax1.js
|
| diff --git a/LayoutTests/fast/workers/resources/parallax1.js b/LayoutTests/fast/workers/resources/parallax1.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d09416ad08e8205a5a6020f20e9a8ab7c4e269e2
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/workers/resources/parallax1.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.m24 = 0.5 * context.getScalar(scroll); //Math.sin(seconds);
|
| + 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);
|
|
|