@adatechnology/game-weather-three 0.6.13 → 0.6.15

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.
@@ -2756,8 +2756,36 @@ void main() {
2756
2756
  loop: 2,
2757
2757
  timeline: [call2("bodywork_impact", [0, 0, 0], NORMAL, [variable("dx"), variable("dy"), variable("dz")], variable("bore"), variable("paint"), variable("metal"))]
2758
2758
  };
2759
+ var GLASS_PIECE = 11061464;
2760
+ var GLASS_DUST = 12572386;
2761
+ var HIT = [0, 0, 0];
2762
+ var VEHICLE_GLASS_CHIP = {
2763
+ id: "vehicle_glass_chip",
2764
+ pageId: "vehicle:vehicle_glass_chip",
2765
+ team: "vehicles",
2766
+ budget: { particles: 16, debris: 6 },
2767
+ loop: 2,
2768
+ timeline: [
2769
+ burst("add", 6, { p: HIT, box: [0.04, 0.04, 0.04], size: [8e-3, 0.02], life: [0.12, 0.3], c0: 16777215, a: 0.9, fi: 0.3 }),
2770
+ burst("normal", 6, { p: HIT, dir: NORMAL, sp: [0.3, 0.9], drag: 3, life: [0.4, 0.8], size: [0.04, 0.08], grow: 2, c0: GLASS_DUST, a: 0.18 }),
2771
+ repeat(6, debris({ p: HIT, box: [0.03, 0.03, 0.03], dir: NORMAL, cone: 0.6, sp: [0.4, 1.4], size: [rnd(2e-3, 4e-3), 2e-3, rnd(2e-3, 4e-3)], c: GLASS_PIECE, spin: 20, life: 6, bounce: 0.2 }))
2772
+ ]
2773
+ };
2774
+ var VEHICLE_GLASS_SHATTER = {
2775
+ id: "vehicle_glass_shatter",
2776
+ pageId: "vehicle:vehicle_glass_shatter",
2777
+ team: "vehicles",
2778
+ budget: { particles: 40, debris: 0 },
2779
+ loop: 2,
2780
+ timeline: [
2781
+ burst("add", 24, { p: HIT, box: [0.5, 0.3, 0.5], size: [0.01, 0.03], life: [0.15, 0.5], c0: 16777215, a: 0.9, fi: 0.3 }),
2782
+ burst("normal", 10, { p: [0, -0.15, 0], box: [0.5, 0.2, 0.5], sp: [0.1, 0.4], drag: 2, life: [0.6, 1.1], size: [0.08, 0.14], grow: 2.5, c0: GLASS_DUST, a: 0.14 })
2783
+ ]
2784
+ };
2759
2785
  var VEHICLE_EFFECTS = [
2760
2786
  BODYWORK_IMPACT,
2787
+ VEHICLE_GLASS_CHIP,
2788
+ VEHICLE_GLASS_SHATTER,
2761
2789
  /** The engine on fire: `engine_smoke` at its worst condition (black smoke, flames in the hood, a light). */
2762
2790
  aliasOf(ENGINE_SMOKE, "vehicle_fire", { params: { id: "condition", options: ["100", "60", "30", "10"], default: 3 }, loop: 12 }),
2763
2791
  /** The exhaust of a car under way: `engine_smoke` in the best condition, for half a second so a moving car asks again. */
@@ -2797,8 +2825,8 @@ void main() {
2797
2825
  var WORKSHOP_EFFECTS = Object.fromEntries(ALL_EFFECTS.map((effect) => [effect.id, effect]));
2798
2826
  var GAME_EFFECTS = { ...WORKSHOP_EFFECTS, ...Object.fromEntries([...EVENT_EFFECTS, ...VIEWMODEL_EFFECTS, ...VEHICLE_EFFECTS, ...SINGLE_PARTICLE_EFFECTS].map((effect) => [effect.id, effect])) };
2799
2827
  var QUARTER_TURN2 = Math.PI / 2;
2800
- var SCRATCH = createVec3();
2801
2828
  var QUARTER_TURN3 = Math.PI / 2;
2829
+ var SCRATCH = createVec3();
2802
2830
  var DEGREES = 180 / Math.PI;
2803
2831
 
2804
2832
  // src/rain-near.ts