laymur 0.25.2 → 0.27.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/README.md +114 -34
- package/dist/core/constraints/UICustomConstraint.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +1 -1
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +1 -1
- package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +2 -3
- package/dist/core/elements/UIAnchor/UIAnchor.d.ts +2 -2
- package/dist/core/elements/UIAnchor/UIAnchor.js +3 -2
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +2 -2
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +24 -12
- package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +13 -0
- package/dist/core/elements/UIDummy/UIDummy.d.ts +74 -5
- package/dist/core/elements/UIDummy/UIDummy.js +222 -29
- package/dist/core/elements/UIElement/UIElement.Internal.d.ts +1 -1
- package/dist/core/elements/UIElement/UIElement.d.ts +37 -1
- package/dist/core/elements/UIElement/UIElement.js +84 -6
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts +1 -1
- package/dist/core/elements/UIGraphics/UIGraphics.d.ts +1 -1
- package/dist/core/elements/UIGraphics/UIGraphics.js +4 -4
- package/dist/core/elements/UIImage/UIImage.d.ts +2 -2
- package/dist/core/elements/UIImage/UIImage.js +10 -8
- package/dist/core/elements/UINineSlice/UINineSlice.d.ts +4 -4
- package/dist/core/elements/UINineSlice/UINineSlice.js +11 -9
- package/dist/core/elements/UIProgress/UIProgress.d.ts +2 -2
- package/dist/core/elements/UIProgress/UIProgress.js +17 -15
- package/dist/core/elements/UIScene/UIScene.Internal.d.ts +1 -1
- package/dist/core/elements/UIScene/UIScene.d.ts +3 -2
- package/dist/core/elements/UIScene/UIScene.js +21 -14
- package/dist/core/elements/UIText/UIText.Measuring.d.ts +1 -1
- package/dist/core/elements/UIText/UIText.d.ts +3 -3
- package/dist/core/elements/UIText/UIText.js +8 -8
- package/dist/core/index.d.ts +60 -11
- package/dist/core/index.js +22 -7
- package/dist/core/layers/UILayer/UILayer.d.ts +45 -5
- package/dist/core/layers/UILayer/UILayer.js +103 -10
- package/dist/core/layers/UIViewportLayer/UIViewportLayer.Internal.d.ts +27 -0
- package/dist/core/layers/{UIFullscreenLayer/UIFullscreenLayer.Internal.js → UIViewportLayer/UIViewportLayer.Internal.js} +1 -1
- package/dist/core/layers/UIViewportLayer/UIViewportLayer.d.ts +98 -0
- package/dist/core/layers/UIViewportLayer/UIViewportLayer.js +251 -0
- package/dist/core/miscellaneous/UIAffineMatrix3.d.ts +13 -0
- package/dist/core/miscellaneous/UIAffineMatrix3.js +13 -0
- package/dist/core/miscellaneous/area/UIArea.d.ts +10 -1
- package/dist/core/miscellaneous/area/UIArea.js +4 -1
- package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaCircle.js +0 -1
- package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaPolygon.js +0 -1
- package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaRectangle.js +0 -1
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +0 -1
- package/dist/core/miscellaneous/asserts.d.ts +23 -0
- package/dist/core/miscellaneous/asserts.js +44 -0
- package/dist/core/miscellaneous/canvas.js +7 -2
- package/dist/core/miscellaneous/color/UIColor.js +5 -2
- package/dist/core/miscellaneous/computeTransform.d.ts +12 -0
- package/dist/core/miscellaneous/computeTransform.js +20 -0
- package/dist/core/miscellaneous/context-monitor/UIContextMonitor.d.ts +1 -0
- package/dist/core/miscellaneous/context-monitor/UIContextMonitor.js +60 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +17 -3
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +88 -26
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.d.ts +9 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.js +29 -6
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +51 -11
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +2 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +47 -6
- package/dist/core/miscellaneous/generic-plane/shared.d.ts +15 -3
- package/dist/core/miscellaneous/generic-plane/shared.js +38 -7
- package/dist/core/miscellaneous/generic-plane/varyingPacking.d.ts +46 -0
- package/dist/core/miscellaneous/generic-plane/varyingPacking.js +170 -0
- package/dist/core/miscellaneous/mask/UIMask.Internal.d.ts +61 -0
- package/dist/core/miscellaneous/mask/UIMask.Internal.js +56 -0
- package/dist/core/miscellaneous/mask/UIMask.d.ts +84 -0
- package/dist/core/miscellaneous/mask/UIMask.js +265 -0
- package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.d.ts +50 -0
- package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.js +233 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +10 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +7 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +2 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +0 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +0 -1
- package/dist/core/miscellaneous/micro/UIMicro.Internal.d.ts +3 -0
- package/dist/core/miscellaneous/micro/UIMicro.Internal.js +1 -0
- package/dist/core/miscellaneous/micro/UIMicro.d.ts +18 -1
- package/dist/core/miscellaneous/micro/UIMicro.js +23 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.d.ts +19 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +16 -3
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +2 -2
- package/dist/core/miscellaneous/text-style/UITextStyle.js +2 -2
- package/dist/core/miscellaneous/texture/UITextureView.d.ts +6 -2
- package/dist/core/miscellaneous/texture/UITextureView.js +13 -9
- package/dist/core/miscellaneous/viewport/UIElementViewport.d.ts +31 -0
- package/dist/core/miscellaneous/viewport/UIElementViewport.js +54 -0
- package/dist/core/miscellaneous/viewport/UIViewport.d.ts +37 -0
- package/dist/core/miscellaneous/viewport/UIViewport.js +31 -0
- package/dist/core/miscellaneous/viewport/UIWindowViewport.d.ts +13 -0
- package/dist/core/miscellaneous/viewport/UIWindowViewport.js +25 -0
- package/dist/core/miscellaneous/webglCapabilities.js +61 -55
- package/dist/core/shaders/UIMask.d.ts +15 -0
- package/dist/core/shaders/UIMask.js +45 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +36 -5
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +23 -2
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +153 -15
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +3 -1
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +1 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +3 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +2 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +3 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +36 -16
- package/dist/debug/UIAspectDebug.js +4 -0
- package/dist/debug/UIHeightDebug.js +4 -0
- package/dist/debug/UIHorizontalDistanceDebug.js +5 -0
- package/dist/debug/UIHorizontalInterpolationDebug.js +5 -0
- package/dist/debug/UILayerDebug.d.ts +7 -0
- package/dist/debug/UILayerDebug.js +21 -0
- package/dist/debug/UIVerticalDistanceDebug.js +5 -0
- package/dist/debug/UIVerticalInterpolationDebug.js +5 -0
- package/dist/debug/UIWidthDebug.js +4 -0
- package/dist/debug/index.d.ts +2 -0
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +8 -1
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +0 -2
- package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +12 -2
- package/dist/particles/behaviorModules/UIBehaviorModule.js +2 -1
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +8 -1
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +13 -12
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +6 -6
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +4 -5
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +8 -1
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +8 -10
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +10 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +8 -7
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +8 -10
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +13 -4
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +12 -10
- package/dist/particles/elements/UIEmitter.Internal.d.ts +21 -1
- package/dist/particles/elements/UIEmitter.Internal.js +6 -0
- package/dist/particles/elements/UIEmitter.d.ts +20 -11
- package/dist/particles/elements/UIEmitter.js +100 -54
- package/dist/particles/index.d.ts +7 -1
- package/dist/particles/index.js +4 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +19 -4
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +117 -83
- package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +8 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.js +41 -4
- package/dist/particles/miscellaneous/miscellaneous.d.ts +34 -0
- package/dist/particles/miscellaneous/miscellaneous.js +72 -0
- package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +4 -0
- package/dist/particles/renderingModules/UIRenderingColorOverLife.js +2 -4
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +4 -0
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +2 -5
- package/dist/particles/renderingModules/UIRenderingModule.d.ts +11 -1
- package/dist/particles/renderingModules/UIRenderingModule.js +4 -1
- package/dist/particles/renderingModules/UIRenderingTexture.d.ts +4 -0
- package/dist/particles/renderingModules/UIRenderingTexture.js +2 -1
- package/dist/particles/shaders/UIRenderingColorOverLife.d.ts +1 -2
- package/dist/particles/shaders/UIRenderingColorOverLife.js +5 -3
- package/dist/particles/shaders/UIRenderingColorOverVelocity.d.ts +1 -9
- package/dist/particles/shaders/UIRenderingColorOverVelocity.js +6 -13
- package/dist/particles/spawnModules/UISpawnModule.d.ts +16 -1
- package/dist/particles/spawnModules/UISpawnModule.js +3 -1
- package/dist/particles/spawnModules/UISpawnOffset.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnOffset.js +0 -2
- package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +8 -1
- package/dist/particles/spawnModules/UISpawnRandomLifetime.js +5 -7
- package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomRotation.js +5 -5
- package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomScale.js +4 -5
- package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomTorque.js +5 -5
- package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomVelocity.js +6 -6
- package/dist/particles/spawnModules/UISpawnRectangle.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRectangle.js +6 -6
- package/package.json +13 -4
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +0 -21
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +0 -63
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +0 -144
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { Ferrsign1 } from "ferrsign";
|
|
2
|
-
import { MathUtils, Ray, Vector3 } from "three";
|
|
3
|
-
import { assertValidNumber } from "../../miscellaneous/asserts.js";
|
|
4
|
-
import { isUIModeInteractive } from "../../miscellaneous/UIMode.js";
|
|
5
|
-
import { UILayer } from "../UILayer/UILayer.js";
|
|
6
|
-
import { FULLSCREEN_LAYER_DEFAULT_RESIZE_POLICY } from "./UIFullscreenLayer.Internal.js";
|
|
7
|
-
/** Layer that automatically handles browser window resizing and input events */
|
|
8
|
-
export class UIFullscreenLayer extends UILayer {
|
|
9
|
-
constructor(options) {
|
|
10
|
-
const resizePolicy = options?.resizePolicy ?? FULLSCREEN_LAYER_DEFAULT_RESIZE_POLICY;
|
|
11
|
-
const scale = resizePolicy.calculateScale(window.innerWidth, window.innerHeight);
|
|
12
|
-
super({
|
|
13
|
-
width: window.innerWidth * scale,
|
|
14
|
-
height: window.innerHeight * scale,
|
|
15
|
-
...options,
|
|
16
|
-
});
|
|
17
|
-
this.resizePolicyDirty = false;
|
|
18
|
-
this.signalPointerPressedInternal = new Ferrsign1();
|
|
19
|
-
this.signalPointerMovedInternal = new Ferrsign1();
|
|
20
|
-
this.signalPointerReleasedInternal = new Ferrsign1();
|
|
21
|
-
this.onResize = () => {
|
|
22
|
-
const scale = this.resizePolicy.calculateScale(window.innerWidth, window.innerHeight);
|
|
23
|
-
this.resizePolicy.dirty = false;
|
|
24
|
-
this.resizePolicyDirty = false;
|
|
25
|
-
this.resizeInternal(window.innerWidth * scale, window.innerHeight * scale);
|
|
26
|
-
};
|
|
27
|
-
this.onPointerDown = (event) => {
|
|
28
|
-
this.handleWindowInput(event, "onPointerDown", this.signalPointerPressedInternal);
|
|
29
|
-
};
|
|
30
|
-
this.onPointerMove = (event) => {
|
|
31
|
-
this.handleWindowInput(event, "onPointerMove", this.signalPointerMovedInternal);
|
|
32
|
-
};
|
|
33
|
-
this.onPointerUp = (event) => {
|
|
34
|
-
this.handleWindowInput(event, "onPointerUp", this.signalPointerReleasedInternal);
|
|
35
|
-
};
|
|
36
|
-
this.resizePolicyInternal = resizePolicy;
|
|
37
|
-
window.addEventListener("resize", this.onResize);
|
|
38
|
-
window.addEventListener("pointerdown", this.onPointerDown);
|
|
39
|
-
window.addEventListener("pointermove", this.onPointerMove);
|
|
40
|
-
window.addEventListener("pointerup", this.onPointerUp);
|
|
41
|
-
}
|
|
42
|
-
/** Current resize policy */
|
|
43
|
-
get resizePolicy() {
|
|
44
|
-
return this.resizePolicyInternal;
|
|
45
|
-
}
|
|
46
|
-
/** Signal fired when pointer is pressed */
|
|
47
|
-
get signalPointerPressed() {
|
|
48
|
-
return this.signalPointerPressedInternal;
|
|
49
|
-
}
|
|
50
|
-
/** Signal fired when pointer is moved */
|
|
51
|
-
get signalPointerMoved() {
|
|
52
|
-
return this.signalPointerMovedInternal;
|
|
53
|
-
}
|
|
54
|
-
/** Signal fired when pointer is released */
|
|
55
|
-
get signalPointerReleased() {
|
|
56
|
-
return this.signalPointerReleasedInternal;
|
|
57
|
-
}
|
|
58
|
-
/** Updates resize policy */
|
|
59
|
-
set resizePolicy(value) {
|
|
60
|
-
if (this.resizePolicyInternal !== value) {
|
|
61
|
-
this.resizePolicyInternal = value;
|
|
62
|
-
this.resizePolicyDirty = true;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/** Removes event listeners and destroys the layer with its elements and constraints */
|
|
66
|
-
destroy() {
|
|
67
|
-
window.removeEventListener("resize", this.onResize);
|
|
68
|
-
window.removeEventListener("pointerdown", this.onPointerDown);
|
|
69
|
-
window.removeEventListener("pointermove", this.onPointerMove);
|
|
70
|
-
window.removeEventListener("pointerup", this.onPointerUp);
|
|
71
|
-
super.destroy();
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Renders layer and all visible elements
|
|
75
|
-
* @param renderer Three.js WebGL renderer
|
|
76
|
-
* @param deltaTime Time since last frame in seconds
|
|
77
|
-
*/
|
|
78
|
-
render(renderer, deltaTime) {
|
|
79
|
-
assertValidNumber(deltaTime, "UIFullscreenLayer.render.deltaTime");
|
|
80
|
-
if (this.destroyed) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
if (this.resizePolicy.dirty || this.resizePolicyDirty) {
|
|
84
|
-
this.onResize();
|
|
85
|
-
}
|
|
86
|
-
super.renderInternal(renderer, deltaTime);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Projects 3D world position to 2D layer coordinates
|
|
90
|
-
* @param position World position
|
|
91
|
-
* @param camera Three.js camera
|
|
92
|
-
* @param result Reusable vector instance
|
|
93
|
-
* @returns Layer coordinates
|
|
94
|
-
*/
|
|
95
|
-
projectWorldPosition(position, camera, result = new Vector3()) {
|
|
96
|
-
result.copy(position).project(camera);
|
|
97
|
-
result.x = MathUtils.mapLinear(result.x, -1, 1, this.x, this.width);
|
|
98
|
-
result.y = MathUtils.mapLinear(result.y, -1, 1, this.y, this.height);
|
|
99
|
-
return result;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Projects 2D layer coordinates to 3D world position
|
|
103
|
-
* @param position Layer coordinates
|
|
104
|
-
* @param camera Three.js camera
|
|
105
|
-
* @param z Depth coordinate
|
|
106
|
-
* @param result Reusable vector instance
|
|
107
|
-
* @returns World position
|
|
108
|
-
*/
|
|
109
|
-
projectLayerPosition(position, camera, z = -1, result = new Vector3()) {
|
|
110
|
-
return result
|
|
111
|
-
.set(MathUtils.mapLinear(position.x, this.x, this.width, -1, 1), MathUtils.mapLinear(position.y, this.y, this.height, -1, 1), z)
|
|
112
|
-
.unproject(camera);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Builds ray from layer position through camera
|
|
116
|
-
* @param position Layer coordinates
|
|
117
|
-
* @param camera Three.js camera
|
|
118
|
-
* @param result Reusable ray instance
|
|
119
|
-
* @returns Ray from near to far plane
|
|
120
|
-
*/
|
|
121
|
-
buildRay(position, camera, result = new Ray()) {
|
|
122
|
-
const near = new Vector3(MathUtils.mapLinear(position.x, this.x, this.width, -1, 1), MathUtils.mapLinear(position.y, this.y, this.height, -1, 1), -1).unproject(camera);
|
|
123
|
-
const far = new Vector3(MathUtils.mapLinear(position.x, this.x, this.width, -1, 1), MathUtils.mapLinear(position.y, this.y, this.height, -1, 1), 1).unproject(camera);
|
|
124
|
-
const direction = far.sub(near).normalize();
|
|
125
|
-
return result.set(near, direction);
|
|
126
|
-
}
|
|
127
|
-
handleWindowInput(event, pointerFunctionName, signal) {
|
|
128
|
-
const rect = event.target instanceof HTMLElement ? event.target.getBoundingClientRect() : null;
|
|
129
|
-
const x = rect ? event.clientX - rect.left : event.clientX;
|
|
130
|
-
const y = rect ? rect.bottom - event.clientY : window.innerHeight - event.clientY;
|
|
131
|
-
const scale = this.resizePolicy.calculateScale(window.innerWidth, window.innerHeight);
|
|
132
|
-
const scaledX = x * scale;
|
|
133
|
-
const scaledY = y * scale;
|
|
134
|
-
if (isUIModeInteractive(this.mode)) {
|
|
135
|
-
signal.emit({
|
|
136
|
-
x: scaledX,
|
|
137
|
-
y: scaledY,
|
|
138
|
-
identifier: event.pointerId,
|
|
139
|
-
layer: this,
|
|
140
|
-
});
|
|
141
|
-
this.inputWrapperInternal[pointerFunctionName](scaledX, scaledY, event.pointerId);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|