diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
diff --git a/src/components/publics/PublicPreview.svelte b/src/components/publics/PublicPreview.svelte
index 8934b83..503540c 100644
--- a/src/components/publics/PublicPreview.svelte
+++ b/src/components/publics/PublicPreview.svelte
@@ -22,9 +22,8 @@
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
import {onDestroy, onMount} from "svelte";
- import { CollectionEntry } from "astro:content";
- export let pub: CollectionEntry<"publics">;
+ export let file: string;
export let fov: number = 60;
export let near: number = 1
export let far: number = 1000;
@@ -41,10 +40,6 @@
let observer: ResizeObserver;
onMount(() => {
- if (!pub.data["3d"]) {
- return;
- }
-
scene = new THREE.Scene();
scene.background = new THREE.Color(0x171717);
camera = new THREE.PerspectiveCamera(fov, 1, near, far);
@@ -57,8 +52,8 @@
const loader = new GLTFLoader();
- loader.load(`/3d/${pub.id}.glb`, (gltf) => {
- scene.add(gltf.scene);
+ loader.load(`/3d/${file}.glb`, (gltf) => {
+ let s = scene.add(gltf.scene);
let cube_bbox = new THREE.Box3();
cube_bbox.setFromObject(gltf.scene);
@@ -69,9 +64,7 @@
camera.position.set(0, center.y, distance);
controls.update();
- }, undefined, (e) => {
- console.error(e);
- });
+ }, undefined, console.log);
div.append(renderer.domElement);
diff --git a/src/components/publics/XRayPreview.svelte b/src/components/publics/XRayPreview.svelte
index 1676343..b458e98 100644
--- a/src/components/publics/XRayPreview.svelte
+++ b/src/components/publics/XRayPreview.svelte
@@ -20,19 +20,29 @@
-
+
diff --git a/src/content/config.ts b/src/content/config.ts
index 048b28c..ff45259 100644
--- a/src/content/config.ts
+++ b/src/content/config.ts
@@ -97,7 +97,6 @@ export const publics = defineCollection({
"image": image(),
"xray": image().optional(),
"gamemode": reference("modes"),
- "3d": z.boolean().optional().default(true),
}),
});
diff --git a/src/content/publics/frostbite.json b/src/content/publics/frostbite.json
index 9379724..95e8c1b 100644
--- a/src/content/publics/frostbite.json
+++ b/src/content/publics/frostbite.json
@@ -4,6 +4,6 @@
"id": 123,
"creator": ["Test", "Test2"],
"gamemode": "wargear",
- "image": "../../images/publics/frostbite/area_render_2_.png",
- "xray": "../../images/publics/frostbite/area_render_1_.png"
+ "image": "../../images/area_render_2_.png",
+ "xray": "../../images/area_render_1_.png"
}
\ No newline at end of file
diff --git a/src/content/publics/ghostleviathan.json b/src/content/publics/ghostleviathan.json
deleted file mode 100644
index 0765447..0000000
--- a/src/content/publics/ghostleviathan.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "name": "GhostLeviathan",
- "description": "A simple, lightweight description of a GhostLeviathan.",
- "id": 789,
- "creator": ["Test", "Test2"],
- "gamemode": "wargear",
- "image": "../../images/publics/ghostleviathan/area_render_9_.png",
- "3d": false
-}
\ No newline at end of file
diff --git a/src/content/publics/lilith.json b/src/content/publics/lilith.json
deleted file mode 100644
index 14110fb..0000000
--- a/src/content/publics/lilith.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "name": "Lilith",
- "description": "A simple, lightweight description of a Lilith.",
- "id": 456,
- "creator": ["Test", "Test2"],
- "gamemode": "wargear",
- "image": "../../images/publics/lilith/area_render_11_.png",
- "3d": false
-}
\ No newline at end of file
diff --git a/src/content/publics/warpedowl.json b/src/content/publics/warpedowl.json
deleted file mode 100644
index 465858e..0000000
--- a/src/content/publics/warpedowl.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "name": "WarpedOwl",
- "description": "A simple, lightweight description of a WarpedOwl.",
- "id": 456,
- "creator": ["Test", "Test2"],
- "gamemode": "wargear",
- "image": "../../images/publics/warpedowl/area_render_12_.png",
- "3d": false
-}
\ No newline at end of file
diff --git a/src/images/publics/frostbite/2024-03-24_20.59.03.png b/src/images/2024-03-24_20.59.03.png
similarity index 100%
rename from src/images/publics/frostbite/2024-03-24_20.59.03.png
rename to src/images/2024-03-24_20.59.03.png
diff --git a/src/images/publics/frostbite/2024-03-24_20.59.59.png b/src/images/2024-03-24_20.59.59.png
similarity index 100%
rename from src/images/publics/frostbite/2024-03-24_20.59.59.png
rename to src/images/2024-03-24_20.59.59.png
diff --git a/src/images/publics/frostbite/area_render_1_.png b/src/images/area_render_1_.png
similarity index 100%
rename from src/images/publics/frostbite/area_render_1_.png
rename to src/images/area_render_1_.png
diff --git a/src/images/publics/frostbite/area_render_2_.png b/src/images/area_render_2_.png
similarity index 100%
rename from src/images/publics/frostbite/area_render_2_.png
rename to src/images/area_render_2_.png
diff --git a/src/images/publics/ghostleviathan/area_render_9_.png b/src/images/publics/ghostleviathan/area_render_9_.png
deleted file mode 100644
index bb20d5d..0000000
Binary files a/src/images/publics/ghostleviathan/area_render_9_.png and /dev/null differ
diff --git a/src/images/publics/lilith/area_render_11_.png b/src/images/publics/lilith/area_render_11_.png
deleted file mode 100644
index d82109b..0000000
Binary files a/src/images/publics/lilith/area_render_11_.png and /dev/null differ
diff --git a/src/images/publics/warpedowl/area_render_12_.png b/src/images/publics/warpedowl/area_render_12_.png
deleted file mode 100644
index 5b77837..0000000
Binary files a/src/images/publics/warpedowl/area_render_12_.png and /dev/null differ
diff --git a/src/pages/publics/[schem].astro b/src/pages/publics/[schem].astro
index 4dbd979..2f88ecb 100644
--- a/src/pages/publics/[schem].astro
+++ b/src/pages/publics/[schem].astro
@@ -23,8 +23,8 @@ const { schem }: { schem: CollectionEntry<"publics">} = Astro.props;
{schem.data.name}
-
-
+
+
{schem.data.description}
diff --git a/src/pages/publics/index.astro b/src/pages/publics/index.astro
index b93d0c5..e3f3da6 100644
--- a/src/pages/publics/index.astro
+++ b/src/pages/publics/index.astro
@@ -5,30 +5,25 @@ import {l} from "../../util/util";
import { Image } from "astro:assets";
import Card from "@components/Card.svelte";
import XRayPreview from "@components/publics/XRayPreview.svelte";
-import {t} from "astro-i18n";
-const gamemodes = await getCollection("modes");
const publics = await getCollection("publics");
---
- {gamemodes.filter(value => publics.map(value1 => value1.data.gamemode.id).includes(value.id)).map((gamemode) => (
- {t(`${gamemode.data.translationKey}.title`)}
-
- ))}
+