source: other-projects/nz-flag-design/trunk/render-3d/Flag_files/slider.js@ 29693

Last change on this file since 29693 was 29693, checked in by bmt11, 9 years ago

Added slider for wind control but the black box is a bug I have no figured out for some time now
Camera control is disabled whilst using the slider also :)

File size: 436 bytes
Line 
1jQuery(document).ready(function ($) {
2 $("#speed").slider({
3 min: 0,
4 max: 100,
5 value: 0,
6 animate: true,
7 range: 'min',
8 slide: function(event, ui) {
9 setSpeed(ui.value/100);
10 }
11 });
12
13 $(".ui-slider").mouseenter(function(){
14 controls.enabled = false;
15 });
16
17 $(".ui-slider").mouseleave(function(){
18 controls.enabled = true;
19 });
20
21 function setSpeed(speed){
22 windForce.set(speed,100,speed);
23 }
24});
Note: See TracBrowser for help on using the repository browser.