@adatechnology/game-vfx 0.12.0 → 0.13.0
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.
- package/README.md +21 -0
- package/dist/index.d.ts +342 -1
- package/dist/index.global.js +680 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +680 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,6 +79,27 @@ is the recipes plus these, what a world plays by default. Texts of every recipe
|
|
|
79
79
|
`vehicle_leak` is the page's pool and drips without the fire and the explosion (`FUEL_LEAK_ONLY`: the same `decal` and `emit` steps); `vehicle_leak_ignited` is the whole sequence (the spark, the fire running along
|
|
80
80
|
the pool to the tank and the blast at 7.2 s), played when the leak catches fire.
|
|
81
81
|
|
|
82
|
+
## Water: rounds and blasts on water
|
|
83
|
+
|
|
84
|
+
`createWaterEffects({ levelAt, limits, seed })` draws what a round or a charge does to water, renderer-free (`createWaterEffectsLayer` of game-vfx-three draws it).
|
|
85
|
+
|
|
86
|
+
- `shot({ point, direction, profile, speed, depth })`: the splash of a class of round where it meets the surface. The classes are data
|
|
87
|
+
(`WATER_SHOT_PROFILES`, `patchWaterShotProfiles`): `rimfire`, `pistol`, `magnum`, `rifle` (5.56, 7.62x39: a tall thin spout, many fast drops),
|
|
88
|
+
`battle_rifle`, `sniper` (.338, .50: a tall wide column, a wide ring), `buckshot` (a small spout and a lot of shallow foam per pellet), `birdshot`,
|
|
89
|
+
`slug`, `arrow`, `fragment` and `object` (a thrown thing falling in). `WATER_SHOT_BY_CALIBER` gives the class of every calibre of `game-weapons`;
|
|
90
|
+
`waterShotClassOf` classes an unknown round by mass and speed. A round below `ricochetBelowDeg` skips off (`plan.ricochet`: the new direction and
|
|
91
|
+
the share of speed kept) with a low spout leaning its way; a steeper one throws a column, a crown of drops, rings and foam, and leaves a trail of
|
|
92
|
+
bubbles that stops where it is spent (`slowing`: metres to lose 1/e of its speed) or at the bed.
|
|
93
|
+
- `blast({ point, level, depth, explosive | tnt, kind })`: a charge by Hopkinson scaling (lengths go with the cube root of the TNT): the tallest column
|
|
94
|
+
a little under the surface, a lower one and the fireball at the surface, a dome of white water and a boil of bubbles deep under (`plan.underwater`:
|
|
95
|
+
no fireball), only the shock ring and spray high over it (`airburst`); a shallow pool cannot throw a full column. Every blast sends a fast shock
|
|
96
|
+
ring, three wave crests, a rain of drops that falls back and rings where it lands, mist and a slick of foam; a fragmentation charge at the surface
|
|
97
|
+
peppers the water around. `WATER_BLASTS` (TNT and kind of each explosive of `game-weapons`) and `WATER_BLAST_KINDS` (`brisance`, column width,
|
|
98
|
+
fragments, mist) are the data.
|
|
99
|
+
- `waveAt(x, z)`: the height and the push (m/s) of the waves there, for what floats and for a body standing in the water.
|
|
100
|
+
- Every record has a life and every pool a limit (`WATER_LIMITS`, `limits`); far from the camera (`setCamera`, `LOD_GAME`) fewer drops and bubbles
|
|
101
|
+
are made. `levelAt` keeps rings, foam and waves inside the water (they stop at the shore) and rings only the drops that fall back on water.
|
|
102
|
+
|
|
82
103
|
## Closed spaces (a shut car keeps the smoke out)
|
|
83
104
|
|
|
84
105
|
`world.enclose(id, { center, halfSize, orientation, openings, leak })` declares a closed space: a turned box the smoke, dust, steam and gas do not
|
package/dist/index.d.ts
CHANGED
|
@@ -2038,4 +2038,345 @@ declare const SMOKE_COLORS: {
|
|
|
2038
2038
|
readonly gas: Rgb;
|
|
2039
2039
|
};
|
|
2040
2040
|
|
|
2041
|
-
|
|
2041
|
+
/** A point or a vector as plain numbers, metres (y up). */
|
|
2042
|
+
type WaterVec3 = readonly [number, number, number];
|
|
2043
|
+
/** How one class of round meets the water, for a round that enters straight down at `speed`. Numbers are metres, seconds and metres per second. */
|
|
2044
|
+
interface WaterShotProfile {
|
|
2045
|
+
/** Speed the numbers are for: a slower round throws less, a faster one a little more. */
|
|
2046
|
+
readonly speed: number;
|
|
2047
|
+
/** Height of the column of water a round entering straight down throws up. */
|
|
2048
|
+
readonly columnHeight: number;
|
|
2049
|
+
/** Radius of that column at its foot. */
|
|
2050
|
+
readonly columnRadius: number;
|
|
2051
|
+
/** Drops of the crown thrown out around the column. */
|
|
2052
|
+
readonly drops: number;
|
|
2053
|
+
/** Speed the crown's drops leave at, slowest and fastest. */
|
|
2054
|
+
readonly dropSpeed: readonly [number, number];
|
|
2055
|
+
/** Radius of one drop. */
|
|
2056
|
+
readonly dropSize: number;
|
|
2057
|
+
/** Radius the widest ring reaches before it is gone. */
|
|
2058
|
+
readonly ringRadius: number;
|
|
2059
|
+
/** Rings that follow one another out from the point. */
|
|
2060
|
+
readonly rings: number;
|
|
2061
|
+
/** Seconds a ring lives. */
|
|
2062
|
+
readonly ringLife: number;
|
|
2063
|
+
/** Radius of the patch of foam left at the point. */
|
|
2064
|
+
readonly foamRadius: number;
|
|
2065
|
+
/** Seconds the foam lasts. */
|
|
2066
|
+
readonly foamLife: number;
|
|
2067
|
+
/** Metres of water the round crosses to lose 1/e of its speed (a rifle bullet yaws and breaks up within a few tens of centimetres). */
|
|
2068
|
+
readonly slowing: number;
|
|
2069
|
+
/** Bubbles left per metre of the trail under the water. */
|
|
2070
|
+
readonly bubblesPerMetre: number;
|
|
2071
|
+
/** Below this angle to the surface, in degrees, the round skips off the water instead of going in. */
|
|
2072
|
+
readonly ricochetBelowDeg: number;
|
|
2073
|
+
}
|
|
2074
|
+
/** The ids of `WATER_SHOT_PROFILES`; a host may add its own (`patchWaterShotProfiles`). */
|
|
2075
|
+
type WaterShotClass = 'rimfire' | 'pistol' | 'magnum' | 'rifle' | 'battle_rifle' | 'sniper' | 'buckshot' | 'birdshot' | 'slug' | 'arrow' | 'fragment' | 'object';
|
|
2076
|
+
/** How a kind of charge works on water. */
|
|
2077
|
+
interface WaterBlastKind {
|
|
2078
|
+
/** Share of the charge that acts on the water like a high explosive: 1 for a high explosive, little for a gas or fuel that only burns fast. */
|
|
2079
|
+
readonly brisance: number;
|
|
2080
|
+
/** Width of the column against a high explosive's (a shaped charge throws a narrow jet). */
|
|
2081
|
+
readonly columnWidth: number;
|
|
2082
|
+
/** Fragments that pepper the water around a charge that bursts at or over the surface. */
|
|
2083
|
+
readonly fragments: number;
|
|
2084
|
+
/** Steam and spray against a high explosive's (a fuel fire boils a lot of water into mist). */
|
|
2085
|
+
readonly mist: number;
|
|
2086
|
+
/** The fireball still shows under the water (never for a real charge; a host may want it). */
|
|
2087
|
+
readonly fireballUnderwater: boolean;
|
|
2088
|
+
}
|
|
2089
|
+
/** The kinds of `WATER_BLAST_KINDS`, as `@adatechnology/game-weapons` names them. */
|
|
2090
|
+
type WaterBlastKindId = 'blast' | 'fragmentation' | 'shaped_charge' | 'fuel' | 'flash' | 'directional' | 'incendiary';
|
|
2091
|
+
/** One explosive of the table: its TNT equivalent in kilograms and its kind. */
|
|
2092
|
+
interface WaterBlastCharge {
|
|
2093
|
+
readonly tnt: number;
|
|
2094
|
+
readonly kind: string;
|
|
2095
|
+
}
|
|
2096
|
+
/** A round meeting the water. */
|
|
2097
|
+
interface WaterShotParams {
|
|
2098
|
+
/** Where the round meets the surface. */
|
|
2099
|
+
readonly point: WaterVec3;
|
|
2100
|
+
/** Unit vector the round travels along. */
|
|
2101
|
+
readonly direction: WaterVec3;
|
|
2102
|
+
/** The class of round (`WATER_SHOT_PROFILES` id) or a profile of its own. */
|
|
2103
|
+
readonly profile: string | WaterShotProfile;
|
|
2104
|
+
/** Speed of the round at the surface; the profile's own when left out. */
|
|
2105
|
+
readonly speed?: number;
|
|
2106
|
+
/** Metres of water under the point (the trail stops at the bed). Default 2. */
|
|
2107
|
+
readonly depth?: number;
|
|
2108
|
+
}
|
|
2109
|
+
/** A charge going off in or over the water. */
|
|
2110
|
+
interface WaterBlastParams {
|
|
2111
|
+
/** The centre of the burst. */
|
|
2112
|
+
readonly point: WaterVec3;
|
|
2113
|
+
/** Height of the water surface over the point. */
|
|
2114
|
+
readonly level: number;
|
|
2115
|
+
/** Metres of water from the bed to the surface there. */
|
|
2116
|
+
readonly depth: number;
|
|
2117
|
+
/** Id of an explosive of `WATER_BLASTS`; `tnt` and `kind` win over it. */
|
|
2118
|
+
readonly explosive?: string;
|
|
2119
|
+
/** Kilograms of TNT equivalent. */
|
|
2120
|
+
readonly tnt?: number;
|
|
2121
|
+
/** Kind of charge (`WATER_BLAST_KINDS` id). Default `blast`. */
|
|
2122
|
+
readonly kind?: string;
|
|
2123
|
+
}
|
|
2124
|
+
/** What a round did at the water, as `planWaterShot` worked it out. */
|
|
2125
|
+
interface WaterShotPlan {
|
|
2126
|
+
readonly profile: WaterShotProfile;
|
|
2127
|
+
/** Degrees between the round's path and the surface. */
|
|
2128
|
+
readonly angleDeg: number;
|
|
2129
|
+
/** The round skipped off: its new direction and the share of its speed it kept. */
|
|
2130
|
+
readonly ricochet: {
|
|
2131
|
+
readonly direction: WaterVec3;
|
|
2132
|
+
readonly speedShare: number;
|
|
2133
|
+
} | null;
|
|
2134
|
+
readonly columnHeight: number;
|
|
2135
|
+
readonly columnRadius: number;
|
|
2136
|
+
/** Horizontal lean of the column, metres of top offset per metre of height. */
|
|
2137
|
+
readonly tilt: readonly [number, number];
|
|
2138
|
+
readonly drops: number;
|
|
2139
|
+
readonly ringRadius: number;
|
|
2140
|
+
readonly rings: number;
|
|
2141
|
+
readonly foamRadius: number;
|
|
2142
|
+
/** Where the round stopped under the water, or met the bed. */
|
|
2143
|
+
readonly trailEnd: WaterVec3;
|
|
2144
|
+
readonly trailLength: number;
|
|
2145
|
+
/** The round reached the bed with this speed (0 when it stopped in the water or skipped off). */
|
|
2146
|
+
readonly bedSpeed: number;
|
|
2147
|
+
}
|
|
2148
|
+
/** What a charge did at the water, as `planWaterBlast` worked it out. */
|
|
2149
|
+
interface WaterBlastPlan {
|
|
2150
|
+
readonly tnt: number;
|
|
2151
|
+
readonly kind: WaterBlastKind;
|
|
2152
|
+
/** Metres under the surface the charge went off (negative over it). */
|
|
2153
|
+
readonly burstDepth: number;
|
|
2154
|
+
/** The charge went off under the water: no fireball, the water takes the blast. */
|
|
2155
|
+
readonly underwater: boolean;
|
|
2156
|
+
/** The burst was too high over the water to throw any: only the shock ring and the spray. */
|
|
2157
|
+
readonly airburst: boolean;
|
|
2158
|
+
readonly columnHeight: number;
|
|
2159
|
+
readonly columnRadius: number;
|
|
2160
|
+
/** Radius of the dome of white water a burst under the surface lifts (0 over it). */
|
|
2161
|
+
readonly domeRadius: number;
|
|
2162
|
+
readonly domeHeight: number;
|
|
2163
|
+
readonly shockRadius: number;
|
|
2164
|
+
readonly waveAmplitude: number;
|
|
2165
|
+
readonly waveSpeed: number;
|
|
2166
|
+
readonly drops: number;
|
|
2167
|
+
readonly mist: number;
|
|
2168
|
+
readonly fragments: number;
|
|
2169
|
+
readonly foamRadius: number;
|
|
2170
|
+
readonly bubbles: number;
|
|
2171
|
+
}
|
|
2172
|
+
/** Upper bound of each pool: past it the oldest record goes. */
|
|
2173
|
+
interface WaterEffectsLimits {
|
|
2174
|
+
readonly drops: number;
|
|
2175
|
+
readonly rings: number;
|
|
2176
|
+
readonly foam: number;
|
|
2177
|
+
readonly columns: number;
|
|
2178
|
+
readonly bubbles: number;
|
|
2179
|
+
readonly mist: number;
|
|
2180
|
+
readonly waves: number;
|
|
2181
|
+
}
|
|
2182
|
+
/** The water's response at a point to the waves going through it. */
|
|
2183
|
+
interface WaterWaveSample {
|
|
2184
|
+
/** Metres the surface stands over its level. */
|
|
2185
|
+
readonly height: number;
|
|
2186
|
+
/** Metres per second a floating body there is pushed with, along x and z. */
|
|
2187
|
+
readonly push: readonly [number, number];
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
/** A drop thrown out of the water: it flies under gravity and, where it falls back on water, leaves a small ring. */
|
|
2191
|
+
interface WaterDrop {
|
|
2192
|
+
x: number;
|
|
2193
|
+
y: number;
|
|
2194
|
+
z: number;
|
|
2195
|
+
vx: number;
|
|
2196
|
+
vy: number;
|
|
2197
|
+
vz: number;
|
|
2198
|
+
size: number;
|
|
2199
|
+
age: number;
|
|
2200
|
+
life: number;
|
|
2201
|
+
/** The surface it was thrown from: it is gone once it falls back under it. */
|
|
2202
|
+
level: number;
|
|
2203
|
+
}
|
|
2204
|
+
/** A ring on the surface. `kind` 0: a ripple that slows as it spreads; 1: the fast shock ring of a blast; 2: a wave crest going out at its speed. */
|
|
2205
|
+
interface WaterRing {
|
|
2206
|
+
x: number;
|
|
2207
|
+
y: number;
|
|
2208
|
+
z: number;
|
|
2209
|
+
kind: 0 | 1 | 2;
|
|
2210
|
+
radius: number;
|
|
2211
|
+
startRadius: number;
|
|
2212
|
+
maxRadius: number;
|
|
2213
|
+
/** Seconds before it shows. */
|
|
2214
|
+
delay: number;
|
|
2215
|
+
age: number;
|
|
2216
|
+
life: number;
|
|
2217
|
+
/** Opacity it starts with. */
|
|
2218
|
+
strength: number;
|
|
2219
|
+
/** Opacity now, 0 while it waits. */
|
|
2220
|
+
alpha: number;
|
|
2221
|
+
}
|
|
2222
|
+
/** A patch of white foam on the surface. */
|
|
2223
|
+
interface WaterFoam {
|
|
2224
|
+
x: number;
|
|
2225
|
+
y: number;
|
|
2226
|
+
z: number;
|
|
2227
|
+
radius: number;
|
|
2228
|
+
startRadius: number;
|
|
2229
|
+
maxRadius: number;
|
|
2230
|
+
age: number;
|
|
2231
|
+
life: number;
|
|
2232
|
+
alpha: number;
|
|
2233
|
+
}
|
|
2234
|
+
/** A column of water thrown up (`dome` false: it rises, holds and falls back) or the dome a burst under the surface lifts. */
|
|
2235
|
+
interface WaterColumn {
|
|
2236
|
+
x: number;
|
|
2237
|
+
y: number;
|
|
2238
|
+
z: number;
|
|
2239
|
+
dome: boolean;
|
|
2240
|
+
peak: number;
|
|
2241
|
+
baseRadius: number;
|
|
2242
|
+
/** Top offset per metre of height, along x and z. */
|
|
2243
|
+
tiltX: number;
|
|
2244
|
+
tiltZ: number;
|
|
2245
|
+
rise: number;
|
|
2246
|
+
delay: number;
|
|
2247
|
+
age: number;
|
|
2248
|
+
life: number;
|
|
2249
|
+
height: number;
|
|
2250
|
+
radius: number;
|
|
2251
|
+
alpha: number;
|
|
2252
|
+
}
|
|
2253
|
+
/** A bubble rising under the water: the trail of a round, the boil of a burst. */
|
|
2254
|
+
interface WaterBubble {
|
|
2255
|
+
x: number;
|
|
2256
|
+
y: number;
|
|
2257
|
+
z: number;
|
|
2258
|
+
size: number;
|
|
2259
|
+
rise: number;
|
|
2260
|
+
delay: number;
|
|
2261
|
+
age: number;
|
|
2262
|
+
life: number;
|
|
2263
|
+
level: number;
|
|
2264
|
+
alpha: number;
|
|
2265
|
+
}
|
|
2266
|
+
/** A puff of spray and steam over the water. */
|
|
2267
|
+
interface WaterMist {
|
|
2268
|
+
x: number;
|
|
2269
|
+
y: number;
|
|
2270
|
+
z: number;
|
|
2271
|
+
vx: number;
|
|
2272
|
+
vy: number;
|
|
2273
|
+
vz: number;
|
|
2274
|
+
size: number;
|
|
2275
|
+
age: number;
|
|
2276
|
+
life: number;
|
|
2277
|
+
alpha: number;
|
|
2278
|
+
}
|
|
2279
|
+
/** A wave going out from a blast: it lifts and pushes what floats where its crest passes. */
|
|
2280
|
+
interface WaterWave {
|
|
2281
|
+
x: number;
|
|
2282
|
+
z: number;
|
|
2283
|
+
speed: number;
|
|
2284
|
+
amplitude: number;
|
|
2285
|
+
width: number;
|
|
2286
|
+
/** Metres it can go before the shore. */
|
|
2287
|
+
reach: number;
|
|
2288
|
+
delay: number;
|
|
2289
|
+
age: number;
|
|
2290
|
+
life: number;
|
|
2291
|
+
}
|
|
2292
|
+
/** The default limits: enough for a rifle on full auto and a few blasts at once in the same pond. */
|
|
2293
|
+
declare const WATER_LIMITS: WaterEffectsLimits;
|
|
2294
|
+
|
|
2295
|
+
interface WaterEffectsOptions {
|
|
2296
|
+
readonly seed?: number;
|
|
2297
|
+
/** Upper bound of each pool (the default `WATER_LIMITS`). */
|
|
2298
|
+
readonly limits?: Partial<WaterEffectsLimits>;
|
|
2299
|
+
/** The water surface at (x, z), or null where there is none: rings, foam and waves stop at the shore, and only drops falling on water ring. */
|
|
2300
|
+
readonly levelAt?: (x: number, z: number) => number | null;
|
|
2301
|
+
/** Distance bands for fewer drops and bubbles far from the camera (default `LOD_GAME`). */
|
|
2302
|
+
readonly lod?: LodBands;
|
|
2303
|
+
/** The shot profiles by class (default `WATER_SHOT_PROFILES`; `patchWaterShotProfiles` to change them). */
|
|
2304
|
+
readonly profiles?: Readonly<Record<string, WaterShotProfile>>;
|
|
2305
|
+
}
|
|
2306
|
+
interface WaterEffectsStats {
|
|
2307
|
+
readonly drops: number;
|
|
2308
|
+
readonly rings: number;
|
|
2309
|
+
readonly foam: number;
|
|
2310
|
+
readonly columns: number;
|
|
2311
|
+
readonly bubbles: number;
|
|
2312
|
+
readonly mist: number;
|
|
2313
|
+
readonly waves: number;
|
|
2314
|
+
}
|
|
2315
|
+
/** Splashes of rounds and blasts on water, renderer-free: plain pools a renderer draws (`createWaterEffectsLayer` of game-vfx-three). */
|
|
2316
|
+
interface WaterEffects {
|
|
2317
|
+
/** A round meets the water at `point`. */
|
|
2318
|
+
shot(params: WaterShotParams): WaterShotPlan;
|
|
2319
|
+
/** A charge goes off in or over the water. */
|
|
2320
|
+
blast(params: WaterBlastParams): WaterBlastPlan;
|
|
2321
|
+
update(dt: number): void;
|
|
2322
|
+
setCamera(position: WaterVec3): void;
|
|
2323
|
+
/** The waves going through (x, z): how high they lift the surface and how hard they push what floats there. */
|
|
2324
|
+
waveAt(x: number, z: number): WaterWaveSample;
|
|
2325
|
+
readonly drops: readonly WaterDrop[];
|
|
2326
|
+
readonly rings: readonly WaterRing[];
|
|
2327
|
+
readonly foam: readonly WaterFoam[];
|
|
2328
|
+
readonly columns: readonly WaterColumn[];
|
|
2329
|
+
readonly bubbles: readonly WaterBubble[];
|
|
2330
|
+
readonly mist: readonly WaterMist[];
|
|
2331
|
+
readonly waves: readonly WaterWave[];
|
|
2332
|
+
readonly limits: WaterEffectsLimits;
|
|
2333
|
+
stats(): WaterEffectsStats;
|
|
2334
|
+
clear(): void;
|
|
2335
|
+
}
|
|
2336
|
+
declare function createWaterEffects(options?: WaterEffectsOptions): WaterEffects;
|
|
2337
|
+
|
|
2338
|
+
/** What a round does as it meets the water: the size of the splash for its class, angle and speed, a skip off a grazing surface, the trail under. */
|
|
2339
|
+
declare function planWaterShot(params: WaterShotParams, random: RandomStream, table?: Readonly<Record<string, WaterShotProfile>>): WaterShotPlan;
|
|
2340
|
+
/** The charge and kind a host names, from its own numbers or the table. */
|
|
2341
|
+
declare function resolveWaterBlast(params: WaterBlastParams): {
|
|
2342
|
+
tnt: number;
|
|
2343
|
+
kind: WaterBlastKind;
|
|
2344
|
+
};
|
|
2345
|
+
/**
|
|
2346
|
+
* What a charge does to the water, by Hopkinson scaling (lengths go with the cube root of the charge): a burst a little under the surface throws the
|
|
2347
|
+
* tallest column; at the surface a lower one and a ring of spray; deep under, the water holds it down to a dome of white water and a boil of bubbles;
|
|
2348
|
+
* high over it, only the shock ring and the spray. A shallow pool has not the water to throw a full column.
|
|
2349
|
+
*/
|
|
2350
|
+
declare function planWaterBlast(params: WaterBlastParams): WaterBlastPlan;
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* How each class of round meets water, entering straight down at its usual speed. A rifle bullet throws a tall thin spout and yaws and breaks up
|
|
2354
|
+
* within a few tens of centimetres; a pistol round a short one and goes on longer; a heavy rifle (.338, .50) a tall wide column; a buckshot pellet a
|
|
2355
|
+
* small spout and a lot of shallow foam; an arrow slips in with little splash and goes far.
|
|
2356
|
+
*/
|
|
2357
|
+
declare const WATER_SHOT_PROFILES: Readonly<Record<WaterShotClass, WaterShotProfile>>;
|
|
2358
|
+
/** The class of round of each calibre of `@adatechnology/game-weapons` (its `calibers.json` ids). A calibre not here is classed by `waterShotClassOf`. */
|
|
2359
|
+
declare const WATER_SHOT_BY_CALIBER: Readonly<Record<string, WaterShotClass>>;
|
|
2360
|
+
/** What is known of a round that has no calibre in the table: its mass in grams, speed in m/s and diameter in millimetres. */
|
|
2361
|
+
interface WaterRound {
|
|
2362
|
+
readonly grams: number;
|
|
2363
|
+
readonly speed: number;
|
|
2364
|
+
readonly diameter?: number;
|
|
2365
|
+
/** One of several pellets of a shell. */
|
|
2366
|
+
readonly pellet?: boolean;
|
|
2367
|
+
}
|
|
2368
|
+
/** The class of a round from what it weighs and how fast it goes, for a calibre the table does not know. */
|
|
2369
|
+
declare function waterShotClassOf(round: WaterRound): WaterShotClass;
|
|
2370
|
+
/**
|
|
2371
|
+
* How each kind of charge works on water. A high explosive throws the water; a shaped charge a narrow jet; a fragmentation charge over the surface
|
|
2372
|
+
* also peppers it with fragments; a gas or fuel deflagration mostly boils it into steam.
|
|
2373
|
+
*/
|
|
2374
|
+
declare const WATER_BLAST_KINDS: Readonly<Record<WaterBlastKindId, WaterBlastKind>>;
|
|
2375
|
+
/** The explosives of `@adatechnology/game-weapons` (`explosives.json`): TNT equivalent in kilograms and kind. */
|
|
2376
|
+
declare const WATER_BLASTS: Readonly<Record<string, WaterBlastCharge>>;
|
|
2377
|
+
/** The profile a host asks for by class id, or the profile it gives; an unknown id falls back to `pistol`. */
|
|
2378
|
+
declare function resolveWaterShotProfile(profile: string | WaterShotProfile, table?: Readonly<Record<string, WaterShotProfile>>): WaterShotProfile;
|
|
2379
|
+
/** Changes a profile table without touching the kit's: `null` removes an entry, a partial entry is merged over the old one. */
|
|
2380
|
+
declare function patchWaterShotProfiles(base: Readonly<Record<string, WaterShotProfile>>, changes: Readonly<Record<string, Partial<WaterShotProfile> | null>>): Record<string, WaterShotProfile>;
|
|
2381
|
+
|
|
2382
|
+
export { AREA_CAP_GAME, type AreaCap, type AreaCapTracker, type Behavior, type BehaviorHost, type BlastLight, type BloodMark, type Carrier, type Chunk, type ConfineResult, type Confiner, type CueRequest, type DebrisSpawn, type Decal, type DecalOptions, type DirtMark, EVENT_BUDGET, EVENT_EFFECTS, EVENT_EFFECTS_MAP, EXPLOSIONS, EXPLOSION_ALIASES, EffectCamera, type EffectDef, EffectInstance, type EffectPlayer, type EffectPlayerOptions, EffectRunner, type EffectRunnerOptions, type EffectStep, type EffectTexts, type EffectTrack, type EffectView, Enclosures, type ExplosionCall, type ExplosionDef, type ExplosionOptions, type Fire, type FireLight, type FireOptions, type FireSpec, type Follow, GAME_EFFECTS, type GameEvent, type Glow, type GroundField, type GroundFieldOptions, type InstanceDeps, type InstanceSetup, type KindPoolHost, LOD_GAME, LOD_LAB, type LandListener, type LensBlob, type LightGlow, type LightPool, type LodBands, type Mark, type MarkEvent, type MarkStore, type MeshParticle, MeshPool, type MeshShape, type MeshSpawn, type MushroomSpec, type MutableVec3, OrderedPool, PROFILES, type Placement, type PlayOptions, type PostProcess, type Puddle, type Puff, type Quaternion, RAIN_CAPACITY, RainField, type RandomStream, type Rgb, type Ring, type RockMark, SCRAPE_LIMIT, SMOKE_COLORS, SPRITE_KINDS, type Schedule, type ScorchMark, type ScrapeMark, type ScreenState, type SheetLabels, type Shock, type Spark, type SpriteGround, type SpriteKind, type SpriteKindDef, SpriteKindPool, SpriteKindSystem, type SpriteKindSystemOptions, type SpriteSpawn, type SpriteSpawnOptions, type SpriteSystem, VFX_LAYERS, VIEWMODEL_EFFECTS, type Vec3Like, type Vec3Tuple, type VfxEnclosure, type VfxEnclosureBox, type VfxLayer, type VfxLocale, type VfxOptions, type VfxPoolsView, type VfxProfile, type VfxProfileName, type VfxSideRequest, type VfxStats, type VfxStrings, type VfxTrace, type VfxWorld, WATER_BLASTS, WATER_BLAST_KINDS, WATER_LIMITS, WATER_SHOT_BY_CALIBER, WATER_SHOT_PROFILES, WORKSHOP_BEHAVIORS, WORKSHOP_EFFECTS, WORKSHOP_PUDDLES, type WaterBlastCharge, type WaterBlastKind, type WaterBlastKindId, type WaterBlastParams, type WaterBlastPlan, type WaterBubble, type WaterColumn, type WaterDrop, type WaterEffects, type WaterEffectsLimits, type WaterEffectsOptions, type WaterEffectsStats, type WaterFoam, type WaterMist, type WaterRing, type WaterRound, type WaterShotClass, type WaterShotParams, type WaterShotPlan, type WaterShotProfile, type WaterVec3, type WaterWave, type WaterWaveSample, type WorkshopContext, WorkshopEngine, type WorkshopOptions, type WorkshopTrace, colorOfChunk, composeExplosion, createAreaCap, createEffectPlayer, createGroundField, createSchedule, createScreenState, createVfx, createWaterEffects, createWorkshopBehaviors, effectForEvent, estimateCost, hexToLinearRgb, hexToRgb, inPuddle, lcg, lehmer, locales, lodScale, patchEffects, patchExplosions, patchSpriteKinds, patchWaterShotProfiles, planWaterBlast, planWaterShot, resolveStrings, resolveWaterBlast, resolveWaterShotProfile, slideAlong, streamFor, updateScreen, waterShotClassOf, workshopGround };
|