Skip to content

Commit

Permalink
refactor: cleanup renderAtlas function and update color handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vladjerca committed Aug 21, 2024
1 parent d7e8d52 commit dcd4fbc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions renderer/internal/renderAtlas.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { randomFloat, randomInt } from '../../utils/rng.mjs';
import { getContext } from './canvas/getContext.mjs';
import { drawPath } from './draw/drawPath.mjs';
import { drawFuzzyCircle } from './draw/drawFuzzyCircle.mjs';
import { state } from './constants/state.mjs';
import { colors } from './constants/colors.mjs';

const ATLAS_SIZE = randomInt('atlas_size', 50, 100);
const ATLAS_X_OFFSET = 0.2;
Expand Down Expand Up @@ -37,9 +35,6 @@ export function renderAtlas({
const primerColor = colors.sky
.clone()
.darken(30);
const atmosphereColor = colors.sky
.clone()
.darken(10);

const primerPoints = [
[x, y - ATLAS_SIZE * 1.2],
Expand All @@ -51,6 +46,10 @@ export function renderAtlas({

drawFuzzyCircle(context, x, y, ATLAS_SIZE * 0.5, ATLAS_CORE_ACTIVITY, ATLAS_CORE_COLOR_RGB_STRING);

const atmosphereColor = colors.sky
.clone()
.darken(10);

const topRightPoints = [
[x, y - ATLAS_SIZE * 1.2],
[x + ATLAS_SIZE, y],
Expand Down

0 comments on commit dcd4fbc

Please sign in to comment.