@vived/app 4.14.0 → 4.14.1
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/lib/Components/Babylon/Mocks/MockBabylonRenderingUC.d.ts +2 -3
- package/lib/Components/Babylon/Mocks/MockBabylonRenderingUC.js +3 -3
- package/lib/Components/Babylon/Mocks/MockPixelToSceneRayUC.d.ts +1 -1
- package/lib/Components/Babylon/Mocks/MockPixelToSceneRayUC.js +3 -3
- package/lib/Components/Babylon/Mocks/MockSceneRayPickUC.d.ts +1 -1
- package/lib/Components/Babylon/Mocks/MockSceneRayPickUC.js +3 -3
- package/lib/Components/Babylon/UC/BabylonRenderingUC.d.ts +0 -9
- package/lib/Components/Babylon/UC/BabylonRenderingUC.js +1 -14
- package/lib/Components/Babylon/UC/PixelToSceneRayUC.d.ts +0 -7
- package/lib/Components/Babylon/UC/PixelToSceneRayUC.js +1 -12
- package/lib/Components/Babylon/UC/ScenePixelPickUC.d.ts +0 -7
- package/lib/Components/Babylon/UC/ScenePixelPickUC.js +1 -12
- package/lib/Components/Babylon/UC/SceneRayPickUC.d.ts +0 -7
- package/lib/Components/Babylon/UC/SceneRayPickUC.js +1 -12
- package/lib/Components/Babylon/index.d.ts +1 -0
- package/lib/Components/Babylon/index.js +1 -0
- package/lib/Components/Transform3D/Mocks/MockBumpTransformScaleAboutPixelPoint.d.ts +2 -0
- package/lib/Components/Transform3D/Mocks/MockPinchTransformUC.d.ts +2 -0
- package/lib/Components/Transform3D/Mocks/MockRayPanScaleTransformUC.d.ts +2 -0
- package/lib/Components/Transform3D/Mocks/MockRayScaleTransform.d.ts +2 -0
- package/lib/Components/Transform3D/UC/BumpTransformScaleAboutPixelPoint.d.ts +2 -1
- package/lib/Components/Transform3D/UC/BumpTransformScaleAboutPixelPoint.js +9 -3
- package/lib/Components/Transform3D/UC/PinchTransform.d.ts +2 -1
- package/lib/Components/Transform3D/UC/PinchTransform.js +11 -6
- package/lib/Components/Transform3D/UC/RayPanScaleTransform.d.ts +2 -1
- package/lib/Components/Transform3D/UC/RayPanScaleTransform.js +10 -5
- package/lib/Components/Transform3D/UC/ScaleTransform.d.ts +2 -1
- package/lib/Components/Transform3D/UC/ScaleTransform.js +7 -3
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="jest" />
|
|
2
|
-
import { AppObjectRepo } from "../../../AppObject";
|
|
3
|
-
import {
|
|
4
|
-
import { BabylonRenderingUC } from "../UC/BabylonRenderingUC";
|
|
2
|
+
import { AppObject, AppObjectRepo } from "../../../AppObject";
|
|
3
|
+
import { BabylonRenderingUC } from "../UC";
|
|
5
4
|
export declare class MockBabylonRenderingUC extends BabylonRenderingUC {
|
|
6
5
|
submitRenderCanvas: jest.Mock<any, any>;
|
|
7
6
|
clearRenderCanvas: jest.Mock<any, any>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeMockBabylonRenderingUC = exports.MockBabylonRenderingUC = void 0;
|
|
4
|
-
const
|
|
5
|
-
class MockBabylonRenderingUC extends
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockBabylonRenderingUC extends UC_1.BabylonRenderingUC {
|
|
6
6
|
constructor(appObject) {
|
|
7
|
-
super(appObject,
|
|
7
|
+
super(appObject, UC_1.BabylonRenderingUC.type);
|
|
8
8
|
this.submitRenderCanvas = jest.fn();
|
|
9
9
|
this.clearRenderCanvas = jest.fn();
|
|
10
10
|
this.resize = jest.fn();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="jest" />
|
|
2
2
|
import { AppObject, AppObjectRepo } from "../../../AppObject";
|
|
3
|
-
import { PixelToSceneRayUC } from "../UC
|
|
3
|
+
import { PixelToSceneRayUC } from "../UC";
|
|
4
4
|
export declare class MockPixelToSceneRayUC extends PixelToSceneRayUC {
|
|
5
5
|
pixelToSceneRay: jest.Mock<any, any>;
|
|
6
6
|
constructor(appObject: AppObject);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeMockPixelToSceneRayUC = exports.MockPixelToSceneRayUC = void 0;
|
|
4
|
-
const
|
|
5
|
-
class MockPixelToSceneRayUC extends
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockPixelToSceneRayUC extends UC_1.PixelToSceneRayUC {
|
|
6
6
|
constructor(appObject) {
|
|
7
|
-
super(appObject,
|
|
7
|
+
super(appObject, UC_1.PixelToSceneRayUC.type);
|
|
8
8
|
this.pixelToSceneRay = jest.fn();
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="jest" />
|
|
2
2
|
import { AppObject, AppObjectRepo } from "../../../AppObject";
|
|
3
|
-
import { SceneRayPickUC } from "../UC
|
|
3
|
+
import { SceneRayPickUC } from "../UC";
|
|
4
4
|
export declare class MockSceneRayPickUC extends SceneRayPickUC {
|
|
5
5
|
sceneRayPick: jest.Mock<any, any>;
|
|
6
6
|
constructor(appObject: AppObject);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeMockSceneRayPickUC = exports.MockSceneRayPickUC = void 0;
|
|
4
|
-
const
|
|
5
|
-
class MockSceneRayPickUC extends
|
|
4
|
+
const UC_1 = require("../UC");
|
|
5
|
+
class MockSceneRayPickUC extends UC_1.SceneRayPickUC {
|
|
6
6
|
constructor(appObject) {
|
|
7
|
-
super(appObject,
|
|
7
|
+
super(appObject, UC_1.SceneRayPickUC.type);
|
|
8
8
|
this.sceneRayPick = jest.fn();
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
import { AppObject } from "../../../AppObject";
|
|
3
1
|
import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
|
|
4
2
|
import { AppObjectUC } from "../../../AppObject/AppObjectUC";
|
|
5
3
|
export declare abstract class BabylonRenderingUC extends AppObjectUC {
|
|
@@ -9,10 +7,3 @@ export declare abstract class BabylonRenderingUC extends AppObjectUC {
|
|
|
9
7
|
abstract clearRenderCanvas: () => void;
|
|
10
8
|
abstract resize: () => void;
|
|
11
9
|
}
|
|
12
|
-
export declare class MockBabylonRenderingUC extends BabylonRenderingUC {
|
|
13
|
-
submitRenderCanvas: jest.Mock<any, any>;
|
|
14
|
-
clearRenderCanvas: jest.Mock<any, any>;
|
|
15
|
-
resize: jest.Mock<any, any>;
|
|
16
|
-
constructor(appObject: AppObject);
|
|
17
|
-
}
|
|
18
|
-
export declare function makeMockBabylonRenderingUC(appObjects: AppObjectRepo): MockBabylonRenderingUC;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BabylonRenderingUC = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
5
|
const AppObjectUC_1 = require("../../../AppObject/AppObjectUC");
|
|
6
6
|
class BabylonRenderingUC extends AppObjectUC_1.AppObjectUC {
|
|
@@ -8,16 +8,3 @@ class BabylonRenderingUC extends AppObjectUC_1.AppObjectUC {
|
|
|
8
8
|
exports.BabylonRenderingUC = BabylonRenderingUC;
|
|
9
9
|
BabylonRenderingUC.type = "BabylonRenderingUC";
|
|
10
10
|
BabylonRenderingUC.get = (appObjects) => AppObject_1.getSingletonComponent(BabylonRenderingUC.type, appObjects);
|
|
11
|
-
class MockBabylonRenderingUC extends BabylonRenderingUC {
|
|
12
|
-
constructor(appObject) {
|
|
13
|
-
super(appObject, BabylonRenderingUC.type);
|
|
14
|
-
this.submitRenderCanvas = jest.fn();
|
|
15
|
-
this.clearRenderCanvas = jest.fn();
|
|
16
|
-
this.resize = jest.fn();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.MockBabylonRenderingUC = MockBabylonRenderingUC;
|
|
20
|
-
function makeMockBabylonRenderingUC(appObjects) {
|
|
21
|
-
return new MockBabylonRenderingUC(appObjects.getOrCreate("Babylon"));
|
|
22
|
-
}
|
|
23
|
-
exports.makeMockBabylonRenderingUC = makeMockBabylonRenderingUC;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
import { AppObject } from "../../../AppObject";
|
|
3
1
|
import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
|
|
4
2
|
import { AppObjectUC } from "../../../AppObject/AppObjectUC";
|
|
5
3
|
import { ParametricLine, Vector2 } from "../../../ValueObjects";
|
|
@@ -9,8 +7,3 @@ export declare abstract class PixelToSceneRayUC extends AppObjectUC {
|
|
|
9
7
|
abstract pixelToSceneRay: (pixelPos: Vector2) => ParametricLine;
|
|
10
8
|
}
|
|
11
9
|
export declare function pixelToSceneRay(pixelPos: Vector2, appObjects: AppObjectRepo): ParametricLine;
|
|
12
|
-
export declare class MockPixelToSceneRayUC extends PixelToSceneRayUC {
|
|
13
|
-
pixelToSceneRay: jest.Mock<any, any>;
|
|
14
|
-
constructor(appObject: AppObject);
|
|
15
|
-
}
|
|
16
|
-
export declare function makeMockPixelToSceneRayUC(appObjects: AppObjectRepo): MockPixelToSceneRayUC;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.pixelToSceneRay = exports.PixelToSceneRayUC = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
5
|
const AppObjectUC_1 = require("../../../AppObject/AppObjectUC");
|
|
6
6
|
const ValueObjects_1 = require("../../../ValueObjects");
|
|
@@ -18,14 +18,3 @@ function pixelToSceneRay(pixelPos, appObjects) {
|
|
|
18
18
|
return uc.pixelToSceneRay(pixelPos);
|
|
19
19
|
}
|
|
20
20
|
exports.pixelToSceneRay = pixelToSceneRay;
|
|
21
|
-
class MockPixelToSceneRayUC extends PixelToSceneRayUC {
|
|
22
|
-
constructor(appObject) {
|
|
23
|
-
super(appObject, PixelToSceneRayUC.type);
|
|
24
|
-
this.pixelToSceneRay = jest.fn();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.MockPixelToSceneRayUC = MockPixelToSceneRayUC;
|
|
28
|
-
function makeMockPixelToSceneRayUC(appObjects) {
|
|
29
|
-
return new MockPixelToSceneRayUC(appObjects.getOrCreate("Babylon"));
|
|
30
|
-
}
|
|
31
|
-
exports.makeMockPixelToSceneRayUC = makeMockPixelToSceneRayUC;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
import { AppObject } from "../../../AppObject";
|
|
3
1
|
import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
|
|
4
2
|
import { AppObjectUC } from "../../../AppObject/AppObjectUC";
|
|
5
3
|
import { ParametricLine, Vector2, Vector3 } from "../../../ValueObjects";
|
|
@@ -17,8 +15,3 @@ export declare abstract class ScenePixelPickUC extends AppObjectUC {
|
|
|
17
15
|
abstract scenePixelPick: (pixelPos: Vector2) => ScenePixelPick | undefined;
|
|
18
16
|
}
|
|
19
17
|
export declare function scenePixelPick(pixelPos: Vector2, appObjects: AppObjectRepo): ScenePixelPick | undefined;
|
|
20
|
-
export declare class MockScenePixelPickUC extends ScenePixelPickUC {
|
|
21
|
-
scenePixelPick: jest.Mock<any, any>;
|
|
22
|
-
constructor(appObject: AppObject);
|
|
23
|
-
}
|
|
24
|
-
export declare function makeMockScenePixelPickUC(appObjects: AppObjectRepo): MockScenePixelPickUC;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.scenePixelPick = exports.ScenePixelPickUC = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
5
|
const AppObjectUC_1 = require("../../../AppObject/AppObjectUC");
|
|
6
6
|
class ScenePixelPickUC extends AppObjectUC_1.AppObjectUC {
|
|
@@ -17,14 +17,3 @@ function scenePixelPick(pixelPos, appObjects) {
|
|
|
17
17
|
return uc.scenePixelPick(pixelPos);
|
|
18
18
|
}
|
|
19
19
|
exports.scenePixelPick = scenePixelPick;
|
|
20
|
-
class MockScenePixelPickUC extends ScenePixelPickUC {
|
|
21
|
-
constructor(appObject) {
|
|
22
|
-
super(appObject, ScenePixelPickUC.type);
|
|
23
|
-
this.scenePixelPick = jest.fn();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.MockScenePixelPickUC = MockScenePixelPickUC;
|
|
27
|
-
function makeMockScenePixelPickUC(appObjects) {
|
|
28
|
-
return new MockScenePixelPickUC(appObjects.getOrCreate("Babylon"));
|
|
29
|
-
}
|
|
30
|
-
exports.makeMockScenePixelPickUC = makeMockScenePixelPickUC;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
import { AppObject } from "../../../AppObject";
|
|
3
1
|
import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
|
|
4
2
|
import { AppObjectUC } from "../../../AppObject/AppObjectUC";
|
|
5
3
|
import { ParametricLine, Vector3 } from "../../../ValueObjects";
|
|
@@ -16,8 +14,3 @@ export declare abstract class SceneRayPickUC extends AppObjectUC {
|
|
|
16
14
|
abstract sceneRayPick: (ray: ParametricLine) => SceneRayPick | undefined;
|
|
17
15
|
}
|
|
18
16
|
export declare function sceneRayPick(ray: ParametricLine, appObjects: AppObjectRepo): SceneRayPick | undefined;
|
|
19
|
-
export declare class MockSceneRayPickUC extends SceneRayPickUC {
|
|
20
|
-
sceneRayPick: jest.Mock<any, any>;
|
|
21
|
-
constructor(appObject: AppObject);
|
|
22
|
-
}
|
|
23
|
-
export declare function makeMockSceneRayPickUC(appObjects: AppObjectRepo): MockSceneRayPickUC;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.sceneRayPick = exports.SceneRayPickUC = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
5
|
const AppObjectUC_1 = require("../../../AppObject/AppObjectUC");
|
|
6
6
|
class SceneRayPickUC extends AppObjectUC_1.AppObjectUC {
|
|
@@ -17,14 +17,3 @@ function sceneRayPick(ray, appObjects) {
|
|
|
17
17
|
return uc.sceneRayPick(ray);
|
|
18
18
|
}
|
|
19
19
|
exports.sceneRayPick = sceneRayPick;
|
|
20
|
-
class MockSceneRayPickUC extends SceneRayPickUC {
|
|
21
|
-
constructor(appObject) {
|
|
22
|
-
super(appObject, SceneRayPickUC.type);
|
|
23
|
-
this.sceneRayPick = jest.fn();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.MockSceneRayPickUC = MockSceneRayPickUC;
|
|
27
|
-
function makeMockSceneRayPickUC(appObjects) {
|
|
28
|
-
return new MockSceneRayPickUC(appObjects.getOrCreate("Babylon"));
|
|
29
|
-
}
|
|
30
|
-
exports.makeMockSceneRayPickUC = makeMockSceneRayPickUC;
|
|
@@ -11,5 +11,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./Entities"), exports);
|
|
14
|
+
__exportStar(require("./Mocks"), exports);
|
|
14
15
|
__exportStar(require("./UC"), exports);
|
|
15
16
|
__exportStar(require("./PM"), exports);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="jest" />
|
|
2
2
|
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { ParametricPlane } from "../../../ValueObjects";
|
|
3
4
|
import { BumpTransformScaleAboutPixelPointUC } from "../UC";
|
|
4
5
|
export declare class MockBumpTransformScaleAboutPixelPoint extends BumpTransformScaleAboutPixelPointUC {
|
|
5
6
|
enabled: boolean;
|
|
6
7
|
minScale?: number | undefined;
|
|
7
8
|
maxScale?: number | undefined;
|
|
9
|
+
pickPlane?: ParametricPlane | undefined;
|
|
8
10
|
sensitivity: number;
|
|
9
11
|
allow: jest.Mock<any, any>;
|
|
10
12
|
bump: jest.Mock<any, any>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/// <reference types="jest" />
|
|
2
2
|
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { ParametricPlane } from "../../../ValueObjects";
|
|
3
4
|
import { PinchTransformUC } from "../UC";
|
|
4
5
|
export declare class MockPinchTransformUC extends PinchTransformUC {
|
|
5
6
|
enabled: boolean;
|
|
6
7
|
sensitivity: number;
|
|
7
8
|
minScale?: number | undefined;
|
|
8
9
|
maxScale?: number | undefined;
|
|
10
|
+
pickPlane?: ParametricPlane | undefined;
|
|
9
11
|
doPinch: jest.Mock<any, any>;
|
|
10
12
|
initializePinch: jest.Mock<any, any>;
|
|
11
13
|
finishPinch: jest.Mock<any, any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="jest" />
|
|
2
2
|
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { ParametricPlane } from "../../../ValueObjects";
|
|
3
4
|
import { RayPanScaleTransformUC } from "../UC";
|
|
4
5
|
export declare class MockRayPanScaleTransformUC extends RayPanScaleTransformUC {
|
|
5
6
|
enabled: boolean;
|
|
@@ -10,6 +11,7 @@ export declare class MockRayPanScaleTransformUC extends RayPanScaleTransformUC {
|
|
|
10
11
|
maxX?: number | undefined;
|
|
11
12
|
minY?: number | undefined;
|
|
12
13
|
maxY?: number | undefined;
|
|
14
|
+
pickPlane?: ParametricPlane | undefined;
|
|
13
15
|
update: jest.Mock<any, any>;
|
|
14
16
|
initialize: jest.Mock<any, any>;
|
|
15
17
|
finish: jest.Mock<any, any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="jest" />
|
|
2
2
|
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { ParametricPlane } from "../../../ValueObjects";
|
|
3
4
|
import { ScaleTransformUC } from "../UC";
|
|
4
5
|
export declare class MockRayScaleTransform extends ScaleTransformUC {
|
|
5
6
|
enabled: boolean;
|
|
@@ -7,6 +8,7 @@ export declare class MockRayScaleTransform extends ScaleTransformUC {
|
|
|
7
8
|
raySensitivity: number;
|
|
8
9
|
minScale?: number | undefined;
|
|
9
10
|
maxScale?: number | undefined;
|
|
11
|
+
pickPlane?: ParametricPlane | undefined;
|
|
10
12
|
updateRay: jest.Mock<any, any>;
|
|
11
13
|
initializeRay: jest.Mock<any, any>;
|
|
12
14
|
finish: jest.Mock<any, any>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AppObject, AppObjectUC } from "../../../AppObject";
|
|
2
|
-
import { Vector2 } from "../../../ValueObjects";
|
|
2
|
+
import { ParametricPlane, Vector2 } from "../../../ValueObjects";
|
|
3
3
|
export declare abstract class BumpTransformScaleAboutPixelPointUC extends AppObjectUC {
|
|
4
4
|
static readonly type = "BumpTransformScaleAboutPixelPointUC";
|
|
5
5
|
abstract sensitivity: number;
|
|
6
6
|
abstract minScale?: number | undefined;
|
|
7
7
|
abstract maxScale?: number | undefined;
|
|
8
|
+
abstract pickPlane?: ParametricPlane;
|
|
8
9
|
abstract enabled: boolean;
|
|
9
10
|
abstract allow(): boolean;
|
|
10
11
|
abstract bump(direction: "IN" | "OUT", pixelPosition: Vector2): void;
|
|
@@ -23,7 +23,7 @@ class BumpTransformScaleAboutPixelPointUCImp extends BumpTransformScaleAboutPixe
|
|
|
23
23
|
return true;
|
|
24
24
|
};
|
|
25
25
|
this.bump = (direction, pixelPosition) => {
|
|
26
|
-
var _a;
|
|
26
|
+
var _a, _b, _c;
|
|
27
27
|
if (!this.enabled)
|
|
28
28
|
return;
|
|
29
29
|
if (!this.transform)
|
|
@@ -36,8 +36,14 @@ class BumpTransformScaleAboutPixelPointUCImp extends BumpTransformScaleAboutPixe
|
|
|
36
36
|
}
|
|
37
37
|
const currentScale = this.transform.worldScale.x;
|
|
38
38
|
const scaleDelta = bumpDirection * this.sensitivity * currentScale;
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
let pickPoint = ValueObjects_1.Vector3.Zero();
|
|
40
|
+
if (this.pickPlane) {
|
|
41
|
+
const pickRay = Babylon_1.pixelToSceneRay(pixelPosition, this.appObjects);
|
|
42
|
+
pickPoint = (_a = this.pickPlane.intersectLine(pickRay)) !== null && _a !== void 0 ? _a : ValueObjects_1.Vector3.Zero();
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
pickPoint = (_c = (_b = Babylon_1.scenePixelPick(pixelPosition, this.appObjects)) === null || _b === void 0 ? void 0 : _b.worldPickPoint) !== null && _c !== void 0 ? _c : ValueObjects_1.Vector3.Zero();
|
|
46
|
+
}
|
|
41
47
|
this.bumpScaleAboutPoint(scaleDelta, pickPoint);
|
|
42
48
|
Dispatcher_1.dispatchStateChange(this.appObjects);
|
|
43
49
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AppObject, AppObjectUC } from "../../../AppObject";
|
|
2
|
-
import { Vector2 } from "../../../ValueObjects";
|
|
2
|
+
import { ParametricPlane, Vector2 } from "../../../ValueObjects";
|
|
3
3
|
export declare abstract class PinchTransformUC extends AppObjectUC {
|
|
4
4
|
static readonly type = "PinchTransformUC";
|
|
5
5
|
abstract sensitivity: number;
|
|
6
6
|
abstract enabled: boolean;
|
|
7
7
|
abstract minScale?: number;
|
|
8
8
|
abstract maxScale?: number;
|
|
9
|
+
abstract pickPlane?: ParametricPlane;
|
|
9
10
|
abstract doPinch: (touchPos1: Vector2, touchPos2: Vector2) => void;
|
|
10
11
|
abstract initializePinch: (touchPos1: Vector2, touchPos2: Vector2) => void;
|
|
11
12
|
abstract finishPinch: () => void;
|
|
@@ -20,7 +20,7 @@ class PinchTransformUCImp extends PinchTransformUC {
|
|
|
20
20
|
this.sensitivity = 0.01;
|
|
21
21
|
this.enabled = true;
|
|
22
22
|
this.previousDistanceBetweenTouches = 0;
|
|
23
|
-
this.
|
|
23
|
+
this._panPlane = ValueObjects_1.ParametricPlane.XY();
|
|
24
24
|
this.pickOffset = ValueObjects_1.Vector3.Zero();
|
|
25
25
|
this.initialScale = 0;
|
|
26
26
|
this.initializePinch = (touchPos1, touchPos2) => {
|
|
@@ -30,11 +30,16 @@ class PinchTransformUCImp extends PinchTransformUC {
|
|
|
30
30
|
this.previousDistanceBetweenTouches = this.getTouchDistance(touchPos1, touchPos2);
|
|
31
31
|
const touchCenter = this.getTouchCenter(touchPos1, touchPos2);
|
|
32
32
|
const scenePick = Babylon_1.scenePixelPick(touchCenter, this.appObjects);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
if (this.pickPlane) {
|
|
34
|
+
this._panPlane = this.pickPlane;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
const pickPoint = (_a = scenePick === null || scenePick === void 0 ? void 0 : scenePick.worldPickPoint) !== null && _a !== void 0 ? _a : ValueObjects_1.Vector3.Zero();
|
|
38
|
+
const pickPlaneDirection = ValueObjects_1.Vector3.Backward();
|
|
39
|
+
this._panPlane = ValueObjects_1.ParametricPlane.FromPointNormal(pickPoint, pickPlaneDirection);
|
|
40
|
+
}
|
|
36
41
|
const pickRay = Babylon_1.pixelToSceneRay(touchCenter, this.appObjects);
|
|
37
|
-
const planePick = (_b = this.
|
|
42
|
+
const planePick = (_b = this._panPlane.intersectLine(pickRay)) !== null && _b !== void 0 ? _b : ValueObjects_1.Vector3.Zero();
|
|
38
43
|
this.pickOffset = this.transform.worldPointToLocal(planePick);
|
|
39
44
|
this.initialScale = this.transform.worldScale.x;
|
|
40
45
|
};
|
|
@@ -58,7 +63,7 @@ class PinchTransformUCImp extends PinchTransformUC {
|
|
|
58
63
|
this.transform.worldScale = new ValueObjects_1.Vector3(newScale, newScale, newScale);
|
|
59
64
|
const touchCenter = this.getTouchCenter(touchPos1, touchPos2);
|
|
60
65
|
const pickRay = Babylon_1.pixelToSceneRay(touchCenter, this.appObjects);
|
|
61
|
-
const planePick = (_a = this.
|
|
66
|
+
const planePick = (_a = this._panPlane.intersectLine(pickRay)) !== null && _a !== void 0 ? _a : ValueObjects_1.Vector3.Zero();
|
|
62
67
|
const globalOffset = this.transform.localPointToWorld(this.pickOffset);
|
|
63
68
|
const delta = ValueObjects_1.Vector3.Subtract(planePick, globalOffset);
|
|
64
69
|
const currentWorldPos = this.transform.worldPosition;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppObject, AppObjectUC } from "../../../AppObject";
|
|
2
|
-
import { ParametricLine } from "../../../ValueObjects";
|
|
2
|
+
import { ParametricLine, ParametricPlane } from "../../../ValueObjects";
|
|
3
3
|
export declare abstract class RayPanScaleTransformUC extends AppObjectUC {
|
|
4
4
|
static readonly type = "RayPanScaleTransformUC";
|
|
5
5
|
abstract sensitivity: number;
|
|
@@ -10,6 +10,7 @@ export declare abstract class RayPanScaleTransformUC extends AppObjectUC {
|
|
|
10
10
|
abstract maxX?: number;
|
|
11
11
|
abstract minY?: number;
|
|
12
12
|
abstract maxY?: number;
|
|
13
|
+
abstract pickPlane?: ParametricPlane;
|
|
13
14
|
abstract update: (ray: ParametricLine) => void;
|
|
14
15
|
abstract initialize: (ray: ParametricLine) => void;
|
|
15
16
|
abstract finish: () => void;
|
|
@@ -22,16 +22,21 @@ class RayPanScaleTransformUCImp extends RayPanScaleTransformUC {
|
|
|
22
22
|
this.allowUpdate = false;
|
|
23
23
|
this.initialScale = 1;
|
|
24
24
|
this.pickOffset = ValueObjects_1.Vector3.Zero();
|
|
25
|
-
this.
|
|
25
|
+
this._panPlane = ValueObjects_1.ParametricPlane.XY();
|
|
26
26
|
this.lastRayLength = 0;
|
|
27
27
|
this.initialize = (ray) => {
|
|
28
28
|
var _a, _b;
|
|
29
29
|
this.allowUpdate = false;
|
|
30
30
|
if (!this.transform)
|
|
31
31
|
return;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
if (this.pickPlane) {
|
|
33
|
+
this._panPlane = this.pickPlane;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const pick = Babylon_1.sceneRayPick(ray, this.appObjects);
|
|
37
|
+
this._panPlane = ValueObjects_1.ParametricPlane.FromPointNormal((_a = pick === null || pick === void 0 ? void 0 : pick.worldPickPoint) !== null && _a !== void 0 ? _a : ValueObjects_1.Vector3.Zero(), ValueObjects_1.Vector3.Backward());
|
|
38
|
+
}
|
|
39
|
+
const pickPoint = (_b = this._panPlane.intersectLine(ray)) !== null && _b !== void 0 ? _b : ValueObjects_1.Vector3.Zero();
|
|
35
40
|
this.lastRayLength = ValueObjects_1.ParametricLine.GetDistanceToPoint(ray, pickPoint);
|
|
36
41
|
this.pickOffset = this.transform.worldPointToLocal(pickPoint);
|
|
37
42
|
this.initialScale = this.transform.worldScale.x;
|
|
@@ -45,7 +50,7 @@ class RayPanScaleTransformUCImp extends RayPanScaleTransformUC {
|
|
|
45
50
|
return;
|
|
46
51
|
if (!this.transform)
|
|
47
52
|
return;
|
|
48
|
-
const pick = (_a = this.
|
|
53
|
+
const pick = (_a = this._panPlane.intersectLine(ray)) !== null && _a !== void 0 ? _a : ValueObjects_1.Vector3.Zero();
|
|
49
54
|
this.updateScale(ray, pick);
|
|
50
55
|
this.updatePosition(pick);
|
|
51
56
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppObject, AppObjectUC } from "../../../AppObject";
|
|
2
|
-
import { ParametricLine, Vector2 } from "../../../ValueObjects";
|
|
2
|
+
import { ParametricLine, ParametricPlane, Vector2 } from "../../../ValueObjects";
|
|
3
3
|
export declare abstract class ScaleTransformUC extends AppObjectUC {
|
|
4
4
|
static readonly type = "ScaleTransformUC";
|
|
5
5
|
abstract raySensitivity: number;
|
|
@@ -7,6 +7,7 @@ export declare abstract class ScaleTransformUC extends AppObjectUC {
|
|
|
7
7
|
abstract enabled: boolean;
|
|
8
8
|
abstract minScale?: number;
|
|
9
9
|
abstract maxScale?: number;
|
|
10
|
+
abstract pickPlane?: ParametricPlane;
|
|
10
11
|
abstract initializeRay: (ray: ParametricLine) => void;
|
|
11
12
|
abstract updateRay: (ray: ParametricLine) => void;
|
|
12
13
|
abstract initializePixel: (pixel: Vector2) => void;
|
|
@@ -92,12 +92,16 @@ class ScaleTransformUCImp extends ScaleTransformUC {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
doInitialize(ray) {
|
|
95
|
-
var _a;
|
|
95
|
+
var _a, _b, _c;
|
|
96
96
|
this.isScaling = false;
|
|
97
97
|
if (!this.transform)
|
|
98
98
|
return;
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
if (this.pickPlane) {
|
|
100
|
+
this.pickPoint = (_a = this.pickPlane.intersectLine(ray)) !== null && _a !== void 0 ? _a : ValueObjects_1.Vector3.Zero();
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.pickPoint = (_c = (_b = Babylon_1.sceneRayPick(ray, this.appObjects)) === null || _b === void 0 ? void 0 : _b.worldPickPoint) !== null && _c !== void 0 ? _c : ValueObjects_1.Vector3.Zero();
|
|
104
|
+
}
|
|
101
105
|
this.initialScale = this.transform.worldScale.x;
|
|
102
106
|
this.isScaling = true;
|
|
103
107
|
}
|