Changeset 29694
- Timestamp:
- 2015-01-22T14:28:16+13:00 (8 years ago)
- Location:
- other-projects/nz-flag-design/trunk/render-3d
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nz-flag-design/trunk/render-3d/CSS/slider.css
r29693 r29694 2 2 width: 50vw; 3 3 height: 50px; 4 position: relative; 5 margin: 0 auto; 6 margin-top: 20px; 4 position: absolute; 5 margin: 0; 6 margin-top: 15px; 7 left: 25vw; 7 8 background: url('../images/slider-graphics.png') no-repeat left top; 8 background-color: transparent;9 9 border: none; 10 border-color: transparent;11 10 outline: 0; 12 color: transparent;13 11 z-index: 0; 14 12 } … … 29 27 position: absolute; 30 28 background: url('../images/speed-full.png') no-repeat left top; 31 opacity: 0. 5;29 opacity: 0.7; 32 30 border: none; 33 31 outline: 0; … … 35 33 36 34 #speed .ui-slider-handle{ 37 width: 38px; 38 height: 39px; 39 background: url('../images/slider-knob.png') no-repeat left top; 35 width: 50px; 36 height: 39px; 37 background: url('../images/wind-symbol.png') no-repeat center; 38 background-size: cover; 40 39 position: absolute; 41 40 margin-left: -15px; -
other-projects/nz-flag-design/trunk/render-3d/Flag_files/Flag.js
r29693 r29694 269 269 particle.addForce(gravity); 270 270 // 271 var x = particle.position.x, y = particle.position.y, z = particle.position.z, t=Date.now() / 1000;271 //var x = particle.position.x, y = particle.position.y, z = particle.position.z, t=Date.now() / 1000; 272 272 //windForce.set(Math.sin(x*y*t), Math.cos(z*t), Math.sin(Math.cos(5*x*y*z))).multiplyScalar(0); 273 particle.addForce(windForce);273 //particle.addForce(windForce); 274 274 particle.integrate(TIMESTEP_SQ); 275 275 } … … 291 291 292 292 // Pin Constrains 293 if(Boolean(pinning)){ 294 for (i=0, il=pins.length;i<il;i++) { 295 var xy = pins[i]; 296 var p = particles[xy]; 297 p.position.copy(p.original); 298 p.previous.copy(p.original); 299 } 300 } 301 302 } 293 for (i=0, il=pins.length;i<il;i++) { 294 var xy = pins[i]; 295 var p = particles[xy]; 296 p.position.copy(p.original); 297 p.previous.copy(p.original); 298 } 299 } -
other-projects/nz-flag-design/trunk/render-3d/Flag_files/slider.js
r29693 r29694 1 1 jQuery(document).ready(function ($) { 2 2 $("#speed").slider({ 3 min: 0,4 max: 100,5 value: 0,3 min: 25, 4 max: 300, 5 value: 100, 6 6 animate: true, 7 7 range: 'min', 8 8 slide: function(event, ui) { 9 setSpeed(ui.value /100);9 setSpeed(ui.value); 10 10 } 11 11 }); … … 20 20 21 21 function setSpeed(speed){ 22 wind Force.set(speed,100,speed);22 windStrength = speed; 23 23 } 24 24 }); -
other-projects/nz-flag-design/trunk/render-3d/flag.html
r29693 r29694 13 13 body { 14 14 font-family: Monospace; 15 background-color: #000;15 background-color: transparent; 16 16 color: #000; 17 17 margin: 0px; … … 124 124 125 125 <script type="x-shader/x-fragment" id="fragmentShaderDepth"> 126 126 127 127 uniform sampler2D texture; 128 128 varying vec2 vUV; … … 227 227 container = document.createElement( 'div' ); 228 228 document.body.appendChild( container ); 229 229 230 windStrength = 100; 230 231 231 232 // scene … … 363 364 // 364 365 365 stats = new Stats();366 /*stats = new Stats(); 366 367 stats.domElement.style.position = 'absolute'; 367 368 stats.domElement.style.top = '0px'; … … 370 371 stats.domElement.children[ 0 ].children[ 0 ].style.color = "#aaa"; 371 372 stats.domElement.children[ 0 ].style.background = "transparent"; 372 stats.domElement.children[ 0 ].children[ 1 ].style.display = "none"; 373 stats.domElement.children[ 0 ].children[ 1 ].style.display = "none";*/ 373 374 374 375 // … … 465 466 466 467 var time = Date.now(); 467 468 windStrength = Math.cos( time / 7000 ) * 100 + 200;468 469 //windStrength = Math.cos( time / 7000 ) * 100 + 200; 469 470 windForce.set( 1000,500,Math.sin( time / 1000 ) ).normalize().multiplyScalar( windStrength ); 470 471 arrow.setLength( windStrength ); … … 474 475 simulate(time); 475 476 render(); 476 stats.update();477 //stats.update(); 477 478 478 479 } … … 521 522 522 523 </script> 523 524 </body></html> 524 525 </body> 526 </html> -
other-projects/nz-flag-design/trunk/render-3d/weather/rain.js
r29634 r29694 14 14 15 15 // create the particle variables 16 this.particleCount = 3500,16 this.particleCount = 10000, 17 17 this.particles = new THREE.Geometry(), 18 18 this.pMaterial = new THREE.ParticleBasicMaterial({ … … 32 32 // create a particle with random 33 33 // position values, -250 -> 250 34 var pX = (Math.random() * 3000) - 1500,35 pY = Math.random() * window.innerHeight * 3- window.innerHeight,36 pZ = (Math.random() * 3000) - 1500;34 var pX = (Math.random() * 10000) - 5000, 35 pY = Math.random() * window.innerHeight * 6 - window.innerHeight, 36 pZ = (Math.random() * 10000) - 5000; 37 37 this.particle = new THREE.Vector3(pX, pY, pZ); 38 38 … … 72 72 // check if we need to reset 73 73 if(this.particle.y < -10) { 74 this.particle.y = (window.innerHeight* 2)+(Math.random() * 100);74 this.particle.y = (window.innerHeight*6)+(Math.random() * 100); 75 75 this.particle.velocity.y = 0; 76 this.particle.x = (Math.random() * 4000) - 2000;77 this.particle.z = (Math.random() * 4000) - 2000;76 this.particle.x = (Math.random() * 10000) - 5000; 77 this.particle.z = (Math.random() * 10000) - 5000; 78 78 79 79 } -
other-projects/nz-flag-design/trunk/render-3d/weather/snow.js
r29634 r29694 14 14 15 15 // create the particle variables 16 this.particleCount = 3000,16 this.particleCount = 6000, 17 17 this.particles = new THREE.Geometry(), 18 18 … … 33 33 // create a particle with random 34 34 // position values 35 var pX = (Math.random() * 3000) - 1500,36 pY = Math.random() * window.innerHeight * 3- window.innerHeight,37 pZ = (Math.random() * 3000) - 1500;35 var pX = (Math.random() * 10000) - 5000, 36 pY = Math.random() * window.innerHeight * 6 - window.innerHeight, 37 pZ = (Math.random() * 10000) - 5000; 38 38 this.particle = new THREE.Vector3(pX, pY, pZ); 39 39 … … 75 75 // check if we need to reset 76 76 if(this.particle.y < -10) { 77 this.particle.y = (window.innerHeight* 2)+(Math.random() * 100);77 this.particle.y = (window.innerHeight*6)+(Math.random() * 100); 78 78 this.particle.velocity.y = 0; 79 this.particle.x = (Math.random() * 4000) - 2000;80 this.particle.z = (Math.random() * 4000) - 2000;79 this.particle.x = (Math.random() * 10000) - 5000; 80 this.particle.z = (Math.random() * 10000) - 5000; 81 81 82 82 }
Note:
See TracChangeset
for help on using the changeset viewer.