Add 3D loose-leaf chronicle of human civilisation
A Three.js site presenting 20 world history milestones as double-sided loose-leaf pages, with three views: a leather binder with page-flip animation, a golden timeline, and a dotted globe with great-circle arcs. All textures (paper, leather, registration cards, and 18 hand-drawn sketches) are generated procedurally via Canvas 2D, so no external image assets are needed beyond the Earth map. Includes dev helper scripts for screenshots, ASCII previews, and headless verification.
This commit is contained in:
@@ -0,0 +1,238 @@
|
||||
// 世界历史里程碑条目数据
|
||||
// timeNumeric 用于时间轴排序/定位(公元前为负,公元后为正,单位:年)
|
||||
|
||||
export const CATEGORY_INFO = {
|
||||
人: { color: '#a03a2a', en: 'PERSONA' },
|
||||
事: { color: '#2c4a6b', en: 'EVENTUS' },
|
||||
物: { color: '#3f5c3a', en: 'ARTIFEX' },
|
||||
};
|
||||
|
||||
export const ENTRIES = [
|
||||
{
|
||||
id: 'No.001',
|
||||
time: '约公元前320万年',
|
||||
timeNumeric: -3200000,
|
||||
region: '东非 · 埃塞俄比亚',
|
||||
name: '露西 · 南方古猿',
|
||||
category: '人',
|
||||
sketch: 'fossil',
|
||||
lat: 11.2, lng: 40.5,
|
||||
description: '1974年在埃塞俄比亚哈达尔发现的一具约40%完整的南方古猿阿法种骨架,是直立行走的最早证据之一,被亲切地称为"人类祖母"。',
|
||||
},
|
||||
{
|
||||
id: 'No.002',
|
||||
time: '约公元前3200年',
|
||||
timeNumeric: -3200,
|
||||
region: '美索不达米亚 · 两河流域',
|
||||
name: '楔形文字',
|
||||
category: '物',
|
||||
sketch: 'tablet',
|
||||
lat: 31.3, lng: 45.6,
|
||||
description: '苏美尔人用削尖的芦苇杆在湿润泥板上压刻出楔形符号,晾干成册,是人类已知最早的文字系统,也是文明记录的开端。',
|
||||
},
|
||||
{
|
||||
id: 'No.003',
|
||||
time: '约公元前2560年',
|
||||
timeNumeric: -2560,
|
||||
region: '古埃及 · 吉萨',
|
||||
name: '胡夫金字塔',
|
||||
category: '物',
|
||||
sketch: 'pyramid',
|
||||
lat: 29.98, lng: 31.13,
|
||||
description: '埃及第四王朝法老胡夫的陵墓,由约230万块巨石砌成,原高约146米,是古代世界七大奇迹中唯一留存至今的建筑。',
|
||||
},
|
||||
{
|
||||
id: 'No.004',
|
||||
time: '公元前551年',
|
||||
timeNumeric: -551,
|
||||
region: '中国 · 鲁国曲阜',
|
||||
name: '孔子',
|
||||
category: '人',
|
||||
sketch: 'figure',
|
||||
lat: 35.6, lng: 117.0,
|
||||
description: '儒家学派创始人,倡导仁、礼与中庸之道,其思想深刻影响了东亚两千余年,被后世尊为"至圣先师"。',
|
||||
},
|
||||
{
|
||||
id: 'No.005',
|
||||
time: '公元前5世纪',
|
||||
timeNumeric: -450,
|
||||
region: '古希腊 · 雅典',
|
||||
name: '雅典卫城 · 帕特农神庙',
|
||||
category: '物',
|
||||
sketch: 'temple',
|
||||
lat: 37.97, lng: 23.73,
|
||||
description: '矗立于雅典城邦山丘之上的建筑群,帕特农神庙为其核心,是古希腊文明、民主精神与古典美学的永恒象征。',
|
||||
},
|
||||
{
|
||||
id: 'No.006',
|
||||
time: '公元前221年',
|
||||
timeNumeric: -221,
|
||||
region: '中国 · 咸阳',
|
||||
name: '秦始皇统一六国',
|
||||
category: '事',
|
||||
sketch: 'crown',
|
||||
lat: 34.34, lng: 108.94,
|
||||
description: '嬴政扫灭六国,建立中国历史上第一个中央集权的大一统王朝,推行书同文、车同轨、统一度量衡,奠定后世版图与文化认同。',
|
||||
},
|
||||
{
|
||||
id: 'No.007',
|
||||
time: '公元前334年',
|
||||
timeNumeric: -334,
|
||||
region: '马其顿 · 希腊半岛',
|
||||
name: '亚历山大大帝',
|
||||
category: '人',
|
||||
sketch: 'figure',
|
||||
lat: 40.7, lng: 22.5,
|
||||
description: '马其顿国王,率军东征波斯,兵锋直抵印度河流域,建立横跨欧亚非的庞大帝国,促进了希腊化文明的广泛传播。',
|
||||
},
|
||||
{
|
||||
id: 'No.008',
|
||||
time: '公元80年',
|
||||
timeNumeric: 80,
|
||||
region: '罗马帝国 · 罗马',
|
||||
name: '罗马斗兽场',
|
||||
category: '物',
|
||||
sketch: 'colosseum',
|
||||
lat: 41.89, lng: 12.49,
|
||||
description: '古罗马最大的椭圆形竞技场,可容纳约五万名观众,拱券与环形结构的杰作,见证了一个帝国的荣光与工程技术。',
|
||||
},
|
||||
{
|
||||
id: 'No.009',
|
||||
time: '公元105年',
|
||||
timeNumeric: 105,
|
||||
region: '中国 · 东汉洛阳',
|
||||
name: '蔡伦造纸',
|
||||
category: '事',
|
||||
sketch: 'scroll',
|
||||
lat: 34.6, lng: 112.4,
|
||||
description: '蔡伦总结前人经验,以树皮、麻头、破布、渔网为原料造出轻便廉价的纸,深刻改变了知识的记录与传播方式。',
|
||||
},
|
||||
{
|
||||
id: 'No.010',
|
||||
time: '约公元570年',
|
||||
timeNumeric: 570,
|
||||
region: '阿拉伯半岛 · 麦加',
|
||||
name: '穆罕默德',
|
||||
category: '人',
|
||||
sketch: 'figure',
|
||||
lat: 21.42, lng: 39.83,
|
||||
description: '伊斯兰教先知,在阿拉伯半岛传播一神信仰,其创立的伊斯兰教深刻塑造了中东、北非乃至世界的文明版图。',
|
||||
},
|
||||
{
|
||||
id: 'No.011',
|
||||
time: '公元1206年',
|
||||
timeNumeric: 1206,
|
||||
region: '蒙古高原',
|
||||
name: '成吉思汗',
|
||||
category: '人',
|
||||
sketch: 'horseman',
|
||||
lat: 47.9, lng: 106.9,
|
||||
description: '铁木真统一蒙古各部,建立大蒙古国,其子孙随后建立了人类历史上疆域最为辽阔的陆上帝国,打通了欧亚大陆。',
|
||||
},
|
||||
{
|
||||
id: 'No.012',
|
||||
time: '公元1492年',
|
||||
timeNumeric: 1492,
|
||||
region: '西班牙 → 美洲',
|
||||
name: '哥伦布发现新大陆',
|
||||
category: '事',
|
||||
sketch: 'ship',
|
||||
lat: 24.0, lng: -75.0,
|
||||
description: '哥伦布率三艘帆船横渡大西洋抵达美洲,揭开大航海时代的序幕,也开启了全球联系与"地球村"的历史进程。',
|
||||
},
|
||||
{
|
||||
id: 'No.013',
|
||||
time: '公元1519—1522年',
|
||||
timeNumeric: 1519,
|
||||
region: '欧洲 → 环球',
|
||||
name: '麦哲伦环球航行',
|
||||
category: '事',
|
||||
sketch: 'globe',
|
||||
lat: 53.5, lng: -70.8,
|
||||
description: '麦哲伦船队首次完成环绕地球一周的航行,用三年艰苦航程实证了地球是圆的,人类的世界观从此改变。',
|
||||
},
|
||||
{
|
||||
id: 'No.014',
|
||||
time: '公元1687年',
|
||||
timeNumeric: 1687,
|
||||
region: '英国 · 剑桥',
|
||||
name: '牛顿《自然哲学的数学原理》',
|
||||
category: '事',
|
||||
sketch: 'apple',
|
||||
lat: 52.2, lng: 0.12,
|
||||
description: '牛顿提出三大运动定律与万有引力定律,将天上与地上的运动统一于同一套数学法则,奠定经典力学与现代科学的基础。',
|
||||
},
|
||||
{
|
||||
id: 'No.015',
|
||||
time: '公元1769年',
|
||||
timeNumeric: 1769,
|
||||
region: '英国 · 格拉斯哥',
|
||||
name: '瓦特改良蒸汽机',
|
||||
category: '物',
|
||||
sketch: 'machine',
|
||||
lat: 55.86, lng: -4.25,
|
||||
description: '瓦特改良的蒸汽机大幅提高热效率并实现旋转动力输出,成为第一次工业革命的核心引擎,机器时代由此轰鸣开启。',
|
||||
},
|
||||
{
|
||||
id: 'No.016',
|
||||
time: '公元1776年',
|
||||
timeNumeric: 1776,
|
||||
region: '北美 · 费城',
|
||||
name: '美国《独立宣言》',
|
||||
category: '事',
|
||||
sketch: 'bell',
|
||||
lat: 39.95, lng: -75.16,
|
||||
description: '宣告"人人生而平等",天赋人权与主权在民,开启现代共和制国家的先河,深刻影响了此后两百年的世界政治。',
|
||||
},
|
||||
{
|
||||
id: 'No.017',
|
||||
time: '公元1859年',
|
||||
timeNumeric: 1859,
|
||||
region: '英国 · 伦敦',
|
||||
name: '达尔文《物种起源》',
|
||||
category: '事',
|
||||
sketch: 'tree',
|
||||
lat: 51.5, lng: -0.12,
|
||||
description: '达尔文提出以自然选择为核心的进化论,彻底改变了人类对生命起源与演化的理解,是近代思想史上的一次革命。',
|
||||
},
|
||||
{
|
||||
id: 'No.018',
|
||||
time: '公元1905年',
|
||||
timeNumeric: 1905,
|
||||
region: '瑞士 · 伯尔尼',
|
||||
name: '爱因斯坦狭义相对论',
|
||||
category: '事',
|
||||
sketch: 'atom',
|
||||
lat: 46.95, lng: 7.45,
|
||||
description: '爱因斯坦提出狭义相对论,得出质能方程 E=mc²,颠覆牛顿的绝对时空观,开启现代物理学的新纪元。',
|
||||
},
|
||||
{
|
||||
id: 'No.019',
|
||||
time: '公元1945年',
|
||||
timeNumeric: 1945,
|
||||
region: '世界 · 纽约',
|
||||
name: '联合国成立',
|
||||
category: '事',
|
||||
sketch: 'dove',
|
||||
lat: 40.75, lng: -73.97,
|
||||
description: '51个国家签署《联合国宪章》,一个以维护世界和平、促进国际合作与发展为宗旨的全球组织正式诞生。',
|
||||
},
|
||||
{
|
||||
id: 'No.020',
|
||||
time: '公元1969年',
|
||||
timeNumeric: 1969,
|
||||
region: '美国 · 卡纳维拉尔角',
|
||||
name: '阿波罗11号登月',
|
||||
category: '事',
|
||||
sketch: 'rocket',
|
||||
lat: 28.4, lng: -80.6,
|
||||
description: '阿波罗11号将人类首次送上月球,阿姆斯特朗迈出"个人一小步、人类一大步",把文明的足迹延伸到地外天体。',
|
||||
},
|
||||
];
|
||||
|
||||
// 时间轴横向定位:对称对数映射,远古压缩、近代展开
|
||||
export function timelineX(t) {
|
||||
const sign = t >= 0 ? 1 : -1;
|
||||
const mag = Math.log10(1 + Math.abs(t) / 50);
|
||||
return sign * mag * 1.15;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// 简化的大陆轮廓(经纬度多边形),用于生成点阵风格的地球。
|
||||
// 坐标 [lng, lat],用于艺术化表达,不求精确。
|
||||
|
||||
export const CONTINENTS = [
|
||||
{ name: '北美洲', poly: [[-168,66],[-140,70],[-90,72],[-60,60],[-55,52],[-65,45],[-75,35],[-80,25],[-90,29],[-97,26],[-97,22],[-105,20],[-110,23],[-117,33],[-125,40],[-125,49],[-135,58],[-150,60],[-165,60],[-168,66]] },
|
||||
{ name: '格陵兰', poly: [[-45,60],[-55,70],[-40,83],[-20,80],[-22,70],[-32,60],[-45,60]] },
|
||||
{ name: '南美洲', poly: [[-77,8],[-60,5],[-51,2],[-35,-5],[-40,-15],[-48,-25],[-58,-35],[-65,-40],[-68,-50],[-72,-53],[-75,-45],[-72,-35],[-70,-20],[-76,-12],[-80,-3],[-77,8]] },
|
||||
{ name: '欧洲', poly: [[-9,43],[-9,37],[3,43],[10,44],[12,48],[8,54],[10,58],[18,58],[25,60],[30,60],[40,68],[30,70],[20,70],[10,64],[5,62],[-5,58],[-9,43]] },
|
||||
{ name: '不列颠', poly: [[-5,50],[-2,53],[-2,57],[-5,58],[-4,54],[-5,50]] },
|
||||
{ name: '冰岛', poly: [[-22,64],[-18,66],[-14,65],[-20,63],[-22,64]] },
|
||||
{ name: '非洲', poly: [[-6,35],[10,37],[20,32],[32,31],[37,18],[43,11],[40,-3],[40,-11],[35,-20],[30,-30],[20,-35],[15,-28],[12,-18],[13,-9],[8,5],[0,5],[-9,5],[-15,10],[-17,15],[-13,25],[-6,35]] },
|
||||
{ name: '马达加斯加', poly: [[44,-12],[48,-16],[50,-16],[47,-25],[44,-22],[44,-12]] },
|
||||
{ name: '阿拉伯', poly: [[35,30],[43,12],[52,15],[58,22],[55,26],[48,30],[35,30]] },
|
||||
{ name: '亚洲', poly: [[27,40],[45,42],[55,46],[60,50],[70,55],[90,60],[120,68],[160,70],[180,66],[180,60],[160,58],[140,52],[135,44],[125,39],[120,32],[112,21],[108,13],[104,8],[98,8],[95,16],[92,22],[85,20],[80,12],[77,7],[74,14],[70,21],[66,25],[60,25],[55,27],[48,29],[40,31],[32,34],[27,40]] },
|
||||
{ name: '日本', poly: [[130,31],[140,35],[142,42],[145,44],[140,40],[135,34],[130,31]] },
|
||||
{ name: '东南亚', poly: [[98,6],[102,-2],[106,-6],[114,-8],[120,-3],[110,3],[104,2],[98,6]] },
|
||||
{ name: '新几内亚', poly: [[131,-1],[138,-3],[145,-6],[147,-9],[140,-8],[134,-4],[131,-1]] },
|
||||
{ name: '澳大利亚', poly: [[114,-22],[122,-18],[130,-12],[138,-17],[146,-19],[153,-28],[150,-37],[140,-38],[130,-32],[120,-34],[114,-22]] },
|
||||
{ name: '新西兰', poly: [[172,-34],[175,-38],[178,-38],[173,-41],[168,-46],[167,-45],[170,-40],[172,-34]] },
|
||||
];
|
||||
|
||||
// 判断点是否在多边形内(射线法)
|
||||
function pointInPoly(lng, lat, poly) {
|
||||
let inside = false;
|
||||
for (let i = 0, j = poly.length - 1; i < poly.length; j = i++) {
|
||||
const [xi, yi] = poly[i];
|
||||
const [xj, yj] = poly[j];
|
||||
if ((yi > lat) !== (yj > lat) && lng < ((xj - xi) * (lat - yi)) / (yj - yi) + xi) {
|
||||
inside = !inside;
|
||||
}
|
||||
}
|
||||
return inside;
|
||||
}
|
||||
|
||||
// 生成陆地点阵(经纬度网格)
|
||||
export function landPoints(step = 2.2) {
|
||||
const pts = [];
|
||||
for (let lat = -62; lat <= 74; lat += step) {
|
||||
for (let lng = -180; lng < 180; lng += step) {
|
||||
for (const c of CONTINENTS) {
|
||||
if (pointInPoly(lng, lat, c.poly)) {
|
||||
pts.push([lng, lat]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return pts;
|
||||
}
|
||||
Reference in New Issue
Block a user