@flighthq/shading 0.2.1-next.459.fb59cc5 → 0.2.1-next.585.c7219b8
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/createAnimatedNormalModifier.d.ts +1 -8
- package/dist/createAnimatedNormalModifier.d.ts.map +1 -1
- package/dist/createAnimatedNormalModifier.js +4 -0
- package/dist/createAnimatedNormalModifier.js.map +1 -1
- package/dist/createDissolveModifier.d.ts +1 -8
- package/dist/createDissolveModifier.d.ts.map +1 -1
- package/dist/createDissolveModifier.js +3 -0
- package/dist/createDissolveModifier.js.map +1 -1
- package/dist/createEmissiveModifier.d.ts +1 -9
- package/dist/createEmissiveModifier.d.ts.map +1 -1
- package/dist/createEmissiveModifier.js +4 -0
- package/dist/createEmissiveModifier.js.map +1 -1
- package/dist/createEnvReflectModifier.d.ts +1 -7
- package/dist/createEnvReflectModifier.d.ts.map +1 -1
- package/dist/createEnvReflectModifier.js +3 -0
- package/dist/createEnvReflectModifier.js.map +1 -1
- package/dist/createFogModifier.d.ts +1 -9
- package/dist/createFogModifier.d.ts.map +1 -1
- package/dist/createFogModifier.js +4 -0
- package/dist/createFogModifier.js.map +1 -1
- package/dist/createRimModifier.d.ts +1 -7
- package/dist/createRimModifier.d.ts.map +1 -1
- package/dist/createRimModifier.js +3 -0
- package/dist/createRimModifier.js.map +1 -1
- package/dist/createShadedMaterial.d.ts +1 -11
- package/dist/createShadedMaterial.d.ts.map +1 -1
- package/dist/createShadedMaterial.js +3 -0
- package/dist/createShadedMaterial.js.map +1 -1
- package/dist/createToonModifier.d.ts +1 -5
- package/dist/createToonModifier.d.ts.map +1 -1
- package/dist/createToonModifier.js +3 -0
- package/dist/createToonModifier.js.map +1 -1
- package/dist/createVertexDisplaceModifier.d.ts +1 -10
- package/dist/createVertexDisplaceModifier.d.ts.map +1 -1
- package/dist/createVertexDisplaceModifier.js +4 -0
- package/dist/createVertexDisplaceModifier.js.map +1 -1
- package/dist/getModifierDefineKey.d.ts +1 -1
- package/dist/getModifierDefineKey.d.ts.map +1 -1
- package/dist/getUnregisteredModifierKinds.d.ts +1 -1
- package/dist/getUnregisteredModifierKinds.d.ts.map +1 -1
- package/dist/isModifierStackValid.d.ts +1 -1
- package/dist/isModifierStackValid.d.ts.map +1 -1
- package/dist/isModifierStackValid.js.map +1 -1
- package/dist/modifierRegistry.d.ts +1 -9
- package/dist/modifierRegistry.d.ts.map +1 -1
- package/dist/modifierRegistry.js +16 -0
- package/dist/modifierRegistry.js.map +1 -1
- package/dist/registerBuiltInModifiers.d.ts +1 -1
- package/dist/registerBuiltInModifiers.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import type { AnimatedNormalModifier,
|
|
2
|
-
export interface AnimatedNormalModifierOptions {
|
|
3
|
-
map: Texture | null;
|
|
4
|
-
scroll: Vector2Like;
|
|
5
|
-
strength?: number;
|
|
6
|
-
secondaryMap?: Texture;
|
|
7
|
-
secondaryScroll?: Vector2Like;
|
|
8
|
-
}
|
|
1
|
+
import type { AnimatedNormalModifier, AnimatedNormalModifierOptions } from '@flighthq/types';
|
|
9
2
|
export declare function createAnimatedNormalModifier(options: Readonly<AnimatedNormalModifierOptions>): AnimatedNormalModifier;
|
|
10
3
|
//# sourceMappingURL=createAnimatedNormalModifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAnimatedNormalModifier.d.ts","sourceRoot":"","sources":["../src/createAnimatedNormalModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"createAnimatedNormalModifier.d.ts","sourceRoot":"","sources":["../src/createAnimatedNormalModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAc7F,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,QAAQ,CAAC,6BAA6B,CAAC,GAAG,sBAAsB,CAWrH"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { AnimatedNormalModifierKind, ModifierSlot } from '@flighthq/types';
|
|
2
|
+
// The options for `createAnimatedNormalModifier`. `map` (nullable) and `scroll` are required; the
|
|
3
|
+
// optional second layer and `strength` carry documented defaults. `map` presence and `secondaryMap`
|
|
4
|
+
// presence are compile-time structural — they drive the define-key signature (disabled / single /
|
|
5
|
+
// dual) — while `scroll`/`strength` are uniform-fed.
|
|
2
6
|
// Builds an AnimatedNormalModifier (slot: Normal) — a UV-panned normal map that perturbs the surface
|
|
3
7
|
// normal, scrolled by the shading tier's per-frame `time` uniform. Covers animated water, lava, and
|
|
4
8
|
// flow. `scroll` is the pan speed in UV units per second (a plain Vector2Like value, copied by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAnimatedNormalModifier.js","sourceRoot":"","sources":["../src/createAnimatedNormalModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createAnimatedNormalModifier.js","sourceRoot":"","sources":["../src/createAnimatedNormalModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE3E,kGAAkG;AAClG,oGAAoG;AACpG,kGAAkG;AAClG,qDAAqD;AAErD,qGAAqG;AACrG,oGAAoG;AACpG,+FAA+F;AAC/F,gGAAgG;AAChG,qGAAqG;AACrG,SAAS;AACT,MAAM,UAAU,4BAA4B,CAAC,OAAgD;IAC3F,MAAM,QAAQ,GAA2B;QACvC,IAAI,EAAE,0BAA0B;QAChC,IAAI,EAAE,YAAY,CAAC,MAAM;QACzB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,CAAC;KAChC,CAAC;IACF,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS;QAAE,QAAQ,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IACrF,IAAI,OAAO,CAAC,eAAe,KAAK,SAAS;QAAE,QAAQ,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAC9F,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import type { DissolveModifier,
|
|
2
|
-
export interface DissolveModifierOptions {
|
|
3
|
-
threshold: number;
|
|
4
|
-
edgeColor?: number;
|
|
5
|
-
edgeWidth?: number;
|
|
6
|
-
map?: Texture;
|
|
7
|
-
scale?: number;
|
|
8
|
-
}
|
|
1
|
+
import type { DissolveModifier, DissolveModifierOptions } from '@flighthq/types';
|
|
9
2
|
export declare function createDissolveModifier(options: Readonly<DissolveModifierOptions>): DissolveModifier;
|
|
10
3
|
//# sourceMappingURL=createDissolveModifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDissolveModifier.d.ts","sourceRoot":"","sources":["../src/createDissolveModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"createDissolveModifier.d.ts","sourceRoot":"","sources":["../src/createDissolveModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAajF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,uBAAuB,CAAC,GAAG,gBAAgB,CAWnG"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { DissolveModifierKind, ModifierSlot } from '@flighthq/types';
|
|
2
|
+
// The options for `createDissolveModifier`. Only `threshold` is required; the rest carry documented
|
|
3
|
+
// defaults. `map` presence is compile-time structural (sampled mask vs procedural noise, driving the
|
|
4
|
+
// define-key signature); `threshold`/`edgeWidth`/`scale` are uniform-fed and `edgeColor` is packed.
|
|
2
5
|
// Builds a DissolveModifier (slot: Effect) — a clip/burn dissolve of the shaded output. A per-fragment
|
|
3
6
|
// noise value (procedural over the UV, or sampled from `map`'s red channel) is compared against
|
|
4
7
|
// `threshold`; fragments below it are discarded and a band of width `edgeWidth` above it glows
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDissolveModifier.js","sourceRoot":"","sources":["../src/createDissolveModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createDissolveModifier.js","sourceRoot":"","sources":["../src/createDissolveModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAErE,oGAAoG;AACpG,qGAAqG;AACrG,oGAAoG;AAEpG,uGAAuG;AACvG,gGAAgG;AAChG,+FAA+F;AAC/F,uGAAuG;AACvG,qGAAqG;AACrG,iGAAiG;AACjG,MAAM,UAAU,sBAAsB,CAAC,OAA0C;IAC/E,MAAM,QAAQ,GAAqB;QACjC,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,YAAY,CAAC,MAAM;QACzB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,UAAU;QAC1C,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI;QACpC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;KAC1B,CAAC;IACF,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;QAAE,QAAQ,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAC1D,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import type { EmissiveModifier,
|
|
2
|
-
import { EmissiveModifierFacing } from '@flighthq/types';
|
|
3
|
-
export interface EmissiveModifierOptions {
|
|
4
|
-
color: number;
|
|
5
|
-
strength?: number;
|
|
6
|
-
mask?: Texture;
|
|
7
|
-
facing?: EmissiveModifierFacing;
|
|
8
|
-
facingSoftness?: number;
|
|
9
|
-
}
|
|
1
|
+
import type { EmissiveModifier, EmissiveModifierOptions } from '@flighthq/types';
|
|
10
2
|
export declare function createEmissiveModifier(options: Readonly<EmissiveModifierOptions>): EmissiveModifier;
|
|
11
3
|
//# sourceMappingURL=createEmissiveModifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEmissiveModifier.d.ts","sourceRoot":"","sources":["../src/createEmissiveModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"createEmissiveModifier.d.ts","sourceRoot":"","sources":["../src/createEmissiveModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAcjF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,uBAAuB,CAAC,GAAG,gBAAgB,CAWnG"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { EmissiveModifierFacing, EmissiveModifierKind, ModifierSlot } from '@flighthq/types';
|
|
2
|
+
// The options for `createEmissiveModifier`. Only `color` is required; every other field carries a
|
|
3
|
+
// documented default so the returned descriptor is fully populated (the define-key signature reads
|
|
4
|
+
// `mask`/`facing` structurally, so leaving them at their defaults yields the unmasked, ungated
|
|
5
|
+
// program variant).
|
|
2
6
|
// Builds an EmissiveModifier (slot: Emissive) — a self-illuminating contribution added to the shaded
|
|
3
7
|
// output, optionally masked and optionally gated by surface facing (the night-side city-lights case
|
|
4
8
|
// uses `AwayFromLight`). `color` is packed sRgb-albedo RGBA (0xrrggbbaa); `strength` scales linear
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEmissiveModifier.js","sourceRoot":"","sources":["../src/createEmissiveModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createEmissiveModifier.js","sourceRoot":"","sources":["../src/createEmissiveModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE7F,kGAAkG;AAClG,mGAAmG;AACnG,+FAA+F;AAC/F,oBAAoB;AAEpB,qGAAqG;AACrG,oGAAoG;AACpG,mGAAmG;AACnG,oGAAoG;AACpG,+FAA+F;AAC/F,uBAAuB;AACvB,MAAM,UAAU,sBAAsB,CAAC,OAA0C;IAC/E,MAAM,QAAQ,GAAqB;QACjC,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,YAAY,CAAC,QAAQ;QAC3B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,CAAC;QAC/B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,sBAAsB,CAAC,MAAM;QACvD,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,CAAC;KAC5C,CAAC;IACF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;QAAE,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7D,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import type { EnvReflectModifier } from '@flighthq/types';
|
|
2
|
-
export interface EnvReflectModifierOptions {
|
|
3
|
-
tint?: number;
|
|
4
|
-
intensity?: number;
|
|
5
|
-
fresnelBias?: number;
|
|
6
|
-
roughness?: number;
|
|
7
|
-
}
|
|
1
|
+
import type { EnvReflectModifier, EnvReflectModifierOptions } from '@flighthq/types';
|
|
8
2
|
export declare function createEnvReflectModifier(options?: Readonly<EnvReflectModifierOptions>): EnvReflectModifier;
|
|
9
3
|
//# sourceMappingURL=createEnvReflectModifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEnvReflectModifier.d.ts","sourceRoot":"","sources":["../src/createEnvReflectModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"createEnvReflectModifier.d.ts","sourceRoot":"","sources":["../src/createEnvReflectModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAarF,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,yBAAyB,CAAC,GAAG,kBAAkB,CAS1G"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { EnvReflectModifierKind, ModifierSlot } from '@flighthq/types';
|
|
2
|
+
// The options for `createEnvReflectModifier`. Every field is optional and carries a documented
|
|
3
|
+
// default so the returned descriptor is fully populated (all four are uniform-fed scalars, so an
|
|
4
|
+
// env-reflect modifier has a single define-key signature regardless of their values).
|
|
2
5
|
// Builds an EnvReflectModifier (slot: Effect) — a view-dependent reflection of the scene's baked
|
|
3
6
|
// environment cubemap added to the shaded output. It samples the SAME prefiltered environment the lit
|
|
4
7
|
// block already binds (no second cubemap), reflecting the view vector about the surface normal and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEnvReflectModifier.js","sourceRoot":"","sources":["../src/createEnvReflectModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createEnvReflectModifier.js","sourceRoot":"","sources":["../src/createEnvReflectModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEvE,+FAA+F;AAC/F,iGAAiG;AACjG,sFAAsF;AAEtF,iGAAiG;AACjG,sGAAsG;AACtG,mGAAmG;AACnG,qGAAqG;AACrG,qGAAqG;AACrG,4FAA4F;AAC5F,MAAM,UAAU,wBAAwB,CAAC,OAA6C;IACpF,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,YAAY,CAAC,MAAM;QACzB,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,UAAU;QACjC,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,CAAC;QAClC,WAAW,EAAE,OAAO,EAAE,WAAW,IAAI,IAAI;QACzC,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,CAAC;KACnC,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import type { FogModifier } from '@flighthq/types';
|
|
2
|
-
import { FogModifierMode } from '@flighthq/types';
|
|
3
|
-
export interface FogModifierOptions {
|
|
4
|
-
color: number;
|
|
5
|
-
mode?: FogModifierMode;
|
|
6
|
-
near?: number;
|
|
7
|
-
far?: number;
|
|
8
|
-
density?: number;
|
|
9
|
-
}
|
|
1
|
+
import type { FogModifier, FogModifierOptions } from '@flighthq/types';
|
|
10
2
|
export declare function createFogModifier(options: Readonly<FogModifierOptions>): FogModifier;
|
|
11
3
|
//# sourceMappingURL=createFogModifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFogModifier.d.ts","sourceRoot":"","sources":["../src/createFogModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"createFogModifier.d.ts","sourceRoot":"","sources":["../src/createFogModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAavE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAUpF"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { FogModifierKind, FogModifierMode, ModifierSlot } from '@flighthq/types';
|
|
2
|
+
// The options for `createFogModifier`. Only `color` is required; `mode`/`near`/`far`/`density` carry
|
|
3
|
+
// documented defaults. `mode` is compile-time structural (each curve emits different GLSL, so it
|
|
4
|
+
// drives the define-key signature); the numeric fields are uniform-fed and leave the program shape
|
|
5
|
+
// identical.
|
|
2
6
|
// Builds a FogModifier (slot: Effect) — blends the shaded output toward `color` by camera-distance
|
|
3
7
|
// density. `color` is packed sRgb RGBA. `mode` defaults to Linear (using `near`/`far` as the ramp
|
|
4
8
|
// endpoints, defaults 0 and 1); the Exponential/Exponential2 modes use `density` (default 1) as the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFogModifier.js","sourceRoot":"","sources":["../src/createFogModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createFogModifier.js","sourceRoot":"","sources":["../src/createFogModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEjF,qGAAqG;AACrG,iGAAiG;AACjG,mGAAmG;AACnG,aAAa;AAEb,mGAAmG;AACnG,kGAAkG;AAClG,oGAAoG;AACpG,8FAA8F;AAC9F,qCAAqC;AACrC,MAAM,UAAU,iBAAiB,CAAC,OAAqC;IACrE,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,YAAY,CAAC,MAAM;QACzB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,eAAe,CAAC,MAAM;QAC5C,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC;QACvB,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;QACrB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,CAAC;KAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import type { RimModifier } from '@flighthq/types';
|
|
2
|
-
export interface RimModifierOptions {
|
|
3
|
-
color: number;
|
|
4
|
-
power?: number;
|
|
5
|
-
intensity?: number;
|
|
6
|
-
bias?: number;
|
|
7
|
-
}
|
|
1
|
+
import type { RimModifier, RimModifierOptions } from '@flighthq/types';
|
|
8
2
|
export declare function createRimModifier(options: Readonly<RimModifierOptions>): RimModifier;
|
|
9
3
|
//# sourceMappingURL=createRimModifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRimModifier.d.ts","sourceRoot":"","sources":["../src/createRimModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"createRimModifier.d.ts","sourceRoot":"","sources":["../src/createRimModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAYvE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,WAAW,CASpF"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ModifierSlot, RimModifierKind } from '@flighthq/types';
|
|
2
|
+
// The options for `createRimModifier`. Only `color` is required; `power`/`intensity`/`bias` carry
|
|
3
|
+
// documented defaults. All three are uniform-fed scalars — they do not change the emitted program,
|
|
4
|
+
// so a rim modifier has a single define-key signature regardless of their values.
|
|
2
5
|
// Builds a RimModifier (slot: Effect) — a view-dependent Fresnel rim added to the shaded output at
|
|
3
6
|
// grazing angles, following `bias + intensity * pow(1 - dot(N, V), power)`. Covers the atmospheric
|
|
4
7
|
// halo, force-field shields, and NPR rim light. `color` is packed sRgb-albedo RGBA (0xrrggbbaa);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRimModifier.js","sourceRoot":"","sources":["../src/createRimModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createRimModifier.js","sourceRoot":"","sources":["../src/createRimModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEhE,kGAAkG;AAClG,mGAAmG;AACnG,kFAAkF;AAElF,mGAAmG;AACnG,mGAAmG;AACnG,iGAAiG;AACjG,gGAAgG;AAChG,0DAA0D;AAC1D,MAAM,UAAU,iBAAiB,CAAC,OAAqC;IACrE,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,YAAY,CAAC,MAAM;QACzB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,CAAC;QACjC,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC;KACxB,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface ShadedMaterialOptions {
|
|
3
|
-
diffuse?: number;
|
|
4
|
-
diffuseMap?: ShadedMaterial['diffuseMap'];
|
|
5
|
-
modifiers?: readonly Modifier[];
|
|
6
|
-
normalMap?: ShadedMaterial['normalMap'];
|
|
7
|
-
normalScale?: number;
|
|
8
|
-
shininess?: number;
|
|
9
|
-
specular?: number;
|
|
10
|
-
specularMap?: ShadedMaterial['specularMap'];
|
|
11
|
-
}
|
|
1
|
+
import type { ShadedMaterial, ShadedMaterialOptions } from '@flighthq/types';
|
|
12
2
|
export declare function createShadedMaterial(options?: Readonly<ShadedMaterialOptions>): ShadedMaterial;
|
|
13
3
|
//# sourceMappingURL=createShadedMaterial.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createShadedMaterial.d.ts","sourceRoot":"","sources":["../src/createShadedMaterial.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"createShadedMaterial.d.ts","sourceRoot":"","sources":["../src/createShadedMaterial.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAe7E,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GAAG,cAAc,CAgB9F"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { createEntity } from '@flighthq/entity';
|
|
2
2
|
import { BlendMode, ShadedMaterialKind } from '@flighthq/types';
|
|
3
|
+
// The options for `createShadedMaterial`. Every field is optional and defaults to the classic lit
|
|
4
|
+
// base at neutral values (white diffuse/specular, shininess 32, no maps, an empty modifier stack);
|
|
5
|
+
// `modifiers` is the ordered augmentation stack this base carries.
|
|
3
6
|
// Builds the composable lit base material owned by @flighthq/shading — a diffuse + half-vector
|
|
4
7
|
// specular surface carrying an ordered `modifiers` stack that the per-backend compile path assembles
|
|
5
8
|
// over the shared light block into one program keyed by the stack's define-key. This is the ONLY
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createShadedMaterial.js","sourceRoot":"","sources":["../src/createShadedMaterial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createShadedMaterial.js","sourceRoot":"","sources":["../src/createShadedMaterial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEhE,kGAAkG;AAClG,mGAAmG;AACnG,mEAAmE;AAEnE,+FAA+F;AAC/F,qGAAqG;AACrG,iGAAiG;AACjG,oGAAoG;AACpG,mGAAmG;AACnG,qGAAqG;AACrG,qGAAqG;AACrG,4FAA4F;AAC5F,MAAM,UAAU,oBAAoB,CAAC,OAAyC;IAC5E,MAAM,QAAQ,GAAG,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAmB,CAAC;IAC9E,QAAQ,CAAC,WAAW,GAAG,GAAG,CAAC;IAC3B,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,QAAQ,CAAC,SAAS,GAAG,UAAU,CAAC;IAChC,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC;IACtC,QAAQ,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,IAAI,UAAU,CAAC;IAClD,QAAQ,CAAC,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,IAAI,CAAC;IAClD,QAAQ,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,QAAQ,CAAC,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IAC9C,QAAQ,CAAC,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,IAAI,CAAC;IAChD,QAAQ,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,CAAC,CAAC;IACjD,QAAQ,CAAC,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,UAAU,CAAC;IACpD,QAAQ,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,IAAI,CAAC;IACpD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import type { ToonModifier } from '@flighthq/types';
|
|
2
|
-
export interface ToonModifierOptions {
|
|
3
|
-
steps: number;
|
|
4
|
-
smoothness?: number;
|
|
5
|
-
}
|
|
1
|
+
import type { ToonModifier, ToonModifierOptions } from '@flighthq/types';
|
|
6
2
|
export declare function createToonModifier(options: Readonly<ToonModifierOptions>): ToonModifier;
|
|
7
3
|
//# sourceMappingURL=createToonModifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createToonModifier.d.ts","sourceRoot":"","sources":["../src/createToonModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"createToonModifier.d.ts","sourceRoot":"","sources":["../src/createToonModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAYzE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAOvF"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ModifierSlot, ToonModifierKind } from '@flighthq/types';
|
|
2
|
+
// The options for `createToonModifier`. Only `steps` is required; `smoothness` carries a documented
|
|
3
|
+
// default. Both are uniform-fed scalars — they do not change the emitted program, so a toon modifier
|
|
4
|
+
// has a single define-key signature regardless of their values.
|
|
2
5
|
// Builds a ToonModifier (slot: Effect) — quantizes the shaded radiance into `steps` flat cel bands,
|
|
3
6
|
// producing the hard light/shadow terminator of toon shading as a MODIFIER over the ShadedMaterial
|
|
4
7
|
// base (the compiled sibling of the standalone ToonMaterial, so a toon look stacks with emissive/rim/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createToonModifier.js","sourceRoot":"","sources":["../src/createToonModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createToonModifier.js","sourceRoot":"","sources":["../src/createToonModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,oGAAoG;AACpG,qGAAqG;AACrG,gEAAgE;AAEhE,oGAAoG;AACpG,mGAAmG;AACnG,sGAAsG;AACtG,uGAAuG;AACvG,8DAA8D;AAC9D,MAAM,UAAU,kBAAkB,CAAC,OAAsC;IACvE,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,YAAY,CAAC,MAAM;QACzB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,CAAC;KACpC,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { VertexDisplaceModifierOptions } from '@flighthq/types';
|
|
2
2
|
import type { VertexDisplaceModifier } from '@flighthq/types';
|
|
3
|
-
export interface VertexDisplaceModifierOptions {
|
|
4
|
-
source: VertexDisplaceModifierSource;
|
|
5
|
-
amplitude: number;
|
|
6
|
-
axis?: Vector3Like;
|
|
7
|
-
map?: Texture;
|
|
8
|
-
frequency?: number;
|
|
9
|
-
speed?: number;
|
|
10
|
-
direction?: Vector3Like;
|
|
11
|
-
}
|
|
12
3
|
export declare function createVertexDisplaceModifier(options: Readonly<VertexDisplaceModifierOptions>): VertexDisplaceModifier;
|
|
13
4
|
//# sourceMappingURL=createVertexDisplaceModifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createVertexDisplaceModifier.d.ts","sourceRoot":"","sources":["../src/createVertexDisplaceModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"createVertexDisplaceModifier.d.ts","sourceRoot":"","sources":["../src/createVertexDisplaceModifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAElF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAY9D,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,QAAQ,CAAC,6BAA6B,CAAC,GAAG,sBAAsB,CAarH"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { ModifierSlot, VertexDisplaceModifierKind } from '@flighthq/types';
|
|
2
|
+
// The options for `createVertexDisplaceModifier`. `source` and `amplitude` are required; the rest
|
|
3
|
+
// carry documented defaults. `source`, `axis` presence, and (for HeightMap) `map` presence are
|
|
4
|
+
// compile-time structural — they drive the define-key signature — while `amplitude`/`frequency`/
|
|
5
|
+
// `speed` are uniform-fed.
|
|
2
6
|
// Builds a VertexDisplaceModifier (slot: Vertex) — the one built-in VERTEX-stage modifier, displacing
|
|
3
7
|
// each vertex along its normal (or a fixed `axis`) before the model transform. `Sine` is a procedural
|
|
4
8
|
// traveling wave animated by the shading tier's per-frame `time` (using `frequency` default 1, `speed`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createVertexDisplaceModifier.js","sourceRoot":"","sources":["../src/createVertexDisplaceModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createVertexDisplaceModifier.js","sourceRoot":"","sources":["../src/createVertexDisplaceModifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG3E,kGAAkG;AAClG,+FAA+F;AAC/F,iGAAiG;AACjG,2BAA2B;AAE3B,sGAAsG;AACtG,sGAAsG;AACtG,uGAAuG;AACvG,qGAAqG;AACrG,uFAAuF;AACvF,MAAM,UAAU,4BAA4B,CAAC,OAAgD;IAC3F,MAAM,QAAQ,GAA2B;QACvC,IAAI,EAAE,0BAA0B;QAChC,IAAI,EAAE,YAAY,CAAC,MAAM;QACzB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,CAAC;QACjC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,iBAAiB;KAClD,CAAC;IACF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;QAAE,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7D,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;QAAE,QAAQ,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAC1D,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,iBAAiB,GAAgB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Modifier } from '@flighthq/types';
|
|
2
|
-
import type { ModifierRegistry } from '
|
|
2
|
+
import type { ModifierRegistry } from '@flighthq/types';
|
|
3
3
|
export declare function getModifierDefineKey(stack: readonly Modifier[], registry?: Readonly<ModifierRegistry>): string;
|
|
4
4
|
//# sourceMappingURL=getModifierDefineKey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getModifierDefineKey.d.ts","sourceRoot":"","sources":["../src/getModifierDefineKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"getModifierDefineKey.d.ts","sourceRoot":"","sources":["../src/getModifierDefineKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAoBxD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAS9G"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Modifier, ModifierKind } from '@flighthq/types';
|
|
2
|
-
import type { ModifierRegistry } from '
|
|
2
|
+
import type { ModifierRegistry } from '@flighthq/types';
|
|
3
3
|
export declare function getUnregisteredModifierKinds(registry: Readonly<ModifierRegistry>, stack: readonly Modifier[]): readonly ModifierKind[];
|
|
4
4
|
//# sourceMappingURL=getUnregisteredModifierKinds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUnregisteredModifierKinds.d.ts","sourceRoot":"","sources":["../src/getUnregisteredModifierKinds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"getUnregisteredModifierKinds.d.ts","sourceRoot":"","sources":["../src/getUnregisteredModifierKinds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAQxD,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACpC,KAAK,EAAE,SAAS,QAAQ,EAAE,GACzB,SAAS,YAAY,EAAE,CAQzB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Modifier } from '@flighthq/types';
|
|
2
|
-
import type { ModifierRegistry } from '
|
|
2
|
+
import type { ModifierRegistry } from '@flighthq/types';
|
|
3
3
|
export declare function isModifierStackValid(registry: Readonly<ModifierRegistry>, stack: readonly Modifier[]): boolean;
|
|
4
4
|
//# sourceMappingURL=isModifierStackValid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isModifierStackValid.d.ts","sourceRoot":"","sources":["../src/isModifierStackValid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"isModifierStackValid.d.ts","sourceRoot":"","sources":["../src/isModifierStackValid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAOxD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,OAAO,CAE9G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isModifierStackValid.js","sourceRoot":"","sources":["../src/isModifierStackValid.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isModifierStackValid.js","sourceRoot":"","sources":["../src/isModifierStackValid.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,+FAA+F;AAC/F,oGAAoG;AACpG,mGAAmG;AACnG,MAAM,UAAU,oBAAoB,CAAC,QAAoC,EAAE,KAA0B;IACnG,OAAO,4BAA4B,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface ModifierDefinition {
|
|
3
|
-
kind: ModifierKind;
|
|
4
|
-
slot: ModifierSlot;
|
|
5
|
-
getDefineSignature?: (modifier: Readonly<Modifier>) => string;
|
|
6
|
-
}
|
|
7
|
-
export interface ModifierRegistry {
|
|
8
|
-
definitions: Map<ModifierKind, ModifierDefinition>;
|
|
9
|
-
}
|
|
1
|
+
import type { ModifierDefinition, ModifierKind, ModifierRegistry } from '@flighthq/types';
|
|
10
2
|
export declare function createModifierRegistry(): ModifierRegistry;
|
|
11
3
|
export declare function registerModifier(registry: Readonly<ModifierRegistry>, definition: Readonly<ModifierDefinition>): void;
|
|
12
4
|
export declare function resolveModifier(registry: Readonly<ModifierRegistry>, kind: ModifierKind): ModifierDefinition | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifierRegistry.d.ts","sourceRoot":"","sources":["../src/modifierRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"modifierRegistry.d.ts","sourceRoot":"","sources":["../src/modifierRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAsB1F,wBAAgB,sBAAsB,IAAI,gBAAgB,CAEzD;AAMD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAErH;AAID,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,YAAY,GAAG,kBAAkB,GAAG,IAAI,CAEnH"}
|
package/dist/modifierRegistry.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
// The substrate-agnostic registration record for one modifier kind: where it injects (`slot`) and
|
|
2
|
+
// how its descriptor's compile-time structure contributes to the define-key (`getDefineSignature`).
|
|
3
|
+
// It carries NO backend GLSL — per-backend compilers (e.g. @flighthq/scene-gl) register their own
|
|
4
|
+
// snippet against the same `kind` in a backend-side registry. This tier only owns the composition
|
|
5
|
+
// contract: slot ordering and the stable define-key that keys the compiled variant cache.
|
|
6
|
+
//
|
|
7
|
+
// `getDefineSignature` returns a short token naming which OPTIONAL, compile-time-affecting features
|
|
8
|
+
// of a modifier instance are structurally present (a mask texture, a facing gate, a second normal
|
|
9
|
+
// layer) — the things that change the emitted program, not the uniform-fed scalars (color, strength)
|
|
10
|
+
// that leave the program identical. It is a pure function of descriptor structure so the define-key
|
|
11
|
+
// is deterministic; omit it (or return `''`) when a kind has exactly one program shape.
|
|
12
|
+
// An open, last-write-wins registry mapping a `ModifierKind` to its substrate-agnostic definition.
|
|
13
|
+
// Not a module global: callers allocate one with `createModifierRegistry`, register built-ins via
|
|
14
|
+
// `registerBuiltInModifiers` and their own vendor-prefixed kinds via `registerModifier`, then feed
|
|
15
|
+
// it to the composition contract. Unused modifier kinds — and this whole registry — tree-shake out
|
|
16
|
+
// for anyone who does not import them, so an assembled variant never costs more than its parts.
|
|
1
17
|
// Allocates an empty modifier registry. The only allocating registry function; register and resolve
|
|
2
18
|
// read or mutate an existing registry in place.
|
|
3
19
|
export function createModifierRegistry() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifierRegistry.js","sourceRoot":"","sources":["../src/modifierRegistry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modifierRegistry.js","sourceRoot":"","sources":["../src/modifierRegistry.ts"],"names":[],"mappings":"AAEA,kGAAkG;AAClG,oGAAoG;AACpG,kGAAkG;AAClG,kGAAkG;AAClG,0FAA0F;AAC1F,EAAE;AACF,oGAAoG;AACpG,kGAAkG;AAClG,qGAAqG;AACrG,oGAAoG;AACpG,wFAAwF;AAExF,mGAAmG;AACnG,kGAAkG;AAClG,mGAAmG;AACnG,mGAAmG;AACnG,gGAAgG;AAEhG,oGAAoG;AACpG,gDAAgD;AAChD,MAAM,UAAU,sBAAsB;IACpC,OAAO,EAAE,WAAW,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AACpC,CAAC;AAED,yFAAyF;AACzF,kGAAkG;AAClG,oGAAoG;AACpG,gDAAgD;AAChD,MAAM,UAAU,gBAAgB,CAAC,QAAoC,EAAE,UAAwC;IAC7G,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AACxD,CAAC;AAED,iGAAiG;AACjG,2EAA2E;AAC3E,MAAM,UAAU,eAAe,CAAC,QAAoC,EAAE,IAAkB;IACtF,OAAO,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AAChD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModifierDefinition, ModifierRegistry } from '
|
|
1
|
+
import type { ModifierDefinition, ModifierRegistry } from '@flighthq/types';
|
|
2
2
|
export declare const animatedNormalModifierDefinition: ModifierDefinition;
|
|
3
3
|
export declare const dissolveModifierDefinition: ModifierDefinition;
|
|
4
4
|
export declare const emissiveModifierDefinition: ModifierDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerBuiltInModifiers.d.ts","sourceRoot":"","sources":["../src/registerBuiltInModifiers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registerBuiltInModifiers.d.ts","sourceRoot":"","sources":["../src/registerBuiltInModifiers.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAS5E,eAAO,MAAM,gCAAgC,EAAE,kBAQ9C,CAAC;AAKF,eAAO,MAAM,0BAA0B,EAAE,kBAMxC,CAAC;AAMF,eAAO,MAAM,0BAA0B,EAAE,kBAUxC,CAAC;AAKF,eAAO,MAAM,4BAA4B,EAAE,kBAG1C,CAAC;AAKF,eAAO,MAAM,qBAAqB,EAAE,kBASnC,CAAC;AAMF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI,CASnF;AAID,eAAO,MAAM,qBAAqB,EAAE,kBAGnC,CAAC;AAIF,eAAO,MAAM,sBAAsB,EAAE,kBAGpC,CAAC;AAMF,eAAO,MAAM,gCAAgC,EAAE,kBAS9C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/shading",
|
|
3
|
-
"version": "0.2.1-next.
|
|
3
|
+
"version": "0.2.1-next.585.c7219b8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/flighthq/flight.git",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@flighthq/entity": "0.2.1-next.
|
|
36
|
-
"@flighthq/types": "0.2.1-next.
|
|
35
|
+
"@flighthq/entity": "0.2.1-next.585.c7219b8",
|
|
36
|
+
"@flighthq/types": "0.2.1-next.585.c7219b8"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"typescript": "^5.3.0"
|