@plasius/gpu-shared 0.1.9 → 0.1.11
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/CHANGELOG.md +32 -0
- package/README.md +4 -1
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{showcase-runtime-55OVDYWT.js → showcase-runtime-2ZNPKD7D.js} +11 -3
- package/dist/{showcase-runtime-55OVDYWT.js.map → showcase-runtime-2ZNPKD7D.js.map} +1 -1
- package/package.json +11 -11
- package/src/showcase-runtime.js +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,36 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
- **Added**
|
|
8
|
+
- (placeholder)
|
|
9
|
+
|
|
10
|
+
- **Changed**
|
|
11
|
+
- (placeholder)
|
|
12
|
+
|
|
13
|
+
- **Fixed**
|
|
14
|
+
- (placeholder)
|
|
15
|
+
|
|
16
|
+
- **Security**
|
|
17
|
+
- (placeholder)
|
|
18
|
+
|
|
19
|
+
## [0.1.11] - 2026-05-13
|
|
20
|
+
|
|
21
|
+
- **Added**
|
|
22
|
+
- (placeholder)
|
|
23
|
+
|
|
24
|
+
- **Changed**
|
|
25
|
+
- (placeholder)
|
|
26
|
+
|
|
27
|
+
- **Fixed**
|
|
28
|
+
- Restored shared harbor water-surface motion by reading the banded
|
|
29
|
+
`@plasius/gpu-fluid` continuity envelope correctly, keeping near-band
|
|
30
|
+
heights finite and visibly animated in the default GPU Demo camera.
|
|
31
|
+
|
|
32
|
+
- **Security**
|
|
33
|
+
- (placeholder)
|
|
34
|
+
|
|
35
|
+
## [0.1.10] - 2026-05-13
|
|
36
|
+
|
|
7
37
|
- **Added**
|
|
8
38
|
- (placeholder)
|
|
9
39
|
|
|
@@ -173,3 +203,5 @@ All notable changes to this project will be documented in this file.
|
|
|
173
203
|
[0.1.7]: https://github.com/Plasius-LTD/gpu-shared/releases/tag/v0.1.7
|
|
174
204
|
[0.1.8]: https://github.com/Plasius-LTD/gpu-shared/releases/tag/v0.1.8
|
|
175
205
|
[0.1.9]: https://github.com/Plasius-LTD/gpu-shared/releases/tag/v0.1.9
|
|
206
|
+
[0.1.10]: https://github.com/Plasius-LTD/gpu-shared/releases/tag/v0.1.10
|
|
207
|
+
[0.1.11]: https://github.com/Plasius-LTD/gpu-shared/releases/tag/v0.1.11
|
package/README.md
CHANGED
|
@@ -90,7 +90,10 @@ can be validated independently of `gpu-demo-viewer`.
|
|
|
90
90
|
|
|
91
91
|
The integrated scene now includes a persistent flag cloth state, visible ship
|
|
92
92
|
wakes and collision ripples, and water reflections that are occluded by later
|
|
93
|
-
ship geometry instead of being painted through hulls.
|
|
93
|
+
ship geometry instead of being painted through hulls. The harbor surface reads
|
|
94
|
+
the banded `@plasius/gpu-fluid` continuity envelope directly, so the default
|
|
95
|
+
camera keeps finite, visibly animated near-band water motion instead of
|
|
96
|
+
flattening or dropping the shared water mesh.
|
|
94
97
|
|
|
95
98
|
## Current Boundary
|
|
96
99
|
|
package/dist/index.cjs
CHANGED
|
@@ -6343,6 +6343,7 @@ var init_browser = __esm({
|
|
|
6343
6343
|
var showcase_runtime_exports = {};
|
|
6344
6344
|
__export(showcase_runtime_exports, {
|
|
6345
6345
|
__testOnlyAdvanceShowcaseClothSimulationState: () => advanceShowcaseClothSimulationState,
|
|
6346
|
+
__testOnlyBuildWaterBands: () => buildWaterBands,
|
|
6346
6347
|
__testOnlyBuildWaterMotionEffects: () => buildWaterMotionEffects,
|
|
6347
6348
|
__testOnlyCollectSceneLightSources: () => collectSceneLightSources,
|
|
6348
6349
|
__testOnlyCreateShowcaseClothSimulationState: () => createShowcaseClothSimulationState,
|
|
@@ -7322,6 +7323,12 @@ function sampleWave(state, x, z, time) {
|
|
|
7322
7323
|
const base = Math.sin(along * 0.22 - time * 1.12 * phaseSpeed) * 0.42 + Math.cos(along * 0.11 + cross * 0.07 - time * 0.78 * phaseSpeed) * 0.26 + Math.sin(cross * 0.19 - time * 1.34 * phaseSpeed) * 0.16;
|
|
7323
7324
|
return base * amplitude + sampleShipWake(state, x, z, time) + sampleWaveImpulses(state, x, z, time);
|
|
7324
7325
|
}
|
|
7326
|
+
function resolveFluidBandContinuity(continuity, band) {
|
|
7327
|
+
if (continuity?.bands && continuity.bands[band]) {
|
|
7328
|
+
return continuity.bands[band];
|
|
7329
|
+
}
|
|
7330
|
+
return continuity ?? { amplitudeFloor: 1, frequencyFloor: 1 };
|
|
7331
|
+
}
|
|
7325
7332
|
function buildWaterMotionEffects(state) {
|
|
7326
7333
|
const wakeTrails = [];
|
|
7327
7334
|
const rippleRings = state.waveImpulses.map((impulse) => {
|
|
@@ -7395,6 +7402,7 @@ function buildWaterBands(state, fluidDetail, visuals) {
|
|
|
7395
7402
|
for (const bandSpec of bandExtents) {
|
|
7396
7403
|
const representation = fluidPlan.representations.find((entry) => entry.band === bandSpec.band) ?? fluidPlan.representations[0];
|
|
7397
7404
|
const continuity = createFluidContinuityEnvelope({ fluidBodyId: "harbor" });
|
|
7405
|
+
const bandContinuity = resolveFluidBandContinuity(continuity, bandSpec.band);
|
|
7398
7406
|
const bandResolution = bandSpec.band === "near" ? fluidDetail.nearResolution : bandSpec.band === "mid" ? fluidDetail.midResolution : bandSpec.band === "far" ? 5 : 3;
|
|
7399
7407
|
const cols = Math.max(4, bandResolution * 2);
|
|
7400
7408
|
const rows = Math.max(4, bandResolution + 2);
|
|
@@ -7408,7 +7416,7 @@ function buildWaterBands(state, fluidDetail, visuals) {
|
|
|
7408
7416
|
const v = row / (rows - 1);
|
|
7409
7417
|
const x = originX + bandSpec.width * u;
|
|
7410
7418
|
const z = originZ + bandSpec.depth * v;
|
|
7411
|
-
const y = bandSpec.y + sampleWave(state, x, z, state.time) *
|
|
7419
|
+
const y = bandSpec.y + sampleWave(state, x, z, state.time) * bandContinuity.amplitudeFloor * (bandSpec.band === "near" ? 0.9 : bandSpec.band === "mid" ? 0.55 : 0.3);
|
|
7412
7420
|
positions.push(vec3(x, y, z));
|
|
7413
7421
|
}
|
|
7414
7422
|
}
|
|
@@ -7424,7 +7432,7 @@ function buildWaterBands(state, fluidDetail, visuals) {
|
|
|
7424
7432
|
bandMeshes.push({
|
|
7425
7433
|
band: bandSpec.band,
|
|
7426
7434
|
representation,
|
|
7427
|
-
continuity,
|
|
7435
|
+
continuity: bandContinuity,
|
|
7428
7436
|
rows,
|
|
7429
7437
|
cols,
|
|
7430
7438
|
positions,
|