@gjsify/example-dom-three-postprocessing-pixel 0.1.10 → 0.1.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/gjs.js +15 -5
- package/package.json +4 -4
package/dist/gjs.js
CHANGED
|
@@ -4036,6 +4036,15 @@ var init_html_element = __esm({
|
|
|
4036
4036
|
set oncontextmenu(value2) {
|
|
4037
4037
|
this[propertyEventListeners].set("oncontextmenu", value2);
|
|
4038
4038
|
}
|
|
4039
|
+
// Wheel events — Excalibur detects wheel support via
|
|
4040
|
+
// `'onwheel' in document.createElement('div')` and only registers its
|
|
4041
|
+
// wheel listener when the property is present on the prototype chain.
|
|
4042
|
+
get onwheel() {
|
|
4043
|
+
return this[propertyEventListeners].get("onwheel") ?? null;
|
|
4044
|
+
}
|
|
4045
|
+
set onwheel(value2) {
|
|
4046
|
+
this[propertyEventListeners].set("onwheel", value2);
|
|
4047
|
+
}
|
|
4039
4048
|
// Keyboard events
|
|
4040
4049
|
get onkeydown() {
|
|
4041
4050
|
return this[propertyEventListeners].get("onkeydown") ?? null;
|
|
@@ -5108,6 +5117,10 @@ var init_document2 = __esm({
|
|
|
5108
5117
|
globalThis.dispatchEvent = (event) => _globalEventTarget.dispatchEvent(event);
|
|
5109
5118
|
}
|
|
5110
5119
|
defineGlobalIfMissing("devicePixelRatio", 1);
|
|
5120
|
+
defineGlobalIfMissing("scrollX", 0);
|
|
5121
|
+
defineGlobalIfMissing("scrollY", 0);
|
|
5122
|
+
defineGlobalIfMissing("pageXOffset", 0);
|
|
5123
|
+
defineGlobalIfMissing("pageYOffset", 0);
|
|
5111
5124
|
defineGlobalIfMissing("alert", (...args) => console.error("alert:", ...args));
|
|
5112
5125
|
if (typeof globalThis.top === "undefined") {
|
|
5113
5126
|
Object.defineProperty(globalThis, "top", {
|
|
@@ -6711,7 +6724,7 @@ function getArgv() {
|
|
|
6711
6724
|
try {
|
|
6712
6725
|
const system = getGjsGlobal().imports?.system;
|
|
6713
6726
|
if (system?.programArgs) {
|
|
6714
|
-
return [system.programInvocationName || "
|
|
6727
|
+
return ["gjs", system.programInvocationName || "", ...system.programArgs];
|
|
6715
6728
|
}
|
|
6716
6729
|
} catch {
|
|
6717
6730
|
}
|
|
@@ -14608,12 +14621,9 @@ function attachEventControllers(widget, getElement, options) {
|
|
|
14608
14621
|
widget.set_can_focus(true);
|
|
14609
14622
|
const state = { lastX: 0, lastY: 0, buttonsPressed: 0, pressedKeys: /* @__PURE__ */ new Set() };
|
|
14610
14623
|
const motionCtrl = new Gtk2.EventControllerMotion();
|
|
14611
|
-
motionCtrl.connect("motion", () => {
|
|
14624
|
+
motionCtrl.connect("motion", (_ctrl, x, y) => {
|
|
14612
14625
|
const el = getElement();
|
|
14613
14626
|
if (!el) return;
|
|
14614
|
-
const event = motionCtrl.get_current_event();
|
|
14615
|
-
if (!event) return;
|
|
14616
|
-
const [, x, y] = event.get_position?.() ?? [false, state.lastX, state.lastY];
|
|
14617
14627
|
const allocW = widget.get_allocated_width();
|
|
14618
14628
|
const allocH = widget.get_allocated_height();
|
|
14619
14629
|
const cx = Math.max(0, Math.min(x, allocW));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/example-dom-three-postprocessing-pixel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Three.js pixel post-processing example ported from refs/three/examples/webgl_postprocessing_pixel.html with Adwaita controls",
|
|
5
5
|
"main": "dist/gjs.js",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build:assets": "cp -f src/browser/index.html dist/index.html && cp -f src/browser/webgl.css dist/webgl.css && cp -rf src/assets dist/assets"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@gjsify/webgl": "^0.1.
|
|
27
|
+
"@gjsify/webgl": "^0.1.11"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@girs/adw-1": "^1.10.0-4.0.0-rc.2",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@girs/gjs": "^4.0.0-rc.2",
|
|
33
33
|
"@girs/gobject-2.0": "^2.88.0-4.0.0-rc.2",
|
|
34
34
|
"@girs/gtk-4.0": "^4.23.0-4.0.0-rc.2",
|
|
35
|
-
"@gjsify/adwaita-web": "^0.1.
|
|
36
|
-
"@gjsify/cli": "^0.1.
|
|
35
|
+
"@gjsify/adwaita-web": "^0.1.11",
|
|
36
|
+
"@gjsify/cli": "^0.1.11",
|
|
37
37
|
"@types/node": "^25.6.0",
|
|
38
38
|
"@types/three": "^0.183.1",
|
|
39
39
|
"http-server": "^14.1.1",
|