@apocaliss92/nodedreame 1.11.4 → 1.11.5
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 +2 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -7
- package/dist/index.d.ts +3 -7
- package/dist/index.js +2 -74
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -86,7 +86,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
86
86
|
|
|
87
87
|
// src/support/version.ts
|
|
88
88
|
var LIBRARY_NAME = "nodedreame";
|
|
89
|
-
var LIBRARY_VERSION = "1.11.
|
|
89
|
+
var LIBRARY_VERSION = "1.11.5";
|
|
90
90
|
|
|
91
91
|
// src/transport/errors.ts
|
|
92
92
|
var DreameError = class extends Error {
|
|
@@ -2913,78 +2913,6 @@ function pose(x, y, angle, absent) {
|
|
|
2913
2913
|
// src/models/vacuum/map/render.ts
|
|
2914
2914
|
var import_pngjs = require("pngjs");
|
|
2915
2915
|
var SCHEMES = {
|
|
2916
|
-
"dreame-light": {
|
|
2917
|
-
floor: [210, 222, 235, 255],
|
|
2918
|
-
wall: [60, 60, 60, 255],
|
|
2919
|
-
carpet: [180, 150, 120, 200],
|
|
2920
|
-
segSat: 0.45,
|
|
2921
|
-
segVal: 0.95,
|
|
2922
|
-
path: [60, 110, 180, 235],
|
|
2923
|
-
robotBody: [40, 70, 110, 255],
|
|
2924
|
-
robotHeading: [255, 255, 255, 255],
|
|
2925
|
-
charger: [40, 160, 80, 255],
|
|
2926
|
-
noGoFill: [220, 60, 60, 70],
|
|
2927
|
-
noGoBorder: [200, 40, 40, 220],
|
|
2928
|
-
noMopFill: [60, 120, 220, 60],
|
|
2929
|
-
noMopBorder: [40, 90, 200, 200],
|
|
2930
|
-
virtualWall: [200, 40, 40, 230],
|
|
2931
|
-
obstacle: [230, 150, 30, 255],
|
|
2932
|
-
label: [40, 40, 40, 255]
|
|
2933
|
-
},
|
|
2934
|
-
"dreame-dark": {
|
|
2935
|
-
floor: [40, 46, 56, 255],
|
|
2936
|
-
wall: [15, 15, 18, 255],
|
|
2937
|
-
carpet: [80, 66, 52, 200],
|
|
2938
|
-
segSat: 0.5,
|
|
2939
|
-
segVal: 0.62,
|
|
2940
|
-
path: [120, 170, 230, 235],
|
|
2941
|
-
robotBody: [120, 170, 230, 255],
|
|
2942
|
-
robotHeading: [20, 24, 30, 255],
|
|
2943
|
-
charger: [60, 200, 110, 255],
|
|
2944
|
-
noGoFill: [220, 70, 70, 80],
|
|
2945
|
-
noGoBorder: [230, 70, 70, 220],
|
|
2946
|
-
noMopFill: [70, 130, 230, 70],
|
|
2947
|
-
noMopBorder: [80, 140, 235, 210],
|
|
2948
|
-
virtualWall: [230, 70, 70, 235],
|
|
2949
|
-
obstacle: [240, 180, 60, 255],
|
|
2950
|
-
label: [225, 230, 240, 255]
|
|
2951
|
-
},
|
|
2952
|
-
"mijia-light": {
|
|
2953
|
-
floor: [225, 232, 240, 255],
|
|
2954
|
-
wall: [70, 78, 92, 255],
|
|
2955
|
-
carpet: [188, 162, 132, 200],
|
|
2956
|
-
segSat: 0.35,
|
|
2957
|
-
segVal: 0.98,
|
|
2958
|
-
path: [80, 130, 200, 230],
|
|
2959
|
-
robotBody: [30, 100, 200, 255],
|
|
2960
|
-
robotHeading: [255, 255, 255, 255],
|
|
2961
|
-
charger: [40, 170, 90, 255],
|
|
2962
|
-
noGoFill: [225, 70, 70, 70],
|
|
2963
|
-
noGoBorder: [205, 45, 45, 220],
|
|
2964
|
-
noMopFill: [70, 130, 225, 60],
|
|
2965
|
-
noMopBorder: [50, 100, 205, 200],
|
|
2966
|
-
virtualWall: [205, 45, 45, 230],
|
|
2967
|
-
obstacle: [235, 160, 35, 255],
|
|
2968
|
-
label: [45, 52, 64, 255]
|
|
2969
|
-
},
|
|
2970
|
-
tasshack: {
|
|
2971
|
-
floor: [200, 210, 225, 255],
|
|
2972
|
-
wall: [80, 80, 95, 255],
|
|
2973
|
-
carpet: [176, 148, 118, 205],
|
|
2974
|
-
segSat: 0.5,
|
|
2975
|
-
segVal: 0.9,
|
|
2976
|
-
path: [50, 100, 170, 235],
|
|
2977
|
-
robotBody: [35, 60, 100, 255],
|
|
2978
|
-
robotHeading: [255, 255, 255, 255],
|
|
2979
|
-
charger: [35, 150, 75, 255],
|
|
2980
|
-
noGoFill: [215, 55, 55, 75],
|
|
2981
|
-
noGoBorder: [195, 35, 35, 220],
|
|
2982
|
-
noMopFill: [55, 115, 215, 65],
|
|
2983
|
-
noMopBorder: [35, 85, 195, 205],
|
|
2984
|
-
virtualWall: [195, 35, 35, 230],
|
|
2985
|
-
obstacle: [225, 145, 25, 255],
|
|
2986
|
-
label: [35, 42, 54, 255]
|
|
2987
|
-
},
|
|
2988
2916
|
// Flat-design: soft neutral floor, bright low-saturation segment fills, thin
|
|
2989
2917
|
// mid-grey walls, a single vivid accent for the path.
|
|
2990
2918
|
flat: {
|
|
@@ -3081,7 +3009,7 @@ function segmentColor(id, pal) {
|
|
|
3081
3009
|
}
|
|
3082
3010
|
function renderVacuumPng(map, opts = {}) {
|
|
3083
3011
|
const scale = Math.max(1, Math.trunc(opts.scale ?? 1));
|
|
3084
|
-
const pal = SCHEMES[opts.colorScheme ?? "
|
|
3012
|
+
const pal = SCHEMES[opts.colorScheme ?? "flat"] ?? SCHEMES.flat;
|
|
3085
3013
|
const w = Math.max(1, map.dimensions.width * scale);
|
|
3086
3014
|
const h = Math.max(1, map.dimensions.height * scale);
|
|
3087
3015
|
const png = new import_pngjs.PNG({ width: w, height: h });
|