Jump to content
Search Community

voxels

Members
  • Posts

    5
  • Joined

  • Last visited

voxels's Achievements

  1. Definitely better!! Thank u very much! Its look perfect! (so is this much more performant ? )
  2. Hi Dipscom, thanks a lot for the reaply, help me a lot ! anyway... with a SCALE VALUE and set... its work fine.. I dont have any issue. I have a problem with a ROTATION VALUE... I try to explain clean here: start at this point .. 1 - I would like to rotate a cube endless. 2 - on a sound beat i would like to give to rotation something like acceleration.. as my codepen http://codepen.io/phosl/pen/xgoBOB Thank again for your time
  3. Hi Dipscom, here the codepen request http://codepen.io/phosl/pen/xgoBOB, thanks, F
  4. Hi Dipscom, thanks a lot for your reply.. I remove the 'tick' event. Anyway i need RAF because 1 - i need to render the 3D scene constantly 2 - i call soundAnalyser also because i need to read the frequencyData of the sound "in realtime". Sincerely the code work, and its fine.. i had sync audio with tween.. ( repeat:-1 on TimelineMax created in RAF function its not working anyway) but im just worried about perfomance.. Expecially on soundAnalyzer when i create a TimelineMax every frame and immediately overwriting it in the next frame. So when you say overwriting, you mean that there aren't problem around performance ? Thanks!
  5. Hi everybody, im new on gsap...playing with threejs, tween and audio visualizer. I have a group with some mesh as child 1 - I would like to animate each element of the mesh with a value created in RAF . 2 - I would like to make endless tween on rotation (unfortunally , "repeat: -1" its not working). Is there another elegant / better solution for do that. Thanks in advance for any help... On RAF i have some function: 1 for render() three scene and one for analyze the sound and pass the value on tween. So this... // The sound analyzer . function soundAnalyzer() { if ((cristal)&&(frequencyData)){ tl_cristal_rotationX = new TimelineMax({repeat:-1 }); analyser.getByteFrequencyData(frequencyData); if(typeof frequencyData === 'object' && frequencyData.length > 0) { scale_value = 9000 - frequencyData[1] * 35 ; scale_value_Low = 1800 - frequencyData[1] * 5 ; cristal.traverse( function ( child ) { if ( child instanceof THREE.Mesh ) { tl_cristal_rotation = new TimelineMax(); tl_cristal_rotation.to(child.rotation, scale_value_Low, { ease: Linear.easeNone, x: -360 , y: -360, repeat:-1 }) } }); tl_cristal_rotationX.to(cristal.rotation, scale_value , { ease: Linear.easeNone, x: -360 }) } } } // and here RAF loop and Render // animation loop function animate() { if(dae) { soundAnalyzer() } requestAnimationFrame( animate ); render(); stats.update(); } TweenLite.ticker.addEventListener("tick", render); //and render the scene function render() { renderer.clear(); camera.position.x += ( mouseX - camera.position.x ) * .015; camera.position.y += ( - mouseY - camera.position.y ) * .015; camera.lookAt(scene.position); composer.reset(); composer.render(scene, camera); composer.pass(OldVideoPass); composer.pass(BrightnessContrastPass); composer.pass(RGBSplitPass); composer.toScreen(); } Thank u very much and sorry for my English.. hope is readable..
×
×
  • Create New...