@chromatic-coherence/generative-engine 1.7.1 → 1.7.2
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/dist/world.d.ts +3 -0
- package/dist/world.js +4 -1
- package/package.json +1 -1
package/dist/world.d.ts
CHANGED
|
@@ -92,6 +92,9 @@ export declare class World {
|
|
|
92
92
|
private keys;
|
|
93
93
|
/** W13 fly speed, units/second (shift = 3x). */
|
|
94
94
|
flySpeed: number;
|
|
95
|
+
/** Fog reference distance — by default fog tracks the orbit distance, which is wrong
|
|
96
|
+
* for fly mode (a close camera would fog out the world). Set to see that far. */
|
|
97
|
+
fogDist: number | null;
|
|
95
98
|
private pFace;
|
|
96
99
|
private pLine;
|
|
97
100
|
private pPt;
|
package/dist/world.js
CHANGED
|
@@ -40,6 +40,9 @@ export class World {
|
|
|
40
40
|
this.keys = new Set();
|
|
41
41
|
/** W13 fly speed, units/second (shift = 3x). */
|
|
42
42
|
this.flySpeed = 420;
|
|
43
|
+
/** Fog reference distance — by default fog tracks the orbit distance, which is wrong
|
|
44
|
+
* for fly mode (a close camera would fog out the world). Set to see that far. */
|
|
45
|
+
this.fogDist = null;
|
|
43
46
|
this.instanced = [];
|
|
44
47
|
/** W9 — the one wind that blows through every swaying instanced batch */
|
|
45
48
|
this.wind = { dir: v3(1, 0, 0.35), speed: 1 };
|
|
@@ -913,7 +916,7 @@ export class World {
|
|
|
913
916
|
}
|
|
914
917
|
for (const rb of this.fRib)
|
|
915
918
|
this.pushRibbon(this.dRibA, rb.pts, rb.o);
|
|
916
|
-
const fogK = this.cam.dist * 0.9;
|
|
919
|
+
const fogK = (this.fogDist ?? this.cam.dist) * 0.9;
|
|
917
920
|
for (let i = 0; i < 8; i++) { // eased group alphas + morph weights
|
|
918
921
|
this.groupAlpha[i] += (this.groupTarget[i] - this.groupAlpha[i]) * Math.min(1, dt * 6);
|
|
919
922
|
this.groupMorph[i] += (this.groupMorphT[i] - this.groupMorph[i]) * Math.min(1, dt * 6);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chromatic-coherence/generative-engine",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "A zero-dependency WebGL2 graphics engine where everything is grown from code — no models, no textures, no asset pipeline. Real light and shadow with a cinematic HDR finish (bloom, SSAO, filmic grade, depth of field, motion blur), a geometry stdlib, GPU crowds (instanced wind, ten-thousand-bird flocks), real water with planar reflections, skeletal figures with procedural walk cycles, free-flight controls, and scenes that drive themselves toward objectives. The Generative Charts API rides on top unchanged.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|