Andrey Zimin Posted December 20, 2017 Share Posted December 20, 2017 Hello friends! What is doing parameter noPreventDefault in method AttachControl? here ---> http://doc.babylonjs.com/classes/3.1/camera#attachcontrol-element-nopreventdefault-rarr-void Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 20, 2017 Share Posted December 20, 2017 By default noPreventDefault is set to false, meaning that preventDefault() is automatically called on all canvas mouse clicks and touch events. I always put it to true Andrey Zimin 1 Quote Link to comment Share on other sites More sharing options...
Andrey Zimin Posted December 20, 2017 Author Share Posted December 20, 2017 12 minutes ago, Dad72 said: By default noPreventDefault is set to false, meaning that preventDefault() is automatically called on all canvas mouse clicks and touch events. I always put it to true Ok. Is understand! But what is doing method preventdefault()? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 20, 2017 Share Posted December 20, 2017 The preventDefault() method stops the default action of an element from happening. For example: Prevent a submit button from submitting a form Prevent a link from following the URL This avoids the propagation of an event Andrey Zimin 1 Quote Link to comment Share on other sites More sharing options...
Andrey Zimin Posted December 20, 2017 Author Share Posted December 20, 2017 1 minute ago, Dad72 said: The preventDefault() method stops the default action of an element from happening. For example: Prevent a submit button from submitting a form Prevent a link from following the URL This avoids the propagation of an event Thank you!:) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 20, 2017 Share Posted December 20, 2017 Sorry if I'm not clear enough, it's not easy to explain. Maybe our @Wingnut friend will have a more detailed explanation. Quote Link to comment Share on other sites More sharing options...
Andrey Zimin Posted December 20, 2017 Author Share Posted December 20, 2017 1 minute ago, Dad72 said: Sorry if I'm not clear enough, it's not easy to explain. Maybe our @Wingnut friend will have a more detailed explanation. No, no! Is very good! I am understood you answer! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 20, 2017 Share Posted December 20, 2017 Oh and I forget, welcome Quote Link to comment Share on other sites More sharing options...
Andrey Zimin Posted December 20, 2017 Author Share Posted December 20, 2017 Just now, Dad72 said: Oh and I forget, welcome I am migration from freejs) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 20, 2017 Share Posted December 20, 2017 I guess you mean TreeJs. You made a good choice with BabylonJS, you will not regret it, it's an excellent engine simpler than TreeJs and more modern and a very active community. Quote Link to comment Share on other sites More sharing options...
Andrey Zimin Posted December 20, 2017 Author Share Posted December 20, 2017 Just now, Dad72 said: I guess you mean TreeJs. You made a good choice with BabylonJS, you will not regret it, it's an excellent engine simpler than TreeJs and more modern and a very active community. Yes ThreeJS! And I can feel it! Babylon I really like at the moment! GameMonetize and Dad72 2 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.