A lightweight 2.5D city-building simulation game based on Three.js and Vue.
Welcome to CubeCity! This is a cartoon-style 2.5D city simulation game where you can build, manage, and expand your very own metropolis. Place buildings, lay down roads, and watch your city grow as you manage resources and expand your territory.

| 界面总览 | 城市一隅 | 离线存储 |
|---|---|---|
![]() | ![]() | ![]() |
游戏主要围绕四种操作模式展开,让你轻松管理城市的方方面面:
🔍 选择模式 (SELECT):
🏗️ 建造模式 (BUILD):
🚚 搬迁模式 (RELOCATE):
💣 拆除模式 (DEMOLISH):
我们计划在未来为游戏增加更多有趣的功能,包括:
Developed by hexianWeb.
如果这个项目对你有帮助,欢迎请作者喝杯咖啡,支持项目长期维护与更新:

This project is licensed under the MIT License.
智能分类展示
轮循机制
状态分类
DEBUFF: ['MISSING_ROAD', 'MISSING_POWER', 'MISSING_POPULATION', 'OVER_POPULATION', 'MISSING_POLLUTION']
BUFF: ['POWER_BOOST', 'ECONOMY_BOOST', 'POPULATION_BOOST', 'COIN_BUFF', 'HUMAN_BUFF', 'UPGRADE']
在建筑类中配置状态:
this.statusConfig = [
// === DEBUFF 状态(问题状态,优先轮循) ===
{
statusType: 'MISSING_ROAD',
condition: (building, gs) => {
building.buffConfig = { targets: ['road'] }
return !building.checkForBuffTargets(gs)
},
effect: { type: 'missRoad', offsetY: 0.7 },
},
// === BUFF 状态(增益状态,无问题时轮循) ===
{
statusType: 'COIN_BUFF',
condition: (building, gs) => {
building.buffConfig = { targets: ['shop'], range: 1 }
return building.checkForBuffTargets(gs)
},
effect: { type: 'coinBuff', offsetY: 0.7 },
},
]
setInterval 实现自动切换fadeOut 方法确保切换流畅参考实现:src/js/components/tiles/buildings/park.js