add the other activity envisioned on the home page (though not sending data yet)

This commit is contained in:
2023-06-22 20:51:06 -06:00
parent 07e7a70d56
commit aa2f484a9f
8 changed files with 138 additions and 11 deletions

View File

@@ -0,0 +1,72 @@
<template>
<div v-if="visible" class="dialog-overlay">
<div class="dialog">
<h1>Received from {{ contact?.name || "nobody in particular" }}</h1>
<p>{{ message }}</p>
<input
type="text"
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
placeholder="What you received"
v-model="description"
/>
<button @click="confirm">Confirm</button>
&nbsp;
<button @click="cancel">Cancel</button>
</div>
</div>
</template>
<script>
export default {
props: ["message"],
data() {
return {
contact: null,
description: "",
visible: false,
};
},
methods: {
open(contact) {
this.contact = contact;
this.visible = true;
},
close() {
this.visible = false;
},
confirm() {
this.close();
this.$emit("dialog-result", {
action: "confirm",
contact: this.contact,
description: this.description,
});
},
cancel() {
this.close();
this.$emit("dialog-result", { action: "cancel" });
},
},
};
</script>
<style>
.dialog-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
}
.dialog {
background-color: white;
padding: 1rem;
border-radius: 0.5rem;
width: 50%;
}
</style>

View File

@@ -2,7 +2,7 @@ import { PlaneGeometry, MeshLambertMaterial, Mesh, TextureLoader } from "three";
export function createTerrain(props) {
const loader = new TextureLoader();
const height = loader.load("img/textures/forest-floor.png");
const height = loader.load("img/textures/leafy-autumn-forest-floor.jpg");
// w h
const geometry = new PlaneGeometry(props.width, props.height, 64, 64);