enable double-sided image plane and signal removal

This commit is contained in:
bflatastic committed 2025-05-23 08:55:52 +07:00
1 parent 7b1bbc4a0e
commit e599aecc62
2 files changed
+1 -9

No files matched your search

@@ -206,6 +206,7 @@ class Scene {
color: 0xffffff,
map: texture,
transparent: true,
side: THREE.DoubleSide,
});
obj = new THREE.Mesh(geometry, image_material);
obj.userData["media_id"] = name;
@@ -3,7 +3,6 @@ import {
galleryModalVisibleDuringDrag,
galleryReopenAfterDragSignal,
} from "./galleryModalSignals";
import { signal } from "@preact/signals-react";
interface DragState {
item: GalleryItem | null;
@@ -25,14 +24,6 @@ const dragState: DragState = {
const dragThreshold = 5;
export const onImageDropSignal = signal<
((item: GalleryItem, position: { x: number; y: number }) => void) | null
>(null);
export function setOnImageDrop(cb: typeof onImageDropSignal.value) {
onImageDropSignal.value = cb;
}
function onPointerDown(event: React.PointerEvent, item: GalleryItem) {
if (event.button !== 0) return;
dragState.item = item;