[page:Curve] →

[name]

قم بإنشاء منحنى بيزيه ثنائي الأبعاد ناعم رباعي، محدد بنقطة البداية ونقطة النهاية ونقطة تحكم واحدة.

مثال الكود

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 } ); // إنشاء الكائن النهائي لإضافته إلى المشهد const curveObject = new THREE.Line( geometry, material );

المنشئ (Constructor)

[name]( [param:Vector2 v0], [param:Vector2 v1], [param:Vector2 v2] )

[page:Vector2 v0] – نقطة البداية.
[page:Vector2 v1] – نقطة التحكم.
[page:Vector2 v2] – نقطة النهاية.

الخصائص (Properties)

انظر إلى قاعدة [page:Curve] للخصائص المشتركة.

[property:Vector2 v0]

نقطة البداية.

[property:Vector2 v1]

نقطة التحكم.

[property:Vector2 v2]

نقطة النهاية.

الخصائص (Properties)

انظر إلى الفئة الأساسية [page:Curve] للحصول على الطرق المشتركة.

المصدر (Source)

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]