| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, computed } from "vue"; |
| | | import { ref, computed, inject } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { initeWaterPrimitiveView } from "@/utils/water"; |
| | | const emit = defineEmits(["start", "end"]); |
| | | // const emit = defineEmits(["start", "end"]); |
| | | const { startSimulate, endSimulate } = inject("simulateActions"); |
| | | |
| | | function endPlay() { |
| | | emit("end"); |
| | | } |
| | | // function endPlay() { |
| | | // emit("end"); |
| | | // } |
| | | |
| | | function startPlay() { |
| | | initeWaterPrimitiveView(); |
| | | emit("start"); |
| | | // emit("start"); |
| | | startSimulate(); |
| | | } |
| | | // 定义 Props |
| | | const props = defineProps({ |