@adatechnology/game-animals-three 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,7 +105,7 @@ var GameAnimalsThree = (() => {
105
105
  var BODY_FOLEY_IDS = [...FOOTSTEP_SOUND_IDS, ...LAND_SOUND_IDS, ...BODY_SOUND_IDS];
106
106
  var SWING_LEAD_SECONDS = { punch: 0.07, kick: 0.09, shove: 0, blade: 0.05, blunt: 0.1, chop: 0.11 };
107
107
 
108
- // ../game-audio/dist/chunk-KBTUANNG.js
108
+ // ../game-audio/dist/chunk-C2K7XN2K.js
109
109
  var DISTANCE_CURVES = {
110
110
  /** The game's `sfx`: `vol / (1 + d² × 0.004)`, cutoff `/ (1 + d × 0.01)`, silent below 0.01 (jogo L62091–62092, L62101). */
111
111
  game_sfx: { model: "inverse_square", k: 4e-3, cutoffK: 0.01, minGain: 0.01 },
@@ -322,7 +322,22 @@ var GameAnimalsThree = (() => {
322
322
  ["smg_45_auto", 2, "sfx_pistol"],
323
323
  ["weapon_draw", 2],
324
324
  ["suppressor_attach", 3],
325
- ["suppressor_detach", 3]
325
+ ["suppressor_detach", 3],
326
+ ["minigun_loop", 3],
327
+ ["smg_5_7x28", 3],
328
+ ["mg_belt_adjust", 3],
329
+ ["mg_belt_box_attach", 3],
330
+ ["mg_cover_open", 3],
331
+ ["mg_cover_close", 3],
332
+ ["weapon_holster", 3],
333
+ ["scope_zoom", 3]
334
+ ]),
335
+ ...entries("impactos", [
336
+ ["knife_hit_wall", 3],
337
+ ["helmet_hit", 3],
338
+ ["vest_hit", 3],
339
+ ["headshot", 3],
340
+ ["blood_squirt", 3]
326
341
  ]),
327
342
  ...entries("explosoes-fogo", [
328
343
  ["explosion_grenade", 1, "boom"],
@@ -340,7 +355,13 @@ var GameAnimalsThree = (() => {
340
355
  ["grenade_bounce", 1],
341
356
  ["c4_plant", 2],
342
357
  ["c4_beep", 2],
343
- ["c4_disarm", 2]
358
+ ["c4_disarm", 2],
359
+ ["c4_disarming_loop", 3],
360
+ ["c4_remote_detonate", 3],
361
+ ["smoke_grenade_hiss", 3],
362
+ ["grenade_pin_pull", 3],
363
+ ["electric_shock", 3],
364
+ ["electric_spark", 3]
344
365
  ]),
345
366
  ...entries("personagem", [
346
367
  ["footstep_concrete_walk", 1, "sfx_step"],
@@ -368,7 +389,13 @@ var GameAnimalsThree = (() => {
368
389
  ["zombie_attack", 1],
369
390
  ["zombie_pain", 1],
370
391
  ["zombie_claw_hit", 1, "sfx_flesh"],
371
- ["zombie_claw_miss", 2]
392
+ ["zombie_claw_miss", 2],
393
+ ["swing_whoosh", 3],
394
+ ["heartbeat_critical", 3],
395
+ ["fall_water", 3],
396
+ ["fall_damage", 3],
397
+ ["fall_scream", 3],
398
+ ["footstep_glass_walk", 3]
372
399
  ]),
373
400
  ...entries("veiculos", [
374
401
  ["engine_loop_car", 1],
@@ -378,7 +405,12 @@ var GameAnimalsThree = (() => {
378
405
  ["car_door_open", 1, "latch"],
379
406
  ["car_door_close", 1, "shut_metal"],
380
407
  ["horn_car", 2, "horn"],
381
- ["tire_skid_asphalt", 2]
408
+ ["tire_skid_asphalt", 2],
409
+ ["jet_flyby", 3],
410
+ ["helicopter_turbine", 3],
411
+ ["tire_burnout", 3],
412
+ ["handbrake_turn", 3],
413
+ ["siren_police", 3]
382
414
  ]),
383
415
  ...entries("itens-portas", [
384
416
  ["item_pickup_metal", 1],
@@ -389,7 +421,27 @@ var GameAnimalsThree = (() => {
389
421
  ["door_creak", 1, "creak_wood"],
390
422
  ["door_locked_rattle", 1, "rattle"],
391
423
  ["drawer_open", 2, "slide"],
392
- ["fridge_close", 2, "shut_metal"]
424
+ ["fridge_close", 2, "shut_metal"],
425
+ ["inventory_open", 3],
426
+ ["inventory_close", 3],
427
+ ["inventory_select", 3],
428
+ ["inventory_place", 3],
429
+ ["pickup_chime", 3],
430
+ ["item_pickup_coins", 3],
431
+ ["bandage_use", 3],
432
+ ["bandage_refuse", 3],
433
+ ["flashlight_toggle", 3],
434
+ ["gear_draw", 3],
435
+ ["gear_holster", 3],
436
+ ["button_press", 3],
437
+ ["lock_desk_open", 3],
438
+ ["elevator_move_loop", 3],
439
+ ["elevator_stop", 3],
440
+ ["door_sliding", 3],
441
+ ["door_kick", 3],
442
+ ["door_wood_break", 3],
443
+ ["gate_iron_open", 3],
444
+ ["gate_iron_close", 3]
393
445
  ]),
394
446
  ...entries("ambiente", [
395
447
  ["rain_loop", 2],
@@ -397,7 +449,16 @@ var GameAnimalsThree = (() => {
397
449
  ["thunder_near", 2],
398
450
  ["thunder_far", 2],
399
451
  ["water_splash", 2],
400
- ["helicopter_loop", 3]
452
+ ["helicopter_loop", 3],
453
+ ["bird_flush", 3],
454
+ ["dog_growl", 3],
455
+ ["dog_whimper", 3],
456
+ ["dog_howl", 3],
457
+ ["zombie_dog_bark", 3],
458
+ ["zombie_dog_howl_far", 3],
459
+ ["insect_squash", 3],
460
+ ["insect_crawl", 3],
461
+ ["fan_loop", 3]
401
462
  ])
402
463
  ];
403
464
  var SFX_MATERIALS = [
@@ -479,6 +540,7 @@ var GameAnimalsThree = (() => {
479
540
  burst: 20,
480
541
  burstSpacing: 0.06
481
542
  };
543
+ var CATALOG = new Map([...SFX_CATALOG, ...SFX_IMPACTS].map((entry) => [entry.id, entry]));
482
544
  var PT = {
483
545
  group: "Som",
484
546
  name: "Painel de som (arquivos e C1\u2013C10)",
@@ -553,9 +615,9 @@ var GameAnimalsThree = (() => {
553
615
  strengths: { light: "leve", medium: "m\xE9dio", heavy: "forte" },
554
616
  states: { file: "A", synth: "S", missing: "F" },
555
617
  criteria: { C1: "C1 Sincronia", C2: "C2 Certo p/ a\xE7\xE3o", C3: "C3 Dist\xE2ncia", C4: "C4 Posi\xE7\xE3o", C5: "C5 Varia\xE7\xE3o", C6: "C6 Volume", C7: "C7 Intensidade", C8: "C8 Cauda", C9: "C9 Rajada", C10: "C10 Escuta" },
556
- metrics: { source: "1 \xB7 Fonte do que tocou", chosen: "1 \xB7 Escolhido", matrix: "2 \xB7 Matriz", last: "\xDAltimo tocado", ab: "4 \xB7 A \xD7 B", blind: "4 \xB7 X", verdicts: "4 \xB7 Prefer\xEAncias", state: "5 \xB7 Medi\xE7\xE3o", count: "1 \xB7 Cat\xE1logo" },
618
+ metrics: { source: "1 \xB7 Fonte do que tocou", chosen: "1 \xB7 Escolhido", matrix: "2 \xB7 Matriz", last: "\xDAltimo tocado", ab: "4 \xB7 A \xD7 B", blind: "4 \xB7 X", verdicts: "4 \xB7 Prefer\xEAncias", state: "5 \xB7 Medi\xE7\xE3o", count: "1 \xB7 Cat\xE1logo", unlicensed: "1 \xB7 Arquivo sem licen\xE7a" },
557
619
  run: { idle: "parada", measuring: "medindo\u2026", done: "pronta", failed: "falhou", recording: "gravando\u2026", recorded: "grava\xE7\xE3o baixada" },
558
- words: { none: "\u2014", hidden: "? (revele)", prefers: "prefere", approved: "aprovado pelo dono" },
620
+ words: { none: "\u2014", hidden: "? (revele)", prefers: "prefere", approved: "aprovado pelo dono", local_file: "arquivo do pacote local", sdk_file: "grava\xE7\xE3o do SDK", synth: "s\xEDntese do SDK" },
559
621
  sources: { sdk: "SDK", user: "seu som", synth: "sintetizado" },
560
622
  probe: "Fonte do som",
561
623
  wall: "Parede (oclus\xE3o)",
@@ -626,9 +688,9 @@ var GameAnimalsThree = (() => {
626
688
  environments: { indoor: "indoor", outdoor: "outdoor" },
627
689
  strengths: { light: "light", medium: "medium", heavy: "heavy" },
628
690
  criteria: { C1: "C1 Sync", C2: "C2 Right sound", C3: "C3 Distance", C4: "C4 Position", C5: "C5 Variation", C6: "C6 Level", C7: "C7 Strength", C8: "C8 Tail", C9: "C9 Burst", C10: "C10 Listening" },
629
- metrics: { source: "1 \xB7 Source of what played", chosen: "1 \xB7 Chosen", matrix: "2 \xB7 Matrix", last: "Last played", ab: "4 \xB7 A \xD7 B", blind: "4 \xB7 X", verdicts: "4 \xB7 Preferences", state: "5 \xB7 Measurement", count: "1 \xB7 Catalogue" },
691
+ metrics: { source: "1 \xB7 Source of what played", chosen: "1 \xB7 Chosen", matrix: "2 \xB7 Matrix", last: "Last played", ab: "4 \xB7 A \xD7 B", blind: "4 \xB7 X", verdicts: "4 \xB7 Preferences", state: "5 \xB7 Measurement", count: "1 \xB7 Catalogue", unlicensed: "1 \xB7 File without licence" },
630
692
  run: { idle: "idle", measuring: "measuring\u2026", done: "done", failed: "failed", recording: "recording\u2026", recorded: "recording downloaded" },
631
- words: { none: "\u2014", hidden: "? (reveal)", prefers: "prefers", approved: "approved by the owner" },
693
+ words: { none: "\u2014", hidden: "? (reveal)", prefers: "prefers", approved: "approved by the owner", local_file: "local pack file", sdk_file: "SDK recording", synth: "SDK synthesis" },
632
694
  sources: { sdk: "SDK", user: "your sound", synth: "synthesized" },
633
695
  probe: "Sound source",
634
696
  wall: "Wall (occlusion)",
@@ -699,6 +761,66 @@ var GameAnimalsThree = (() => {
699
761
  };
700
762
  }
701
763
  var sceneMany = (count, make2) => Array.from({ length: count }, make2);
764
+ var hz = (midi) => 440 * 2 ** ((midi - 69) / 12);
765
+ var layer = (note, beat, wave, level) => {
766
+ const [at, midi, beats] = note;
767
+ const length = beats * beat;
768
+ return {
769
+ at: at * beat,
770
+ duration: length,
771
+ source: { kind: "osc", wave, frequency: { set: hz(midi) } },
772
+ envelope: [[0, 1e-4, "set"], [0.01, level, "linear"], [Math.max(0.02, length * 0.9), level * 0.35, "linear"], [length, 1e-4, "exp", "fixed"]]
773
+ };
774
+ };
775
+ function radioTrack(spec) {
776
+ const beat = 60 / spec.bpm;
777
+ const recipes = Array.from({ length: spec.bars }, (_, bar) => {
778
+ const inBar = (notes) => notes.filter((n) => n[0] >= bar * 4 && n[0] < bar * 4 + 4).map((n) => [n[0] - bar * 4, n[1], n[2]]);
779
+ const layers = [
780
+ ...inBar(spec.bass).map((n) => layer(n, beat, "triangle", 0.16)),
781
+ ...inBar(spec.chords).map((n) => layer(n, beat, "sine", 0.05)),
782
+ ...inBar(spec.melody).map((n) => layer(n, beat, spec.wave, 0.07))
783
+ ];
784
+ return { id: `${spec.id}_${bar}`, bus: "world", duration: 4 * beat, layers, falloff: { model: "none" } };
785
+ });
786
+ return { song: { id: spec.id, barSeconds: 4 * beat, bars: recipes.map((r) => r.id) }, recipes };
787
+ }
788
+ var chord = (bar, root, minor = false) => [[bar * 4, root, 4], [bar * 4, root + (minor ? 3 : 4), 4], [bar * 4, root + 7, 4]];
789
+ var bassLine = (roots, pattern) => roots.flatMap((root, bar) => pattern.map((b) => [bar * 4 + b, root - 12, 0.9]));
790
+ var TRACKS = [
791
+ // a bright pop loop: I–V–vi–IV in C
792
+ radioTrack({
793
+ id: "radio_track_pop",
794
+ bpm: 112,
795
+ bars: 4,
796
+ wave: "square",
797
+ bass: bassLine([48, 55, 57, 53], [0, 1.5, 2, 3]),
798
+ chords: [...chord(0, 60), ...chord(1, 55), ...chord(2, 57, true), ...chord(3, 53)],
799
+ melody: [[0, 76, 1], [1, 74, 0.5], [1.5, 72, 1.5], [4, 74, 1], [5, 76, 1], [6, 79, 2], [8, 76, 1], [9, 74, 1], [10, 72, 2], [12, 72, 1], [13, 74, 1], [14, 72, 2]]
800
+ }),
801
+ // a syncopated loop in A minor, the bass on the off-beats
802
+ radioTrack({
803
+ id: "radio_track_groove",
804
+ bpm: 100,
805
+ bars: 4,
806
+ wave: "triangle",
807
+ bass: bassLine([57, 62, 64, 57], [0, 0.75, 1.5, 2.5, 3.25]),
808
+ chords: [...chord(0, 57, true), ...chord(1, 62, true), ...chord(2, 64), ...chord(3, 57, true)],
809
+ melody: [[0.5, 72, 0.5], [1.25, 76, 0.75], [2.5, 74, 1], [4.5, 77, 0.5], [5.25, 74, 0.75], [6.5, 72, 1.5], [8.5, 71, 0.5], [9.25, 74, 0.75], [10.5, 76, 1.5], [12.5, 72, 0.5], [13.25, 69, 2]]
810
+ }),
811
+ // a slow blues-like loop in F with a swung melody
812
+ radioTrack({
813
+ id: "radio_track_slow",
814
+ bpm: 76,
815
+ bars: 4,
816
+ wave: "sine",
817
+ bass: bassLine([53, 58, 53, 60], [0, 2]),
818
+ chords: [...chord(0, 65), ...chord(1, 58), ...chord(2, 65), ...chord(3, 60)],
819
+ melody: [[0, 72, 1.5], [1.67, 75, 0.33], [2, 77, 2], [4, 74, 1], [5, 72, 1], [6, 70, 2], [8, 72, 1.5], [9.67, 69, 0.33], [10, 65, 2], [12, 67, 1], [13, 70, 1], [14, 72, 2]]
820
+ })
821
+ ];
822
+ var RADIO_TRACKS = TRACKS.map((t) => t.song);
823
+ var RADIO_BANK = { id: "vehicle_radio", sounds: TRACKS.flatMap((t) => t.recipes), loops: [] };
702
824
  var FOLEY_FALLOFF = {
703
825
  model: "inverse_square",
704
826
  k: 0.02,
@@ -1305,11 +1427,11 @@ var GameAnimalsThree = (() => {
1305
1427
  ...s.splash ? [sceneNoise({ type: "bandpass", f: s.splash.f * take.f, f2: s.splash.f2 * take.f, q: 1.4, d: s.splash.d * take.t * weight ** 0.4, vol: s.splash.vol * gait.vol * take.v * weight ** 0.5 })] : []
1306
1428
  ];
1307
1429
  }
1308
- var quieter = (level, layers) => layers.map((layer) => {
1309
- const gain = layer.gain ?? 1;
1310
- if (typeof gain === "number") return { ...layer, gain: gain * level };
1311
- if (Array.isArray(gain)) return { ...layer, gain: [gain[0] * level, gain[1] * level] };
1312
- return layer;
1430
+ var quieter = (level, layers) => layers.map((layer2) => {
1431
+ const gain = layer2.gain ?? 1;
1432
+ if (typeof gain === "number") return { ...layer2, gain: gain * level };
1433
+ if (Array.isArray(gain)) return { ...layer2, gain: [gain[0] * level, gain[1] * level] };
1434
+ return layer2;
1313
1435
  });
1314
1436
  var recipe = (id, layers, falloff, bus = "world") => ({ id, bus, pan: true, layers, falloff, sources: ["sdk"] });
1315
1437
  var takeId = (id, index) => `${id}_${String(index + 1).padStart(2, "0")}`;
@@ -1325,7 +1447,7 @@ var GameAnimalsThree = (() => {
1325
1447
  (take) => quieter(LANDING_LEVEL, [
1326
1448
  // both feet, a hair apart, then the knees taking the weight (a low body thump) and the clothes settling
1327
1449
  ...footLayers(surface, take, GAITS.run, LANDINGS[landing2].weight),
1328
- ...footLayers(surface, { ...take, v: take.v * 0.6 }, GAITS.run, LANDINGS[landing2].weight * 0.6).map((layer) => ({ ...layer, at: (typeof layer.at === "number" ? layer.at : 0) + 0.018 * take.t })),
1450
+ ...footLayers(surface, { ...take, v: take.v * 0.6 }, GAITS.run, LANDINGS[landing2].weight * 0.6).map((layer2) => ({ ...layer2, at: (typeof layer2.at === "number" ? layer2.at : 0) + 0.018 * take.t })),
1329
1451
  sceneTone({ f: 60 * take.f, f2: 38, d: 0.14 * LANDINGS[landing2].weight * take.t, vol: 0.22 * LANDINGS[landing2].weight ** 0.7 * take.v, delay: 0.02 }),
1330
1452
  sceneNoise({ type: "bandpass", f: [1800, 2600], q: 0.8, d: 0.18, vol: LANDINGS[landing2].cloth * take.v, delay: 0.04 })
1331
1453
  ]),
@@ -1371,7 +1493,7 @@ var GameAnimalsThree = (() => {
1371
1493
  fall_damage: (take) => [
1372
1494
  ...BODY.body_fall(take),
1373
1495
  sceneNoise({ type: "highpass", f: 2800, d: 0.02, vol: 0.35 * take.v, delay: 0.01 }),
1374
- ...voice({ f0: 170, f1: 110, d: 0.32, fA: 650, fB: 1150, noise: 0.25, vol: 0.32 })(take).map((layer) => ({ ...layer, at: 0.08 }))
1496
+ ...voice({ f0: 170, f1: 110, d: 0.32, fA: 650, fB: 1150, noise: 0.25, vol: 0.32 })(take).map((layer2) => ({ ...layer2, at: 0.08 }))
1375
1497
  ],
1376
1498
  player_hurt: voice({ f0: 150, f1: 105, d: 0.26, fA: 620, fB: 1100, noise: 0.3, vol: 0.35 }),
1377
1499
  player_breath_run: (take) => [
@@ -2842,8 +2964,8 @@ var GameAnimalsThree = (() => {
2842
2964
  const face = faces[i];
2843
2965
  f3(face[2] + offset, face[1] + offset, face[0] + offset);
2844
2966
  }
2845
- const layer = steps + bevelSegments * 2;
2846
- offset = vlen * layer;
2967
+ const layer2 = steps + bevelSegments * 2;
2968
+ offset = vlen * layer2;
2847
2969
  for (let i = 0; i < flen; i++) {
2848
2970
  const face = faces[i];
2849
2971
  f3(face[0] + offset, face[1] + offset, face[2] + offset);
@@ -3644,8 +3766,8 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
3644
3766
  const isChicken = species.id === "chicken";
3645
3767
  const isLapwing = species.id === "southern_lapwing";
3646
3768
  const flying = clip === "run" && !isChicken;
3647
- const hz = clip === "run" && !flying ? species.runHz : clip === "walk" ? species.walkHz : 0;
3648
- rig.phase += dt * (flying ? isVulture ? 1.1 : 4.5 : hz) * 2 * PI;
3769
+ const hz2 = clip === "run" && !flying ? species.runHz : clip === "walk" ? species.walkHz : 0;
3770
+ rig.phase += dt * (flying ? isVulture ? 1.1 : 4.5 : hz2) * 2 * PI;
3649
3771
  const targetHeight = flying ? rig.size * 1.2 : 0;
3650
3772
  rig.trunk.position.y += (targetHeight - rig.trunk.position.y) * Math.min(1, dt * 3);
3651
3773
  rig.legs.forEach((leg, index) => {
@@ -3708,8 +3830,8 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
3708
3830
  if (rig.jaw) rig.jaw.rotation.x = 0.25;
3709
3831
  return;
3710
3832
  }
3711
- const hz = (clip === "run" ? species.runHz : clip === "walk" ? species.walkHz : 0) * (rig.infected ? 1.2 : 1);
3712
- rig.phase += dt * hz * 2 * PI2;
3833
+ const hz2 = (clip === "run" ? species.runHz : clip === "walk" ? species.walkHz : 0) * (rig.infected ? 1.2 : 1);
3834
+ rig.phase += dt * hz2 * 2 * PI2;
3713
3835
  const gait = clip === "run" ? species.gallop ? gaits.gallop : gaits.trot : gaits.walk;
3714
3836
  const amplitude = clip === "run" ? 0.62 : 0.34;
3715
3837
  const flex = clip === "run" ? 1.15 : 0.75;