surface placement
This commit is contained in:
@@ -11,12 +11,12 @@ function getInitialState(node: {
|
||||
}): PlacementState {
|
||||
const attachTo = node.asset.attachTo
|
||||
if (attachTo === 'wall' || attachTo === 'wall-side') {
|
||||
return { surface: 'wall', wallId: node.parentId, ceilingId: null }
|
||||
return { surface: 'wall', wallId: node.parentId, ceilingId: null, surfaceItemId: null }
|
||||
}
|
||||
if (attachTo === 'ceiling') {
|
||||
return { surface: 'ceiling', wallId: null, ceilingId: node.parentId }
|
||||
return { surface: 'ceiling', wallId: null, ceilingId: node.parentId, surfaceItemId: null }
|
||||
}
|
||||
return { surface: 'floor', wallId: null, ceilingId: null }
|
||||
return { surface: 'floor', wallId: null, ceilingId: null, surfaceItemId: null }
|
||||
}
|
||||
|
||||
export const MoveTool: React.FC = () => {
|
||||
|
||||
@@ -73,7 +73,7 @@ export function usePlacementCoordinator(config: PlacementCoordinatorConfig): Rea
|
||||
const basePlaneRef = useRef<Mesh>(null!)
|
||||
const gridPosition = useRef(new Vector3(0, 0, 0))
|
||||
const placementState = useRef<PlacementState>(
|
||||
config.initialState ?? { surface: 'floor', wallId: null, ceilingId: null },
|
||||
config.initialState ?? { surface: 'floor', wallId: null, ceilingId: null, surfaceItemId: null },
|
||||
)
|
||||
const shiftFreeRef = useRef(false)
|
||||
|
||||
|
||||
@@ -1167,7 +1167,9 @@ export const CATALOG_ITEMS: AssetInput[] = [
|
||||
scale: [1, 1, 1],
|
||||
offset: [0, 0.21, 0],
|
||||
rotation: [0, 0, 0],
|
||||
dimensions: [2, 0.4, 0.5],
|
||||
dimensions: [2, 0.4, 0.5],surface: {
|
||||
height: 0.36
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ItemNode } from "@pascal-app/core";
|
||||
import { type AnyNodeId, ItemNode } from "@pascal-app/core";
|
||||
import { useViewer } from "@pascal-app/viewer";
|
||||
import Image from "next/image";
|
||||
import { useState } from "react";
|
||||
|
||||
@@ -14,7 +14,8 @@ export async function submitFeedback(
|
||||
const session = await getSession()
|
||||
const supabase = await createServerSupabaseClient()
|
||||
|
||||
const { error } = await supabase.from('feedback').insert({
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const { error } = await (supabase as any).from('feedback').insert({
|
||||
id: createId('feedback'),
|
||||
user_id: session?.user?.id ?? null,
|
||||
message: trimmed,
|
||||
|
||||
Reference in New Issue
Block a user