|
@@ -101539,8 +101539,8 @@ var BABYLON;
|
|
|
function PositionGizmo(gizmoLayer) {
|
|
|
if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
|
|
|
var _this = _super.call(this, gizmoLayer) || this;
|
|
|
- _this.xGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
|
|
|
- _this.yGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
|
|
|
+ _this.xGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
|
|
|
+ _this.yGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
|
|
|
_this.zGizmo = new BABYLON.AxisDragGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
|
|
|
_this.attachedMesh = null;
|
|
|
return _this;
|
|
@@ -101641,8 +101641,8 @@ var BABYLON;
|
|
|
function RotationGizmo(gizmoLayer) {
|
|
|
if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
|
|
|
var _this = _super.call(this, gizmoLayer) || this;
|
|
|
- _this.xGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
|
|
|
- _this.yGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
|
|
|
+ _this.xGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
|
|
|
+ _this.yGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
|
|
|
_this.zGizmo = new BABYLON.PlaneRotationGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
|
|
|
_this.attachedMesh = null;
|
|
|
return _this;
|
|
@@ -101743,16 +101743,20 @@ var BABYLON;
|
|
|
function ScaleGizmo(gizmoLayer) {
|
|
|
if (gizmoLayer === void 0) { gizmoLayer = BABYLON.UtilityLayerRenderer.DefaultUtilityLayer; }
|
|
|
var _this = _super.call(this, gizmoLayer) || this;
|
|
|
- _this.xGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
|
|
|
- _this.yGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
|
|
|
+ _this.xGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(1, 0, 0), BABYLON.Color3.Red().scale(0.5), gizmoLayer);
|
|
|
+ _this.yGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Green().scale(0.5), gizmoLayer);
|
|
|
_this.zGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 0, 1), BABYLON.Color3.Blue().scale(0.5), gizmoLayer);
|
|
|
// Create uniform scale gizmo
|
|
|
_this.uniformScaleGizmo = new BABYLON.AxisScaleGizmo(new BABYLON.Vector3(0, 1, 0), BABYLON.Color3.Yellow().scale(0.5), gizmoLayer);
|
|
|
_this.uniformScaleGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
|
_this.uniformScaleGizmo.uniformScaling = true;
|
|
|
+ var uniformScalingMesh = BABYLON.Mesh.CreatePolyhedron("", { type: 1 }, _this.uniformScaleGizmo.gizmoLayer.utilityLayerScene);
|
|
|
+ uniformScalingMesh.scaling.scaleInPlace(0.02);
|
|
|
+ uniformScalingMesh.visibility = 0;
|
|
|
var octahedron = BABYLON.Mesh.CreatePolyhedron("", { type: 1 }, _this.uniformScaleGizmo.gizmoLayer.utilityLayerScene);
|
|
|
octahedron.scaling.scaleInPlace(0.007);
|
|
|
- _this.uniformScaleGizmo.setCustomMesh(octahedron, true);
|
|
|
+ uniformScalingMesh.addChild(octahedron);
|
|
|
+ _this.uniformScaleGizmo.setCustomMesh(uniformScalingMesh, true);
|
|
|
_this.attachedMesh = null;
|
|
|
return _this;
|
|
|
}
|
|
@@ -101773,6 +101777,9 @@ var BABYLON;
|
|
|
return this.xGizmo.updateGizmoRotationToMatchAttachedMesh;
|
|
|
},
|
|
|
set: function (value) {
|
|
|
+ if (!value) {
|
|
|
+ BABYLON.Tools.Warn("Setting updateGizmoRotationToMatchAttachedMesh = false on scaling gizmo is not supported.");
|
|
|
+ }
|
|
|
if (this.xGizmo) {
|
|
|
this.xGizmo.updateGizmoRotationToMatchAttachedMesh = value;
|
|
|
this.yGizmo.updateGizmoRotationToMatchAttachedMesh = value;
|
|
@@ -102431,7 +102438,6 @@ var BABYLON;
|
|
|
if (value) {
|
|
|
if (!this.gizmos.positionGizmo) {
|
|
|
this.gizmos.positionGizmo = new BABYLON.PositionGizmo();
|
|
|
- this.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
|
}
|
|
|
this.gizmos.positionGizmo.attachedMesh = this._attachedMesh;
|
|
|
}
|
|
@@ -102454,7 +102460,6 @@ var BABYLON;
|
|
|
if (value) {
|
|
|
if (!this.gizmos.rotationGizmo) {
|
|
|
this.gizmos.rotationGizmo = new BABYLON.RotationGizmo();
|
|
|
- this.gizmos.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
|
}
|
|
|
this.gizmos.rotationGizmo.attachedMesh = this._attachedMesh;
|
|
|
}
|