chore: address code quality audit findings
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
export const CHUNK_CONFIG = {
|
||||
enabled: true,
|
||||
chunkSize: 35,
|
||||
loadRadius: 50,
|
||||
unloadRadius: 65,
|
||||
updateInterval: 250,
|
||||
};
|
||||
@@ -1,5 +1,3 @@
|
||||
import { TERRAIN_COLORS } from "@/data/world/terrainConfig";
|
||||
|
||||
export type FogMode = "linear" | "exp2";
|
||||
|
||||
export const FOG_CONFIG = {
|
||||
@@ -28,13 +26,3 @@ export interface FogState {
|
||||
mode: FogMode;
|
||||
near: number;
|
||||
}
|
||||
|
||||
export const CHUNK_CONFIG = {
|
||||
enabled: true,
|
||||
chunkSize: 35,
|
||||
loadRadius: 50,
|
||||
unloadRadius: 65,
|
||||
updateInterval: 250,
|
||||
};
|
||||
|
||||
export const GROUND_PLANE_COLOR = TERRAIN_COLORS.grass1.hex;
|
||||
|
||||
@@ -6,8 +6,4 @@ export const GRAPHICS_DEFAULTS = {
|
||||
grassDensity: 1.0,
|
||||
};
|
||||
|
||||
export const GRAPHICS_BOUNDS = {
|
||||
grassDensity: { min: 0.1, max: 2.0, step: 0.1 },
|
||||
};
|
||||
|
||||
export type GraphicsState = typeof GRAPHICS_DEFAULTS;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const AMBIENT_LIGHT_COLOR = "#dfe7d8";
|
||||
export const SUN_LIGHT_COLOR = "#ffe2bf";
|
||||
const AMBIENT_LIGHT_COLOR = "#dfe7d8";
|
||||
const SUN_LIGHT_COLOR = "#ffe2bf";
|
||||
|
||||
export const LIGHTING_DEFAULTS = {
|
||||
ambientColor: AMBIENT_LIGHT_COLOR,
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
export const MAP_INSTANCING_ASSETS = {
|
||||
boiteauxlettres: {
|
||||
mapName: "boiteauxlettres",
|
||||
modelPath: "/models/boiteauxlettres/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
pylone: {
|
||||
mapName: "pylone",
|
||||
modelPath: "/models/pylone/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
immeuble1: {
|
||||
mapName: "immeuble1",
|
||||
modelPath: "/models/immeuble1/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
maison1: {
|
||||
mapName: "maison1",
|
||||
modelPath: "/models/maison1/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
eolienne: {
|
||||
mapName: "eolienne",
|
||||
modelPath: "/models/eolienne/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
parcebike: {
|
||||
mapName: "parcebike",
|
||||
modelPath: "/models/parcebike/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
panneauaffichage: {
|
||||
mapName: "panneauaffichage",
|
||||
modelPath: "/models/panneauaffichage/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
panneauclassique: {
|
||||
mapName: "panneauclassique",
|
||||
modelPath: "/models/panneauclassique/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
panneaufleche: {
|
||||
mapName: "panneaufleche",
|
||||
modelPath: "/models/panneaufleche/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
panneausolaire: {
|
||||
mapName: "panneausolaire",
|
||||
modelPath: "/models/panneausolaire/model.gltf",
|
||||
castShadow: true,
|
||||
receiveShadow: true,
|
||||
enabled: true,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const MAP_INSTANCING_ASSET_TYPES = [
|
||||
"boiteauxlettres",
|
||||
"pylone",
|
||||
"immeuble1",
|
||||
"maison1",
|
||||
"eolienne",
|
||||
"parcebike",
|
||||
"panneauaffichage",
|
||||
"panneauclassique",
|
||||
"panneaufleche",
|
||||
"panneausolaire",
|
||||
] as const satisfies readonly (keyof typeof MAP_INSTANCING_ASSETS)[];
|
||||
|
||||
export type MapInstancingAssetType =
|
||||
(typeof MAP_INSTANCING_ASSET_TYPES)[number];
|
||||
|
||||
export type MapInstancingAssetConfig =
|
||||
(typeof MAP_INSTANCING_ASSETS)[MapInstancingAssetType];
|
||||
|
||||
const MAP_INSTANCED_NODE_NAMES: ReadonlySet<string> = new Set(
|
||||
Object.values(MAP_INSTANCING_ASSETS)
|
||||
.filter((config) => config.enabled)
|
||||
.map((config) => config.mapName),
|
||||
);
|
||||
|
||||
export function isInstancedMapNodeName(name: string): boolean {
|
||||
return MAP_INSTANCED_NODE_NAMES.has(name);
|
||||
}
|
||||
@@ -1,16 +1,9 @@
|
||||
import type { TerrainSurfaceColorConfig } from "@/types/world/terrainSurface";
|
||||
|
||||
export const TERRAIN_MODEL_PATH = "/models/terrain/model.gltf";
|
||||
export const TERRAIN_SURFACE_COLOR_TOLERANCE = 15;
|
||||
export const TERRAIN_SURFACE_PROJECTION = {
|
||||
flipX: false,
|
||||
flipZ: true,
|
||||
offsetX: 0,
|
||||
offsetZ: 0,
|
||||
};
|
||||
export const TERRAIN_WATER_HEIGHT = 0.8;
|
||||
export const TERRAIN_TILE_SIZE = 1;
|
||||
export const GRASS_BASE_COLOR = "#1a3a1a";
|
||||
|
||||
const TERRAIN_TILE_SIZE = 1;
|
||||
|
||||
export const TERRAIN_COLORS = {
|
||||
grass1: {
|
||||
@@ -61,5 +54,3 @@ export const TERRAIN_COLORS = {
|
||||
kind: "rock",
|
||||
},
|
||||
} satisfies Record<string, TerrainSurfaceColorConfig>;
|
||||
|
||||
export type TerrainColorKey = keyof typeof TERRAIN_COLORS;
|
||||
|
||||
Reference in New Issue
Block a user