diff --git a/src/App.vue b/src/App.vue index 234cf1e..d5d59c7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,6 +27,7 @@ pocket({ name: 'Pick Axe', type: 'tool', icon: 'pick', quality: 'wood' }) let animationFrame = 0 let lastTick = 0 +const debug = ref(false) const x = ref(0) const y = ref(0) const floorX = computed(() => Math.floor(x.value)) @@ -233,7 +234,7 @@ onMounted(() => {
@@ -256,7 +257,12 @@ onMounted(() => {
- +
x:{{ floorX }}, y:{{ floorY }} diff --git a/src/light-mask.vue b/src/light-mask.vue deleted file mode 100644 index e99e005..0000000 --- a/src/light-mask.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/src/util/useLightMap.ts b/src/util/useLightMap.ts index 38afbb4..bdd9b75 100644 --- a/src/util/useLightMap.ts +++ b/src/util/useLightMap.ts @@ -48,7 +48,9 @@ export default function useLightMap( // Add color stops: white in the center to transparent white playerLight.addColorStop(0.0, "#FFFF"); - playerLight.addColorStop(1, "#FFF0"); + playerLight.addColorStop(0.4, "#FFFF"); + playerLight.addColorStop(0.7, "#FFFA"); + playerLight.addColorStop(1, "#FFF1"); // Set the fill style and draw a rectangle ctx.fillStyle = playerLight; @@ -58,7 +60,6 @@ export default function useLightMap( function drawLights() { // used for everything above ground const ambientLight = getAmbientLightColor() - const surroundingLight = ambientLight.slice(-2) const barrier = lightBarrier.value ctx.fillStyle = ambientLight @@ -74,8 +75,7 @@ export default function useLightMap( // make light columns wider to illuminate surrounding blocks const extra = Math.floor(B / 2) - const reflectedLight = ambientLight.slice(0, -1) + ', 50%)' - ctx.fillStyle = reflectedLight + ctx.fillStyle = ambientLight.slice(0, -1) + ', 40%)' for (let col = 0; col < W / B; col++) { const level = (barrier[col] - y.value) * B const sw = B