-
Notifications
You must be signed in to change notification settings - Fork 2
/
sketch.js
65 lines (60 loc) · 1.46 KB
/
sketch.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
var canvasWidth = window.innerWidth-10;
var canvasHeight = window.innerHeight-10;
var scl = 10;
var w = 130;
var h = 65;
var elevationObj = {
offset: 0.1,
frequency: 1,
octave: 1,
redistribution: 1
};
var drynessObj = {
offset: 0.03,
frequency: 0.7,
octave: 1,
redistribution: 1
};
var forestObj = {
offset: 0.6,
frequency: 1,
octave: 1,
redistribution: 1
};
var colorObj = {
seed: this.seed+70,
offset: 0.1,
frequency: 1,
octave: 1,
redistribution: 1
};
var imageSet = [];
function preload(){
/*
imageSet['Stone'] = loadImage('tile-stone.png');
imageSet['Beach'] = loadImage('tile-beach.png');
imageSet['Sandstone'] = loadImage('tile-sandstone.png');
imageSet['Brush'] = loadImage('tile-brush.png');
imageSet['Grass'] = loadImage('tile-grass.png');
imageSet['Desert'] = loadImage('tile-desert.png');
imageSet['Swamp'] = loadImage('tile-swamp.png');
imageSet['Water'] = loadImage('tile-water.png');
imageSet['Snow'] = loadImage('tile-snow.png');
imageSet['Savana'] = loadImage('tile-savana.png');
imageSet['ForestBrush'] = loadImage('tile-brush-forest.png');
imageSet['ForestGrass'] = loadImage('tile-grass-forest.png');
imageSet['ForestSavana'] = loadImage('tile-savana-forest.png');
*/
}
function setup() {
createCanvas(canvasWidth, canvasHeight);
background(51);
noStroke();
noLoop();
m = new Map(Math.floor(Math.random()*100000000000000));
m.make(w,h);
m.show();
setNoiseValue();
}
function draw() {
}