fdeng Posted August 23, 2018 Share Posted August 23, 2018 Hi everyone, I need to select an area in the scene, and then enlarge it as frustum plane. Select an area by mouse: Enlarge the selected area as frustum plane: It seems babylon can not set a frustum plane directly, any idea to implement it? Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted August 23, 2018 Share Posted August 23, 2018 hi @fdeng https://www.babylonjs-playground.com/#9FD1KJ#78 i made this for ArcRotateCamera but some bug i have 1. i make select on div top of canvas 2. that close object use by scale arcrotatecamera radius parameter 3. just one direction selected ** use click ight for back ** after any change you most reload full html and see correct result https://www.babylonjs-playground.com/#9FD1KJ#82 babbleon 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted August 23, 2018 Share Posted August 23, 2018 https://www.babylonjs-playground.com/#9FD1KJ#92 https://www.babylonjs-playground.com/frame#9FD1KJ#94 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 23, 2018 Share Posted August 23, 2018 Perhaps you need a clipping plane instead? http://doc.babylonjs.com/how_to/clip_planes Quote Link to comment Share on other sites More sharing options...
fdeng Posted August 26, 2018 Author Share Posted August 26, 2018 @Deltakosh I don't want to chip anything, I just want to select a rectangle area, and then scale up it to fill the render canvas size. @NasimiAsl Thanks for your PG demo, it can zoom in the selected area, but the scale is a little different than what I want. Your method is also a good choice if I can't find a better way to implement it NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted August 26, 2018 Share Posted August 26, 2018 var scalep = Math.max( dv.offsetWidth/ canv.offsetWidth ,dv.offsetHeight/ canv.offsetHeight ); look to line 41 you can manage your scale by this wish that help 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.