lythreeframe 1.0.51 → 1.1.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/dist/bundle.cjs.js
CHANGED
|
@@ -568,7 +568,7 @@ class SceneComponent extends Component {
|
|
|
568
568
|
throw Error("newComponent threeObject is invalid");
|
|
569
569
|
}
|
|
570
570
|
newComponent.parentActor = this.parentActor;
|
|
571
|
-
if (attachmentRule
|
|
571
|
+
if (attachmentRule === exports.AttachmentRules.KeepWorld) {
|
|
572
572
|
let worldMatrix = newComponent.getWorldMatrix();
|
|
573
573
|
this.threeObject.add(newComponent.threeObject);
|
|
574
574
|
newComponent.setWorldMatrix(worldMatrix);
|
|
@@ -1721,6 +1721,17 @@ class Viewport {
|
|
|
1721
1721
|
this.markRenderStateDirty();
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
|
+
setOutlineObjects(objects) {
|
|
1725
|
+
this.outlineObjects.length = 0;
|
|
1726
|
+
this.outlineObjects.push(...objects);
|
|
1727
|
+
if (!this.postProcessParam.outline) {
|
|
1728
|
+
this.postProcessParam.outline = DefaultOutlineParams;
|
|
1729
|
+
this.setupPostProcess();
|
|
1730
|
+
}
|
|
1731
|
+
else {
|
|
1732
|
+
this.markRenderStateDirty();
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1724
1735
|
removeOutlineObject(obj) {
|
|
1725
1736
|
if (!this.postProcessParam.outline) {
|
|
1726
1737
|
this.outlineObjects = [];
|
|
@@ -3022,7 +3033,11 @@ class TransformGizmo extends Pawn {
|
|
|
3022
3033
|
this.onChangeEvent = () => { this.onChange(); };
|
|
3023
3034
|
this.onUpdateFunctions = [];
|
|
3024
3035
|
this.onDraggingFunctions = [];
|
|
3025
|
-
|
|
3036
|
+
let canvas = controller.viewPort.canvas;
|
|
3037
|
+
if (!canvas) {
|
|
3038
|
+
throw new Error("TransformGizmo:Canvas not found");
|
|
3039
|
+
}
|
|
3040
|
+
this._control = new TransformControls_js.TransformControls(controller.camera, canvas);
|
|
3026
3041
|
this.control.getHelper().traverse((elem) => {
|
|
3027
3042
|
elem.userData["rayIgnored"] = true;
|
|
3028
3043
|
});
|
|
@@ -3142,6 +3157,24 @@ class TransformGizmo extends Pawn {
|
|
|
3142
3157
|
setSize(size) {
|
|
3143
3158
|
this.control.setSize(size);
|
|
3144
3159
|
}
|
|
3160
|
+
getTranslationSnap() {
|
|
3161
|
+
return this.control.translationSnap;
|
|
3162
|
+
}
|
|
3163
|
+
setTranslationSnap(translationSnap) {
|
|
3164
|
+
this.control.setTranslationSnap(translationSnap);
|
|
3165
|
+
}
|
|
3166
|
+
getRotationnSnap() {
|
|
3167
|
+
return this.control.rotationSnap;
|
|
3168
|
+
}
|
|
3169
|
+
setRotationSnap(translationSnap) {
|
|
3170
|
+
this.control.setRotationSnap(translationSnap);
|
|
3171
|
+
}
|
|
3172
|
+
getScaleSnap() {
|
|
3173
|
+
return this.control.scaleSnap;
|
|
3174
|
+
}
|
|
3175
|
+
setScaleSnap(translationSnap) {
|
|
3176
|
+
this.control.setScaleSnap(translationSnap);
|
|
3177
|
+
}
|
|
3145
3178
|
destroy() {
|
|
3146
3179
|
var _a;
|
|
3147
3180
|
this.isTickEnabled = false;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -566,7 +566,7 @@ class SceneComponent extends Component {
|
|
|
566
566
|
throw Error("newComponent threeObject is invalid");
|
|
567
567
|
}
|
|
568
568
|
newComponent.parentActor = this.parentActor;
|
|
569
|
-
if (attachmentRule
|
|
569
|
+
if (attachmentRule === AttachmentRules.KeepWorld) {
|
|
570
570
|
let worldMatrix = newComponent.getWorldMatrix();
|
|
571
571
|
this.threeObject.add(newComponent.threeObject);
|
|
572
572
|
newComponent.setWorldMatrix(worldMatrix);
|
|
@@ -1719,6 +1719,17 @@ class Viewport {
|
|
|
1719
1719
|
this.markRenderStateDirty();
|
|
1720
1720
|
}
|
|
1721
1721
|
}
|
|
1722
|
+
setOutlineObjects(objects) {
|
|
1723
|
+
this.outlineObjects.length = 0;
|
|
1724
|
+
this.outlineObjects.push(...objects);
|
|
1725
|
+
if (!this.postProcessParam.outline) {
|
|
1726
|
+
this.postProcessParam.outline = DefaultOutlineParams;
|
|
1727
|
+
this.setupPostProcess();
|
|
1728
|
+
}
|
|
1729
|
+
else {
|
|
1730
|
+
this.markRenderStateDirty();
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1722
1733
|
removeOutlineObject(obj) {
|
|
1723
1734
|
if (!this.postProcessParam.outline) {
|
|
1724
1735
|
this.outlineObjects = [];
|
|
@@ -3020,7 +3031,11 @@ class TransformGizmo extends Pawn {
|
|
|
3020
3031
|
this.onChangeEvent = () => { this.onChange(); };
|
|
3021
3032
|
this.onUpdateFunctions = [];
|
|
3022
3033
|
this.onDraggingFunctions = [];
|
|
3023
|
-
|
|
3034
|
+
let canvas = controller.viewPort.canvas;
|
|
3035
|
+
if (!canvas) {
|
|
3036
|
+
throw new Error("TransformGizmo:Canvas not found");
|
|
3037
|
+
}
|
|
3038
|
+
this._control = new TransformControls(controller.camera, canvas);
|
|
3024
3039
|
this.control.getHelper().traverse((elem) => {
|
|
3025
3040
|
elem.userData["rayIgnored"] = true;
|
|
3026
3041
|
});
|
|
@@ -3140,6 +3155,24 @@ class TransformGizmo extends Pawn {
|
|
|
3140
3155
|
setSize(size) {
|
|
3141
3156
|
this.control.setSize(size);
|
|
3142
3157
|
}
|
|
3158
|
+
getTranslationSnap() {
|
|
3159
|
+
return this.control.translationSnap;
|
|
3160
|
+
}
|
|
3161
|
+
setTranslationSnap(translationSnap) {
|
|
3162
|
+
this.control.setTranslationSnap(translationSnap);
|
|
3163
|
+
}
|
|
3164
|
+
getRotationnSnap() {
|
|
3165
|
+
return this.control.rotationSnap;
|
|
3166
|
+
}
|
|
3167
|
+
setRotationSnap(translationSnap) {
|
|
3168
|
+
this.control.setRotationSnap(translationSnap);
|
|
3169
|
+
}
|
|
3170
|
+
getScaleSnap() {
|
|
3171
|
+
return this.control.scaleSnap;
|
|
3172
|
+
}
|
|
3173
|
+
setScaleSnap(translationSnap) {
|
|
3174
|
+
this.control.setScaleSnap(translationSnap);
|
|
3175
|
+
}
|
|
3143
3176
|
destroy() {
|
|
3144
3177
|
var _a;
|
|
3145
3178
|
this.isTickEnabled = false;
|
|
@@ -42,6 +42,7 @@ export declare class Viewport {
|
|
|
42
42
|
updateSSRParam(params: SSRParam | null): void;
|
|
43
43
|
updateOutlineParam(params: OutlineParams | null): void;
|
|
44
44
|
addOutlineObject(obj: Object3D): void;
|
|
45
|
+
setOutlineObjects(objects: Object3D[]): void;
|
|
45
46
|
removeOutlineObject(obj: Object3D): void;
|
|
46
47
|
destroyPostProcess(): void;
|
|
47
48
|
onWindowResize(): void;
|
|
@@ -43,5 +43,11 @@ export declare class TransformGizmo extends Pawn {
|
|
|
43
43
|
setSpace(space: "world" | "local"): void;
|
|
44
44
|
setAxis(axis: "X" | "Y" | "Z" | "E" | "XY" | "YZ" | "XZ" | "XYZ" | "XYZE" | null): void;
|
|
45
45
|
setSize(size: number): void;
|
|
46
|
+
getTranslationSnap(): number | null;
|
|
47
|
+
setTranslationSnap(translationSnap: number | null): void;
|
|
48
|
+
getRotationnSnap(): number | null;
|
|
49
|
+
setRotationSnap(translationSnap: number | null): void;
|
|
50
|
+
getScaleSnap(): number | null;
|
|
51
|
+
setScaleSnap(translationSnap: number | null): void;
|
|
46
52
|
destroy(): void;
|
|
47
53
|
}
|