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

Unified Diff: chrome/test/data/third_party/spaceport/js/sprites/transformers/scale.js

Issue 10134041: Add test data for spaceport benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/third_party/spaceport/js/sprites/transformers/scale.js
diff --git a/chrome/test/data/third_party/spaceport/js/sprites/transformers/scale.js b/chrome/test/data/third_party/spaceport/js/sprites/transformers/scale.js
new file mode 100644
index 0000000000000000000000000000000000000000..55468e0b2faf1ec62b87d51c42e48863123892c6
--- /dev/null
+++ b/chrome/test/data/third_party/spaceport/js/sprites/transformers/scale.js
@@ -0,0 +1,14 @@
+define([ 'sprites/Transform' ], function (Transform) {
+ return function scale(frameIndex, objectIndex) {
+ var scale = (Math.sin((objectIndex + frameIndex * (objectIndex + 1)) / 100) / 2 + 1) * 0.4;
+ var x = Math.cos(objectIndex) * 200 + 100;
+ var y = Math.sin(objectIndex) * 200 + 100;
+
+ return new Transform({
+ x: x,
+ y: y,
+ scaleX: scale,
+ scaleY: scale
+ });
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698