Majeed Siddiqui

Members
  • Content Count

    11
  • Joined

  • Last visited

About Majeed Siddiqui

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Majeed Siddiqui

    Bug in Tags module

    BabylonJS's Tag module uses https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.tags.js#L63 for (var i in arr) { ... } looping style, this gives error when we add custom methods to array prototype as follows Array.prototype.sayCheese = function () { console.log("Cheese!!"); } // with above sayCheese added var arr[] = ['majeed', 'found', 'a', 'bug']; for (var i in arr) { console.log(arr[i]); } // output: // majeed // found // a // bug // function Array.prototype.sayCheese() {} [not string a function object] Which result in i.trim is not a function exception in Tags._AddTagTo function https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.tags.js#L68. Solution: use for (var i = 0, len = arr.length; i < len; ++i) traditional loop (http://stackoverflow.com/questions/5349425/whats-the-fastest-way-to-loop-through-an-array-in-javascript) I want to contribute. Is there contribution guide or should I just make changes and make a pull request?
  2. Majeed Siddiqui

    How to group multiple small boxes under one big box?

    Thanks @aWeirdo! I know how to create basic boxes. How do I club all small boxes into big one? Solution I tried: Creating small boxes and setting their parent as big box. This fails miserably! The big box acts as pivot instead of covering these small boxes. I know I can achieve the view of mesh through LOD. I want a simpler mechanism. Like big box acting as container for small boxes.
  3. I have few small boxes which I want to fit in big box. e.g I have 4x3, 4x4, 4x8 small boxes. And one big box of 4x(3 + 4 + 8 = 15) => 4x15. I want all these small boxes to be aligned in one line. Which are covered by big box. This big box is not visible at very close distance from camera only small boxes are. But it hides all the small and displays it self only at large distance from camera. How do I achieve this? Edit 1: I have drag and drop functionality thanks to @Wingnut, so doing drag and drop on big box should affect small boxes.
  4. Majeed Siddiqui

    How to stop free camera movement completely?

    @Wingnut @Pryme8 Thanks a lot! I have combined both now its working. There is small glitch but its tolerable. I am holding for further assistance.
  5. I have free camera in orthographic camera mode. I don't want camera to move at all on mouse or any other kind of input. So I tried not calling attachControl with this, camera doesn't react at all (Good!) but boxes in this scene with actions registered to action manager also do not react to mouse inputs. Second approach I tried is calling attachControl with following function: scope.registerBeforeRender(function () { // I want top view camera.rotation.x = Math.PI / 2; camera.rotation.y = Math.PI / 2; camera.rotation.z = 0; }); When I try to move ground with mouse it does move slightly. As shown in image. Help needed.
  6. Majeed Siddiqui

    Align randomly created boxes with grid on plane

    You are the best!! Thanks a lot!
  7. This one has almost 60 fps! Thanks a lot!
  8. I would like to create boxes of random size that should align with grid squares. For example, if grid is 8x8 square and there is a box of size 2x3 then it should exactly take 2x3=6 square on grid. Is there any way to force this? Actually I want have drag and drop for those boxes that's why this restriction is needed. Or do I have to do maths stuff to force this? Something like shown in image. http://www.babylonjs-playground.com/#26LMDE#0 I am using one of these to implement grid:
  9. Thank you so much for your response! As you mentioned do you want to do any processing? I would like to create boxes of random size that should align with grid squares. For example, if grid is 8x8 square and there is a box of size 2x3 then it should exactly take 2x3=6 square on grid. Is there any way to force this? Actually I want have drag and drop for those boxes that's why this restriction is needed. Or do I have to do maths stuff to force this?
  10. How to implement large probably 1000x1000 grid. Not necessarily 3D? Playground: http://www.babylonjs-playground.com/#1VGWP9#9 Thanks in advance.
  11. Update 1: Single question for which solution required. How to implement large probably 1000x1000 grid. Not necessarily 3D? Playground: http://www.babylonjs-playground.com/#1VGWP9#9 Thanks in advance. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Detailed App: Use-Case: I want to create a floor for building. Floor is a grid. I must be able to add and remove boxes as rectangle which align with grid squares. This functionality should be implemented with drag and drop. When entered source and destination coordinates for two squares on grid, I have to show the path. This app can be done as 2D, 3D no required. Tried: I implemented basic grid with TiledGround of size 30x30 but as soon as I increase the size of grid the FPS goes down to 1, 2. I am finding hard to implement feature for box to aligned with grid. For showing path, after finding the path I am creating small boxes and putting them onto squares with basic translation for alignment with grid. The grid size may go upto 1000x1000. Help: Can you suggest better way to implement this application? I am good with 2D too. Attached: Screenshot of my implementation so far.