Complete Cocos Creator port with level bundles, themes, and tooling.

Adds level prefabs, theme assets, audio, extensions, and deployment scripts for the Unity WebGL migration.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-16 15:30:58 +08:00
parent cba5105908
commit d393302388
6248 changed files with 17322729 additions and 11036 deletions

View File

@@ -0,0 +1,46 @@
'use strict';
/** 与 assets/scripts/level/EntitySpawnDefaults.ts 保持一致 */
const ENTITY_BASE_HEIGHT = {
player: 90,
vehicle: 80,
};
const ENTITY_BASE_SCALE = {
player: 1,
vehicle: 1,
prop: 0.85,
prop_decor: 0.6,
enemy: 1,
};
const DEFAULT_SPAWN_SCALE = {
player: 1,
vehicle: 1,
prop: 1,
};
function clampScale(v) {
const n = typeof v === 'number' ? v : parseFloat(String(v));
if (Number.isNaN(n)) return 1;
return Math.max(0.1, Math.min(4, n));
}
function normalizeSpawnScale(scale) {
const s = clampScale(scale);
return Math.abs(s - 1) < 0.001 ? undefined : s;
}
function resolveEntityScaleMul(kind, spawnScale) {
return clampScale(spawnScale !== undefined && spawnScale !== null ? spawnScale : 1);
}
module.exports = {
ENTITY_BASE_HEIGHT,
ENTITY_BASE_SCALE,
DEFAULT_SPAWN_SCALE,
clampScale,
normalizeSpawnScale,
resolveEntityScaleMul,
};