Hosting code to git for the first time.

This commit is contained in:
2023-02-02 17:29:05 +08:00
parent 398469ebe4
commit c8fe5854ab
57 changed files with 2419 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
<template>
<div ref="contentRef" class="content"></div>
</template>
<script lang="ts" setup>
import { ref, onMounted } from "vue";
import { WebGLCanvas, EventEmitter } from "@ray-lab/renderer-webgl";
const contentRef = ref<HTMLDivElement>();
const canvasEle = document.createElement("canvas");
onMounted(() => {
const c = new WebGLCanvas({
canvas: canvasEle,
container: contentRef.value,
autoResize: true,
width: 800,
height: 600
});
// c.on("resize", () => { console.log(c.canvas.width, c.canvas.height) });
if (contentRef.value) {
contentRef.value.appendChild(canvasEle);
}
})
</script>
<style>
html, body {
margin: 0;
}
div.content {
position: absolute;
width: 100%;
height: 100%;
}
</style>
@@ -0,0 +1,5 @@
import { createApp } from "vue";
import AppVue from "./App.vue";
const oneMapApp = createApp(AppVue);
oneMapApp.mount("#app");