Files
leggenda-del-regolo/src/story/ambience.js
T
manzoloandClaude Fable 5.1 51a46fe5a0 Effetti ambientali nelle dieci scene del 27 ottobre (Andrea: «applicale tutte»)
Nuvole, rondini e ombre di foglie dove ci sono alberi e cielo; ombra di nuvola sui campi di Gabbiano, Coldaia, le
Mozzète e la Provinciale; alberi al vento a Gabbiano e Via Massorondinaio; farfalle alla Piazzetta, a Gabbiano e
Coldaia, la libellula al ponticino delle Mozzète; piccioni e merli sulla Provinciale e alla falegnameria, col pulviscolo
nel fienile; di sera la lanterna della Piazzetta, il lampione di Via del Pignone, le lampade del Cinema Taiuti e il
cartellone del Rattattù illuminato.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GiECdBYE8csKd4tcFvwntT
2026-10-28 00:25:01 +01:00

130 lines
8.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Dettagli ambientali, separati dagli enigmi. Coordinate nello sfondo 640×360.
// Le tre prove (Bosco ai Frati, campeggio, interno Pieve) restano in story.js.
const day = ['pomeriggio', 'tramonto'];
const rect = ([x, y, w, h]) => [[x, y], [x + w, y], [x + w, y + h], [x, y + h]];
const shade = (area, count = 10) => ({ type: 'leafshadow', phase: day, area, count, opacity: 0.55, clip: rect(area) });
const butterfly = (area, offset = 0) => ({ type: 'insect', phase: day, area, every: 34000, duration: 10500, offset });
const curtain = area => ({ type: 'curtain', phase: day, area, clip: rect(area) });
const bird = (area, offset = 0, kind = 'pigeon') => ({ type: 'groundbird', phase: day, area, every: 42000, duration: 17000, offset, kind });
export const ambience = {
piazza: [bird([165, 277, 58, 20], 7000), bird([245, 286, 38, 20], 2000)],
fortezza: [shade([25, 295, 135, 44], 9)],
pieve: [{ type: 'birds', phase: day, area: [195, 16, 95, 30], count: 2, every: 27000, duration: 4300, offset: 9000,
clip: [[160, 0], [268, 0], [268, 66], [160, 66]] }],
oratorio: [bird([366, 139, 28, 12], 11000), shade([430, 278, 150, 45], 8)],
via_de_medici: [{ type: 'cat', phase: day, points: [[264, 250], [399, 255]], every: 57000, duration: 9500, offset: 3000 }],
comune: [shade([20, 268, 240, 70], 16)],
giardini_poste: [butterfly([80, 222, 145, 42], 6000), shade([340, 262, 150, 60], 8)],
via_calimara: [shade([52, 263, 190, 64], 14)],
via_provinciale: [
{ type: 'cloth', pole: 'left', rects: [[168, 198, 55, 5], [230, 201, 49, 5]], amount: 0.8,
clip: [[166, 197], [282, 197], [282, 208], [166, 208]] },
{ type: 'lamps', phase: 'sera', points: [[384, 198]], glow: 7 },
],
area_feste: [butterfly([280, 225, 150, 40], 9000), shade([460, 260, 130, 35], 7)],
ponte_sieve: [shade([20, 280, 175, 55], 11), { type: 'lamps', phase: 'sera', points: [[62, 39], [271, 62], [293, 136], [533, 115]], glow: 12 }],
polisportiva: [shade([220, 280, 135, 55], 10), butterfly([380, 251, 100, 28], 18000)],
polisportiva_principale: [bird([230, 237, 76, 18], 12000, 'blackbird')],
forno: [{ type: 'windowlife', area: [162, 164, 66, 55], every: 47000, duration: 7000, offset: 1000,
clip: [[162, 164], [228, 164], [228, 218], [162, 218]] }],
stazione: [shade([20, 270, 200, 55], 12),
{ type: 'windowlife', area: [353, 219, 15, 20], every: 51000, duration: 6500, offset: 14000,
clip: rect([353, 219, 15, 20]), fill: 'rgba(255,192,105,0.16)' }],
bivio_provinciale: [shade([320, 300, 80, 35], 6), butterfly([335, 232, 105, 30], 20000)],
provinciale_viale: [shade([55, 274, 240, 62], 14)],
verso_luna: [
{ type: 'ripples', area: [375, 287, 225, 42], count: 15, flow: [8, 2],
clip: [[366, 303], [402, 296], [429, 286], [479, 288], [519, 307], [597, 324], [500, 330], [456, 321], [400, 312]] },
{ type: 'ripples', area: [428, 222, 42, 18], count: 4, flow: [2, 2],
clip: [[428, 223], [449, 222], [469, 235], [445, 240]] },
],
campomigliaio_strada: [shade([458, 296, 140, 42], 10)],
campomigliaio_circolo: [{ type: 'drip', at: [379, 232], height: 27, every: 2900 }],
campomigliaio_ponte: [
{ type: 'ripples', area: [157, 209, 180, 87], count: 15, flow: [12, 6],
clip: [[159, 211], [231, 213], [286, 226], [310, 247], [329, 280], [310, 294], [259, 281], [213, 253], [169, 234]] },
{ type: 'ripples', area: [402, 321, 163, 39], count: 9, flow: [12, 4],
clip: [[430, 323], [467, 337], [494, 337], [566, 359], [402, 359], [409, 342]] },
],
tennis_chiesa: [butterfly([410, 294, 120, 32], 4000), shade([490, 305, 140, 36], 8)],
casa_maestro_bacci: [{ type: 'cloudshadow', phase: day, area: [172, 215, 450, 140], offset: 19000,
clip: [[172, 215], [370, 234], [622, 309], [622, 355], [315, 296]] }],
area_feste_festa: [
{ type: 'cloth', pole: 'left', amount: 0.9, rects: [[190, 109, 8, 9], [224, 118, 7, 9], [262, 124, 7, 9], [598, 120, 9, 10], [610, 117, 9, 11]] },
{ type: 'insect', kind: 'moth', phase: 'sera', area: [148, 80, 28, 24], every: 29000, duration: 9000, offset: 4500 },
],
villa_adami: [curtain([300, 120, 12, 26])],
salita_fortezza: [shade([500, 308, 135, 36], 9),
{ type: 'leaves', phase: day, area: [560, 242, 55, 70], count: 1, colors: ['#8a9e48'] }],
salita_villa_adami: [shade([460, 298, 170, 45], 10)],
carza: [shade([55, 275, 210, 60], 12)],
ponticino: [{ type: 'insect', kind: 'dragonfly', phase: day, area: [90, 240, 100, 44], every: 37000, duration: 8500, offset: 7000 }],
area_camper: [shade([30, 242, 200, 65], 14), butterfly([245, 240, 90, 30], 21000)],
campo_giannini: [bird([220, 262, 100, 25], 6000, 'blackbird')],
cardetole: [curtain([450, 121, 10, 18]),
{ type: 'windows', phase: 'sera', rects: [[450, 121, 10, 18], [496, 111, 12, 15], [450, 169, 10, 12]], over: 6500, opacity: 0.5, blend: 'screen' }],
scuola: [shade([191, 260, 130, 47], 9)],
viale_cipressi: [{ type: 'cloudshadow', phase: day, area: [95, 225, 435, 135], offset: 11000,
clip: [[300, 225], [337, 225], [530, 360], [95, 360]] }],
trebbio: [shade([278, 277, 112, 23], 6)],
// Le scene del 27 ottobre (Andrea: «applicale tutte»).
via_pignone: [
{ type: 'clouds', area: [100, 0, 440, 110], count: 3, big: true },
{ type: 'birds', phase: day, area: [200, 20, 300, 80], count: 3, every: 23000, duration: 5000, offset: 6000 },
shade([330, 282, 180, 50], 10),
{ type: 'lamps', phase: 'sera', points: [[250, 74]], glow: 10 },
],
piazzetta: [
shade([30, 290, 300, 60], 14),
butterfly([150, 170, 150, 60], 5000),
{ type: 'lamps', phase: 'sera', points: [[616, 118]], glow: 12 },
],
provinciale_pignone: [
shade([80, 270, 220, 70], 14), shade([470, 290, 170, 60], 10),
{ type: 'cloudshadow', phase: day, area: [120, 230, 420, 130], offset: 8000,
clip: [[290, 232], [370, 232], [640, 330], [640, 360], [0, 360], [0, 330]] },
bird([410, 258, 70, 16], 9000),
],
gabbiano: [
{ type: 'clouds', area: [140, 0, 500, 140], count: 3, big: true },
{ type: 'birds', phase: day, area: [200, 40, 400, 100], count: 4, every: 21000, duration: 5500, offset: 3000 },
{ type: 'cloudshadow', phase: day, area: [140, 160, 500, 200], offset: 7000, clip: rect([140, 160, 500, 200]) },
{ type: 'sway', rects: [[430, 128, 70, 60]], amount: 2 },
butterfly([120, 250, 200, 60], 3000),
],
ponticino_mozzete: [
shade([0, 230, 640, 110], 22),
{ type: 'insect', kind: 'dragonfly', phase: day, area: [80, 230, 140, 50], every: 37000, duration: 8500, offset: 7000 },
],
via_cipriani: [
{ type: 'clouds', area: [0, 0, 420, 150], count: 3, big: true },
shade([300, 300, 160, 50], 10),
// Di sera le lampade del cinema e il cartellone del Rattattù illuminato.
{ type: 'lamps', phase: 'sera', points: [[545, 214], [620, 168]], glow: 12 },
{ type: 'lamps', phase: 'sera', points: [[490, 200]], glow: 34 },
],
via_massorondinaio: [
{ type: 'clouds', area: [0, 0, 640, 100], count: 3, big: true },
{ type: 'birds', phase: day, area: [100, 30, 400, 100], count: 3, every: 25000, duration: 5000, offset: 11000 },
{ type: 'sway', rects: [[200, 128, 90, 72]], amount: 2 },
],
coldaia: [
{ type: 'clouds', area: [200, 0, 440, 120], count: 2 },
{ type: 'cloudshadow', phase: day, area: [0, 150, 640, 210], offset: 15000, clip: rect([0, 160, 640, 200]) },
{ type: 'birds', phase: day, area: [250, 20, 350, 90], count: 3, every: 27000, duration: 5500, offset: 2000 },
butterfly([60, 280, 200, 50], 12000),
],
falegnameria_coldaia: [
{ type: 'clouds', area: [0, 0, 640, 110], count: 3, big: true },
{ type: 'dust', phase: day, area: [330, 150, 260, 70], count: 10 },
bird([250, 230, 90, 18], 8000, 'blackbird'),
],
mozzete: [
{ type: 'clouds', area: [100, 0, 540, 110], count: 3, big: true },
shade([0, 215, 230, 60], 12),
{ type: 'cloudshadow', phase: day, area: [60, 220, 520, 140], offset: 23000,
clip: [[0, 215], [400, 195], [640, 260], [640, 360], [0, 360]] },
],
};