Merge remote-tracking branch 'origin/develop' into feat/mission-2
# Conflicts: # package-lock.json # package.json # src/App.tsx # src/components/three/interaction/CentralObject.tsx # src/components/three/interaction/VillageoisHelperObject.tsx # src/managers/GameStepManager.ts # src/stateManager/AudioManager.ts # src/world/World.tsx # src/world/player/PlayerController.tsx
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import type { Vector3Tuple } from "@/types/three/three";
|
||||
|
||||
export interface CinematicCameraKeyframe {
|
||||
time: number;
|
||||
position: Vector3Tuple;
|
||||
target: Vector3Tuple;
|
||||
}
|
||||
|
||||
export interface CinematicDialogueCue {
|
||||
time: number;
|
||||
dialogueId: string;
|
||||
}
|
||||
|
||||
export interface CinematicDefinition {
|
||||
id: string;
|
||||
timecode?: number;
|
||||
cameraKeyframes: CinematicCameraKeyframe[];
|
||||
dialogueCues?: CinematicDialogueCue[];
|
||||
}
|
||||
|
||||
export interface CinematicManifest {
|
||||
version: 1;
|
||||
cinematics: CinematicDefinition[];
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { SubtitleLanguage } from "@/managers/stores/useSettingsStore";
|
||||
|
||||
export type DialogueVoiceId = "narrateur" | "fermier" | "electricienne";
|
||||
export type DialogueSpeaker = "Narrateur" | "Fermier" | "Electricienne";
|
||||
|
||||
export interface DialogueVoice {
|
||||
id: DialogueVoiceId;
|
||||
speaker: DialogueSpeaker;
|
||||
subtitles: Partial<Record<SubtitleLanguage, string>>;
|
||||
}
|
||||
|
||||
export interface DialogueDefinition {
|
||||
id: string;
|
||||
voice: DialogueVoiceId;
|
||||
audio: string;
|
||||
subtitleCueIndex: number;
|
||||
timecode?: number;
|
||||
}
|
||||
|
||||
export interface DialogueManifest {
|
||||
version: 1;
|
||||
voices: DialogueVoice[];
|
||||
dialogues: DialogueDefinition[];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import type { Vector3Tuple } from "../three/three";
|
||||
|
||||
export interface MapNode {
|
||||
name: string;
|
||||
type: string;
|
||||
position: Vector3Tuple;
|
||||
rotation: Vector3Tuple;
|
||||
scale: Vector3Tuple;
|
||||
}
|
||||
|
||||
export interface SceneData {
|
||||
mapNodes: MapNode[];
|
||||
models: Map<string, string>;
|
||||
}
|
||||
|
||||
export type TransformMode = "translate" | "rotate" | "scale";
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { Vector3Tuple } from "@/types/3d";
|
||||
import type { Vector3Tuple } from "@/types/three/three";
|
||||
|
||||
export type GameStep =
|
||||
| "intro"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
export type RepairMissionId = "bike" | "pylone" | "ferme";
|
||||
|
||||
export type MissionStep =
|
||||
| "locked"
|
||||
| "waiting"
|
||||
| "inspected"
|
||||
| "fragmented"
|
||||
| "scanning"
|
||||
| "repairing"
|
||||
| "reassembling"
|
||||
| "done";
|
||||
|
||||
export const REPAIR_MISSION_IDS = ["bike", "pylone", "ferme"] as const;
|
||||
|
||||
export const MISSION_STEPS = [
|
||||
"locked",
|
||||
"waiting",
|
||||
"inspected",
|
||||
"fragmented",
|
||||
"scanning",
|
||||
"repairing",
|
||||
"reassembling",
|
||||
"done",
|
||||
] as const satisfies readonly MissionStep[];
|
||||
|
||||
export function isRepairMissionId(value: string): value is RepairMissionId {
|
||||
return (REPAIR_MISSION_IDS as readonly string[]).includes(value);
|
||||
}
|
||||
|
||||
export function isMissionStep(value: string): value is MissionStep {
|
||||
return (MISSION_STEPS as readonly string[]).includes(value);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
export interface HandTrackingLandmark {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
}
|
||||
|
||||
export type HandTrackingSource = "backend" | "browser";
|
||||
|
||||
export interface HandTrackingHand {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
landmarks: HandTrackingLandmark[];
|
||||
handedness: string;
|
||||
isFist: boolean;
|
||||
score: number;
|
||||
}
|
||||
|
||||
type HandTrackingUsageStatus = "inactive" | "available" | "active";
|
||||
|
||||
export type HandTrackingStatus =
|
||||
| "idle"
|
||||
| "requesting_camera"
|
||||
| "starting_camera"
|
||||
| "connecting_server"
|
||||
| "connecting"
|
||||
| "connected"
|
||||
| "disconnected"
|
||||
| "error";
|
||||
|
||||
export interface HandTrackingSnapshot {
|
||||
hands: HandTrackingHand[];
|
||||
status: HandTrackingStatus;
|
||||
usageStatus: HandTrackingUsageStatus;
|
||||
serverStatus: string | null;
|
||||
error: string | null;
|
||||
}
|
||||
|
||||
export interface HandTrackingFrameMessage {
|
||||
type: "frame";
|
||||
timestamp: number;
|
||||
width: number;
|
||||
height: number;
|
||||
image: string;
|
||||
}
|
||||
|
||||
interface HandTrackingHandsMessage {
|
||||
type: "hands";
|
||||
timestamp: number;
|
||||
hands: HandTrackingHand[];
|
||||
}
|
||||
|
||||
interface HandTrackingStatusMessage {
|
||||
type: "status";
|
||||
timestamp: number;
|
||||
status: string;
|
||||
}
|
||||
|
||||
interface HandTrackingErrorMessage {
|
||||
type: "error";
|
||||
timestamp: number;
|
||||
hands: HandTrackingHand[];
|
||||
message: string;
|
||||
}
|
||||
|
||||
export type HandTrackingServerMessage =
|
||||
| HandTrackingHandsMessage
|
||||
| HandTrackingStatusMessage
|
||||
| HandTrackingErrorMessage;
|
||||
@@ -1,6 +1,4 @@
|
||||
export type InteractableKind = "grab" | "trigger";
|
||||
|
||||
export interface TriggerInteractableHandle {
|
||||
interface TriggerInteractableHandle {
|
||||
kind: "trigger";
|
||||
label: string;
|
||||
onPress: () => void;
|
||||
@@ -19,5 +17,7 @@ export type InteractableHandle =
|
||||
|
||||
export interface InteractionSnapshot {
|
||||
focused: InteractableHandle | null;
|
||||
nearby: boolean;
|
||||
holding: boolean;
|
||||
handHolding: boolean;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
export type LogLevel = "debug" | "info" | "warn" | "error";
|
||||
|
||||
export type LogValue =
|
||||
type LogValue =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
@@ -2,6 +2,14 @@ import type { Octree } from "three/addons/math/Octree.js";
|
||||
|
||||
export type Vector3Tuple = [number, number, number];
|
||||
|
||||
export type Vector3Scale = Vector3Tuple | number;
|
||||
|
||||
export interface ModelTransformProps {
|
||||
position?: Vector3Tuple;
|
||||
rotation?: Vector3Tuple;
|
||||
scale?: Vector3Scale;
|
||||
}
|
||||
|
||||
export type ColliderShape = "cuboid" | "ball" | "hull";
|
||||
|
||||
export type OctreeReadyHandler = (octree: Octree) => void;
|
||||
@@ -0,0 +1,15 @@
|
||||
export type SceneLoadingStatus = "loading" | "ready";
|
||||
|
||||
export interface SceneLoadingState {
|
||||
currentStep: string;
|
||||
progress: number;
|
||||
status: SceneLoadingStatus;
|
||||
}
|
||||
|
||||
export type SceneLoadingChangeHandler = (state: SceneLoadingState) => void;
|
||||
|
||||
export const INITIAL_SCENE_LOADING_STATE: SceneLoadingState = {
|
||||
currentStep: "Initialisation du jeu",
|
||||
progress: 0,
|
||||
status: "loading",
|
||||
};
|
||||
Reference in New Issue
Block a user