mudlet-map-renderer 0.29.0-konva → 0.29.2-konva
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/CullingManager.d.ts +1 -1
- package/dist/GridRenderer.d.ts +5 -0
- package/dist/backend/BlueprintBackend.d.ts +4 -0
- package/dist/backend/DrawingBackend.d.ts +8 -0
- package/dist/backend/IsometricBackend.d.ts +9 -0
- package/dist/backend/KonvaBackend.d.ts +4 -0
- package/dist/backend/NeonBackend.d.ts +32 -0
- package/dist/backend/ParchmentBackend.d.ts +4 -0
- package/dist/backend/SketchyBackend.d.ts +4 -0
- package/dist/backend/SvgBackend.d.ts +4 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +642 -588
- package/dist/index.mjs.map +1 -1
- package/dist/rendering/KonvaRenderBackend.d.ts +9 -2
- package/dist/rendering/MapRenderer.d.ts +17 -7
- package/dist/types/OverlayPlugin.d.ts +6 -2
- package/package.json +2 -2
- package/dist/scene/WeatherOverlay.d.ts +0 -59
package/dist/CullingManager.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare class CullingManager {
|
|
|
54
54
|
private perfMonitor;
|
|
55
55
|
private coordinateTransform;
|
|
56
56
|
constructor(stageInfo: StageInfo, roomLayer: LayerNode, linkLayer: LayerNode, settings: Settings);
|
|
57
|
-
setCoordinateTransform(fn: CoordinateTransform
|
|
57
|
+
setCoordinateTransform(fn: CoordinateTransform): void;
|
|
58
58
|
private transformPoint;
|
|
59
59
|
private transformBounds;
|
|
60
60
|
computeBucketSize(): void;
|
package/dist/GridRenderer.d.ts
CHANGED
|
@@ -10,7 +10,12 @@ export declare class GridRenderer {
|
|
|
10
10
|
private readonly settings;
|
|
11
11
|
private readonly backend;
|
|
12
12
|
private cachedBounds;
|
|
13
|
+
private inverseTransform;
|
|
13
14
|
constructor(layer: LayerNode, settings: Settings, backend: DrawingBackend);
|
|
15
|
+
setInverseTransform(fn: (x: number, y: number) => {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}): void;
|
|
14
19
|
invalidateCache(): void;
|
|
15
20
|
render(viewportBounds: ViewportBounds): void;
|
|
16
21
|
}
|
|
@@ -27,4 +27,8 @@ export declare class BlueprintBackend implements DrawingBackend {
|
|
|
27
27
|
addPolygon(parent: GroupNode, config: PolygonConfig): void;
|
|
28
28
|
addText(parent: GroupNode, config: TextConfig): void;
|
|
29
29
|
addImage(parent: GroupNode, config: ImageConfig): void;
|
|
30
|
+
getExitDepthOffset(): {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
};
|
|
30
34
|
}
|
|
@@ -97,4 +97,12 @@ export interface DrawingBackend {
|
|
|
97
97
|
addPolygon(parent: GroupNode, config: PolygonConfig): void;
|
|
98
98
|
addText(parent: GroupNode, config: TextConfig): void;
|
|
99
99
|
addImage(parent: GroupNode, config: ImageConfig): void;
|
|
100
|
+
/**
|
|
101
|
+
* Cartesian offset for exit line groups so they connect at the cube base
|
|
102
|
+
* instead of the top face. Returns {x:0, y:0} for flat backends.
|
|
103
|
+
*/
|
|
104
|
+
getExitDepthOffset(): {
|
|
105
|
+
x: number;
|
|
106
|
+
y: number;
|
|
107
|
+
};
|
|
100
108
|
}
|
|
@@ -37,6 +37,7 @@ export declare class IsometricBackend implements DrawingBackend {
|
|
|
37
37
|
private readonly inner;
|
|
38
38
|
private readonly depth;
|
|
39
39
|
private readonly iso;
|
|
40
|
+
private readonly isoInv;
|
|
40
41
|
/**
|
|
41
42
|
* @param inner The backend to delegate to after iso-transforming coordinates.
|
|
42
43
|
* @param options Depth (cube side face height, default 0.18) and rotation (0/90/180/270, default 0).
|
|
@@ -68,4 +69,12 @@ export declare class IsometricBackend implements DrawingBackend {
|
|
|
68
69
|
x: number;
|
|
69
70
|
y: number;
|
|
70
71
|
};
|
|
72
|
+
getInverseTransform(): (x: number, y: number) => {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
};
|
|
76
|
+
getExitDepthOffset(): {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
};
|
|
71
80
|
}
|
|
@@ -34,4 +34,8 @@ export declare class KonvaBackend implements DrawingBackend {
|
|
|
34
34
|
addPolygon(parent: GroupNode, config: PolygonConfig): void;
|
|
35
35
|
addText(parent: GroupNode, config: TextConfig): void;
|
|
36
36
|
addImage(parent: GroupNode, config: ImageConfig): void;
|
|
37
|
+
getExitDepthOffset(): {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
37
41
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DrawingBackend, GroupNode, RectConfig, CircleConfig, LineConfig, PolygonConfig, TextConfig, ImageConfig } from './DrawingBackend';
|
|
2
|
+
/**
|
|
3
|
+
* Decorator that wraps a DrawingBackend and remaps all colors to a
|
|
4
|
+
* cyberpunk/neon aesthetic — glowing colored outlines on a dark background.
|
|
5
|
+
*
|
|
6
|
+
* - **Fills** become very dark with a subtle tint of the original hue.
|
|
7
|
+
* - **Strokes** become bright neon colors (hue-preserved, saturation/lightness boosted).
|
|
8
|
+
* - A **glow** effect is achieved by drawing a wider translucent stroke underneath.
|
|
9
|
+
* - **Text** uses bright cyan-green.
|
|
10
|
+
* - **Images** pass through unchanged.
|
|
11
|
+
*
|
|
12
|
+
* For the best result, also adjust the map settings:
|
|
13
|
+
* ```ts
|
|
14
|
+
* settings.backgroundColor = '#0a0a0f';
|
|
15
|
+
* settings.lineColor = '#00ffaa';
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class NeonBackend implements DrawingBackend {
|
|
19
|
+
private readonly inner;
|
|
20
|
+
constructor(inner: DrawingBackend);
|
|
21
|
+
createGroup(x: number, y: number): GroupNode;
|
|
22
|
+
addRect(parent: GroupNode, config: RectConfig): void;
|
|
23
|
+
addCircle(parent: GroupNode, config: CircleConfig): void;
|
|
24
|
+
addLine(parent: GroupNode, config: LineConfig): void;
|
|
25
|
+
addPolygon(parent: GroupNode, config: PolygonConfig): void;
|
|
26
|
+
addText(parent: GroupNode, config: TextConfig): void;
|
|
27
|
+
addImage(parent: GroupNode, config: ImageConfig): void;
|
|
28
|
+
getExitDepthOffset(): {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -40,4 +40,8 @@ export declare class ParchmentBackend implements DrawingBackend {
|
|
|
40
40
|
addPolygon(parent: GroupNode, config: PolygonConfig): void;
|
|
41
41
|
addText(parent: GroupNode, config: TextConfig): void;
|
|
42
42
|
addImage(parent: GroupNode, config: ImageConfig): void;
|
|
43
|
+
getExitDepthOffset(): {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
};
|
|
43
47
|
}
|
|
@@ -33,4 +33,8 @@ export declare class SketchyBackend implements DrawingBackend {
|
|
|
33
33
|
addPolygon(parent: GroupNode, config: PolygonConfig): void;
|
|
34
34
|
addText(parent: GroupNode, config: TextConfig): void;
|
|
35
35
|
addImage(parent: GroupNode, config: ImageConfig): void;
|
|
36
|
+
getExitDepthOffset(): {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
};
|
|
36
40
|
}
|
|
@@ -43,4 +43,8 @@ export declare class SvgBackend implements DrawingBackend {
|
|
|
43
43
|
addPolygon(parent: GroupNode, config: PolygonConfig): void;
|
|
44
44
|
addText(parent: GroupNode, config: TextConfig): void;
|
|
45
45
|
addImage(parent: GroupNode, config: ImageConfig): void;
|
|
46
|
+
getExitDepthOffset(): {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
};
|
|
46
50
|
}
|