Skip to content

Instantly share code, notes, and snippets.

View trezy's full-sized avatar
🥳

Trezy trezy

🥳
View GitHub Profile
@trezy
trezy / generateHSLCustomProperties.scss
Last active October 18, 2021 15:37
SCSS mixins for generating a set of CSS Custom Properties to use for HSL color calculations.
// Generates a set of flexible CSS Custom Properties
@mixin generateHSLCustomProperties($propertyName, $hue, $saturation, $lightness) {
// $safeName is necessary because $name can be a color literal (like 'red').
// Sass doesn't like that, so we convert it to a string.
$safeName: '' + $propertyName;
--#{$safeName}-hue: calc(#{$hue} + var(--hue-shift));
--#{$safeName}-saturation: #{$saturation};
--#{$safeName}-lightness: #{$lightness};
//tiled render code
//by glEnd2
/*
to use create a new Tilemap object with the path to your .json file exported from tiled.
will do the rest from there.
to get renderable canvas use Tilemap.getImage();
rendering is done at creation so that there is less overhead later on.
*/