[page:Curve] →

[name]

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

مثال الكود

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 );

المنشئ (Constructor)

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

[page:Vector3 v0] – نقطة البداية
[page:Vector3 v1] – نقطة التحكم الوسطى
[page:Vector3 v2] – نقطة النهاية

الخصائص (Properties)

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

[property:Vector3 v0]

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

[property:Vector3 v1]

نقطة التحكم.

[property:Vector3 v2]

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

الوظائف (Methods)

انظر إلى قاعدة [page:Curve] للأساليب المشتركة.

المصدر (Source)

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