قم بإنشاء منحنى بيزيه ثلاثي الأبعاد ناعم رباعي، محدد بنقطة البداية ونقطة النهاية ونقطة تحكم واحدة.
const curve = new THREE.QuadraticBezierCurve3(
new THREE.Vector3( -10, 0, 0 ),
new THREE.Vector3( 20, 15, 0 ),
new THREE.Vector3( 10, 0, 0 )
);
const points = curve.getPoints( 50 );
const geometry = new THREE.BufferGeometry().setFromPoints( points );
const material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
// إنشاء الكائن النهائي لإضافته إلى المشهد
const curveObject = new THREE.Line( geometry, material );
[page:Vector3 v0] – نقطة البداية
[page:Vector3 v1] – نقطة التحكم الوسطى
[page:Vector3 v2] – نقطة النهاية
انظر إلى قاعدة [page:Curve] للخصائص المشتركة.
نقطة البداية.
نقطة التحكم.
نقطة النهاية.
انظر إلى قاعدة [page:Curve] للأساليب المشتركة.
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]