Changeset 29721
- Timestamp:
- 2015-02-09T12:11:28+13:00 (9 years ago)
- Location:
- other-projects/nz-flag-design/trunk/render-3d
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nz-flag-design/trunk/render-3d/CSS/slider.css
r29720 r29721 42 42 border: none; 43 43 outline: 0; 44 color: white;45 44 } 46 45 47 .tooltip { 48 position: absolute; 49 z-index: 1020; 50 display: block; 51 padding: 5px; 52 font-size: 11px; 53 visibility: visible; 54 margin-top: -2px; 55 bottom:120%; 56 margin-left: -2em; 46 .tt{ 47 margin-top: 29px; 48 width: calc(782px/11); 49 height: calc(405px/11); 50 margin-left: -10px; 51 position: absolute; 52 background: url('../images/tooltip.png') no-repeat center; 53 background-size: cover; 57 54 } 58 55 59 .t ooltip .tooltip-arrow{60 bottom: 0;61 left: 50%;62 margin-left: -5px;63 border-top: 5px solid #000000;64 border-right: 5px solid transparent;65 border-left: 5px solid transparent;66 position: absolute;67 width: 0;68 height: 0; 56 .text{ 57 color: #3385FF; 58 width: 100%; 59 height: 100%; 60 text-align: center; 61 position: absolute; 62 margin-top: 5px; 63 font-size: 22px; 64 font-family: "Calibri", Serif; 65 69 66 } 70 -
other-projects/nz-flag-design/trunk/render-3d/Flag_files/slider.js
r29719 r29721 2 2 3 3 var initialValue = 100; 4 var curValue = initialValue;5 var t ooltip = 'Wind Speed: '+curValue+'';4 var tooltip = '<span class="tt"><span class="text">'+getDescript(initialValue)+'</span></span>'; 5 var target; 6 6 7 7 $("#speed").slider({ … … 20 20 21 21 function initTooltip(ui){ 22 tooltip = 'Wind Speed: '+curValue+''; 23 var target = ui.handle || $('.ui-slider-handle'); 24 $(target).html(tooltip); 22 target = ui.handle || $('.ui-slider-handle'); 25 23 } 26 24 27 25 function setSpeed(ui){ 28 26 windStrength = ui.value; 29 curValue = ui.value; 30 tooltip = 'Wind Speed: '+curValue+''; 31 target = ui.handle || $('.ui-slider-handle'); 32 $(target).html(tooltip); 27 tooltip = '<span class="tt"><span class="text">'+getDescript(ui.value)+'</span></span>'; 28 target = ui.handle || $('.ui-slider-handle'); 29 $(target).html(tooltip); 30 } 31 32 function getDescript(speed){ 33 if(speed < 50) return 'calm'; 34 if(speed < 100) return 'light'; 35 if(speed < 150) return 'fair'; 36 if(speed < 200) return 'heavy'; 37 return 'gusty'; 33 38 } 34 39 35 40 $(".ui-slider").mouseenter(function(){ 36 41 controls.enabled = false; 42 $(target).html(tooltip); 37 43 }); 38 44 39 45 $(".ui-slider").mouseleave(function(){ 40 46 controls.enabled = true; 47 $(".tt").remove(); 41 48 }); 42 49 -
other-projects/nz-flag-design/trunk/render-3d/weather/rain.js
r29719 r29721 3 3 4 4 this.isInit = false; 5 this.MASS = 0. 01;5 this.MASS = 0.9; 6 6 7 7 this.init = function() { … … 14 14 15 15 // create the particle variables 16 this.particleCount = 10000,16 this.particleCount = 8000, 17 17 this.particles = new THREE.Geometry(), 18 18 this.pMaterial = new THREE.ParticleBasicMaterial({ … … 39 39 // create a velocity vector 40 40 this.particle.velocity = new THREE.Vector3( 41 (windForce.x * (1-this.MASS)), // x 42 -Math.random() * 0.01, // y 43 (windForce.z * (1-this.MASS))); // z 41 (windForce.x * this.MASS), // x 42 -Math.random() * this.MASS, // y 43 (windForce.z * this.MASS) // z 44 ); 44 45 45 46 // add it to the geometry
Note:
See TracChangeset
for help on using the changeset viewer.