Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: LayoutTests/fast/workers/resources/parallax1.js

Issue 474683003: Not for review - Rebase of crrev.com/62833003 Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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.m24 = 0.5 * context.getScalar(scroll); //Math.sin(seconds);
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);
OLDNEW
« no previous file with comments | « LayoutTests/fast/workers/resources/parallax.js ('k') | LayoutTests/fast/workers/resources/scroll-linked-effects.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698