mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
chore : fix jshint errors "thanks" to caret version range from grunt-contrib-jshint
This commit is contained in:
parent
cd8d5c0b52
commit
73b165ef0c
@ -9,6 +9,15 @@
|
|||||||
|
|
||||||
var TRANSPARENT_COLOR = 'rgba(0, 0, 0, 0)';
|
var TRANSPARENT_COLOR = 'rgba(0, 0, 0, 0)';
|
||||||
|
|
||||||
|
var componentToHex = function (c) {
|
||||||
|
var hex = c.toString(16);
|
||||||
|
return hex.length == 1 ? '0' + hex : hex;
|
||||||
|
};
|
||||||
|
|
||||||
|
var rgbToHex = function (r, g, b) {
|
||||||
|
return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);
|
||||||
|
};
|
||||||
|
|
||||||
var toHexString_ = function(color) {
|
var toHexString_ = function(color) {
|
||||||
if (color === TRANSPARENT_COLOR) {
|
if (color === TRANSPARENT_COLOR) {
|
||||||
return color;
|
return color;
|
||||||
@ -25,15 +34,6 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var rgbToHex = function (r, g, b) {
|
|
||||||
return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);
|
|
||||||
};
|
|
||||||
|
|
||||||
var componentToHex = function (c) {
|
|
||||||
var hex = c.toString(16);
|
|
||||||
return hex.length == 1 ? '0' + hex : hex;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getFrameColors = function (frame) {
|
var getFrameColors = function (frame) {
|
||||||
var frameColors = {};
|
var frameColors = {};
|
||||||
for (var x = 0 ; x < frame.length ; x++) {
|
for (var x = 0 ; x < frame.length ; x++) {
|
||||||
|
@ -24,15 +24,15 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var rgbToHex = function (r, g, b) {
|
|
||||||
return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);
|
|
||||||
};
|
|
||||||
|
|
||||||
var componentToHex = function (c) {
|
var componentToHex = function (c) {
|
||||||
var hex = c.toString(16);
|
var hex = c.toString(16);
|
||||||
return hex.length == 1 ? '0' + hex : hex;
|
return hex.length == 1 ? '0' + hex : hex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var rgbToHex = function (r, g, b) {
|
||||||
|
return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);
|
||||||
|
};
|
||||||
|
|
||||||
var imageDataToGrid = function (imageData, width, height, transparent) {
|
var imageDataToGrid = function (imageData, width, height, transparent) {
|
||||||
// Draw the zoomed-up pixels to a different canvas context
|
// Draw the zoomed-up pixels to a different canvas context
|
||||||
var grid = [];
|
var grid = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user