obelisk-browserify
Version:
Browserify-compatible fork of obelisk.js, hopefully temporary
49 lines (40 loc) • 983 B
JavaScript
/*global obelisk:true*/
/*
* ColorPattern
*/
(function (obelisk) {
"use strict";
var ColorPattren, p;
ColorPattren = function () {
throw new Error('ColorGeom is a static Class, cannot be instanced.');
};
p = ColorPattren;
// public properties
p.GRASS_GREEN = 0xCCFF00;
p.YELLOW = 0xFFFF00;
p.WINE_RED = 0xFF0099;
p.PINK = 0xFF7CBF;
p.PURPLE = 0xCC00FF;
p.BLUE = 0x00CCFF;
p.GRAY = 0xEEEEEE;
p.BLACK = 0x666666;
p.FINE_COLORS =
[
p.GRASS_GREEN,
p.YELLOW,
p.WINE_RED,
p.PINK,
p.PURPLE,
p.BLUE,
p.GRAY,
p.BLACK
];
// public methods
p.getRandomComfortableColor = function () {
return p.FINE_COLORS[Math.floor(Math.random() * p.FINE_COLORS.length)];
};
p.toString = function () {
return "[ColorPattern]";
};
obelisk.ColorPattern = ColorPattren;
}(obelisk));