![]() ![]() ![]() ![]() To remove the zoom, you just have to remove the camera radius update, or better : to limit its range, like this : camera.lowerRadiusLimit = camera.radius camera.upperRadiusLimit = camera.radius Now, you are able to scroll your page and to zoom. To allow the browser to scroll AND to zoom in your scene, just set this value to 'true' when the camera is attached to the canvas : camera.attachControl(canvas, true) You can see line 10 that the wheel event is stuck in this method, and not given away to the browser to scroll ( noPreventDefault is a variable defined in babylon - set to false by default) Or to temporarily deactivate the camera in order to activate later if( event scrool)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |