This commit is contained in:
zenoamaro committed 2019-06-26 03:05:13 +02:00
1 parent 330140d419
commit c4ab55ac2f
3 files changed
+22 -12

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ export function createTerrain(width, height) {
export function generateTerrain(ctx) {
const {width, height} = ctx.canvas;
for (let x=0; x<width; x++) {
const h = Math.round(80 + 8 * Math.sin(x/25));
const h = Math.round(80 + 30 * Math.sin(x/25));
drawRect(ctx, x, height-h, 1, h, 'burlywood');
}
}