2013-06-17 13:42:53 +04:00
|
|
|
// TODO(grosbouddha): put under pskl namespace.
|
2012-08-31 12:45:07 +04:00
|
|
|
var Constants = {
|
2013-11-25 22:00:19 +04:00
|
|
|
DEFAULT : {
|
|
|
|
HEIGHT : 32,
|
|
|
|
WIDTH : 32,
|
|
|
|
FPS : 12
|
|
|
|
},
|
|
|
|
|
|
|
|
MODEL_VERSION : 2,
|
|
|
|
|
|
|
|
MAX_HEIGHT : 1024,
|
|
|
|
MAX_WIDTH : 1024,
|
|
|
|
|
2014-03-30 05:12:56 +04:00
|
|
|
MINIMUM_ZOOM : 1,
|
|
|
|
|
2013-11-25 22:00:19 +04:00
|
|
|
PREVIEW_FILM_SIZE : 120,
|
2014-03-30 05:12:56 +04:00
|
|
|
ANIMATED_PREVIEW_WIDTH : 200,
|
2013-11-25 22:00:19 +04:00
|
|
|
|
|
|
|
DEFAULT_PEN_COLOR : '#000000',
|
2014-03-30 05:12:56 +04:00
|
|
|
TRANSPARENT_COLOR : 'rgba(0, 0, 0, 0)',
|
|
|
|
|
|
|
|
// Used for Spectrum input
|
|
|
|
PREFERRED_COLOR_FORMAT : 'rgb',
|
2013-11-25 22:00:19 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Fake semi-transparent color used to highlight transparent
|
|
|
|
* strokes and rectangles:
|
|
|
|
*/
|
|
|
|
SELECTION_TRANSPARENT_COLOR: 'rgba(255, 255, 255, 0.6)',
|
|
|
|
|
|
|
|
/*
|
|
|
|
* When a tool is hovering the drawing canvas, we highlight the eventual
|
|
|
|
* pixel target with this color:
|
|
|
|
*/
|
|
|
|
TOOL_TARGET_HIGHLIGHT_COLOR: 'rgba(255, 255, 255, 0.2)',
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Default entry point for piskel web service:
|
|
|
|
*/
|
|
|
|
STATIC : {
|
|
|
|
URL : {
|
|
|
|
SAVE : 'http://3.piskel-app.appspot.com/store',
|
|
|
|
GET : 'http://3.piskel-app.appspot.com/get'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
APPENGINE : {
|
|
|
|
URL : {
|
|
|
|
SAVE : 'save'
|
|
|
|
}
|
|
|
|
},
|
2014-03-30 05:12:56 +04:00
|
|
|
IMAGE_SERVICE_UPLOAD_URL : 'http://piskel-imgstore-a.appspot.com/__/upload',
|
|
|
|
IMAGE_SERVICE_GET_URL : 'http://piskel-imgstore-a.appspot.com/img/',
|
2013-11-25 22:00:19 +04:00
|
|
|
|
|
|
|
ZOOMED_OUT_BACKGROUND_COLOR : '#A0A0A0',
|
|
|
|
|
2014-03-30 05:12:56 +04:00
|
|
|
LEFT_BUTTON : 0,
|
|
|
|
MIDDLE_BUTTON : 1,
|
|
|
|
RIGHT_BUTTON : 2,
|
2013-11-25 22:00:19 +04:00
|
|
|
MOUSEMOVE_THROTTLING : 10,
|
|
|
|
|
|
|
|
ABSTRACT_FUNCTION : function () {throw 'abstract method should be implemented';}
|
2012-08-31 12:45:07 +04:00
|
|
|
};
|