lythreeframe 1.1.4 → 1.1.5
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/bundle.cjs.js
CHANGED
|
@@ -3030,7 +3030,7 @@ class TransformGizmo extends Pawn {
|
|
|
3030
3030
|
this.targetMatrixMap = new Map();
|
|
3031
3031
|
this.onDraggingChangedEvent = (param) => { this.onDraggingChanged(param); };
|
|
3032
3032
|
this.onObjectChangeEvent = () => { this.onObjectChanged(); };
|
|
3033
|
-
|
|
3033
|
+
this.onChangeEvent = () => { this.onChange(); };
|
|
3034
3034
|
this.onUpdateFunction = null;
|
|
3035
3035
|
this.onDraggingFunction = null;
|
|
3036
3036
|
let canvas = controller.viewPort.canvas;
|
|
@@ -3047,13 +3047,13 @@ class TransformGizmo extends Pawn {
|
|
|
3047
3047
|
var _a;
|
|
3048
3048
|
(_a = this.controller.world.scene) === null || _a === void 0 ? void 0 : _a.add(this.helperObject);
|
|
3049
3049
|
this.control.attach(this.helperObject);
|
|
3050
|
-
|
|
3050
|
+
this.control.addEventListener('change', this.onChangeEvent);
|
|
3051
3051
|
this.control.addEventListener('dragging-changed', this.onDraggingChangedEvent);
|
|
3052
3052
|
this.control.addEventListener('objectChange', this.onObjectChangeEvent);
|
|
3053
3053
|
}
|
|
3054
3054
|
unpossess() {
|
|
3055
3055
|
var _a;
|
|
3056
|
-
|
|
3056
|
+
this.control.removeEventListener('change', this.onChangeEvent);
|
|
3057
3057
|
this.control.removeEventListener('dragging-changed', this.onDraggingChangedEvent);
|
|
3058
3058
|
this.control.removeEventListener('objectChange', this.onObjectChangeEvent);
|
|
3059
3059
|
this.control.detach();
|
|
@@ -3078,9 +3078,9 @@ class TransformGizmo extends Pawn {
|
|
|
3078
3078
|
this.targetMatrixMap.set(elem, TB_local);
|
|
3079
3079
|
});
|
|
3080
3080
|
}
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3081
|
+
onChange() {
|
|
3082
|
+
this.controller.viewPort.markRenderStateDirty();
|
|
3083
|
+
}
|
|
3084
3084
|
onDraggingChanged(event) {
|
|
3085
3085
|
if (this.primaryTarget) {
|
|
3086
3086
|
let tMatrix = this.primaryTarget.getMatrixInWorld();
|
|
@@ -3091,6 +3091,7 @@ class TransformGizmo extends Pawn {
|
|
|
3091
3091
|
}
|
|
3092
3092
|
}
|
|
3093
3093
|
onObjectChanged() {
|
|
3094
|
+
console.log("onObjectChanged");
|
|
3094
3095
|
if (this.primaryTarget) {
|
|
3095
3096
|
//const TA1 = this.primaryTarget.getMatrixInWorld();
|
|
3096
3097
|
this.helperObject.updateMatrixWorld(true);
|
|
@@ -3111,7 +3112,6 @@ class TransformGizmo extends Pawn {
|
|
|
3111
3112
|
if (this.onUpdateFunction) {
|
|
3112
3113
|
this.onUpdateFunction();
|
|
3113
3114
|
}
|
|
3114
|
-
this.controller.viewPort.markRenderStateDirty();
|
|
3115
3115
|
}
|
|
3116
3116
|
set enable(newEnable) {
|
|
3117
3117
|
this.control.enabled = newEnable;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -3028,7 +3028,7 @@ class TransformGizmo extends Pawn {
|
|
|
3028
3028
|
this.targetMatrixMap = new Map();
|
|
3029
3029
|
this.onDraggingChangedEvent = (param) => { this.onDraggingChanged(param); };
|
|
3030
3030
|
this.onObjectChangeEvent = () => { this.onObjectChanged(); };
|
|
3031
|
-
|
|
3031
|
+
this.onChangeEvent = () => { this.onChange(); };
|
|
3032
3032
|
this.onUpdateFunction = null;
|
|
3033
3033
|
this.onDraggingFunction = null;
|
|
3034
3034
|
let canvas = controller.viewPort.canvas;
|
|
@@ -3045,13 +3045,13 @@ class TransformGizmo extends Pawn {
|
|
|
3045
3045
|
var _a;
|
|
3046
3046
|
(_a = this.controller.world.scene) === null || _a === void 0 ? void 0 : _a.add(this.helperObject);
|
|
3047
3047
|
this.control.attach(this.helperObject);
|
|
3048
|
-
|
|
3048
|
+
this.control.addEventListener('change', this.onChangeEvent);
|
|
3049
3049
|
this.control.addEventListener('dragging-changed', this.onDraggingChangedEvent);
|
|
3050
3050
|
this.control.addEventListener('objectChange', this.onObjectChangeEvent);
|
|
3051
3051
|
}
|
|
3052
3052
|
unpossess() {
|
|
3053
3053
|
var _a;
|
|
3054
|
-
|
|
3054
|
+
this.control.removeEventListener('change', this.onChangeEvent);
|
|
3055
3055
|
this.control.removeEventListener('dragging-changed', this.onDraggingChangedEvent);
|
|
3056
3056
|
this.control.removeEventListener('objectChange', this.onObjectChangeEvent);
|
|
3057
3057
|
this.control.detach();
|
|
@@ -3076,9 +3076,9 @@ class TransformGizmo extends Pawn {
|
|
|
3076
3076
|
this.targetMatrixMap.set(elem, TB_local);
|
|
3077
3077
|
});
|
|
3078
3078
|
}
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3079
|
+
onChange() {
|
|
3080
|
+
this.controller.viewPort.markRenderStateDirty();
|
|
3081
|
+
}
|
|
3082
3082
|
onDraggingChanged(event) {
|
|
3083
3083
|
if (this.primaryTarget) {
|
|
3084
3084
|
let tMatrix = this.primaryTarget.getMatrixInWorld();
|
|
@@ -3089,6 +3089,7 @@ class TransformGizmo extends Pawn {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
}
|
|
3091
3091
|
onObjectChanged() {
|
|
3092
|
+
console.log("onObjectChanged");
|
|
3092
3093
|
if (this.primaryTarget) {
|
|
3093
3094
|
//const TA1 = this.primaryTarget.getMatrixInWorld();
|
|
3094
3095
|
this.helperObject.updateMatrixWorld(true);
|
|
@@ -3109,7 +3110,6 @@ class TransformGizmo extends Pawn {
|
|
|
3109
3110
|
if (this.onUpdateFunction) {
|
|
3110
3111
|
this.onUpdateFunction();
|
|
3111
3112
|
}
|
|
3112
|
-
this.controller.viewPort.markRenderStateDirty();
|
|
3113
3113
|
}
|
|
3114
3114
|
set enable(newEnable) {
|
|
3115
3115
|
this.control.enabled = newEnable;
|
|
@@ -24,12 +24,14 @@ export declare class TransformGizmo extends Pawn {
|
|
|
24
24
|
value: unknown;
|
|
25
25
|
}) => void;
|
|
26
26
|
protected onObjectChangeEvent: () => void;
|
|
27
|
+
protected onChangeEvent: () => void;
|
|
27
28
|
protected onUpdateFunction: (() => void) | null;
|
|
28
29
|
protected onDraggingFunction: ((event: any) => void) | null;
|
|
29
30
|
constructor(controller: Controller);
|
|
30
31
|
possess(): void;
|
|
31
32
|
unpossess(): void;
|
|
32
33
|
refresh(): void;
|
|
34
|
+
protected onChange(): void;
|
|
33
35
|
protected onDraggingChanged(event: {
|
|
34
36
|
value: any;
|
|
35
37
|
}): void;
|