[READ-ONLY] Mirror of https://github.com/flo-bit/flo-bit.github.io. my personal website, w/ astro, svelte, tailwind, typescript, threlte flo-bit.dev/
portfolio portfolio-website svelte sveltekit tailwind threejs threlte typescript
0

Configure Feed

Select the types of activity you want to include in your feed.

flo-bit.github.io / src / lib / 3D / worlds / presets.ts
3.4 kB 257 lines
1import { type BiomeOptions } from './biome'; 2 3const beach: BiomeOptions = { 4 noise: { 5 min: -0.05, 6 max: 0.05, 7 octaves: 4, 8 lacunarity: 2.0, 9 gain: { 10 min: 0.1, 11 max: 0.8, 12 scale: 2 13 }, 14 warp: 0.3, 15 scale: 1, 16 power: 1.5 17 }, 18 19 colors: [ 20 [-0.5, 0x994400], 21 [-0.0, 0xccaa00], 22 [0.4, 0xcc7700], 23 [1.0, 0x002222] 24 ], 25 26 seaColors: [ 27 [-1, 0x000066], 28 [-0.52, 0x0000aa], 29 [-0.1, 0x00f2e5] 30 ], 31 seaNoise: { 32 min: -0.005, 33 max: 0.005, 34 scale: 5 35 }, 36 37 vegetation: { 38 items: [ 39 { 40 name: 'PalmTree', 41 density: 50, 42 minimumHeight: 0.1, 43 colors: { 44 Brown: { array: [0x8b4513, 0x5b3105] }, 45 Green: { array: [0x22851e, 0x22a51e] }, 46 DarkGreen: { array: [0x006400] } 47 } 48 }, 49 { 50 name: 'Rock', 51 density: 10, 52 minimumHeight: 0.1, 53 colors: { 54 Gray: { array: [0x775544] } 55 } 56 } 57 ] 58 } 59}; 60 61const forest: BiomeOptions = { 62 noise: { 63 min: -0.05, 64 max: 0.05, 65 octaves: 4, 66 lacunarity: 2.0, 67 gain: { 68 min: 0.1, 69 max: 0.8, 70 scale: 2 71 }, 72 warp: 0.3, 73 scale: 1, 74 power: 0.8 75 }, 76 77 tintColor: 0x113322, 78 79 colors: [ 80 [-0.5, 0x332200], 81 [-0.0, 0x115512], 82 [0.4, 0x224411], 83 [1.0, 0x006622] 84 ], 85 86 seaColors: [ 87 [-1, 0x000066], 88 [-0.52, 0x0000aa], 89 [-0.1, 0x0042a5] 90 ], 91 seaNoise: { 92 min: -0.005, 93 max: 0.005, 94 scale: 5 95 }, 96 97 vegetation: { 98 items: [ 99 { 100 name: 'Rock', 101 density: 5, 102 minimumHeight: 0.1, 103 colors: { 104 Gray: { array: [0x888888, 0x616161, 0x414141] } 105 } 106 }, 107 { 108 name: 'CommonTree', 109 density: 5, 110 minimumHeight: 0.0 111 }, 112 { 113 name: 'Bush', 114 density: 5, 115 minimumHeight: 0.0 116 }, 117 { 118 name: 'CommonTree_Dead', 119 density: 5 120 }, 121 { 122 name: 'PineTree', 123 density: 5 124 }, 125 { 126 name: 'TreeStump', 127 density: 1 128 }, 129 { 130 name: 'TreeStump_Moss', 131 density: 1 132 }, 133 { 134 name: 'Willow', 135 density: 5 136 }, 137 { 138 name: 'Willow_Dead', 139 density: 5 140 }, 141 { 142 name: 'WoodLog', 143 density: 1 144 }, 145 { 146 name: 'BirchTree', 147 density: 5 148 }, 149 { 150 name: 'BirchTree_Dead', 151 density: 5 152 } 153 ] 154 } 155}; 156 157const snowForest: BiomeOptions = { 158 noise: { 159 min: -0.05, 160 max: 0.05, 161 octaves: 4, 162 lacunarity: 2.0, 163 gain: { 164 min: 0.1, 165 max: 0.8, 166 scale: 2 167 }, 168 warp: 0.3, 169 scale: 1, 170 power: 0.8 171 }, 172 173 tintColor: 0x119922, 174 175 colors: [ 176 [-0.5, 0xff99ff], 177 [-0.0, 0xffffff], 178 [0.4, 0xeeffff], 179 [1.0, 0xffffff] 180 ], 181 182 seaColors: [ 183 [-1, 0x8899cc], 184 [-0.52, 0xaaccff], 185 [-0.1, 0xaaccff] 186 ], 187 seaNoise: { 188 min: -0.005, 189 max: 0.005, 190 scale: 5 191 }, 192 193 vegetation: { 194 items: [ 195 { 196 name: 'Rock_Snow', 197 density: 5, 198 minimumHeight: 0.1, 199 colors: { 200 Gray: { array: [0x888888, 0x616161, 0x414141] } 201 } 202 }, 203 { 204 name: 'CommonTree_Snow', 205 density: 5, 206 minimumHeight: 0.0 207 }, 208 { 209 name: 'Bush_Snow', 210 density: 5, 211 minimumHeight: 0.0 212 }, 213 { 214 name: 'CommonTree_Dead_Snow', 215 density: 5 216 }, 217 { 218 name: 'PineTree_Snow', 219 density: 5 220 }, 221 { 222 name: 'TreeStump_Snow', 223 density: 1 224 }, 225 { 226 name: 'TreeStump_Snow', 227 density: 1 228 }, 229 { 230 name: 'Willow_Snow', 231 density: 5 232 }, 233 { 234 name: 'Willow_Dead_Snow', 235 density: 5 236 }, 237 { 238 name: 'WoodLog_Snow', 239 density: 1 240 }, 241 { 242 name: 'BirchTree_Snow', 243 density: 5 244 }, 245 { 246 name: 'BirchTree_Dead_Snow', 247 density: 5 248 } 249 ] 250 } 251}; 252 253export const biomePresets: Record<string, BiomeOptions> = { 254 beach, 255 forest, 256 snowForest 257};