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

Side by Side Diff: LayoutTests/fast/workers/resources/scrub.html

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 transform = null;
6 var opacity = null;
7 var scroll = null;
8
9 // An extremely cheesy animation.
10 function tick(context) {
11 var seconds = context.timestamp / 1000.0;
12 var matrix = context.getMatrix(transform);
13 matrix.m14 = 200.0 + 100 * Math.sin(seconds);
14
15 context.setMatrix(transform, matrix);
16 //context.setScalar(opacity, 0.5 + 0.5 * (Math.sin(seconds * 2.0)));
17 context.setScalar(opacity, 0.5 + 0.5 * scroll);
18 context.setScalar(scroll, 200.0 + 100.0 * (Math.sin(seconds * 0.75)));
19
20 scope.teleportMessage(context, tick);
21 }
22
23 scope.onmessage = function(e) {
24 tokens = e.data;
25 transform = tokens[0];
26 opacity = tokens[1];
27 scroll = tokens[2];
28 var context = new TeleportContext(tokens);
29 scope.teleportMessage(context, tick);
30 };
31
32 })(self);
OLDNEW
« no previous file with comments | « LayoutTests/fast/workers/resources/scroll-linked-effects.js ('k') | LayoutTests/fast/workers/resources/scrub.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698