mirror of
https://github.com/iamlukethedev/Claw3D.git
synced 2026-08-14 09:02:38 +00:00
Move office shop to outdoor shopping strip
Co-authored-by: Luke The Dev <iamlukethedev@users.noreply.github.com>
This commit is contained in:
co-authored by
Luke The Dev
parent
ed821588b2
commit
94aff0f3da
@@ -62,9 +62,9 @@ const DEFAULT_JUKEBOX: FurnitureSeed = {
|
||||
|
||||
const DEFAULT_SHOP: FurnitureSeed = {
|
||||
type: "shop",
|
||||
x: 560,
|
||||
y: 210,
|
||||
facing: 270,
|
||||
x: 320,
|
||||
y: 840,
|
||||
facing: 0,
|
||||
};
|
||||
|
||||
const DEFAULT_KANBAN_BOARD: FurnitureSeed = {
|
||||
@@ -116,6 +116,18 @@ const DEFAULT_DINING_ITEMS: FurnitureSeed[] = [
|
||||
{ type: "chair", x: 970, y: 130, facing: 270 },
|
||||
];
|
||||
|
||||
const DEFAULT_SHOPPING_STRIP_ITEMS: FurnitureSeed[] = [
|
||||
{ type: "table_rect", x: 230, y: 820, w: 110, h: 40, facing: 0 },
|
||||
{ type: "vending", x: 470, y: 790, facing: 0 },
|
||||
{ type: "table_rect", x: 670, y: 870, w: 120, h: 40, facing: 0 },
|
||||
{ type: "plant", x: 210, y: 930 },
|
||||
{ type: "plant", x: 520, y: 930 },
|
||||
{ type: "plant", x: 860, y: 930 },
|
||||
{ type: "couch", x: 1010, y: 820, w: 90, h: 30, facing: 0 },
|
||||
{ type: "couch", x: 1200, y: 820, w: 90, h: 30, facing: 0 },
|
||||
{ type: "couch", x: 1390, y: 820, w: 90, h: 30, facing: 0 },
|
||||
];
|
||||
|
||||
const DEFAULT_SERVER_ROOM_ITEMS: FurnitureSeed[] = [
|
||||
{ type: "wall", x: 0, y: 560, w: 230, h: WALL_THICKNESS },
|
||||
{ type: "wall", x: 220, y: 560, w: WALL_THICKNESS, h: 60 },
|
||||
@@ -522,6 +534,7 @@ const DEFAULT_FURNITURE: FurnitureSeed[] = [
|
||||
{ type: "plant", x: 1090, y: 310 },
|
||||
{ type: "plant", x: 1100, y: 490 },
|
||||
{ type: "plant", x: 530, y: 700 },
|
||||
...DEFAULT_SHOPPING_STRIP_ITEMS,
|
||||
...DEFAULT_SERVER_ROOM_ITEMS,
|
||||
...DEFAULT_GYM_ITEMS,
|
||||
...DEFAULT_QA_LAB_ITEMS,
|
||||
|
||||
@@ -6,9 +6,9 @@ import type {
|
||||
} from "@/features/retro-office/core/types";
|
||||
|
||||
export const SHOP_TARGET: FacingPoint = {
|
||||
x: 80,
|
||||
y: 415,
|
||||
facing: Math.PI / 2,
|
||||
x: 280,
|
||||
y: 840,
|
||||
facing: 0,
|
||||
};
|
||||
|
||||
export const resolveShopRoute = (
|
||||
@@ -27,18 +27,18 @@ export const resolveShopRoute = (
|
||||
const { width, height } = getItemBaseSize(item);
|
||||
const centerY = item.y + height / 2;
|
||||
const approachTarget = {
|
||||
x: item.x - 28,
|
||||
y: centerY,
|
||||
facing: Math.PI / 2,
|
||||
x: item.x + width / 2,
|
||||
y: item.y + height + 50,
|
||||
facing: 0,
|
||||
};
|
||||
const counterTarget = {
|
||||
x: item.x + width * 0.4,
|
||||
x: item.x + width / 2,
|
||||
y: centerY,
|
||||
facing: Math.PI / 2,
|
||||
facing: 0,
|
||||
};
|
||||
|
||||
const atCounter =
|
||||
x >= approachTarget.x - 6 || Math.hypot(x - approachTarget.x, y - approachTarget.y) < 18;
|
||||
y <= approachTarget.y + 6 || Math.hypot(x - approachTarget.x, y - approachTarget.y) < 18;
|
||||
if (atCounter) {
|
||||
return {
|
||||
stage: "counter",
|
||||
|
||||
@@ -354,6 +354,26 @@ export const FloorAndWalls = memo(function FloorAndWalls({
|
||||
</mesh>
|
||||
);
|
||||
})}
|
||||
|
||||
{Array.from({ length: 5 }).map((_, index) => {
|
||||
const [wx, , wz] = toWorld(220 + index * 280, 785);
|
||||
return (
|
||||
<group key={`shopping-awning-${index}`} position={[wx, 0, wz]}>
|
||||
<mesh position={[0, 0.9, 0]} castShadow receiveShadow>
|
||||
<boxGeometry args={[1.3, 0.08, 0.42]} />
|
||||
<meshStandardMaterial color="#5d4037" roughness={0.8} metalness={0.08} />
|
||||
</mesh>
|
||||
<mesh position={[0, 1.08, 0]} castShadow receiveShadow>
|
||||
<boxGeometry args={[1.22, 0.16, 0.36]} />
|
||||
<meshStandardMaterial color="#f59e0b" roughness={0.46} metalness={0.06} />
|
||||
</mesh>
|
||||
<mesh position={[0, 0.52, 0.02]} castShadow receiveShadow>
|
||||
<boxGeometry args={[1.1, 0.72, 0.16]} />
|
||||
<meshStandardMaterial color="#7c3aed" roughness={0.58} metalness={0.12} />
|
||||
</mesh>
|
||||
</group>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
) : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user