• Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by trevordev

  1. trevordev

    Sample code for features in babylonEditor

    @Dad72 Thanks for the feedback. I updated the default gizmo look to have thin lines like the visuals you provided. (See gizmo playground once this PR is merged, @Varsha Kamble let me know if this still doesn't suit your liking.) As for code, the gizmo manager is aimed to be very similar to that library, but provide additional support for things like bounding box gizmo, customization and webVR support. Is there anything in the following that should be changed? // Init manipulator, by default any mesh you click on will get attached var gizmoManager = new BABYLON.GizmoManager(scene); // To avoid automatic pointer attaching and manually attach/detach gizmoManager.usePointerToAttachGizmos = false; gizmoManager.attachToMesh(mesh); // attach gizmoManager.attachToMesh(null); // detach // Enable/disable gizmos, all gizmos are on their own layer and will not modify the existing scene (eg. scene.meshes) gizmoManager.positionGizmoEnabled = true; // By default gizmo's will be rotated to the world but to have gizmos rotate in local space set the following gizmoManager.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = true; // Comes with bounding box gizmo if needed and supports webVR gizmoManager.boundingBoxGizmoEnabled = true; // Dispose gizmoManager.dispose();
  2. trevordev

    Sample code for features in babylonEditor

    @Dad72 Can you expand on more common´╗┐ design and its less complicated to set up or use? For common design are you talking about the appearance? For complications setting it up. the gizmo manager ( aims to help make it less complicated to use, is there something it does/doesn't do that can be improved? Thanks
  3. trevordev

    Sample code for features in babylonEditor

    @Varsha Kamble I see, you would like the default look to be more inline with the editor? I can try to adjust the look to be more inline with the editor (is this design ok? It still doesn't have lighting like in the editor but I've been told by other lighting is not an ideal default). If you want to tweak all of this manually you can add your own logic for hover as specified here, when used with setCustomMesh you can make the appearance of the mesh look however you would like. @brianzinn This can also be done using the custom mesh depending on how you position the custom gizmo relative to the origin
  4. trevordev

    Sample code for features in babylonEditor

    @Varsha Kamble I created a PR here: after this is merged and the next nightly build runs this playground should work which shows how to customize the gizmos.
  5. trevordev

    Sample code for features in babylonEditor

    @Varsha Kamble Hey sorry for the delay, this is not working at the moment but I'll get a pull request out to support this today.
  6. trevordev

    Absolute User Camera Rotation

    You can try diffing the y rotation of the camera on each frame and adding the diff to a local variable that tracks how far the camera has rotated. See this playground it prints how many rotations the camera is currently at every frame.
  7. Hey, Gizmo's (position, rotation, scale, bounding box) and Mesh behaviors (pointerDrag, sixDofDrag) have been added to the latest Babylon preview. Gizmo docs Mesh behaviors docs GizmoManager playground GLTF bounding box playground Please let me know if you have any feedback. Thanks! 2018-07-06_10-08-12.mp4 2018-07-06_10-11-54.mp4
  8. trevordev

    Gizmo's and mesh dragging behaviors

    @Arte Thanks I understand now. I'll see if I can do something to support this.
  9. trevordev

    Gizmo's and mesh dragging behaviors

    @Arte I think this could be done by creating a new class that extends the bounding box gizmo that adds the new scale controls to the _anchorMesh of the gizmo. I am not sure how the scaling you mentioned would work though, if the new scaling cubes were added where the rotation sphere were on the right would they scale along the x axis or the z axis, or would it be different depending on where you are looking at it from? @babbleon Sure is this ok? Once merged it should work in this PG:
  10. trevordev

    VR interactions in cubemaps

    Hey, take a look at this playground: (Is this behavior what you expect?) setting mesh.isPickable = false will make the rays not be blocked by the skybox's cube but you wont be able to see through the cube to see the rays hitting the plane, so I made the skybox much larger to avoid this The gazeTracker was not visible because the plane rendering group id was different then the gazerMeshes render group id, so I think the plane was being rendered on top of the gazer mesh, removing the setting of group id makes the gazer visible again Let me know if these solutions are not what you are looking for. Thanks.
  11. trevordev

    Gizmo's and mesh dragging behaviors

    Thanks for the feedback @Arte can you explain what you mean by "rotationGizmo change to scaling"? You want the spheres to scale the model as well? Or do you just want to hide them to only have scaling at the corners (this is possible right now with gizmo.setEnabledRotationAxis("");)? @babbleon You can listen to the gizmo.dragBehavior.onDragObservable instead of onSnapObservable. You are correct that the gizmo event's are not public on the gizmo manager, I could look into making the underlying gizmos of the manager public if this is desired.
  12. trevordev

    WebVR Controller Forward Vector

    Good point, I was not aware of hasPosition, I don't have a daydream headset to easily test with at the moment but I can put this on my backlog unless you want to take a stab at it.
  13. trevordev

    Gizmo's and mesh dragging behaviors

    Thanks, it should work with children/groups as well. Attaching to just individual child: Attaching to parent containing children: If you have a specific scenario in mind that doesn't work let me know and I can see if theres something I can do to support it.
  14. trevordev

    WebVR Controller Forward Vector

    @MackeyK24This( was just merged. Let me know if the rotation is now more in line with what you were expecting.
  15. trevordev

    WebVR Controller Forward Vector

    Cool, I created this so I dont forget:
  16. trevordev

    WebVR Controller Forward Vector

    Hey, to clarify are you talking about a 3dof controller like in gearVR or oculus GO? If so I think I understand what might be going on. I can take a shot at fixing this next week when I have a 3Dof to test with.
  17. trevordev

    How to dispose a Ray

    Are you seeing that the memory is still existing? I believe it should be garbage collected as soon as there are no references to it existing, just like Vector3 or Quaternion objects.
  18. trevordev

    Hide a sprite

    Sorry, I think it should be good now. PR: . Thanks for the tip @sable
  19. trevordev


    Hey, I've done much of the existing gizmo work. I agree the current appearance is pretty bulky and like your suggestions. I was planning on adding support to specify a custom mesh when creating the gizmo so anyone can make the gizmo look like however they want but I can definitely take the look of @NasimiAsl's playground for a better default but might leave the animation out for simplicity.
  20. trevordev

    Problems with pivot and rotation

    For rotation pivots I've had success when using a parent mesh, positioning the child mesh inside it and then rotating the parent mesh. See
  21. trevordev

    Hide a sprite

    I believe @Deltakosh does them nightly.
  22. trevordev

    Hide a sprite

    Sure, how about this?
  23. For my projects I like Babylon for: No large IDE/libraries required, I can setup a local babylon dev environment in < 5min or jump into the playground instantly Easily reuse existing web stack, typescript, the dom, existing js code, npm, webpack, socketio, jquery, etc. No licensing
  24. trevordev

    What is the default antialiasing used?

    @V!nc3r I think the msaa algo is the same for both. To get it to look identical you should also turn off imageProcessingEnabled (Line 71) which might be causing the differences in your comparison (see Let me know if you notice any other issues.
  25. trevordev

    How does the GUI support multi-touch´╝č

    I'm not sure I repro'd exactly what you are seeing but I did notice that touch both buttons at once and then releasing causes a right click event to be fired which might be interrupting your up/down events. I disabled right clicking on the canvas using $("#renderCanvas").bind("contextmenu", ()=>{ return false }) This stops the right click event and up/down events seem to work expected now for me here (tested with: Chrome + laptop with touchscreen): Let me know if this still doesn't fix your issue.