Merge branch 'develop' into feat/polish-mission-2
🔍 Lint / 🪄 Check lint (push) Has been cancelled
🔍 Lint / 🎨 Check format (push) Has been cancelled
🔍 Lint / 🔎 Typecheck (push) Has been cancelled
📊 Quality / 🔒 Security Audit (push) Has been cancelled
📊 Quality / 📋 Dependency Freshness (push) Has been cancelled
📊 Quality / 📦 Bundle Size (push) Has been cancelled
🔍 Lint / 🏗 Build (push) Has been cancelled
🔍 Lint / 🪄 Check lint (push) Has been cancelled
🔍 Lint / 🎨 Check format (push) Has been cancelled
🔍 Lint / 🔎 Typecheck (push) Has been cancelled
📊 Quality / 🔒 Security Audit (push) Has been cancelled
📊 Quality / 📋 Dependency Freshness (push) Has been cancelled
📊 Quality / 📦 Bundle Size (push) Has been cancelled
🔍 Lint / 🏗 Build (push) Has been cancelled
This commit is contained in:
@@ -4,7 +4,7 @@ export const REPAIR_CASE_MODEL_PATH = "/models/packderelance/model.gltf";
|
||||
export const REPAIR_CASE_OPEN_SOUND_PATH = "/sounds/effect/open-malette.mp3";
|
||||
export const REPAIR_CASE_CLOSE_SOUND_PATH = "/sounds/effect/close-malette.mp3";
|
||||
|
||||
export const REPAIR_CASE_LID_NODE_NAME = "partiesup";
|
||||
export const REPAIR_CASE_LID_NODE_NAME = "partsup";
|
||||
export const REPAIR_CASE_CLOSED_ROTATION_OFFSET_DEGREES = 0;
|
||||
export const REPAIR_CASE_OPEN_ROTATION_OFFSET_DEGREES = 115;
|
||||
export const REPAIR_CASE_ANIMATION_DURATION = 0.8;
|
||||
@@ -27,3 +27,50 @@ export const REPAIR_CASE_FOCUS_SCALE = 2.25;
|
||||
export const REPAIR_CASE_PLACEHOLDER_NAME_PREFIX = "placeholder_";
|
||||
export const REPAIR_CASE_PLACEHOLDER_SNAP_RADIUS = 0.65;
|
||||
export const REPAIR_CASE_PLACEHOLDER_SNAP_DURATION = 0.25;
|
||||
|
||||
/**
|
||||
* Names of nodes inside the packderelance GLTF where standalone part models
|
||||
* are anchored (visually injected). The original meshes under these nodes are
|
||||
* hidden at runtime so the standalone model takes their place.
|
||||
*
|
||||
* Some entries (e.g. `refroidisseur`) do not exist as nodes in the GLTF; an
|
||||
* empty Object3D is created at mount time at the corresponding case-local
|
||||
* fallback position so the anchoring pipeline is uniform.
|
||||
*/
|
||||
export const REPAIR_CASE_PART_ANCHOR_NAMES = [
|
||||
"cabledroit",
|
||||
"cablegauche",
|
||||
"pucehaut",
|
||||
"pucebas",
|
||||
"refroidisseur",
|
||||
] as const;
|
||||
|
||||
export type RepairCasePartAnchorName =
|
||||
(typeof REPAIR_CASE_PART_ANCHOR_NAMES)[number];
|
||||
|
||||
/**
|
||||
* Case-local positions used when an anchor node is missing from the GLTF.
|
||||
* Values are expressed in the case model's local coordinate system (the case
|
||||
* is rendered at small intrinsic scale; magnitudes are in the 0.01-0.25 range
|
||||
* to match the existing nodes such as `cabledroit`).
|
||||
*/
|
||||
export const REPAIR_CASE_PART_ANCHOR_FALLBACKS: Record<
|
||||
RepairCasePartAnchorName,
|
||||
Vector3Tuple
|
||||
> = {
|
||||
cabledroit: [0.0087, 0.0139, 0.1921],
|
||||
cablegauche: [0.0087, 0.0139, 0.2477],
|
||||
pucehaut: [-0.0207, 0.009, -0.0479],
|
||||
pucebas: [0.0987, 0.009, -0.0479],
|
||||
refroidisseur: [0.05, 0.014, 0.05],
|
||||
};
|
||||
|
||||
/**
|
||||
* Quaternion applied to anchor nodes that are created at runtime (because
|
||||
* the corresponding node is absent from the GLTF). Matches the rotation of
|
||||
* the existing part nodes in packderelance to keep visual orientation
|
||||
* consistent.
|
||||
*/
|
||||
export const REPAIR_CASE_PART_ANCHOR_FALLBACK_QUATERNION = [
|
||||
0.7071068286895752, 0, 0, 0.7071068286895752,
|
||||
] as const satisfies readonly [number, number, number, number];
|
||||
|
||||
@@ -25,26 +25,48 @@ export const REPAIR_MISSIONS: Record<RepairMissionId, RepairMissionConfig> = {
|
||||
interactUiPath: REPAIR_INTERACT_UI_PATH,
|
||||
brokenUiPath: REPAIR_BROKEN_UI_PATH,
|
||||
case: DEFAULT_REPAIR_CASE,
|
||||
requiredReplacementPartId: "ebike-cooling-core-replacement",
|
||||
requiredReplacementPartIds: ["ebike-cooling-core-replacement"],
|
||||
brokenParts: [
|
||||
{
|
||||
id: "ebike-cooling-core",
|
||||
label: "Cooling core",
|
||||
modelPath: "/models/refroidisseur/model.gltf",
|
||||
nodeName: "refroidisseur",
|
||||
targetNodeName: "refroidisseur",
|
||||
caseSlotName: "placeholder_1",
|
||||
},
|
||||
],
|
||||
replacementParts: [
|
||||
{
|
||||
id: "ebike-cooling-core-replacement",
|
||||
label: "Replacement cooling core",
|
||||
label: "Refroidisseur",
|
||||
modelPath: "/models/refroidisseur/model.gltf",
|
||||
caseAnchor: "refroidisseur",
|
||||
targetNodeName: "refroidisseur",
|
||||
},
|
||||
{
|
||||
id: "ebike-glove-distractor",
|
||||
label: "Insulation glove",
|
||||
modelPath: "/models/gant_l/model.gltf",
|
||||
id: "ebike-cable-right-distractor",
|
||||
label: "Câble droit",
|
||||
modelPath: "/models/cable1/model.gltf",
|
||||
caseAnchor: "cabledroit",
|
||||
},
|
||||
{
|
||||
id: "ebike-cable-left-distractor",
|
||||
label: "Câble gauche",
|
||||
modelPath: "/models/cable2/model.gltf",
|
||||
caseAnchor: "cablegauche",
|
||||
},
|
||||
{
|
||||
id: "ebike-puce-haut-distractor",
|
||||
label: "Puce haute",
|
||||
modelPath: "/models/puce/model.gltf",
|
||||
caseAnchor: "pucehaut",
|
||||
},
|
||||
{
|
||||
id: "ebike-puce-bas-distractor",
|
||||
label: "Puce basse",
|
||||
modelPath: "/models/puce/model.gltf",
|
||||
caseAnchor: "pucebas",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -53,13 +75,16 @@ export const REPAIR_MISSIONS: Record<RepairMissionId, RepairMissionConfig> = {
|
||||
label: "Power pylon",
|
||||
description:
|
||||
"Restore the pylon lamp relay and damaged panel before reconnecting the grid",
|
||||
modelPath: "/models/pylone/model.gltf",
|
||||
modelPath: "/models/pylone/model.glb",
|
||||
stageUiPath: "/assets/world/UI/pylon-mission-notification.webm",
|
||||
interactUiPath: REPAIR_INTERACT_UI_PATH,
|
||||
brokenUiPath: REPAIR_BROKEN_UI_PATH,
|
||||
case: DEFAULT_REPAIR_CASE,
|
||||
reassemblySeconds: 1.8,
|
||||
requiredReplacementPartId: "pylon-grid-relay-replacement",
|
||||
requiredReplacementPartIds: [
|
||||
"pylon-cable-right-replacement",
|
||||
"pylon-cable-left-replacement",
|
||||
],
|
||||
scanPartSeconds: 1.4,
|
||||
brokenParts: [
|
||||
{
|
||||
@@ -77,19 +102,38 @@ export const REPAIR_MISSIONS: Record<RepairMissionId, RepairMissionConfig> = {
|
||||
],
|
||||
replacementParts: [
|
||||
{
|
||||
id: "pylon-grid-relay-replacement",
|
||||
label: "Replacement grid relay",
|
||||
modelPath: "/models/pylone/model.gltf",
|
||||
id: "pylon-cable-right-replacement",
|
||||
label: "Câble droit",
|
||||
modelPath: "/models/cable1/model.gltf",
|
||||
caseAnchor: "cabledroit",
|
||||
caseLockGroup: "pylon-cable",
|
||||
targetNodeName: "cable2",
|
||||
},
|
||||
{
|
||||
id: "pylon-stone-distractor",
|
||||
label: "Stone counterweight",
|
||||
modelPath: "/models/galet/model.gltf",
|
||||
id: "pylon-cable-left-replacement",
|
||||
label: "Câble gauche",
|
||||
modelPath: "/models/cable2/model.gltf",
|
||||
caseAnchor: "cablegauche",
|
||||
caseLockGroup: "pylon-cable",
|
||||
targetNodeName: "cable2",
|
||||
},
|
||||
{
|
||||
id: "pylon-cooling-distractor",
|
||||
label: "Cooling core",
|
||||
label: "Refroidisseur",
|
||||
modelPath: "/models/refroidisseur/model.gltf",
|
||||
caseAnchor: "refroidisseur",
|
||||
},
|
||||
{
|
||||
id: "pylon-puce-haut-distractor",
|
||||
label: "Puce haute",
|
||||
modelPath: "/models/puce/model.gltf",
|
||||
caseAnchor: "pucehaut",
|
||||
},
|
||||
{
|
||||
id: "pylon-puce-bas-distractor",
|
||||
label: "Puce basse",
|
||||
modelPath: "/models/puce/model.gltf",
|
||||
caseAnchor: "pucebas",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -104,7 +148,7 @@ export const REPAIR_MISSIONS: Record<RepairMissionId, RepairMissionConfig> = {
|
||||
brokenUiPath: REPAIR_BROKEN_UI_PATH,
|
||||
case: DEFAULT_REPAIR_CASE,
|
||||
reassemblySeconds: 1.2,
|
||||
requiredReplacementPartId: "farm-irrigation-pump-replacement",
|
||||
requiredReplacementPartIds: ["farm-irrigation-pump-replacement"],
|
||||
scanPartSeconds: 0.9,
|
||||
brokenParts: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user