v86 0.5.471 → 0.5.473
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/build/libv86-debug.js +1 -1
- package/build/libv86-debug.mjs +1 -1
- package/build/libv86.js +4 -4
- package/build/libv86.mjs +3 -3
- package/build/v86-debug.wasm +0 -0
- package/build/v86-fallback.wasm +0 -0
- package/build/v86.wasm +0 -0
- package/package.json +1 -1
package/build/libv86-debug.js
CHANGED
|
@@ -4381,7 +4381,7 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4381
4381
|
$may_handle$jscomp$1$$($e$jscomp$33$$) && $click_event$$($e$jscomp$33$$, !1);
|
|
4382
4382
|
}
|
|
4383
4383
|
function $click_event$$($e$jscomp$34$$, $down$$) {
|
|
4384
|
-
$mouse$$.bus && (1 === $e$jscomp$34$$.which ? $left_down$$ = $down$$ : 2 === $e$jscomp$34$$.which ? $middle_down$$ = $down$$ : 3 === $e$jscomp$34$$.which ? $right_down$$ = $down$$ : $dbg_log$$module$src$log$$("Unknown event.which: " + $e$jscomp$34$$.which), $mouse$$.bus.send("mouse-click", [$left_down$$, $middle_down$$, $right_down$$]), $e$jscomp$34$$.preventDefault());
|
|
4384
|
+
$mouse$$.bus && (1 === $e$jscomp$34$$.which ? $left_down$$ = $down$$ : 2 === $e$jscomp$34$$.which ? $middle_down$$ = $down$$ : 3 === $e$jscomp$34$$.which ? $right_down$$ = $down$$ : $dbg_log$$module$src$log$$("Unknown event.which: " + $e$jscomp$34$$.which), $mouse$$.bus.send("mouse-click", [$left_down$$, $middle_down$$, $right_down$$]), $e$jscomp$34$$.preventDefault(), $down$$ && window.focus());
|
|
4385
4385
|
}
|
|
4386
4386
|
function $mousewheel_handler$$($e$jscomp$35$$) {
|
|
4387
4387
|
if ($may_handle$jscomp$1$$($e$jscomp$35$$)) {
|
package/build/libv86-debug.mjs
CHANGED
|
@@ -4380,7 +4380,7 @@ function $MouseAdapter$$module$src$browser$mouse$$($bus$jscomp$11$$, $screen_con
|
|
|
4380
4380
|
$may_handle$jscomp$1$$($e$jscomp$33$$) && $click_event$$($e$jscomp$33$$, !1);
|
|
4381
4381
|
}
|
|
4382
4382
|
function $click_event$$($e$jscomp$34$$, $down$$) {
|
|
4383
|
-
$mouse$$.bus && (1 === $e$jscomp$34$$.which ? $left_down$$ = $down$$ : 2 === $e$jscomp$34$$.which ? $middle_down$$ = $down$$ : 3 === $e$jscomp$34$$.which ? $right_down$$ = $down$$ : $dbg_log$$module$src$log$$("Unknown event.which: " + $e$jscomp$34$$.which), $mouse$$.bus.send("mouse-click", [$left_down$$, $middle_down$$, $right_down$$]), $e$jscomp$34$$.preventDefault());
|
|
4383
|
+
$mouse$$.bus && (1 === $e$jscomp$34$$.which ? $left_down$$ = $down$$ : 2 === $e$jscomp$34$$.which ? $middle_down$$ = $down$$ : 3 === $e$jscomp$34$$.which ? $right_down$$ = $down$$ : $dbg_log$$module$src$log$$("Unknown event.which: " + $e$jscomp$34$$.which), $mouse$$.bus.send("mouse-click", [$left_down$$, $middle_down$$, $right_down$$]), $e$jscomp$34$$.preventDefault(), $down$$ && window.focus());
|
|
4384
4384
|
}
|
|
4385
4385
|
function $mousewheel_handler$$($e$jscomp$35$$) {
|
|
4386
4386
|
if ($may_handle$jscomp$1$$($e$jscomp$35$$)) {
|
package/build/libv86.js
CHANGED
|
@@ -245,10 +245,10 @@ IntlBackslash:86,F11:87,F12:88,NumpadEnter:57372,ControlRight:57373,NumpadDivide
|
|
|
245
245
|
!1),window.removeEventListener("input",f,!1))};this.init=function(){"undefined"!==typeof window&&(this.destroy(),window.addEventListener("keyup",c,!1),window.addEventListener("keydown",d,!1),window.addEventListener("blur",e,!1),window.addEventListener("input",f,!1))};this.init();this.simulate_press=function(t){t={keyCode:t};g(t,!0);g(t,!1)};this.simulate_char=function(t){var I=t.charCodeAt(0);I in B?this.simulate_press(B[I]):I in C?(l(42),this.simulate_press(C[I]),l(170)):console.log("ascii -> keyCode not found: ",
|
|
246
246
|
I,t)}};function cc(a,b){function c(){C.bus.send("mouse-pointer-lock",!!document.pointerLockElement)}function d(w){e(w)&&w.preventDefault()}function e(w){if(!C.enabled||!C.emu_enabled)return!1;var t=b||document.body,I;if(!(I=document.pointerLockElement))a:{for(w=w.target;w.parentNode;){if(w===t){I=!0;break a}w=w.parentNode}I=!1}return I}function f(w){e(w)&&(w=w.changedTouches)&&w.length&&(w=w[w.length-1],F=w.clientX,B=w.clientY)}function g(){if(q||x||r)C.bus.send("mouse-click",[!1,!1,!1]),q=x=r=!1}function h(w){if(C.bus&&
|
|
247
247
|
e(w)&&C.is_running){var t=0,I=0,P=w.changedTouches;P?P.length&&(P=P[P.length-1],t=P.clientX-F,I=P.clientY-B,F=P.clientX,B=P.clientY,w.preventDefault()):"number"===typeof w.movementX?(t=w.movementX,I=w.movementY):"number"===typeof w.webkitMovementX?(t=w.webkitMovementX,I=w.webkitMovementY):"number"===typeof w.mozMovementX?(t=w.mozMovementX,I=w.mozMovementY):(t=w.clientX-F,I=w.clientY-B,F=w.clientX,B=w.clientY);C.bus.send("mouse-delta",[1*t,-(1*I)]);b&&!document.pointerLockElement&&(t=b.getBoundingClientRect(),
|
|
248
|
-
C.bus.send("mouse-absolute",[w.clientX-t.left,w.clientY-t.top,t.width,t.height]))}}function m(w){e(w)&&n(w,!0)}function l(w){e(w)&&n(w,!1)}function n(w,t){C.bus&&(1===w.which?q=t:2===w.which?x=t:3===w.which&&(r=t),C.bus.send("mouse-click",[q,x,r]),w.preventDefault())}function p(w){if(e(w)){var t=w.wheelDelta||-w.detail;0>t?t=-1:0<t&&(t=1);C.bus.send("mouse-wheel",[t,0]);w.preventDefault()}}var q=!1,r=!1,x=!1,F=0,B=0,C=this;this.enabled=!1;this.emu_enabled=!0;this.absolute_mouse
|
|
249
|
-
function(w){this.enabled=w;this.update_cursor()},this);this.bus.register("vmware-absolute-mouse",function(w){this.absolute_mouse=w;this.update_cursor()},this);this.is_running=!1;this.bus.register("emulator-stopped",function(){this.is_running=!1},this);this.bus.register("emulator-started",function(){this.is_running=!0},this);this.update_cursor=function(){b&&(b.style.cursor=this.absolute_mouse&&this.enabled&&this.emu_enabled?"none":"")};this.destroy=function(){"undefined"!==
|
|
250
|
-
f,!1),window.removeEventListener("touchend",g,!1),window.removeEventListener("touchmove",h,!1),window.removeEventListener("mousemove",h,!1),window.removeEventListener("mousedown",m,!1),window.removeEventListener("mouseup",l,!1),window.removeEventListener("wheel",p,{passive:!1}),window.removeEventListener("contextmenu",d,!1),document.removeEventListener("pointerlockchange",c,!1))};this.init=function(){"undefined"!==typeof window&&(this.destroy(),
|
|
251
|
-
g,!1),window.addEventListener("touchmove",h,!1),window.addEventListener("mousemove",h,!1),window.addEventListener("mousedown",m,!1),window.addEventListener("mouseup",l,!1),window.addEventListener("wheel",p,{passive:!1}),window.addEventListener("contextmenu",d,!1),document.addEventListener("pointerlockchange",c,!1))};this.init()};function dc(a){var b,c=0,d=0,e=ra(a?.encoding);this.put_char=function(f,g,h){b[f*c+g]=h};this.destroy=function(){};this.pause=function(){};this.continue=function(){};this.clear_text_state=function(){d=c=null};this.set_mode=function(){};this.set_font_bitmap=function(){};this.set_font_page=function(){};this.clear_screen=function(){};this.set_size_text=function(f,g){if(f!==c||g!==d)b=new Uint8Array(f*g),c=f,d=g};this.set_size_graphical=function(){};this.set_scale=function(){};this.update_cursor_scanline=
|
|
248
|
+
C.bus.send("mouse-absolute",[w.clientX-t.left,w.clientY-t.top,t.width,t.height]))}}function m(w){e(w)&&n(w,!0)}function l(w){e(w)&&n(w,!1)}function n(w,t){C.bus&&(1===w.which?q=t:2===w.which?x=t:3===w.which&&(r=t),C.bus.send("mouse-click",[q,x,r]),w.preventDefault(),t&&window.focus())}function p(w){if(e(w)){var t=w.wheelDelta||-w.detail;0>t?t=-1:0<t&&(t=1);C.bus.send("mouse-wheel",[t,0]);w.preventDefault()}}var q=!1,r=!1,x=!1,F=0,B=0,C=this;this.enabled=!1;this.emu_enabled=!0;this.absolute_mouse=
|
|
249
|
+
!1;this.bus=a;this.bus.register("mouse-enable",function(w){this.enabled=w;this.update_cursor()},this);this.bus.register("vmware-absolute-mouse",function(w){this.absolute_mouse=w;this.update_cursor()},this);this.is_running=!1;this.bus.register("emulator-stopped",function(){this.is_running=!1},this);this.bus.register("emulator-started",function(){this.is_running=!0},this);this.update_cursor=function(){b&&(b.style.cursor=this.absolute_mouse&&this.enabled&&this.emu_enabled?"none":"")};this.destroy=function(){"undefined"!==
|
|
250
|
+
typeof window&&(window.removeEventListener("touchstart",f,!1),window.removeEventListener("touchend",g,!1),window.removeEventListener("touchmove",h,!1),window.removeEventListener("mousemove",h,!1),window.removeEventListener("mousedown",m,!1),window.removeEventListener("mouseup",l,!1),window.removeEventListener("wheel",p,{passive:!1}),window.removeEventListener("contextmenu",d,!1),document.removeEventListener("pointerlockchange",c,!1))};this.init=function(){"undefined"!==typeof window&&(this.destroy(),
|
|
251
|
+
window.addEventListener("touchstart",f,!1),window.addEventListener("touchend",g,!1),window.addEventListener("touchmove",h,!1),window.addEventListener("mousemove",h,!1),window.addEventListener("mousedown",m,!1),window.addEventListener("mouseup",l,!1),window.addEventListener("wheel",p,{passive:!1}),window.addEventListener("contextmenu",d,!1),document.addEventListener("pointerlockchange",c,!1))};this.init()};function dc(a){var b,c=0,d=0,e=ra(a?.encoding);this.put_char=function(f,g,h){b[f*c+g]=h};this.destroy=function(){};this.pause=function(){};this.continue=function(){};this.clear_text_state=function(){d=c=null};this.set_mode=function(){};this.set_font_bitmap=function(){};this.set_font_page=function(){};this.clear_screen=function(){};this.set_size_text=function(f,g){if(f!==c||g!==d)b=new Uint8Array(f*g),c=f,d=g};this.set_size_graphical=function(){};this.set_scale=function(){};this.update_cursor_scanline=
|
|
252
252
|
function(){};this.update_cursor=function(){};this.update_buffer=function(){};this.get_text_screen=function(){for(var f=[],g=0;g<d;g++)f.push(this.get_text_row(g));return f};this.get_text_row=function(f){f*=c;return Array.from(b.subarray(f,f+c),g=>e[g]).join("")};this.set_size_text(80,25)};function ec(a){var b,c=0,d=0,e=ra(a?.encoding);this.put_char=function(f,g,h,m,l,n){f=3*(f*c+g);b[f+0]=h;b[f+1]=l;b[f+2]=n};this.destroy=function(){};this.pause=function(){};this.continue=function(){};this.set_mode=function(){};this.set_font_bitmap=function(){};this.set_font_page=function(){};this.clear_screen=function(){};this.set_size_text=function(f,g){if(f!==c||g!==d)b=new Int32Array(f*g*3),c=f,d=g};this.set_size_graphical=function(){};this.set_scale=function(){};this.update_cursor_scanline=function(){};
|
|
253
253
|
this.update_cursor=function(){};this.update_buffer=function(){};this.get_text_screen=function(){for(var f=[],g=0;g<d;g++)f.push(this.get_text_row(g));return f};this.get_text_row=function(f){var g=f*c*3;f=g+3*c;let h=null,m=null,l="";for(;g<f;g+=3){const n=e[b[g]],p=b[g+1],q=b[g+2];let r="";h!==p&&(r+=`\x1B[48;${`2;${(p&16711680)>>16};${(p&65280)>>8};${p&255}`}m`,h=p);m!==q&&(r+=`\x1B[38;${`2;${(q&16711680)>>16};${(q&65280)>>8};${q&255}`}m`,m=q);l+=r+n}return l+"\u001b[0m"};this.set_size_text(80,25)}
|
|
254
254
|
;function fc(a){function b(g){f.enabled&&(f.send_char(g.which),g.preventDefault())}function c(g){var h=g.which;8===h?(f.send_char(127),g.preventDefault()):9===h&&(f.send_char(9),g.preventDefault())}function d(g){if(f.enabled){for(var h=g.clipboardData.getData("text/plain"),m=0;m<h.length;m++)f.send_char(h.charCodeAt(m));g.preventDefault()}}function e(g){g.target!==a&&a.blur()}var f=this;this.enabled=!0;this.text="";this.text_new_line=!1;this.last_update=0;this.destroy=function(){this.enabled=!1;a.removeEventListener("keypress",
|
package/build/libv86.mjs
CHANGED
|
@@ -219,9 +219,9 @@ NumpadSubtract:74,Numpad4:75,Numpad5:76,Numpad6:77,NumpadAdd:78,Numpad1:79,Numpa
|
|
|
219
219
|
(window.removeEventListener("keyup",c,!1),window.removeEventListener("keydown",d,!1),window.removeEventListener("blur",e,!1),window.removeEventListener("input",f,!1))};this.init=function(){"undefined"!==typeof window&&(this.destroy(),window.addEventListener("keyup",c,!1),window.addEventListener("keydown",d,!1),window.addEventListener("blur",e,!1),window.addEventListener("input",f,!1))};this.init();this.simulate_press=function(t){t={keyCode:t};g(t,!0);g(t,!1)};this.simulate_char=function(t){var I=
|
|
220
220
|
t.charCodeAt(0);I in B?this.simulate_press(B[I]):I in C?(l(42),this.simulate_press(C[I]),l(170)):console.log("ascii -> keyCode not found: ",I,t)}}function cc(a,b){function c(){C.bus.send("mouse-pointer-lock",!!document.pointerLockElement)}function d(w){e(w)&&w.preventDefault()}function e(w){if(!C.enabled||!C.emu_enabled)return!1;var t=b||document.body,I;if(!(I=document.pointerLockElement))a:{for(w=w.target;w.parentNode;){if(w===t){I=!0;break a}w=w.parentNode}I=!1}return I}function f(w){e(w)&&(w=w.changedTouches)&&
|
|
221
221
|
w.length&&(w=w[w.length-1],F=w.clientX,B=w.clientY)}function g(){if(q||x||r)C.bus.send("mouse-click",[!1,!1,!1]),q=x=r=!1}function h(w){if(C.bus&&e(w)&&C.is_running){var t=0,I=0,P=w.changedTouches;P?P.length&&(P=P[P.length-1],t=P.clientX-F,I=P.clientY-B,F=P.clientX,B=P.clientY,w.preventDefault()):"number"===typeof w.movementX?(t=w.movementX,I=w.movementY):"number"===typeof w.webkitMovementX?(t=w.webkitMovementX,I=w.webkitMovementY):"number"===typeof w.mozMovementX?(t=w.mozMovementX,I=w.mozMovementY):
|
|
222
|
-
(t=w.clientX-F,I=w.clientY-B,F=w.clientX,B=w.clientY);C.bus.send("mouse-delta",[1*t,-(1*I)]);b&&!document.pointerLockElement&&(t=b.getBoundingClientRect(),C.bus.send("mouse-absolute",[w.clientX-t.left,w.clientY-t.top,t.width,t.height]))}}function m(w){e(w)&&n(w,!0)}function l(w){e(w)&&n(w,!1)}function n(w,t){C.bus&&(1===w.which?q=t:2===w.which?x=t:3===w.which&&(r=t),C.bus.send("mouse-click",[q,x,r]),w.preventDefault())}function p(w){if(e(w)){var t=w.wheelDelta||-w.detail;0>t?t=-1:
|
|
223
|
-
[t,0]);w.preventDefault()}}var q=!1,r=!1,x=!1,F=0,B=0,C=this;this.enabled=!1;this.emu_enabled=!0;this.absolute_mouse=!1;this.bus=a;this.bus.register("mouse-enable",function(w){this.enabled=w;this.update_cursor()},this);this.bus.register("vmware-absolute-mouse",function(w){this.absolute_mouse=w;this.update_cursor()},this);this.is_running=!1;this.bus.register("emulator-stopped",function(){this.is_running=!1},this);this.bus.register("emulator-started",function(){this.is_running
|
|
224
|
-
function(){b&&(b.style.cursor=this.absolute_mouse&&this.enabled&&this.emu_enabled?"none":"")};this.destroy=function(){"undefined"!==typeof window&&(window.removeEventListener("touchstart",f,!1),window.removeEventListener("touchend",g,!1),window.removeEventListener("touchmove",h,!1),window.removeEventListener("mousemove",h,!1),window.removeEventListener("mousedown",m,!1),window.removeEventListener("mouseup",l,!1),window.removeEventListener("wheel",p,{passive:!1}),window.removeEventListener("contextmenu",
|
|
222
|
+
(t=w.clientX-F,I=w.clientY-B,F=w.clientX,B=w.clientY);C.bus.send("mouse-delta",[1*t,-(1*I)]);b&&!document.pointerLockElement&&(t=b.getBoundingClientRect(),C.bus.send("mouse-absolute",[w.clientX-t.left,w.clientY-t.top,t.width,t.height]))}}function m(w){e(w)&&n(w,!0)}function l(w){e(w)&&n(w,!1)}function n(w,t){C.bus&&(1===w.which?q=t:2===w.which?x=t:3===w.which&&(r=t),C.bus.send("mouse-click",[q,x,r]),w.preventDefault(),t&&window.focus())}function p(w){if(e(w)){var t=w.wheelDelta||-w.detail;0>t?t=-1:
|
|
223
|
+
0<t&&(t=1);C.bus.send("mouse-wheel",[t,0]);w.preventDefault()}}var q=!1,r=!1,x=!1,F=0,B=0,C=this;this.enabled=!1;this.emu_enabled=!0;this.absolute_mouse=!1;this.bus=a;this.bus.register("mouse-enable",function(w){this.enabled=w;this.update_cursor()},this);this.bus.register("vmware-absolute-mouse",function(w){this.absolute_mouse=w;this.update_cursor()},this);this.is_running=!1;this.bus.register("emulator-stopped",function(){this.is_running=!1},this);this.bus.register("emulator-started",function(){this.is_running=
|
|
224
|
+
!0},this);this.update_cursor=function(){b&&(b.style.cursor=this.absolute_mouse&&this.enabled&&this.emu_enabled?"none":"")};this.destroy=function(){"undefined"!==typeof window&&(window.removeEventListener("touchstart",f,!1),window.removeEventListener("touchend",g,!1),window.removeEventListener("touchmove",h,!1),window.removeEventListener("mousemove",h,!1),window.removeEventListener("mousedown",m,!1),window.removeEventListener("mouseup",l,!1),window.removeEventListener("wheel",p,{passive:!1}),window.removeEventListener("contextmenu",
|
|
225
225
|
d,!1),document.removeEventListener("pointerlockchange",c,!1))};this.init=function(){"undefined"!==typeof window&&(this.destroy(),window.addEventListener("touchstart",f,!1),window.addEventListener("touchend",g,!1),window.addEventListener("touchmove",h,!1),window.addEventListener("mousemove",h,!1),window.addEventListener("mousedown",m,!1),window.addEventListener("mouseup",l,!1),window.addEventListener("wheel",p,{passive:!1}),window.addEventListener("contextmenu",d,!1),document.addEventListener("pointerlockchange",
|
|
226
226
|
c,!1))};this.init()}function dc(a){var b,c=0,d=0,e=ra(a?.encoding);this.put_char=function(f,g,h){b[f*c+g]=h};this.destroy=function(){};this.pause=function(){};this.continue=function(){};this.clear_text_state=function(){d=c=null};this.set_mode=function(){};this.set_font_bitmap=function(){};this.set_font_page=function(){};this.clear_screen=function(){};this.set_size_text=function(f,g){if(f!==c||g!==d)b=new Uint8Array(f*g),c=f,d=g};this.set_size_graphical=function(){};this.set_scale=function(){};this.update_cursor_scanline=
|
|
227
227
|
function(){};this.update_cursor=function(){};this.update_buffer=function(){};this.get_text_screen=function(){for(var f=[],g=0;g<d;g++)f.push(this.get_text_row(g));return f};this.get_text_row=function(f){f*=c;return Array.from(b.subarray(f,f+c),g=>e[g]).join("")};this.set_size_text(80,25)}function ec(a){var b,c=0,d=0,e=ra(a?.encoding);this.put_char=function(f,g,h,m,l,n){f=3*(f*c+g);b[f+0]=h;b[f+1]=l;b[f+2]=n};this.destroy=function(){};this.pause=function(){};this.continue=function(){};this.set_mode=
|
package/build/v86-debug.wasm
CHANGED
|
Binary file
|
package/build/v86-fallback.wasm
CHANGED
|
Binary file
|
package/build/v86.wasm
CHANGED
|
Binary file
|