@flighthq/effects 0.1.0 → 0.2.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/dist/bevelEffect.d.ts +3 -0
- package/dist/bevelEffect.d.ts.map +1 -0
- package/dist/bevelEffect.js +5 -0
- package/dist/bevelEffect.js.map +1 -0
- package/dist/blurDownsample.d.ts +17 -0
- package/dist/blurDownsample.d.ts.map +1 -0
- package/dist/blurDownsample.js +35 -0
- package/dist/blurDownsample.js.map +1 -0
- package/dist/blurEffect.d.ts +3 -0
- package/dist/blurEffect.d.ts.map +1 -0
- package/dist/blurEffect.js +7 -0
- package/dist/blurEffect.js.map +1 -0
- package/dist/boxBlurMath.d.ts +27 -0
- package/dist/boxBlurMath.d.ts.map +1 -0
- package/dist/boxBlurMath.js +64 -0
- package/dist/boxBlurMath.js.map +1 -0
- package/dist/convolutionEffect.d.ts +3 -0
- package/dist/convolutionEffect.d.ts.map +1 -0
- package/dist/convolutionEffect.js +4 -0
- package/dist/convolutionEffect.js.map +1 -0
- package/dist/dropShadowEffect.d.ts +3 -0
- package/dist/dropShadowEffect.d.ts.map +1 -0
- package/dist/dropShadowEffect.js +5 -0
- package/dist/dropShadowEffect.js.map +1 -0
- package/dist/gaussianKernel.d.ts +17 -0
- package/dist/gaussianKernel.d.ts.map +1 -0
- package/dist/gaussianKernel.js +49 -0
- package/dist/gaussianKernel.js.map +1 -0
- package/dist/gradientBevelEffect.d.ts +3 -0
- package/dist/gradientBevelEffect.d.ts.map +1 -0
- package/dist/gradientBevelEffect.js +5 -0
- package/dist/gradientBevelEffect.js.map +1 -0
- package/dist/gradientGlowEffect.d.ts +3 -0
- package/dist/gradientGlowEffect.d.ts.map +1 -0
- package/dist/gradientGlowEffect.js +5 -0
- package/dist/gradientGlowEffect.js.map +1 -0
- package/dist/index.d.ts +14 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/dist/innerGlowEffect.d.ts +3 -0
- package/dist/innerGlowEffect.d.ts.map +1 -0
- package/dist/innerGlowEffect.js +5 -0
- package/dist/innerGlowEffect.js.map +1 -0
- package/dist/innerShadowEffect.d.ts +3 -0
- package/dist/innerShadowEffect.d.ts.map +1 -0
- package/dist/innerShadowEffect.js +5 -0
- package/dist/innerShadowEffect.js.map +1 -0
- package/dist/linearSampledGaussian.d.ts +22 -0
- package/dist/linearSampledGaussian.d.ts.map +1 -0
- package/dist/linearSampledGaussian.js +56 -0
- package/dist/linearSampledGaussian.js.map +1 -0
- package/dist/medianEffect.d.ts +3 -0
- package/dist/medianEffect.d.ts.map +1 -0
- package/dist/medianEffect.js +4 -0
- package/dist/medianEffect.js.map +1 -0
- package/dist/outerGlowEffect.d.ts +3 -0
- package/dist/outerGlowEffect.d.ts.map +1 -0
- package/dist/outerGlowEffect.js +5 -0
- package/dist/outerGlowEffect.js.map +1 -0
- package/dist/renderEffectDefaults.js +22 -20
- package/dist/renderEffectDefaults.js.map +1 -1
- package/dist/renderEffectInputs.d.ts.map +1 -1
- package/dist/renderEffectInputs.js +10 -11
- package/dist/renderEffectInputs.js.map +1 -1
- package/package.json +7 -2
- package/src/bevelEffect.test.ts +11 -0
- package/src/blurDownsample.test.ts +46 -0
- package/src/blurEffect.test.ts +17 -0
- package/src/boxBlurMath.test.ts +96 -0
- package/src/convolutionEffect.test.ts +20 -0
- package/src/dropShadowEffect.test.ts +11 -0
- package/src/gaussianKernel.test.ts +80 -0
- package/src/gradientBevelEffect.test.ts +15 -0
- package/src/gradientGlowEffect.test.ts +15 -0
- package/src/innerGlowEffect.test.ts +11 -0
- package/src/innerShadowEffect.test.ts +11 -0
- package/src/linearSampledGaussian.test.ts +87 -0
- package/src/medianEffect.test.ts +11 -0
- package/src/outerGlowEffect.test.ts +11 -0
- package/src/renderEffectDefaults.test.ts +4 -5
- package/src/renderEffectInputs.test.ts +3 -5
- package/src/renderEffectInterpolation.test.ts +6 -9
- package/src/renderEffectValidation.test.ts +2 -2
- package/dist/brightnessContrastEffect.d.ts +0 -3
- package/dist/brightnessContrastEffect.d.ts.map +0 -1
- package/dist/brightnessContrastEffect.js +0 -4
- package/dist/brightnessContrastEffect.js.map +0 -1
- package/dist/channelMixerEffect.d.ts +0 -3
- package/dist/channelMixerEffect.d.ts.map +0 -1
- package/dist/channelMixerEffect.js +0 -4
- package/dist/channelMixerEffect.js.map +0 -1
- package/dist/colorBlindSimulationEffect.d.ts +0 -3
- package/dist/colorBlindSimulationEffect.d.ts.map +0 -1
- package/dist/colorBlindSimulationEffect.js +0 -4
- package/dist/colorBlindSimulationEffect.js.map +0 -1
- package/dist/colorGradeEffect.d.ts +0 -3
- package/dist/colorGradeEffect.d.ts.map +0 -1
- package/dist/colorGradeEffect.js +0 -4
- package/dist/colorGradeEffect.js.map +0 -1
- package/dist/exposureEffect.d.ts +0 -3
- package/dist/exposureEffect.d.ts.map +0 -1
- package/dist/exposureEffect.js +0 -4
- package/dist/exposureEffect.js.map +0 -1
- package/dist/grayscaleEffect.d.ts +0 -3
- package/dist/grayscaleEffect.d.ts.map +0 -1
- package/dist/grayscaleEffect.js +0 -4
- package/dist/grayscaleEffect.js.map +0 -1
- package/dist/hueSaturationEffect.d.ts +0 -3
- package/dist/hueSaturationEffect.d.ts.map +0 -1
- package/dist/hueSaturationEffect.js +0 -4
- package/dist/hueSaturationEffect.js.map +0 -1
- package/dist/invertEffect.d.ts +0 -3
- package/dist/invertEffect.d.ts.map +0 -1
- package/dist/invertEffect.js +0 -4
- package/dist/invertEffect.js.map +0 -1
- package/dist/liftGammaGainEffect.d.ts +0 -3
- package/dist/liftGammaGainEffect.d.ts.map +0 -1
- package/dist/liftGammaGainEffect.js +0 -4
- package/dist/liftGammaGainEffect.js.map +0 -1
- package/dist/lookupTableGradeEffect.d.ts +0 -3
- package/dist/lookupTableGradeEffect.d.ts.map +0 -1
- package/dist/lookupTableGradeEffect.js +0 -4
- package/dist/lookupTableGradeEffect.js.map +0 -1
- package/dist/lutMath.d.ts +0 -7
- package/dist/lutMath.d.ts.map +0 -1
- package/dist/lutMath.js +0 -39
- package/dist/lutMath.js.map +0 -1
- package/dist/sepiaEffect.d.ts +0 -3
- package/dist/sepiaEffect.d.ts.map +0 -1
- package/dist/sepiaEffect.js +0 -4
- package/dist/sepiaEffect.js.map +0 -1
- package/src/brightnessContrastEffect.test.ts +0 -14
- package/src/channelMixerEffect.test.ts +0 -12
- package/src/colorBlindSimulationEffect.test.ts +0 -13
- package/src/colorGradeEffect.test.ts +0 -11
- package/src/exposureEffect.test.ts +0 -7
- package/src/grayscaleEffect.test.ts +0 -11
- package/src/hueSaturationEffect.test.ts +0 -15
- package/src/invertEffect.test.ts +0 -11
- package/src/liftGammaGainEffect.test.ts +0 -15
- package/src/lookupTableGradeEffect.test.ts +0 -11
- package/src/lutMath.test.ts +0 -67
- package/src/sepiaEffect.test.ts +0 -11
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Bilinear-tap ("linear sampling") Gaussian optimization. Substrate-agnostic recipe math: halves the
|
|
2
|
+
// GPU tap count of a separable Gaussian by folding adjacent texel pairs into one hardware-filtered fetch.
|
|
3
|
+
//
|
|
4
|
+
// Copied verbatim from filters-math during the filters→effects migration — effects is the
|
|
5
|
+
// canonical home for the spatial-effect blur math (effect-adjustment-architecture.md, migration
|
|
6
|
+
// step 4). filters-math keeps its copy until the filters* packages retire; the duplicate is
|
|
7
|
+
// deliberate for the duration (mirrors the Phase 1 colorMatrixMath port).
|
|
8
|
+
import { computeGaussianKernelWeights, getGaussianKernelSize } from './gaussianKernel';
|
|
9
|
+
/**
|
|
10
|
+
* Produces the bilinear-tap ("linear sampling") form of a Gaussian blur for standard deviation
|
|
11
|
+
* `sigma`, writing the combined weights into `outWeights` and their signed sample offsets (in texels,
|
|
12
|
+
* relative to the center) into `outOffsets`. Both arrays are truncated to
|
|
13
|
+
* `getLinearSampledGaussianTapCount(sigma)`.
|
|
14
|
+
*
|
|
15
|
+
* A separable Gaussian of `N` discrete texels can be sampled with `ceil(N / 2)` bilinear taps: each
|
|
16
|
+
* adjacent texel pair `(i, i+1)` is replaced by one sample whose weight is `w[i] + w[i+1]` taken at
|
|
17
|
+
* the weighted-midpoint offset `(pos[i]·w[i] + pos[i+1]·w[i+1]) / (w[i] + w[i+1])`. Reading that
|
|
18
|
+
* fractional position with hardware bilinear filtering reconstructs the pair's summed contribution
|
|
19
|
+
* in a single fetch, halving the tap count. `N` is always odd, so the final texel is emitted as a
|
|
20
|
+
* standalone unit-pair sample at its own integer offset. The combined weights sum to 1 because the
|
|
21
|
+
* source discrete weights do. Returns `outWeights`.
|
|
22
|
+
*/
|
|
23
|
+
export function computeLinearSampledGaussian(sigma, outWeights, outOffsets) {
|
|
24
|
+
const size = getGaussianKernelSize(sigma);
|
|
25
|
+
const radius = (size - 1) / 2;
|
|
26
|
+
computeGaussianKernelWeights(sigma, scratchWeights);
|
|
27
|
+
const tapCount = getLinearSampledGaussianTapCount(sigma);
|
|
28
|
+
outWeights.length = tapCount;
|
|
29
|
+
outOffsets.length = tapCount;
|
|
30
|
+
for (let tap = 0; tap < tapCount; tap++) {
|
|
31
|
+
const i = tap * 2;
|
|
32
|
+
const posA = i - radius;
|
|
33
|
+
if (i + 1 < size) {
|
|
34
|
+
const weightA = scratchWeights[i];
|
|
35
|
+
const weightB = scratchWeights[i + 1];
|
|
36
|
+
const combined = weightA + weightB;
|
|
37
|
+
outWeights[tap] = combined;
|
|
38
|
+
outOffsets[tap] = combined === 0 ? posA + 0.5 : (posA * weightA + (posA + 1) * weightB) / combined;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
outWeights[tap] = scratchWeights[i];
|
|
42
|
+
outOffsets[tap] = posA;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return outWeights;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns the number of bilinear taps the linear-sampling Gaussian uses for standard deviation
|
|
49
|
+
* `sigma`: `ceil(N / 2)` where `N = getGaussianKernelSize(sigma)`. Callers size their weight and
|
|
50
|
+
* offset arrays with this before calling `computeLinearSampledGaussian`.
|
|
51
|
+
*/
|
|
52
|
+
export function getLinearSampledGaussianTapCount(sigma) {
|
|
53
|
+
return Math.ceil(getGaussianKernelSize(sigma) / 2);
|
|
54
|
+
}
|
|
55
|
+
const scratchWeights = [];
|
|
56
|
+
//# sourceMappingURL=linearSampledGaussian.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linearSampledGaussian.js","sourceRoot":"","sources":["../src/linearSampledGaussian.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,0GAA0G;AAC1G,EAAE;AACF,0FAA0F;AAC1F,gGAAgG;AAChG,4FAA4F;AAC5F,0EAA0E;AAE1E,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEvF;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,4BAA4B,CAAC,KAAa,EAAE,UAAoB,EAAE,UAAoB;IACpG,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC9B,4BAA4B,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IACpD,MAAM,QAAQ,GAAG,gCAAgC,CAAC,KAAK,CAAC,CAAC;IACzD,UAAU,CAAC,MAAM,GAAG,QAAQ,CAAC;IAC7B,UAAU,CAAC,MAAM,GAAG,QAAQ,CAAC;IAC7B,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,QAAQ,EAAE,GAAG,EAAE,EAAE,CAAC;QACxC,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;QAClB,MAAM,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;YACjB,MAAM,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;YAClC,MAAM,OAAO,GAAG,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACtC,MAAM,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;YACnC,UAAU,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;YAC3B,UAAU,CAAC,GAAG,CAAC,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,OAAO,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,QAAQ,CAAC;QACrG,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;YACpC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QACzB,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAAC,KAAa;IAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,cAAc,GAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medianEffect.d.ts","sourceRoot":"","sources":["../src/medianEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAM,GAAG,YAAY,CAEnG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medianEffect.js","sourceRoot":"","sources":["../src/medianEffect.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAC,UAAgD,EAAE;IACnF,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,OAAO,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outerGlowEffect.d.ts","sourceRoot":"","sources":["../src/outerGlowEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAM,GAAG,eAAe,CAE5G"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Outer-glow composite effect: tint the scene silhouette, blur it centered (no offset), then composite the source over the glow.
|
|
2
|
+
export function createOuterGlowEffect(options = {}) {
|
|
3
|
+
return { kind: 'OuterGlowEffect', ...options };
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=outerGlowEffect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outerGlowEffect.js","sourceRoot":"","sources":["../src/outerGlowEffect.ts"],"names":[],"mappings":"AAEA,iIAAiI;AACjI,MAAM,UAAU,qBAAqB,CAAC,UAAmD,EAAE;IACzF,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,OAAO,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -42,45 +42,48 @@ export function normalizeRenderEffect(effect, out) {
|
|
|
42
42
|
const DEFAULTS = {
|
|
43
43
|
AutoExposureEffect: { adaptationSpeed: 1, exposureCompensation: 0, maxExposure: 2, minExposure: -2 },
|
|
44
44
|
BarrelDistortionEffect: { amount: 0.5, scale: 0.9 },
|
|
45
|
+
BevelEffect: {
|
|
46
|
+
angle: 45,
|
|
47
|
+
bevelType: 'inner',
|
|
48
|
+
blurX: 4,
|
|
49
|
+
blurY: 4,
|
|
50
|
+
distance: 4,
|
|
51
|
+
highlightAlpha: 1,
|
|
52
|
+
highlightColor: 0xffffff,
|
|
53
|
+
quality: 1,
|
|
54
|
+
shadowAlpha: 1,
|
|
55
|
+
shadowColor: 0x000000,
|
|
56
|
+
strength: 1,
|
|
57
|
+
},
|
|
45
58
|
BloomEffect: { brightness: 1, mipCount: 0, passes: 1, radius: 8, threshold: 0.8, thresholdKnee: 0.5 },
|
|
59
|
+
BlurEffect: { blurX: 4, blurY: 4 },
|
|
46
60
|
BokehDepthOfFieldEffect: { apertureBlades: 6, maxBlurRadius: 16, samples: 16 },
|
|
47
|
-
BrightnessContrastEffect: { brightness: 0, contrast: 0 },
|
|
48
61
|
CameraMotionBlurEffect: { samples: 8 },
|
|
49
62
|
ChromaticAberrationEffect: { fringeStrength: 0.01, radial: true, samples: 3 },
|
|
50
|
-
ColorGradeEffect: {
|
|
51
|
-
brightness: 0,
|
|
52
|
-
contrast: 0,
|
|
53
|
-
exposure: 0,
|
|
54
|
-
highlights: 0x808080ff,
|
|
55
|
-
midtones: 0x808080ff,
|
|
56
|
-
saturation: 1,
|
|
57
|
-
shadows: 0x808080ff,
|
|
58
|
-
temperature: 0,
|
|
59
|
-
tint: 0,
|
|
60
|
-
},
|
|
61
|
-
ColorBlindSimulationEffect: { type: 'deuteranopia' },
|
|
62
63
|
ContactShadowsEffect: { distance: 0.5, opacity: 0.6, samples: 16, smoothness: 0.5 },
|
|
64
|
+
ConvolutionEffect: { bias: 0, clamp: true, preserveAlpha: true },
|
|
63
65
|
CrtEffect: { curvature: 0.1, scanlineIntensity: 0.5, vignette: 0.4, aberration: 0 },
|
|
64
66
|
DirectionalBlurEffect: { angle: 0, samples: 8 },
|
|
65
67
|
DisplacementEffect: { frequency: 12, intensity: 8 },
|
|
66
68
|
DitherEffect: { levels: 16 },
|
|
67
|
-
|
|
69
|
+
DropShadowEffect: { alpha: 1, angle: 45, blurX: 4, blurY: 4, distance: 4, quality: 1, strength: 1 },
|
|
68
70
|
FilmEmulationEffect: { gateWeave: 0, grainIntensity: 0.1, halationRadius: 4, halationStrength: 0.3 },
|
|
69
71
|
FilmGrainEffect: { intensity: 0.2, size: 1, seed: 0 },
|
|
70
72
|
FxaaEffect: { edgeThreshold: 0.0312, subpixel: 0.75 },
|
|
71
73
|
GlitchEffect: { blockSize: 24, colorShift: 8, intensity: 0.5, seed: 0 },
|
|
72
74
|
GodRaysEffect: { centerX: 0.5, centerY: 0.5, decay: 0.96, density: 0.96, exposure: 0.1, samples: 100, weight: 0.4 },
|
|
73
|
-
|
|
75
|
+
GradientBevelEffect: { angle: 45, bevelType: 'inner', blurX: 4, blurY: 4, distance: 4, quality: 1, strength: 1 },
|
|
76
|
+
GradientGlowEffect: { blurX: 6, blurY: 6, quality: 1, strength: 1 },
|
|
74
77
|
HalftoneEffect: { angle: 0.785, scale: 8 }, // 0.785 ≈ π/4 = 45°
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
InnerGlowEffect: { alpha: 1, blurX: 6, blurY: 6, color: 0xff0000, quality: 1, strength: 1 },
|
|
79
|
+
InnerShadowEffect: { alpha: 1, angle: 45, blurX: 4, blurY: 4, distance: 4, quality: 1, strength: 1 },
|
|
77
80
|
KuwaharaEffect: { radius: 3 },
|
|
78
81
|
LensDirtEffect: { intensity: 1, threshold: 0.55 },
|
|
79
82
|
LensDistortionEffect: { amount: 0.5, scale: 0.9 },
|
|
80
83
|
LensFlareEffect: { ghosts: 4, halo: 0.5, intensity: 1, threshold: 0.9 },
|
|
81
|
-
|
|
82
|
-
LookupTableGradeEffect: { size: 16, strength: 1 },
|
|
84
|
+
MedianEffect: { radius: 1 },
|
|
83
85
|
MotionBlurEffect: { intensity: 1, samples: 8, shutterAngle: 180, target: 'both' },
|
|
86
|
+
OuterGlowEffect: { alpha: 1, blurX: 6, blurY: 6, color: 0xff0000, quality: 1, strength: 1 },
|
|
84
87
|
OutlineEffect: { color: 0x000000ff, thickness: 1, threshold: 0.1 },
|
|
85
88
|
PanniniProjectionEffect: { compression: 0.5, crop: 0 },
|
|
86
89
|
PixelateEffect: { size: 8 },
|
|
@@ -88,7 +91,6 @@ const DEFAULTS = {
|
|
|
88
91
|
RadialBlurEffect: { centerX: 0.5, centerY: 0.5, samples: 8, strength: 0.1 },
|
|
89
92
|
ScanlinesEffect: { count: 480, intensity: 0.25 },
|
|
90
93
|
ScreenSpaceFogEffect: { density: 0.5, far: 1000, near: 10 },
|
|
91
|
-
SepiaEffect: { intensity: 1 },
|
|
92
94
|
SharpenEffect: { amount: 0.5 },
|
|
93
95
|
SketchEffect: { strength: 1 },
|
|
94
96
|
SmaaEffect: { threshold: 0.1 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderEffectDefaults.js","sourceRoot":"","sources":["../src/renderEffectDefaults.ts"],"names":[],"mappings":"AAEA,4FAA4F;AAC5F,iGAAiG;AACjG,uFAAuF;AACvF,+FAA+F;AAC/F,sEAAsE;AAEtE,mGAAmG;AACnG,qGAAqG;AACrG,qGAAqG;AACrG,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;AACtB,CAAC;AAED,kGAAkG;AAClG,kGAAkG;AAClG,oGAAoG;AACpG,qGAAqG;AACrG,2CAA2C;AAC3C,EAAE;AACF,+FAA+F;AAC/F,MAAM,UAAU,qBAAqB,CAAC,MAA8B,EAAE,GAAiB;IACrF,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,gDAAgD;IAChD,MAAM,SAAS,GAAG,MAAiC,CAAC;IACpD,MAAM,MAAM,GAAG,GAAyC,CAAC;IACzD,2EAA2E;IAC3E,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,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
-
{"version":3,"file":"renderEffectInputs.d.ts","sourceRoot":"","sources":["../src/renderEffectInputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKvE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,SAAS,iBAAiB,EAAE,CAElG;AAID,wBAAgB,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAExD;AAwBD,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"renderEffectInputs.d.ts","sourceRoot":"","sources":["../src/renderEffectInputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKvE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,SAAS,iBAAiB,EAAE,CAElG;AAID,wBAAgB,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAExD;AAwBD,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAoDhD,CAAC"}
|
|
@@ -33,37 +33,37 @@ const RENDER_EFFECT_INPUTS = {
|
|
|
33
33
|
export const RENDER_EFFECT_KINDS = [
|
|
34
34
|
'AutoExposureEffect',
|
|
35
35
|
'BarrelDistortionEffect',
|
|
36
|
+
'BevelEffect',
|
|
36
37
|
'BloomEffect',
|
|
38
|
+
'BlurEffect',
|
|
37
39
|
'BokehDepthOfFieldEffect',
|
|
38
|
-
'BrightnessContrastEffect',
|
|
39
40
|
'CameraMotionBlurEffect',
|
|
40
|
-
'ChannelMixerEffect',
|
|
41
41
|
'ChromaticAberrationEffect',
|
|
42
|
-
'ColorBlindSimulationEffect',
|
|
43
|
-
'ColorGradeEffect',
|
|
44
42
|
'ContactShadowsEffect',
|
|
43
|
+
'ConvolutionEffect',
|
|
45
44
|
'CrtEffect',
|
|
46
45
|
'CustomShaderEffect',
|
|
47
46
|
'DirectionalBlurEffect',
|
|
48
47
|
'DisplacementEffect',
|
|
49
48
|
'DitherEffect',
|
|
50
|
-
'
|
|
49
|
+
'DropShadowEffect',
|
|
51
50
|
'FilmEmulationEffect',
|
|
52
51
|
'FilmGrainEffect',
|
|
53
52
|
'FxaaEffect',
|
|
54
53
|
'GlitchEffect',
|
|
55
54
|
'GodRaysEffect',
|
|
56
|
-
'
|
|
55
|
+
'GradientBevelEffect',
|
|
56
|
+
'GradientGlowEffect',
|
|
57
57
|
'HalftoneEffect',
|
|
58
|
-
'
|
|
59
|
-
'
|
|
58
|
+
'InnerGlowEffect',
|
|
59
|
+
'InnerShadowEffect',
|
|
60
60
|
'KuwaharaEffect',
|
|
61
61
|
'LensDirtEffect',
|
|
62
62
|
'LensDistortionEffect',
|
|
63
63
|
'LensFlareEffect',
|
|
64
|
-
'
|
|
65
|
-
'LookupTableGradeEffect',
|
|
64
|
+
'MedianEffect',
|
|
66
65
|
'MotionBlurEffect',
|
|
66
|
+
'OuterGlowEffect',
|
|
67
67
|
'OutlineEffect',
|
|
68
68
|
'PanniniProjectionEffect',
|
|
69
69
|
'PixelateEffect',
|
|
@@ -71,7 +71,6 @@ export const RENDER_EFFECT_KINDS = [
|
|
|
71
71
|
'RadialBlurEffect',
|
|
72
72
|
'ScanlinesEffect',
|
|
73
73
|
'ScreenSpaceFogEffect',
|
|
74
|
-
'SepiaEffect',
|
|
75
74
|
'SharpenEffect',
|
|
76
75
|
'SketchEffect',
|
|
77
76
|
'SmaaEffect',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderEffectInputs.js","sourceRoot":"","sources":["../src/renderEffectInputs.ts"],"names":[],"mappings":"AAEA,+FAA+F;AAC/F,wFAAwF;AACxF,0EAA0E;AAC1E,MAAM,UAAU,qBAAqB,CAAC,MAA8B;IAClE,OAAO,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AACjD,CAA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B,eAAe;IACf,gBAAgB;IAChB,uBAAuB;IACvB,oBAAoB;CACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/effects",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/flighthq/flight.git",
|
|
7
|
+
"directory": "packages/effects"
|
|
8
|
+
},
|
|
4
9
|
"type": "module",
|
|
5
10
|
"main": "dist/index.js",
|
|
6
11
|
"types": "dist/index.d.ts",
|
|
@@ -27,7 +32,7 @@
|
|
|
27
32
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
28
33
|
},
|
|
29
34
|
"dependencies": {
|
|
30
|
-
"@flighthq/types": "0.
|
|
35
|
+
"@flighthq/types": "0.2.0"
|
|
31
36
|
},
|
|
32
37
|
"devDependencies": {
|
|
33
38
|
"typescript": "^5.3.0"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createBevelEffect } from './bevelEffect';
|
|
2
|
+
|
|
3
|
+
describe('createBevelEffect', () => {
|
|
4
|
+
it('tags the intent type', () => {
|
|
5
|
+
expect(createBevelEffect().kind).toBe('BevelEffect');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('carries options', () => {
|
|
9
|
+
expect(createBevelEffect({ strength: 2 })).toMatchObject({ strength: 2 });
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { getBlurDownsampleLevel, getBlurResidualSigma } from './blurDownsample';
|
|
2
|
+
|
|
3
|
+
describe('getBlurDownsampleLevel', () => {
|
|
4
|
+
it('stays at full resolution at or below the max sigma threshold', () => {
|
|
5
|
+
expect(getBlurDownsampleLevel(1)).toBe(0);
|
|
6
|
+
expect(getBlurDownsampleLevel(2)).toBe(0);
|
|
7
|
+
expect(getBlurDownsampleLevel(4)).toBe(0);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('adds one level per doubling of sigma past the threshold', () => {
|
|
11
|
+
expect(getBlurDownsampleLevel(8)).toBe(1);
|
|
12
|
+
expect(getBlurDownsampleLevel(16)).toBe(2);
|
|
13
|
+
expect(getBlurDownsampleLevel(32)).toBe(3);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('rounds a partial doubling up to the next level', () => {
|
|
17
|
+
// sigma 5 → log2(5/4) ≈ 0.32 → ceil → level 1.
|
|
18
|
+
expect(getBlurDownsampleLevel(5)).toBe(1);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('returns 0 for non-positive sigma', () => {
|
|
22
|
+
expect(getBlurDownsampleLevel(0)).toBe(0);
|
|
23
|
+
expect(getBlurDownsampleLevel(-4)).toBe(0);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('never leaves a residual sigma above the threshold', () => {
|
|
27
|
+
for (const sigma of [4, 5, 8, 13, 16, 40, 100]) {
|
|
28
|
+
const level = getBlurDownsampleLevel(sigma);
|
|
29
|
+
expect(getBlurResidualSigma(sigma, level)).toBeLessThanOrEqual(4);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
describe('getBlurResidualSigma', () => {
|
|
35
|
+
it('divides sigma by 2^level', () => {
|
|
36
|
+
expect(getBlurResidualSigma(8, 1)).toBe(4);
|
|
37
|
+
expect(getBlurResidualSigma(16, 2)).toBe(4);
|
|
38
|
+
expect(getBlurResidualSigma(4, 0)).toBe(4);
|
|
39
|
+
expect(getBlurResidualSigma(32, 3)).toBe(4);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('returns 0 for non-positive sigma', () => {
|
|
43
|
+
expect(getBlurResidualSigma(0, 2)).toBe(0);
|
|
44
|
+
expect(getBlurResidualSigma(-8, 1)).toBe(0);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createBlurEffect } from './blurEffect';
|
|
2
|
+
|
|
3
|
+
describe('createBlurEffect', () => {
|
|
4
|
+
it('sets the kind', () => {
|
|
5
|
+
expect(createBlurEffect().kind).toBe('BlurEffect');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('defaults to no options beyond kind', () => {
|
|
9
|
+
expect(createBlurEffect()).toEqual({ kind: 'BlurEffect' });
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('carries through blurX and blurY', () => {
|
|
13
|
+
const effect = createBlurEffect({ blurX: 6, blurY: 3 });
|
|
14
|
+
expect(effect.blurX).toBe(6);
|
|
15
|
+
expect(effect.blurY).toBe(3);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { computeBoxBlurPassRadius, computeBoxBlurRadius, computeGaussianSigmaForBlurRadius } from './boxBlurMath';
|
|
2
|
+
|
|
3
|
+
describe('computeBoxBlurPassRadius', () => {
|
|
4
|
+
// Combined variance of n box passes of radius rᵢ is Σ (rᵢ² + rᵢ) / 3; the effective σ is its
|
|
5
|
+
// square root. These assert the construction tracks the target σ rather than overshooting.
|
|
6
|
+
const effectiveSigma = (radii: ReadonlyArray<number>): number =>
|
|
7
|
+
Math.sqrt(radii.reduce((sum, r) => sum + (r * r + r) / 3, 0));
|
|
8
|
+
|
|
9
|
+
const passRadii = (sigma: number, passes: number): number[] =>
|
|
10
|
+
Array.from({ length: passes }, (_unused, pass) => computeBoxBlurPassRadius(sigma, passes, pass));
|
|
11
|
+
|
|
12
|
+
it('returns 0 for every pass when sigma is 0', () => {
|
|
13
|
+
expect(passRadii(0, 3)).toEqual([0, 0, 0]);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('returns 0 for every pass when sigma is negative', () => {
|
|
17
|
+
expect(passRadii(-1, 2)).toEqual([0, 0]);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('uses at most two distinct box sizes', () => {
|
|
21
|
+
expect(new Set(passRadii(12, 3)).size).toBeLessThanOrEqual(2);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('is non-decreasing in pass index', () => {
|
|
25
|
+
const radii = passRadii(4, 3);
|
|
26
|
+
for (let i = 1; i < radii.length; i++) {
|
|
27
|
+
expect(radii[i]).toBeGreaterThanOrEqual(radii[i - 1]);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('approximates the target sigma within a few percent without overshooting', () => {
|
|
32
|
+
for (const sigma of [4, 8, 12]) {
|
|
33
|
+
const sigmaEff = effectiveSigma(passRadii(sigma, 3));
|
|
34
|
+
expect(sigmaEff).toBeGreaterThan(sigma * 0.9);
|
|
35
|
+
expect(sigmaEff).toBeLessThanOrEqual(sigma * 1.02);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('does not overshoot the way a single repeated rounded radius does', () => {
|
|
40
|
+
// The uniform approach rounds 3.53 up to 4 → σ_eff ≈ 4.47 for σ=4, n=3.
|
|
41
|
+
const naiveRadius = computeBoxBlurRadius(4, 3);
|
|
42
|
+
const naiveSigma = effectiveSigma([naiveRadius, naiveRadius, naiveRadius]);
|
|
43
|
+
const splitSigma = effectiveSigma(passRadii(4, 3));
|
|
44
|
+
expect(naiveSigma).toBeGreaterThan(4); // documents the overshoot
|
|
45
|
+
expect(Math.abs(splitSigma - 4)).toBeLessThan(Math.abs(naiveSigma - 4));
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
describe('computeBoxBlurRadius', () => {
|
|
50
|
+
it('returns 0 for sigma 0', () => {
|
|
51
|
+
expect(computeBoxBlurRadius(0, 1)).toBe(0);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('returns 0 for negative sigma', () => {
|
|
55
|
+
expect(computeBoxBlurRadius(-4, 1)).toBe(0);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('returns a positive radius for positive sigma', () => {
|
|
59
|
+
expect(computeBoxBlurRadius(4, 1)).toBeGreaterThan(0);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('returns a smaller radius for more passes at the same sigma', () => {
|
|
63
|
+
const r1 = computeBoxBlurRadius(10, 1);
|
|
64
|
+
const r3 = computeBoxBlurRadius(10, 3);
|
|
65
|
+
expect(r3).toBeLessThan(r1);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('returns radius 6 for sigma 4 with 1 pass', () => {
|
|
69
|
+
// round((-1 + sqrt(1 + 12·16/1)) / 2) = round((-1 + sqrt(193)) / 2) ≈ round(6.44) = 6
|
|
70
|
+
expect(computeBoxBlurRadius(4, 1)).toBe(6);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
describe('computeGaussianSigmaForBlurRadius', () => {
|
|
75
|
+
it('returns 0 for radius 0', () => {
|
|
76
|
+
expect(computeGaussianSigmaForBlurRadius(0, 1)).toBe(0);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('returns 0 for negative radius', () => {
|
|
80
|
+
expect(computeGaussianSigmaForBlurRadius(-1, 1)).toBe(0);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('returns 0 for non-positive passes', () => {
|
|
84
|
+
expect(computeGaussianSigmaForBlurRadius(4, 0)).toBe(0);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('returns a positive sigma for positive radius and passes', () => {
|
|
88
|
+
expect(computeGaussianSigmaForBlurRadius(6, 1)).toBeGreaterThan(0);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it('produces a larger sigma for more passes at the same radius', () => {
|
|
92
|
+
const s1 = computeGaussianSigmaForBlurRadius(4, 1);
|
|
93
|
+
const s3 = computeGaussianSigmaForBlurRadius(4, 3);
|
|
94
|
+
expect(s3).toBeGreaterThan(s1);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createConvolutionEffect } from './convolutionEffect';
|
|
2
|
+
|
|
3
|
+
describe('createConvolutionEffect', () => {
|
|
4
|
+
it('tags the intent type', () => {
|
|
5
|
+
expect(createConvolutionEffect({ matrix: [1], matrixX: 1, matrixY: 1 }).kind).toBe('ConvolutionEffect');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('carries required fields', () => {
|
|
9
|
+
const matrix = [0, 1, 0, 1, -4, 1, 0, 1, 0];
|
|
10
|
+
const effect = createConvolutionEffect({ matrix, matrixX: 3, matrixY: 3 });
|
|
11
|
+
expect(effect.matrixX).toBe(3);
|
|
12
|
+
expect(effect.matrixY).toBe(3);
|
|
13
|
+
expect(effect.matrix).toBe(matrix);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('carries optional fields', () => {
|
|
17
|
+
const effect = createConvolutionEffect({ matrix: [1], matrixX: 1, matrixY: 1, bias: 8, preserveAlpha: false });
|
|
18
|
+
expect(effect).toMatchObject({ bias: 8, preserveAlpha: false });
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createDropShadowEffect } from './dropShadowEffect';
|
|
2
|
+
|
|
3
|
+
describe('createDropShadowEffect', () => {
|
|
4
|
+
it('tags the intent type', () => {
|
|
5
|
+
expect(createDropShadowEffect().kind).toBe('DropShadowEffect');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('carries options', () => {
|
|
9
|
+
expect(createDropShadowEffect({ strength: 2 })).toMatchObject({ strength: 2 });
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { computeGaussianKernelWeights, getGaussianKernelSize } from './gaussianKernel';
|
|
2
|
+
|
|
3
|
+
describe('computeGaussianKernelWeights', () => {
|
|
4
|
+
const sumOf = (weights: ReadonlyArray<number>): number => weights.reduce((total, weight) => total + weight, 0);
|
|
5
|
+
|
|
6
|
+
it('produces weights that sum to exactly 1 across several sigmas', () => {
|
|
7
|
+
for (const sigma of [0.75, 1, 2, 3.5, 6]) {
|
|
8
|
+
const out: number[] = [];
|
|
9
|
+
computeGaussianKernelWeights(sigma, out);
|
|
10
|
+
expect(sumOf(out)).toBeCloseTo(1, 12);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('produces a symmetric kernel', () => {
|
|
15
|
+
const out: number[] = [];
|
|
16
|
+
computeGaussianKernelWeights(2, out);
|
|
17
|
+
for (let i = 0; i < out.length; i++) {
|
|
18
|
+
expect(out[i]).toBeCloseTo(out[out.length - 1 - i], 12);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('makes the center weight the maximum', () => {
|
|
23
|
+
const out: number[] = [];
|
|
24
|
+
computeGaussianKernelWeights(2.5, out);
|
|
25
|
+
const center = (out.length - 1) / 2;
|
|
26
|
+
for (let i = 0; i < out.length; i++) {
|
|
27
|
+
expect(out[center]).toBeGreaterThanOrEqual(out[i]);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('matches the closed-form Gaussian ratio between taps', () => {
|
|
32
|
+
// w[center+d] / w[center] = exp(-d^2 / (2 sigma^2)), independent of the normalization constant.
|
|
33
|
+
const sigma = 2;
|
|
34
|
+
const out: number[] = [];
|
|
35
|
+
computeGaussianKernelWeights(sigma, out);
|
|
36
|
+
const center = (out.length - 1) / 2;
|
|
37
|
+
for (const d of [1, 2, 3]) {
|
|
38
|
+
const expectedRatio = Math.exp(-(d * d) / (2 * sigma * sigma));
|
|
39
|
+
expect(out[center + d] / out[center]).toBeCloseTo(expectedRatio, 12);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('sizes out to getGaussianKernelSize and reuses the array', () => {
|
|
44
|
+
const out: number[] = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9];
|
|
45
|
+
computeGaussianKernelWeights(2, out);
|
|
46
|
+
expect(out.length).toBe(getGaussianKernelSize(2));
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('returns the identity kernel for non-positive sigma', () => {
|
|
50
|
+
const out: number[] = [];
|
|
51
|
+
computeGaussianKernelWeights(0, out);
|
|
52
|
+
expect(out).toEqual([1]);
|
|
53
|
+
computeGaussianKernelWeights(-3, out);
|
|
54
|
+
expect(out).toEqual([1]);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('returns out', () => {
|
|
58
|
+
const out: number[] = [];
|
|
59
|
+
expect(computeGaussianKernelWeights(1.5, out)).toBe(out);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
describe('getGaussianKernelSize', () => {
|
|
64
|
+
it('is radius*2+1 with radius = ceil(3*sigma)', () => {
|
|
65
|
+
expect(getGaussianKernelSize(1)).toBe(2 * 3 + 1);
|
|
66
|
+
expect(getGaussianKernelSize(2)).toBe(2 * 6 + 1);
|
|
67
|
+
expect(getGaussianKernelSize(2.5)).toBe(2 * Math.ceil(7.5) + 1);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('is always odd', () => {
|
|
71
|
+
for (const sigma of [0.5, 1, 1.7, 4, 9]) {
|
|
72
|
+
expect(getGaussianKernelSize(sigma) % 2).toBe(1);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it('returns 1 for non-positive sigma', () => {
|
|
77
|
+
expect(getGaussianKernelSize(0)).toBe(1);
|
|
78
|
+
expect(getGaussianKernelSize(-2)).toBe(1);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createGradientBevelEffect } from './gradientBevelEffect';
|
|
2
|
+
|
|
3
|
+
describe('createGradientBevelEffect', () => {
|
|
4
|
+
it('tags the intent type', () => {
|
|
5
|
+
expect(createGradientBevelEffect({ colors: [0xff0000, 0x00ff00], alphas: [1, 1], ratios: [0, 255] }).kind).toBe(
|
|
6
|
+
'GradientBevelEffect',
|
|
7
|
+
);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('carries options', () => {
|
|
11
|
+
expect(
|
|
12
|
+
createGradientBevelEffect({ colors: [0xff0000, 0x00ff00], alphas: [1, 1], ratios: [0, 255], strength: 2 }),
|
|
13
|
+
).toMatchObject({ strength: 2 });
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createGradientGlowEffect } from './gradientGlowEffect';
|
|
2
|
+
|
|
3
|
+
describe('createGradientGlowEffect', () => {
|
|
4
|
+
it('tags the intent type', () => {
|
|
5
|
+
expect(createGradientGlowEffect({ colors: [0xff0000, 0x00ff00], alphas: [1, 1], ratios: [0, 255] }).kind).toBe(
|
|
6
|
+
'GradientGlowEffect',
|
|
7
|
+
);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('carries options', () => {
|
|
11
|
+
expect(
|
|
12
|
+
createGradientGlowEffect({ colors: [0xff0000, 0x00ff00], alphas: [1, 1], ratios: [0, 255], strength: 2 }),
|
|
13
|
+
).toMatchObject({ strength: 2 });
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createInnerGlowEffect } from './innerGlowEffect';
|
|
2
|
+
|
|
3
|
+
describe('createInnerGlowEffect', () => {
|
|
4
|
+
it('tags the intent type', () => {
|
|
5
|
+
expect(createInnerGlowEffect().kind).toBe('InnerGlowEffect');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('carries options', () => {
|
|
9
|
+
expect(createInnerGlowEffect({ strength: 2 })).toMatchObject({ strength: 2 });
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createInnerShadowEffect } from './innerShadowEffect';
|
|
2
|
+
|
|
3
|
+
describe('createInnerShadowEffect', () => {
|
|
4
|
+
it('tags the intent type', () => {
|
|
5
|
+
expect(createInnerShadowEffect().kind).toBe('InnerShadowEffect');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('carries options', () => {
|
|
9
|
+
expect(createInnerShadowEffect({ strength: 2 })).toMatchObject({ strength: 2 });
|
|
10
|
+
});
|
|
11
|
+
});
|