forked from GithubMirrors/cardconjurer
		
	restyle
This commit is contained in:
		| @@ -236,10 +236,10 @@ class cardText { | |||||||
| } | } | ||||||
|  |  | ||||||
| function scaleX(xToScale) { | function scaleX(xToScale) { | ||||||
| 	return xToScale * cardWidth | 	return Math.round(xToScale * cardWidth) | ||||||
| } | } | ||||||
| function scaleY(yToScale) { | function scaleY(yToScale) { | ||||||
| 	return yToScale * cardHeight | 	return Math.round(yToScale * cardHeight) | ||||||
| } | } | ||||||
|  |  | ||||||
| function drawCardObjects() { | function drawCardObjects() { | ||||||
|   | |||||||
| @@ -9,7 +9,9 @@ rootStyles.setProperty('--body-background', 'none') | |||||||
| setCookie('colorPalette', 'dayRave') | setCookie('colorPalette', 'dayRave') | ||||||
|  |  | ||||||
| //Stops the hue shift when another palette is loaded | //Stops the hue shift when another palette is loaded | ||||||
| document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false) | if (document.getElementById('inputColorPalette') != null) { | ||||||
|  | 	document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false) | ||||||
|  | } | ||||||
|  |  | ||||||
| function removeEventListener() { | function removeEventListener() { | ||||||
| 	clearInterval(colorCycle) | 	clearInterval(colorCycle) | ||||||
| @@ -17,7 +19,7 @@ function removeEventListener() { | |||||||
| } | } | ||||||
|  |  | ||||||
| //Shifts the hue | //Shifts the hue | ||||||
| var colorCycle = setInterval(shiftHue, 100) | var colorCycle = setInterval(shiftHue, 200) | ||||||
| var currentHueRotation = 0 | var currentHueRotation = 0 | ||||||
|  |  | ||||||
| function shiftHue() { | function shiftHue() { | ||||||
|   | |||||||
| @@ -9,7 +9,9 @@ rootStyles.setProperty('--body-background', 'none') | |||||||
| setCookie('colorPalette', 'nightRave') | setCookie('colorPalette', 'nightRave') | ||||||
|  |  | ||||||
| //Stops the hue shift when another palette is loaded | //Stops the hue shift when another palette is loaded | ||||||
| document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false) | if (document.getElementById('inputColorPalette') != null) { | ||||||
|  | 	document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false) | ||||||
|  | } | ||||||
|  |  | ||||||
| function removeEventListener() { | function removeEventListener() { | ||||||
| 	clearInterval(colorCycle) | 	clearInterval(colorCycle) | ||||||
| @@ -17,7 +19,7 @@ function removeEventListener() { | |||||||
| } | } | ||||||
|  |  | ||||||
| //Shifts the hue | //Shifts the hue | ||||||
| var colorCycle = setInterval(shiftHue, 100) | var colorCycle = setInterval(shiftHue, 200) | ||||||
| var currentHueRotation = 0 | var currentHueRotation = 0 | ||||||
|  |  | ||||||
| function shiftHue() { | function shiftHue() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kyle
					Kyle