W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
創(chuàng)建一條平滑的二維 二次貝塞爾曲線, 由起點(diǎn)、終點(diǎn)和一個(gè)控制點(diǎn)所定義。
const curve = new THREE.QuadraticBezierCurve(
new THREE.Vector2( -10, 0 ),
new THREE.Vector2( 20, 15 ),
new THREE.Vector2( 10, 0 )
);
const points = curve.getPoints( 50 );
const geometry = new THREE.BufferGeometry().setFromPoints( points );
const material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
//Create the final object to add to the scene
const curveObject = new THREE.Line( geometry, material );
v0 – 起點(diǎn)
v1 – 中間的控制點(diǎn)
v2 – 終點(diǎn)
共有屬性請(qǐng)參見其基類Curve。
起點(diǎn)
控制點(diǎn)
終點(diǎn)
共有方法請(qǐng)參見其基類Curve。
src/extras/curves/QuadraticBezierCurve.js
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: