southorion Posted March 10, 2018 Share Posted March 10, 2018 Hi everyone! What I'm trying to do is to display a cube on the screen and I can use mouse to change the size of the cube. The idea is 1. Display a cube on the center of the screen. 2. Hold the left key of the mouse then point the cursor to any part of the cube and flip along a certain direction. The cube's size will grow along the fliiping direction.(You can image this like your finger flipping on the iPhone sceen) 3. I can rotate the cube using mouse. I'm very new to babylon.js. Hope you can give a little clue. Thank you sooooo much! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 11, 2018 Share Posted March 11, 2018 Hiya S! Umm... here's a cool playground. https://www.babylonjs-playground.com/#PZGBU#10 Mouse-drag does one thing, CONTROL-mousedrag does another thing, SHIFT-mousedrag does a third thing, ALT-mousedrag does a fourth. There's quite a bit to be learned from experimenting with that playground. Grab its zip... take it home... or make more playground versions.... edit/save as many as you wish. I think this will be a good start for you. Ask more questions if you wish... we're here. The model-loading method used in that playground... is a bit "older". You might wish to remove it and just use some simple mesh, or modernize it to an "AssetsManager task" way-of loading stuff. ALSO... I think some/all the DOM-based pointer/eventHandler stuff... can be replaced with more tech-wise ActionManager things. cya 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.