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:6e6eb5069f
- .gitignore - update-frostbite-images-2024 (refs/gitbutler/update-frostbite-images-2024) branch head:6e6eb5069f
- .gitignore - master (refs/gitbutler/master) Your previous branch was:073d474bc3
The sha for that commit was:073d474bc3
For more information about what we're doing here, check out our docs: https://docs.gitbutler.com/features/virtual-branches/integration-branch
0
.gitignore
vendored
Normale Datei → Ausführbare Datei
@ -22,9 +22,8 @@
|
|||||||
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
|
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
|
||||||
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
|
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
|
||||||
import {onDestroy, onMount} from "svelte";
|
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 fov: number = 60;
|
||||||
export let near: number = 1
|
export let near: number = 1
|
||||||
export let far: number = 1000;
|
export let far: number = 1000;
|
||||||
@ -41,10 +40,6 @@
|
|||||||
let observer: ResizeObserver;
|
let observer: ResizeObserver;
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (!pub.data["3d"]) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
scene = new THREE.Scene();
|
scene = new THREE.Scene();
|
||||||
scene.background = new THREE.Color(0x171717);
|
scene.background = new THREE.Color(0x171717);
|
||||||
camera = new THREE.PerspectiveCamera(fov, 1, near, far);
|
camera = new THREE.PerspectiveCamera(fov, 1, near, far);
|
||||||
@ -57,8 +52,8 @@
|
|||||||
|
|
||||||
const loader = new GLTFLoader();
|
const loader = new GLTFLoader();
|
||||||
|
|
||||||
loader.load(`/3d/${pub.id}.glb`, (gltf) => {
|
loader.load(`/3d/${file}.glb`, (gltf) => {
|
||||||
scene.add(gltf.scene);
|
let s = scene.add(gltf.scene);
|
||||||
|
|
||||||
let cube_bbox = new THREE.Box3();
|
let cube_bbox = new THREE.Box3();
|
||||||
cube_bbox.setFromObject(gltf.scene);
|
cube_bbox.setFromObject(gltf.scene);
|
||||||
@ -69,9 +64,7 @@
|
|||||||
camera.position.set(0, center.y, distance);
|
camera.position.set(0, center.y, distance);
|
||||||
|
|
||||||
controls.update();
|
controls.update();
|
||||||
}, undefined, (e) => {
|
}, undefined, console.log);
|
||||||
console.error(e);
|
|
||||||
});
|
|
||||||
|
|
||||||
div.append(renderer.domElement);
|
div.append(renderer.domElement);
|
||||||
|
|
||||||
|
@ -20,19 +20,29 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
let xray: HTMLDivElement;
|
let xray: HTMLDivElement;
|
||||||
|
|
||||||
|
let size = 100;
|
||||||
|
|
||||||
function mouseMove(e: MouseEvent) {
|
function mouseMove(e: MouseEvent) {
|
||||||
let x = e.offsetX;
|
let x = e.offsetX;
|
||||||
let y = e.offsetY;
|
let y = e.offsetY;
|
||||||
|
|
||||||
xray.style.clipPath = `circle(100px at ${x}px ${y}px)`;
|
xray.style.clipPath = `circle(${size}px at ${x}px ${y}px)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
xray.style.clipPath = 'circle(0px at 0 0)';
|
xray.style.clipPath = 'circle(0px at 0 0)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleScroll(e: WheelEvent) {
|
||||||
|
size += e.deltaY / -20;
|
||||||
|
if (size < 20) {
|
||||||
|
size = 20;
|
||||||
|
}
|
||||||
|
mouseMove(e);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="relative overflow-hidden rounded-xl" on:mousemove={mouseMove} on:mouseleave={reset} role="img">
|
<div class="relative overflow-hidden rounded-xl" on:mousemove={mouseMove} on:mousewheel|preventDefault={handleScroll} on:mouseleave={reset} role="img">
|
||||||
<slot name="normal"></slot>
|
<slot name="normal"></slot>
|
||||||
<div bind:this={xray} class="absolute top-0 left-0 right-0 bottom-0 xray" style="clip-path: circle(0px at 0 0);">
|
<div bind:this={xray} class="absolute top-0 left-0 right-0 bottom-0 xray" style="clip-path: circle(0px at 0 0);">
|
||||||
<slot name="xray">
|
<slot name="xray">
|
||||||
|
@ -97,7 +97,6 @@ export const publics = defineCollection({
|
|||||||
"image": image(),
|
"image": image(),
|
||||||
"xray": image().optional(),
|
"xray": image().optional(),
|
||||||
"gamemode": reference("modes"),
|
"gamemode": reference("modes"),
|
||||||
"3d": z.boolean().optional().default(true),
|
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
"id": 123,
|
"id": 123,
|
||||||
"creator": ["Test", "Test2"],
|
"creator": ["Test", "Test2"],
|
||||||
"gamemode": "wargear",
|
"gamemode": "wargear",
|
||||||
"image": "../../images/publics/frostbite/area_render_2_.png",
|
"image": "../../images/area_render_2_.png",
|
||||||
"xray": "../../images/publics/frostbite/area_render_1_.png"
|
"xray": "../../images/area_render_1_.png"
|
||||||
}
|
}
|
@ -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
|
|
||||||
}
|
|
@ -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
|
|
||||||
}
|
|
@ -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
|
|
||||||
}
|
|
Vorher Breite: | Höhe: | Größe: 3.7 MiB Nachher Breite: | Höhe: | Größe: 3.7 MiB |
Vorher Breite: | Höhe: | Größe: 2.3 MiB Nachher Breite: | Höhe: | Größe: 2.3 MiB |
Vorher Breite: | Höhe: | Größe: 1.4 MiB Nachher Breite: | Höhe: | Größe: 1.4 MiB |
Vorher Breite: | Höhe: | Größe: 1.7 MiB Nachher Breite: | Höhe: | Größe: 1.7 MiB |
Vorher Breite: | Höhe: | Größe: 1.6 MiB |
Vorher Breite: | Höhe: | Größe: 1.3 MiB |
Vorher Breite: | Höhe: | Größe: 1.3 MiB |
@ -23,8 +23,8 @@ const { schem }: { schem: CollectionEntry<"publics">} = Astro.props;
|
|||||||
|
|
||||||
<PageLayout title={schem.data.name}>
|
<PageLayout title={schem.data.name}>
|
||||||
<h1 class="text-5xl font-bold w-fit" transition:name={schem.data.id + "-title"}>{schem.data.name}</h1>
|
<h1 class="text-5xl font-bold w-fit" transition:name={schem.data.id + "-title"}>{schem.data.name}</h1>
|
||||||
<PublicPreview client:idle pub={schem} imageHeight={schem.data.image.height}>
|
<PublicPreview client:idle file={schem.id} imageHeight={schem.data.image.height}>
|
||||||
<Image class="object-contain" transition:name={schem.data.id + "-img"} src={schem.data.image} alt={schem.data.name}></Image>
|
<Image transition:name={schem.data.id + "-img"} src={schem.data.image} alt={schem.data.name}></Image>
|
||||||
</PublicPreview>
|
</PublicPreview>
|
||||||
<p transition:name={schem.data.id + "-desc"}>{schem.data.description}</p>
|
<p transition:name={schem.data.id + "-desc"}>{schem.data.description}</p>
|
||||||
<p>
|
<p>
|
||||||
|
@ -5,30 +5,25 @@ import {l} from "../../util/util";
|
|||||||
import { Image } from "astro:assets";
|
import { Image } from "astro:assets";
|
||||||
import Card from "@components/Card.svelte";
|
import Card from "@components/Card.svelte";
|
||||||
import XRayPreview from "@components/publics/XRayPreview.svelte";
|
import XRayPreview from "@components/publics/XRayPreview.svelte";
|
||||||
import {t} from "astro-i18n";
|
|
||||||
|
|
||||||
const gamemodes = await getCollection("modes");
|
|
||||||
const publics = await getCollection("publics");
|
const publics = await getCollection("publics");
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout title="Publics">
|
<PageLayout title="Publics">
|
||||||
{gamemodes.filter(value => publics.map(value1 => value1.data.gamemode.id).includes(value.id)).map((gamemode) => (
|
<div>
|
||||||
<h1 class="text-4xl font-bold">{t(`${gamemode.data.translationKey}.title`)}</h1>
|
{publics.map((pub) => (
|
||||||
<div class="grid grid-cols-2 gap-2">
|
|
||||||
{publics.filter(value => value.data.gamemode.id == gamemode.id).map((pub) => (
|
|
||||||
<a href={l("/publics/" + pub.id)}>
|
<a href={l("/publics/" + pub.id)}>
|
||||||
<Card extraClasses="w-full m-0" hoverEffect={false}>
|
<Card extraClasses="w-full mx-0">
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
<XRayPreview client:load>
|
<XRayPreview client:load>
|
||||||
<Image style="width: 500px" slot="normal" src={pub.data.image} alt={pub.data.name} transition:name={pub.data.id + "-img"} />
|
<Image style="width: 500px" slot="normal" src={pub.data.image} alt={pub.data.name} transition:name={pub.data.id + "-img"} />
|
||||||
{pub.data.xray && <Image slot="xray" class="bg-zinc-50 dark:bg-zinc-900" src={pub.data.xray} alt={pub.data.name} />}
|
{pub.data.xray && <Image slot="xray" class="bg-zinc-50 dark:bg-zinc-900" src={pub.data.xray} alt={pub.data.name} />}
|
||||||
</XRayPreview>
|
</XRayPreview>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="font-bold text-3xl" transition:name={pub.data.id + "-title"}>{pub.data.name}</h2>
|
<h2 class="font-bold text-5xl" transition:name={pub.data.id + "-title"}>{pub.data.name}</h2>
|
||||||
<h3 transition:name={pub.data.id + "-desc"}>{pub.data.description}</h3>
|
<h3 transition:name={pub.data.id + "-desc"}>{pub.data.description}</h3>
|
||||||
</Card>
|
</Card>
|
||||||
</a>
|
</a>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
))}
|
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
|