Play again at game over
This commit is contained in:
1 parent
2e4b1c17b2
commit
5512ea56e7
3 files changed
+63
-42
No files matched your search
+2
-8
@@ -1,14 +1,8 @@
|
||||
import {createCanvas, drawRect, clipCanvas, plot} from './gfx.js';
|
||||
import {randomInt, gradient} from './math.js';
|
||||
import {SKY_COLORS} from './constants.js';
|
||||
import {drawRect} from './gfx.js';
|
||||
import {gradient} from './math.js';
|
||||
import {sample} from './utils.js';
|
||||
|
||||
export function createSky(width, height) {
|
||||
const ctx = createCanvas(width, height);
|
||||
generateSky(ctx);
|
||||
return ctx;
|
||||
}
|
||||
|
||||
export function generateSky(ctx) {
|
||||
const {width, height} = ctx.canvas;
|
||||
const {from, to} = sample(SKY_COLORS);
|
||||
|
||||
Reference in new issue
Block a user