masterdon Posted July 10, 2017 Share Posted July 10, 2017 Can we set lines as dashed in grids lines. I am using below code: var gridBox = BABYLON.MeshBuilder.CreateBox("box1", { width: objectProperties.width, height: 0.05, depth: objectProperties.height, updatable: true }, scene); var defaultGridMaterial = new BABYLON.GridMaterial("default", scene); defaultGridMaterial.majorUnitFrequency = 2; defaultGridMaterial.gridRatio = 2; gridBox.material = defaultGridMaterial; gridBox.material.diffuseColor = new BABYLON.Color3(1, 2, 0); Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted July 10, 2017 Share Posted July 10, 2017 Not that I can see, unless that is what the major / minor units are for. Quote Link to comment Share on other sites More sharing options...
masterdon Posted July 10, 2017 Author Share Posted July 10, 2017 Hi @JCPalmer Thanks for quick reply. i tried setting both the properties from 0.1 to 100. But no luck. Here is the demo for same http://www.babylonjs-playground.com/#I7L5CI Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted July 10, 2017 Share Posted July 10, 2017 http://www.babylonjs-playground.com/#3YQXS1#2 Quote Link to comment Share on other sites More sharing options...
masterdon Posted July 10, 2017 Author Share Posted July 10, 2017 @NasimiAsl Hi Nasimi. Thanks for the demo I am not aware how syntax for Fragment_Before_FragColor works. But ill look into this. But there is lots of flickering when the above lines are viewed from longer distance. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 10, 2017 Share Posted July 10, 2017 I think it is a great idea to add it to GridMaterial Btw GridMaterial will soon be added to core bjs (for 3.1) I'll make sure to add support for dotted lines masterdon 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 10, 2017 Share Posted July 10, 2017 https://github.com/BabylonJS/Babylon.js/issues/2476 masterdon 1 Quote Link to comment Share on other sites More sharing options...
masterdon Posted September 15, 2017 Author Share Posted September 15, 2017 @Deltakosh: any work around for thhis. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 15, 2017 Share Posted September 15, 2017 I tried to find a smart way but I was not able to find one 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.