Jump to content

Development for platform of designing 2d models


masterdon
 Share

Recommended Posts

Hi Team. We have developed the platform for designing 2d models of buildings and work spaces. However, we were thinking to migrate from existing js to babylon for two reasons: to improve usability in designing and support to 3d model rendering.

Our use cases are something like this.and i have already started working on it. so i will post the query for each topic.

1) a 2dplayground with just zoom in zoom out effect.

I am using below code. which has both rotation and zoom effect. 

var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0.8, 100, new BABYLON.Vector3.Zero(), scene);
camera.attachControl(canvas, true);

I have seen a solution in one of the topic to detachControl for removing rotation effect. However that also removes zooming. I want to only keep zoom in zoom and no rotation pertaining to workspace.

2) Option to add elements to scene from panel. user can drag and drop elements like lines,circles on predefined shape/rectangular model available in space.

What would the best case to allow users to only drag and drop on certain edges of the rectangle.

3) I have another example where i am trying to create basic solid line in rectangle. which throws some error:
 

http://www.babylonjs-playground.com/#272WI1#90

 

Thanks for Help in Advance,

MasterDon

 

Link to comment
Share on other sites

Wow. that works. Thanks a lot Gijs.

Currently i have created the plane, which will have rotation disabled when planning is done in 2D mode. http://www.babylonjs-playground.com/#7EJ4CM . rotation will be enabled only in 3D mode.

Can anyone guide me one second point. how should i create the option to add solid lines that depicts walls of structure. 

I was thinking to consider using lines or planes. I have a requirement that lines can be of different type depicting different parts of structure(windows,walls,free walls, slider windows,etc.). should have ability to set height,width, gradient, ability to drag and drop in 2d i.e. wrt x & y axis.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...