@blorkfield/overlay-core 0.5.8 → 0.5.9
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/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
package/dist/index.d.cts
CHANGED
|
@@ -419,6 +419,8 @@ interface TTFTextObstacleConfig {
|
|
|
419
419
|
ttl?: number;
|
|
420
420
|
/** Fill color for the letters (CSS color string, default: '#ffffff') */
|
|
421
421
|
fillColor?: string;
|
|
422
|
+
/** Per-character fill colors (overrides fillColor for specific characters by index) */
|
|
423
|
+
fillColors?: string[];
|
|
422
424
|
/** Line height for multiline text (default: fontSize * 1.2) */
|
|
423
425
|
lineHeight?: number;
|
|
424
426
|
/** Pressure threshold config - when reached, letters collapse */
|
package/dist/index.d.ts
CHANGED
|
@@ -419,6 +419,8 @@ interface TTFTextObstacleConfig {
|
|
|
419
419
|
ttl?: number;
|
|
420
420
|
/** Fill color for the letters (CSS color string, default: '#ffffff') */
|
|
421
421
|
fillColor?: string;
|
|
422
|
+
/** Per-character fill colors (overrides fillColor for specific characters by index) */
|
|
423
|
+
fillColors?: string[];
|
|
422
424
|
/** Line height for multiline text (default: fontSize * 1.2) */
|
|
423
425
|
lineHeight?: number;
|
|
424
426
|
/** Pressure threshold config - when reached, letters collapse */
|
package/dist/index.js
CHANGED
|
@@ -2455,6 +2455,7 @@ var OverlayScene = class {
|
|
|
2455
2455
|
const baseTags = config.tags ?? [];
|
|
2456
2456
|
const isStatic = !baseTags.includes("falling");
|
|
2457
2457
|
const fillColor = config.fillColor ?? "#ffffff";
|
|
2458
|
+
const fillColors = config.fillColors;
|
|
2458
2459
|
const lineHeight = config.lineHeight ?? fontSize * 1.2;
|
|
2459
2460
|
const letterIds = [];
|
|
2460
2461
|
const letterMap = /* @__PURE__ */ new Map();
|
|
@@ -2568,6 +2569,7 @@ var OverlayScene = class {
|
|
|
2568
2569
|
}
|
|
2569
2570
|
const shadow = config.shadow ? { opacity: config.shadow.opacity ?? 0.3 } : void 0;
|
|
2570
2571
|
const clicksRemaining = config.clickToFall?.clicks;
|
|
2572
|
+
const charFillColor = fillColors?.[globalCharIndex] ?? fillColor;
|
|
2571
2573
|
const entry = {
|
|
2572
2574
|
id,
|
|
2573
2575
|
body,
|
|
@@ -2578,7 +2580,7 @@ var OverlayScene = class {
|
|
|
2578
2580
|
char,
|
|
2579
2581
|
fontSize,
|
|
2580
2582
|
fontFamily,
|
|
2581
|
-
fillColor,
|
|
2583
|
+
fillColor: charFillColor,
|
|
2582
2584
|
offsetX,
|
|
2583
2585
|
offsetY
|
|
2584
2586
|
},
|