From 5ac4a80a5cbe8b19d7caa027b3bdf3ffae45eaec Mon Sep 17 00:00:00 2001 From: GitButler Date: Fri, 3 May 2024 20:52:06 +0200 Subject: [PATCH 1/3] GitButler Integration Commit This is an integration commit for the virtual branches that GitButler is tracking. Due to GitButler managing multiple virtual branches, you cannot switch back and forth between git branches and virtual branches easily. If you switch to another branch, GitButler will need to be reinitialized. If you commit on this branch, GitButler will throw it away. Here are the branches that are currently applied: - Virtual branch (refs/gitbutler/Virtual-branch) branch head: 6e6eb5069fd06ed7358eb9432340aae48c0452fd - .gitignore - update-frostbite-images-2024 (refs/gitbutler/update-frostbite-images-2024) branch head: 6e6eb5069fd06ed7358eb9432340aae48c0452fd - .gitignore - master (refs/gitbutler/master) Your previous branch was: 073d474bc3f06d064c45fe303ac46f922327cb19 The sha for that commit was: 073d474bc3f06d064c45fe303ac46f922327cb19 For more information about what we're doing here, check out our docs: https://docs.gitbutler.com/features/virtual-branches/integration-branch --- .gitignore | 0 src/components/publics/PublicPreview.svelte | 15 ++----- src/components/publics/XRayPreview.svelte | 14 ++++++- src/content/config.ts | 1 - src/content/publics/frostbite.json | 4 +- src/content/publics/ghostleviathan.json | 9 ----- src/content/publics/lilith.json | 9 ----- src/content/publics/warpedowl.json | 9 ----- .../frostbite => }/2024-03-24_20.59.03.png | Bin .../frostbite => }/2024-03-24_20.59.59.png | Bin .../frostbite => }/area_render_1_.png | Bin .../frostbite => }/area_render_2_.png | Bin .../publics/ghostleviathan/area_render_9_.png | Bin 1636798 -> 0 bytes src/images/publics/lilith/area_render_11_.png | Bin 1384475 -> 0 bytes .../publics/warpedowl/area_render_12_.png | Bin 1406174 -> 0 bytes src/pages/publics/[schem].astro | 4 +- src/pages/publics/index.astro | 37 ++++++++---------- 17 files changed, 36 insertions(+), 66 deletions(-) mode change 100644 => 100755 .gitignore delete mode 100644 src/content/publics/ghostleviathan.json delete mode 100644 src/content/publics/lilith.json delete mode 100644 src/content/publics/warpedowl.json rename src/images/{publics/frostbite => }/2024-03-24_20.59.03.png (100%) rename src/images/{publics/frostbite => }/2024-03-24_20.59.59.png (100%) rename src/images/{publics/frostbite => }/area_render_1_.png (100%) rename src/images/{publics/frostbite => }/area_render_2_.png (100%) delete mode 100644 src/images/publics/ghostleviathan/area_render_9_.png delete mode 100644 src/images/publics/lilith/area_render_11_.png delete mode 100644 src/images/publics/warpedowl/area_render_12_.png 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 @@ -