2013-06-17 13:42:53 +04:00
|
|
|
// TODO(grosbouddha): put under pskl namespace.
|
2013-08-11 12:04:35 +04:00
|
|
|
var Constants = {
|
2013-09-22 23:02:43 +04:00
|
|
|
DEFAULT : {
|
|
|
|
HEIGHT : 32,
|
|
|
|
WIDTH : 32,
|
2015-07-26 03:00:46 +03:00
|
|
|
FPS : 12,
|
|
|
|
LAYER_OPACITY : 0.2
|
2013-08-10 14:11:16 +04:00
|
|
|
},
|
2012-09-16 20:48:32 +04:00
|
|
|
|
2016-08-25 00:02:27 +03:00
|
|
|
MODEL_VERSION : 3,
|
2013-09-22 23:02:43 +04:00
|
|
|
|
2013-10-30 01:16:39 +04:00
|
|
|
MAX_HEIGHT : 1024,
|
|
|
|
MAX_WIDTH : 1024,
|
2012-09-03 03:34:11 +04:00
|
|
|
|
2015-04-14 23:36:25 +03:00
|
|
|
MAX_PALETTE_COLORS : 100,
|
2014-07-03 02:48:49 +04:00
|
|
|
|
2014-05-08 22:45:05 +04:00
|
|
|
PREVIEW_FILM_SIZE : 96,
|
2014-03-30 04:10:00 +04:00
|
|
|
ANIMATED_PREVIEW_WIDTH : 200,
|
2013-08-06 01:34:11 +04:00
|
|
|
|
2013-09-29 01:52:51 +04:00
|
|
|
DEFAULT_PEN_COLOR : '#000000',
|
2013-11-21 03:44:46 +04:00
|
|
|
TRANSPARENT_COLOR : 'rgba(0, 0, 0, 0)',
|
2016-06-04 17:58:49 +03:00
|
|
|
SEAMLESS_MODE_OVERLAY_COLOR : 'rgba(255, 255, 255, 0.5)',
|
2013-09-30 01:26:09 +04:00
|
|
|
|
2014-05-08 23:56:36 +04:00
|
|
|
CURRENT_COLORS_PALETTE_ID : '__current-colors',
|
2014-03-30 16:56:31 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
/*
|
|
|
|
* Fake semi-transparent color used to highlight transparent
|
|
|
|
* strokes and rectangles:
|
|
|
|
*/
|
2015-09-12 18:54:11 +03:00
|
|
|
SELECTION_TRANSPARENT_COLOR: 'rgba(160, 215, 240, 0.6)',
|
2012-09-16 17:35:30 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
/*
|
|
|
|
* When a tool is hovering the drawing canvas, we highlight the eventual
|
|
|
|
* pixel target with this color:
|
|
|
|
*/
|
2015-09-12 18:54:11 +03:00
|
|
|
TOOL_HIGHLIGHT_COLOR_LIGHT: 'rgba(255, 255, 255, 0.2)',
|
|
|
|
TOOL_HIGHLIGHT_COLOR_DARK: 'rgba(0, 0, 0, 0.2)',
|
2013-09-30 01:26:09 +04:00
|
|
|
|
2013-11-05 03:05:49 +04:00
|
|
|
ZOOMED_OUT_BACKGROUND_COLOR : '#A0A0A0',
|
2013-04-09 09:24:07 +04:00
|
|
|
|
2013-12-06 01:12:48 +04:00
|
|
|
LEFT_BUTTON : 0,
|
|
|
|
MIDDLE_BUTTON : 1,
|
|
|
|
RIGHT_BUTTON : 2,
|
2013-11-15 03:32:18 +04:00
|
|
|
MOUSEMOVE_THROTTLING : 10,
|
|
|
|
|
2014-05-08 03:41:14 +04:00
|
|
|
ABSTRACT_FUNCTION : function () {throw 'abstract method should be implemented';},
|
2014-08-24 00:45:52 +04:00
|
|
|
EMPTY_FUNCTION : function () {},
|
|
|
|
|
|
|
|
// TESTS
|
2014-12-21 18:44:10 +03:00
|
|
|
DRAWING_TEST_FOLDER : 'drawing',
|
|
|
|
|
|
|
|
// SERVICE URLS
|
|
|
|
APPENGINE_SAVE_URL : 'save',
|
|
|
|
IMAGE_SERVICE_UPLOAD_URL : 'http://piskel-imgstore-b.appspot.com/__/upload',
|
|
|
|
IMAGE_SERVICE_GET_URL : 'http://piskel-imgstore-b.appspot.com/img/'
|
2015-04-14 19:02:33 +03:00
|
|
|
};
|