vim-web 0.5.0-dev.10 → 0.5.0-dev.11
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/types/core-viewers/ultra/vim.d.ts +1 -0
- package/dist/vim-web.iife.js +17 -10
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +17 -10
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
package/dist/vim-web.iife.js
CHANGED
|
@@ -60922,6 +60922,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60922
60922
|
// Color tracking remains unchanged.
|
|
60923
60923
|
__publicField(this, "_elementColors", /* @__PURE__ */ new Map());
|
|
60924
60924
|
__publicField(this, "_updatedColors", /* @__PURE__ */ new Set());
|
|
60925
|
+
__publicField(this, "_removedColors", /* @__PURE__ */ new Set());
|
|
60925
60926
|
// Delayed update flag.
|
|
60926
60927
|
__publicField(this, "_updateScheduled", false);
|
|
60927
60928
|
__publicField(this, "_elementCount", 0);
|
|
@@ -61087,16 +61088,18 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61087
61088
|
}
|
|
61088
61089
|
this.applyColor(elements, color);
|
|
61089
61090
|
}
|
|
61090
|
-
applyColor(elements,
|
|
61091
|
-
for (let i2 = 0; i2 <
|
|
61092
|
-
const
|
|
61091
|
+
applyColor(elements, colors) {
|
|
61092
|
+
for (let i2 = 0; i2 < colors.length; i2++) {
|
|
61093
|
+
const color = colors[i2];
|
|
61093
61094
|
const element = elements[i2];
|
|
61094
|
-
|
|
61095
|
+
const existingColor = this._elementColors.get(element);
|
|
61096
|
+
if (color === void 0 && existingColor !== void 0) {
|
|
61095
61097
|
this._elementColors.delete(element);
|
|
61096
|
-
|
|
61097
|
-
|
|
61098
|
+
this._removedColors.add(element);
|
|
61099
|
+
} else if (color !== existingColor) {
|
|
61100
|
+
this._elementColors.set(element, color);
|
|
61101
|
+
this._updatedColors.add(element);
|
|
61098
61102
|
}
|
|
61099
|
-
this._updatedColors.add(element);
|
|
61100
61103
|
}
|
|
61101
61104
|
this.scheduleColorUpdate();
|
|
61102
61105
|
}
|
|
@@ -61116,6 +61119,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61116
61119
|
}
|
|
61117
61120
|
reapplyColors() {
|
|
61118
61121
|
this._updatedColors.clear();
|
|
61122
|
+
this._removedColors.clear();
|
|
61119
61123
|
this._elementColors.forEach((c, n) => this._updatedColors.add(n));
|
|
61120
61124
|
this.scheduleColorUpdate();
|
|
61121
61125
|
}
|
|
@@ -61132,12 +61136,15 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61132
61136
|
this._renderer.notifySceneUpdated();
|
|
61133
61137
|
}
|
|
61134
61138
|
async updateRemoteColors() {
|
|
61135
|
-
const
|
|
61136
|
-
const
|
|
61139
|
+
const updatedElement = Array.from(this._updatedColors);
|
|
61140
|
+
const removedElement = Array.from(this._removedColors);
|
|
61141
|
+
const colors = updatedElement.map((n) => this._elementColors.get(n));
|
|
61137
61142
|
const remoteColors = await this._colors.getColors(colors);
|
|
61138
61143
|
const colorIds = remoteColors.map((c) => (c == null ? void 0 : c.id) ?? -1);
|
|
61139
|
-
this._rpc.
|
|
61144
|
+
this._rpc.RPCClearMaterialOverridesForElements(this._handle, removedElement);
|
|
61145
|
+
this._rpc.RPCSetMaterialOverridesForElements(this._handle, updatedElement, colorIds);
|
|
61140
61146
|
this._updatedColors.clear();
|
|
61147
|
+
this._removedColors.clear();
|
|
61141
61148
|
}
|
|
61142
61149
|
}
|
|
61143
61150
|
function wait(ms) {
|