在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ threejs創(chuàng)建的三維曲線如何控制其緩慢增長(zhǎng)

threejs創(chuàng)建的三維曲線如何控制其緩慢增長(zhǎng)

問題描述

CatmullRomCurve3 生成的曲線會(huì)整條顯示,怎么讓其慢慢變長(zhǎng)

相關(guān)代碼

          var curve = new THREE.CatmullRomCurve3( [
            new THREE.Vector3( 0, 0, 0 ),
            new THREE.Vector3( 1, -1, -1 ),
            new THREE.Vector3( -5, 5, 5 )
          ] );

          var geometry = new THREE.Geometry();
          geometry.vertices = curve.getPoints( 50 );
          console.log(curve);
          var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
          addMesh = new THREE.Line(geometry, material);
          scene.add(addMesh);
          
回答
編輯回答
避風(fēng)港

創(chuàng)建虛線,初始狀態(tài)控制實(shí)線部分為0,虛線部分為足夠長(zhǎng),然后在每一幀中通過控制虛線的虛實(shí)長(zhǎng)度分配實(shí)現(xiàn)生長(zhǎng)動(dòng)畫

2017年12月18日 09:25