@lvce-editor/renderer-process 21.17.0 → 21.18.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/rendererProcessMain.js +18 -0
- package/package.json +1 -1
|
@@ -3117,6 +3117,23 @@ const create$x = async (canvasId, objectId) => {
|
|
|
3117
3117
|
set$6(canvasId, canvas);
|
|
3118
3118
|
await invokeAndTransfer('Transferrable.transfer', objectId, offscreenCanvas);
|
|
3119
3119
|
};
|
|
3120
|
+
const create2 = async (canvasId, objectId, width, height) => {
|
|
3121
|
+
const canvas = document.createElement('canvas');
|
|
3122
|
+
if (width) {
|
|
3123
|
+
canvas.width = width;
|
|
3124
|
+
}
|
|
3125
|
+
if (height) {
|
|
3126
|
+
canvas.height = height;
|
|
3127
|
+
}
|
|
3128
|
+
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
3129
|
+
set$1$1(canvasId, {
|
|
3130
|
+
factory: {},
|
|
3131
|
+
state: {
|
|
3132
|
+
$Viewlet: canvas
|
|
3133
|
+
}
|
|
3134
|
+
});
|
|
3135
|
+
await invokeAndTransfer('Transferrable.transfer', objectId, offscreenCanvas);
|
|
3136
|
+
};
|
|
3120
3137
|
|
|
3121
3138
|
const True = 'true';
|
|
3122
3139
|
const False = 'false';
|
|
@@ -9907,6 +9924,7 @@ const commandMap = {
|
|
|
9907
9924
|
'Notification.createWithOptions': createWithOptions,
|
|
9908
9925
|
'Notification.dispose': dispose$i,
|
|
9909
9926
|
'OffscreenCanvas.create': create$x,
|
|
9927
|
+
'OffscreenCanvas.create2': create2,
|
|
9910
9928
|
'Open.openUrl': openUrl,
|
|
9911
9929
|
'Performance.getMemory': getMemory,
|
|
9912
9930
|
'Performance.measureUserAgentSpecificMemory': measureUserAgentSpecificMemory,
|