masterdon Posted June 13, 2017 Share Posted June 13, 2017 Hi Team, I am doing a good progress for migrating 2D planner to use babylon js. Here is the playground for same: http://www.babylonjs-playground.com/#SUXKHY#24 I am having couple of issues here, There: 1) as you can see the boxes with yellow faces depicts certain walls that are draggable in respective rows and columns. However horizontal walls can not be dragged to the last slot in its current room row and vertical slot is not draggable on top most slot in its column. what am i missing here? The code for horizontal draggable to right is on line : 183 The code for vertical draggable to top is on line : 196 2) How can i avoid dragging element to position where there is already a wall with yellow faces. 3) There is some code which is causing the page to become unresponsive.This do not happen consistently but i can see the high memory uses in chrome task manager. Any help would be appreciated. Thank you for stopping by... Quote Link to comment Share on other sites More sharing options...
Gijs Posted June 13, 2017 Share Posted June 13, 2017 Hi, For #1 I got it working by replacing the loops with direct calculations of the positions: http://www.babylonjs-playground.com/#SUXKHY#25 Maybe those loops also caused #3 by never ending, though that wouldn't make the memory usage high. Good luck with your project masterdon and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
masterdon Posted June 18, 2017 Author Share Posted June 18, 2017 @Gijs: awesome. exactly what i wanted. Thank you very much Gijs 1 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.