Hosting code to git for the first time.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Ray Lay Renderer Debugger</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/source/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"private": "true",
|
||||
"name": "@ray-lab/renderer-debugger",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"dev": "vite"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@ray-lab/renderer-virtual": "workspace:*",
|
||||
"@ray-lab/renderer-webgl": "workspace:*",
|
||||
"vue": "^3.2.45"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.11.18",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue/tsconfig": "^0.1.3",
|
||||
"typescript": "^4.9.4",
|
||||
"vite": "^4.0.4",
|
||||
"vite-plugin-vue-setup-extend": "^0.4.0"
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.web.json",
|
||||
|
||||
"include": [
|
||||
"./source/**/*",
|
||||
"./source/**/*.vue"
|
||||
],
|
||||
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"build"
|
||||
],
|
||||
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"alwaysStrict": true,
|
||||
"baseUrl": "./",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"useDefineForClassFields": true,
|
||||
},
|
||||
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.vite.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.node.json",
|
||||
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"types": ["node"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { defineConfig, type UserConfig, type ConfigEnv } from "vite";
|
||||
import { default as vuePlugin } from "@vitejs/plugin-vue";
|
||||
import { default as VueSetupExtend } from 'vite-plugin-vue-setup-extend';
|
||||
import { resolve } from "path";
|
||||
|
||||
const projectPath = resolve(__dirname, "./");
|
||||
const buildPath = resolve(projectPath, "./build");
|
||||
|
||||
async function viteConfig({ command, mode }: ConfigEnv): Promise<UserConfig> {
|
||||
|
||||
return {
|
||||
root: projectPath,
|
||||
build: {
|
||||
outDir: buildPath,
|
||||
},
|
||||
plugins: [vuePlugin(), VueSetupExtend()]
|
||||
}
|
||||
}
|
||||
|
||||
export default defineConfig(viteConfig);
|
||||
Reference in New Issue
Block a user