From 45dbf7352c4eed8eab7c1358f733ed829fd92227 Mon Sep 17 00:00:00 2001 From: "azykov@mail.ru" Date: Tue, 2 Jun 2026 14:33:36 +0300 Subject: [PATCH] renamed state files --- src/components/ObjectView.tsx | 2 +- src/state/{character.ts => characterState.ts} | 2 +- src/state/index.ts | 2 +- src/state/{root.ts => rootState.ts} | 4 ++-- src/state/{worldEditor.ts => worldEditorState.ts} | 2 +- src/state/{world.ts => worldState.ts} | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) rename src/state/{character.ts => characterState.ts} (91%) rename src/state/{root.ts => rootState.ts} (81%) rename src/state/{worldEditor.ts => worldEditorState.ts} (98%) rename src/state/{world.ts => worldState.ts} (97%) diff --git a/src/components/ObjectView.tsx b/src/components/ObjectView.tsx index 90be0b2..95df579 100644 --- a/src/components/ObjectView.tsx +++ b/src/components/ObjectView.tsx @@ -5,7 +5,7 @@ import type { Group } from "three"; import { Edges, TransformControls } from "@react-three/drei"; import type { ThreeEvent } from "@react-three/fiber"; import { state } from "../state"; -import { nextSelectionEditMode } from "../state/worldEditor"; +import { nextSelectionEditMode } from "../state/worldEditorState"; import type { R3 } from "../types/3d"; type ObjectViewProps = { diff --git a/src/state/character.ts b/src/state/characterState.ts similarity index 91% rename from src/state/character.ts rename to src/state/characterState.ts index b8a5f81..ebfdb0c 100644 --- a/src/state/character.ts +++ b/src/state/characterState.ts @@ -1,5 +1,5 @@ import { makeAutoObservable } from "mobx"; -import type { WorldState } from "./world"; +import type { WorldState } from "./worldState"; import type { CameraProps } from "@react-three/fiber"; export class CharacterState { diff --git a/src/state/index.ts b/src/state/index.ts index 209b15d..5e32916 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -1 +1 @@ -export * from './root'; +export * from './rootState'; diff --git a/src/state/root.ts b/src/state/rootState.ts similarity index 81% rename from src/state/root.ts rename to src/state/rootState.ts index 7441629..cb44001 100644 --- a/src/state/root.ts +++ b/src/state/rootState.ts @@ -1,6 +1,6 @@ import { makeAutoObservable } from "mobx"; -import { WorldState } from "./world"; -import { WorldEditorState } from "./worldEditor"; +import { WorldState } from "./worldState"; +import { WorldEditorState } from "./worldEditorState"; export class RootState { public readonly world = new WorldState(); diff --git a/src/state/worldEditor.ts b/src/state/worldEditorState.ts similarity index 98% rename from src/state/worldEditor.ts rename to src/state/worldEditorState.ts index 147ece4..c3a5a42 100644 --- a/src/state/worldEditor.ts +++ b/src/state/worldEditorState.ts @@ -1,5 +1,5 @@ import { makeAutoObservable } from "mobx"; -import type { WorldState } from "./world"; +import type { WorldState } from "./worldState"; import type { ObjectInstance, Scene, World } from "../types"; import { createObjectInstance } from "../utils/object"; import { randomId } from "../utils"; diff --git a/src/state/world.ts b/src/state/worldState.ts similarity index 97% rename from src/state/world.ts rename to src/state/worldState.ts index b98606f..6bde9ec 100644 --- a/src/state/world.ts +++ b/src/state/worldState.ts @@ -1,11 +1,11 @@ import { makeAutoObservable } from "mobx"; import { WorldFactory } from "../model/worldFactory"; import type { ObjectType, RunningGameState, Scene, World } from "../types"; -import { CharacterState } from "./character"; +import { CharacterState } from "./characterState"; import type { Pos3 } from "../types/3d"; import { clone } from "../utils"; import type { VoxelType } from "../types/voxel"; -import { state } from "./root"; +import { state } from "./rootState"; import { DEFAULT_VOXEL_TYPES } from "../model/defaultVoxelTypes"; import { wolf } from "../model/objectPrefabs/wolf";