Initial commit after recreate
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"componentId": "voxel-universe",
|
||||
"displayName": "Voxel Universe",
|
||||
"version": "1.0.0",
|
||||
"folderName": "glitch_voxel_universe",
|
||||
"packageName": "@glitch-components/voxel-universe",
|
||||
"entry": "dist/voxel_universe.js",
|
||||
"source": "src/index.tsx",
|
||||
"tags": [
|
||||
"glitch-component",
|
||||
"voxel",
|
||||
"geometry"
|
||||
]
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
import React from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import VoxelUniverse, { metadata } from "./voxel_universe.js";
|
||||
|
||||
const rootElement = document.getElementById("root");
|
||||
|
||||
if (rootElement) {
|
||||
createRoot(rootElement).render(
|
||||
React.createElement(VoxelUniverse, {
|
||||
config: {
|
||||
id: "voxel-universe-hosted",
|
||||
name: metadata?.name ?? "voxel_universe",
|
||||
version: metadata?.version ?? "1.0.0",
|
||||
params: metadata?.defaultParams ?? {}
|
||||
},
|
||||
theme: {
|
||||
primary: "#45c4b0",
|
||||
accent: "#ff7a59",
|
||||
bg: "#0d1117",
|
||||
bgSecondary: "#182237",
|
||||
text: "#f1f4ef",
|
||||
textMuted: "#b6c0d4",
|
||||
border: "#34516f"
|
||||
},
|
||||
onProgress: () => {},
|
||||
onComplete: () => {}
|
||||
})
|
||||
);
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Voxel Universe</title>
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #0d1117;
|
||||
}
|
||||
</style>
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"react": "https://esm.sh/react@18.3.1",
|
||||
"react/jsx-runtime": "https://esm.sh/react@18.3.1/jsx-runtime",
|
||||
"react-dom/client": "https://esm.sh/react-dom@18.3.1/client"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="./host.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+14400
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user