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

Unified Diff: experimental/docs/utilities.js

Issue 1342523002: json based animation toy (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: wip whats next? Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/docs/svgbaseddoc.htm ('k') | resources/slides.lua » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/docs/utilities.js
diff --git a/experimental/docs/utilities.js b/experimental/docs/utilities.js
new file mode 100644
index 0000000000000000000000000000000000000000..e3261c604e2b08b93b1925157c4af2f61c04c7f7
--- /dev/null
+++ b/experimental/docs/utilities.js
@@ -0,0 +1,24 @@
+function alpha(value, color) {
+ return value << 24 | (color & 0x00FFFFFF);
+}
+
+function argb(a, r, g, b) {
+ return a << 24 | r << 16 | g << 8 | b;
+}
+
+function assert(condition) {
+ if (!condition) debugger;
+}
+
+function isAlpha(code) {
+ return (code > 64 && code < 91) // upper alpha (A-Z)
+ || (code > 96 && code < 123); // lower alpha (a-z)
+}
+
+function isArray(a) {
+ return a.constructor === Array;
+}
+
+function rgb(r, g, b) {
+ return 0xFF << 24 | r << 16 | g << 8 | b;
+}
« no previous file with comments | « experimental/docs/svgbaseddoc.htm ('k') | resources/slides.lua » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698