• Content Count

  • Joined

  • Last visited

About masterdon

  • Rank
    Advanced Member

Recent Profile Visitors

1046 profile views
  1. Hey Gijs. Its not working. tried all combination for values camera1.inertia = 0 camera1.panningInertia = 0;
  2. That works for zoom in/out. but panning isn't working any more here is the cam code scene = new BABYLON.Scene(engine); camera1 = new BABYLON.ArcRotateCamera("Camera1", 1.57, 0.01, 120, new BABYLON.Vector3(0, -0.4, 10), scene); camera1.attachControl(canvas, true); // This targets the camera to scene origin //camera1.setTarget(new BABYLON.Vector3.Zero()); //set camera position camera1.setPosition(new BABYLON.Vector3(0, 200, 11)); //set zoom limit camera1.inputs.attached['keyboard'].detachControl(canvas); camera1.lowerRadiusLimit = 40; camera1.upperRadiusLimit = 160; camera1.checkCollisions = true; if (!is3D) { //limit the arcCam alpha and beta (essentially to disabled the rotation). camera1.upperAlphaLimit = -Math.PI / 2; camera1.lowerAlphaLimit = -Math.PI / 2; camera1.upperBetaLimit = 0; camera1.lowerBetaLimit = 0; } camera1.inertia = 0 //camera1.speed = 500 scene.activeCamera = camera1; scene.activeCamera.attachControl(canvas, true);
  3. @RaananW: Thanks a lot for quick reply I want to have panning and zooming happening quickly. without smooth effect
  4. Hi Team, I am using arc rotate camera in the scene. There is delay/animation in panning when pressed control+drag. I want the panning to happen on the go without delay. I am trying to modify the native library code for arc rotate camera, but the snippet itself is loaded with delay. Is there a way to disable delay/animation in panning effect? if (this.inertialPanningX !== 0 || this.inertialPanningY !== 0) { console.log('Start Drag---------------') console.log(new Date()) if (!this._localDirection) { this._localDirection = BABYLON.Vector3.Zero(); this._transformedDirection = BABYLON.Vector3.Zero(); } this.inertialPanningX *= this.inertia; this.inertialPanningY *= this.inertia; if (Math.abs(this.inertialPanningX) < BABYLON.Epsilon) this.inertialPanningX = 0; if (Math.abs(this.inertialPanningY) < BABYLON.Epsilon) this.inertialPanningY = 0; this._localDirection.copyFromFloats(this.inertialPanningX, this.inertialPanningY, this.inertialPanningY); this._localDirection.multiplyInPlace(this.panningAxis); this._viewMatrix.invertToRef(this._cameraTransformMatrix); BABYLON.Vector3.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection); //Eliminate y if map panning is enabled (panningAxis == 1,0,1) if (!this.panningAxis.y) { this._transformedDirection.y = 0; } if (! {; } console.log(new Date()) console.log('End Drag---------------') } also tried setting various values to speed, panningSensibility, cameraAcceleration.
  5. Hi Team, I am working on a floor planner. I have implemented freewall drawing feature using ribbons. I am also setting the borders to freewall using enable edge rendering. This works fine for individual ribbons. however, there can be a situation where multiple freewalls are connected to each other. in this case, i want borders to come for complete path and not individually. i tried merging the meshes using `BABYLON.Mesh.MergeMeshes` . however, the borders are coming still individual Something similiar to freewalls fro, homestyler ( what is the best way to implement something close to this.
  6. @RaananW: actually it didn't worked out. The borders after merging were not coming as one object. I ended up taking the array of points for meshes i am merging and then drawing the border separately using createLines.
  7. Hi Deltakosh, The issue is resolved now . Thanks for stopping by.
  8. Hi everyone, so whats the syntax for serializing all the meshes for saving and then loading them again in scene?
  9. Hi Team, I am merging the array of ribbon objects to create one mesh. However, edge rendering for new mesh is creating edges for individual sub meshes instead of creating for complete object. Is there a way to change this behaviour?
  10. @Deltakosh: any work around for thhis.
  11. Thanks a lot guys can anyone help me on this topic
  12. Hi Team, I am having a PG here . FYI, as per requirement, with the help of legendary @Wingnut, camera rotation has been disabled here. by limiting arcCam alpha and beta. Now i am trying to assign key events on canvas for mesh movements. keydown and keyup are working fine. however, keypress is failing. code is at line number 149. what could be the reason?
  13. Hi Everyone, I have created a grid using GridMaterial on box mesh. the issue is, the grid isn't coming complete. Its broken on all the edges(see the snapshot). i.e. no boundary lines to wrap everything in rectangle. i have also tried setting uOffset and voffset on material however its not working. what am i missing here? Here is my code: var gridBox = BABYLON.MeshBuilder.CreateBox("box1", { width: objectProperties.width-1, height: 0.05, depth: objectProperties.height + 1, updatable: true }, scene); gridBox.position = new BABYLON.Vector3(objectProperties.left + startFromLeftPosition + objectProperties.width / 2 - horizontalSlotHeight / 2, 10.05, startFromTopPosition - ( + (i > 0 ? 8 : 7))); var defaultGridMaterial = new BABYLON.GridMaterial("default", scene); defaultGridMaterial.majorUnitFrequency = 0; defaultGridMaterial.minorUnitVisibility = 0.1; defaultGridMaterial.gridRatio = 1; //defaultGridMaterial.uOffset = 0.5; //defaultGridMaterial.vOffset = 0.5; gridBox.material = defaultGridMaterial; gridBox.material.alpha = 0.5;
  14. Hi Everyone, var scalingObject = BABYLON.Mesh.CreatePlane("scalez", 1, scene, false); scalingObject.material = new BABYLON.StandardMaterial("outputplane", scene); scalingObject.position = scalorPosition if (isXScalor) scalingObject.material.diffuseTexture = new BABYLON.Texture("../images/icons/icons-Resize-Horizontal.png", scene); else scalingObject.material.diffuseTexture = new BABYLON.Texture("../images/icons/icons-Resize-Vertical.png", scene); scalingObject.rotate(BABYLON.Axis.X, 1.5, BABYLON.Space.LOCAL); I am using above code to create little boxes as re-sizable controllers. i have set a image icon material as texture to plane for giving them look of resizable controller . However the background of material(or color of mesh) is coming black instead of transparent. what could be the reason?