trevordev Posted July 23, 2018 Share Posted July 23, 2018 @Ravi Sure, I can try to do that, would a flag on the rotation gizmo such as lockScale that when set to true and dragging occurs scales the mesh equally or are you looking for another gizmo type like the triangle in your video? Ravi 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 23, 2018 Share Posted July 23, 2018 @trevordev, I guess you missed my message. Ravi 1 Quote Link to comment Share on other sites More sharing options...
Ravi Posted July 24, 2018 Share Posted July 24, 2018 Hi @trevordev , Triangular representation is standard and is used widely in 3D softwares. If you could implement triangular representation as per video then that will be great. I have used 3DS Max for recording video. @Dad72 has also mentioned the full model scaling scenario which indicates its globally acceptable feature. Thanks @Dad72 for mentioning that here. Quote Link to comment Share on other sites More sharing options...
trevordev Posted July 27, 2018 Share Posted July 27, 2018 Thanks @Dad72 and @Ravi for the feedback sorry for the delayed response (I was out for a week+), Snapping: this is possible today via var gizmoManager = new BABYLON.GizmoManager(scene) gizmoManager.positionGizmoEnabled=true; gizmoManager.gizmos.positionGizmo.xGizmo.snapDistance = 0.3 gizmoManager.gizmos.positionGizmo.yGizmo.snapDistance = 0.3 gizmoManager.gizmos.positionGizmo.zGizmo.snapDistance = 0.3 but I will add a helper method for this gizmoManager.gizmos.positionGizmo.snapDistance = 0.3; Possibilities to define euler: In Babylon, I believe it is recommended to always use Quaternions instead of euler angles. If you wish to continue using euler angles you can always use the methods to convert Quaternions to euler and vice verca. BABYLON.Quaternion.RotationYawPitchRollToRef quaternionObj.toEulerAnglesToRef Add layerMask to the gizmo: One of the goals when creating the gizmos was to avoid modifying the existing scene. To avoid this it uses the UtilityLayerRenderer which creates another scene that is overlayed on top of the original. Because of this, unfortunately, I don't believe the layer mask would have any effect. What you could do to work around this is to use another UtilityLayerRenderer for the minimap and place on the minimap contents in the UtilityLayerRenderer's scene. Triangular equal scaling gizmo: @ravi Sure I will take a stab at creating a new gizmo type for this. https://github.com/BabylonJS/Babylon.js/issues/4844 Hopefully these resolutions are acceptable. Ravi, GameMonetize and Dad72 1 2 Quote Link to comment Share on other sites More sharing options...
trevordev Posted July 31, 2018 Share Posted July 31, 2018 Added the equal scaling gizmo to function similarly to the BabylonJS-EditControl Dad72 mentioned. @Ravi Does this now work as desired? http://playground.babylonjs.com/#8MGKWK#16 Varsha Kamble 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 31, 2018 Share Posted July 31, 2018 Yes, it works. I will try to use it concretely on my project TerrainEditor. trevordev 1 Quote Link to comment Share on other sites More sharing options...
Varsha Kamble Posted August 1, 2018 Author Share Posted August 1, 2018 Hi @trevordev This is amazing ?. Can you please help me with npm version in which this feature is integrated. Currently i am using Quote "babylonjs": "3.3.0-alpha.13" which does not have this feature enabled. Thanks. Regards, Varsha Quote Link to comment Share on other sites More sharing options...
Ravi Posted August 1, 2018 Share Posted August 1, 2018 On 7/28/2018 at 2:25 AM, trevordev said: Thanks @Dad72 and @Ravi for the feedback sorry for the delayed response (I was out for a week+), Snapping: this is possible today via var gizmoManager = new BABYLON.GizmoManager(scene) gizmoManager.positionGizmoEnabled=true; gizmoManager.gizmos.positionGizmo.xGizmo.snapDistance = 0.3 gizmoManager.gizmos.positionGizmo.yGizmo.snapDistance = 0.3 gizmoManager.gizmos.positionGizmo.zGizmo.snapDistance = 0.3 but I will add a helper method for this gizmoManager.gizmos.positionGizmo.snapDistance = 0.3; Possibilities to define euler: In Babylon, I believe it is recommended to always use Quaternions instead of euler angles. If you wish to continue using euler angles you can always use the methods to convert Quaternions to euler and vice verca. BABYLON.Quaternion.RotationYawPitchRollToRef quaternionObj.toEulerAnglesToRef Add layerMask to the gizmo: One of the goals when creating the gizmos was to avoid modifying the existing scene. To avoid this it uses the UtilityLayerRenderer which creates another scene that is overlayed on top of the original. Because of this, unfortunately, I don't believe the layer mask would have any effect. What you could do to work around this is to use another UtilityLayerRenderer for the minimap and place on the minimap contents in the UtilityLayerRenderer's scene. Triangular equal scaling gizmo: @ravi Sure I will take a stab at creating a new gizmo type for this. https://github.com/BabylonJS/Babylon.js/issues/4844 Hopefully these resolutions are acceptable. Awesome. This is working fine. Thanks for your help! Will check with larger models and let you know the results. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 1, 2018 Share Posted August 1, 2018 @Varsha Kamble npm is updated once a week. alpha14 will be available this friday Quote Link to comment Share on other sites More sharing options...
Varsha Kamble Posted August 2, 2018 Author Share Posted August 2, 2018 Hi @Deltakosh, Thanks for the updates. ? Will be waiting to get this feature merged. Regards, Varsha Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.