CapsuleGeometry.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html lang="ar">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body class="rtl">
  10. [page:BufferGeometry] → [page:LatheGeometry] →
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. [name] هي فئة هندسة لكبسولة بأشعة وارتفاع محدد. يتم بناؤها باستخدام مخرطة.
  14. </p>
  15. <iframe
  16. id="scene"
  17. src="scenes/geometry-browser.html#CapsuleGeometry"
  18. ></iframe>
  19. <script>
  20. // iOS iframe auto-resize workaround
  21. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  22. const scene = document.getElementById( 'scene' );
  23. scene.style.width = getComputedStyle( scene ).width;
  24. scene.style.height = getComputedStyle( scene ).height;
  25. scene.setAttribute( 'scrolling', 'no' );
  26. }
  27. </script>
  28. <h2>مثال الكود</h2>
  29. <code>
  30. const geometry = new THREE.CapsuleGeometry( 1, 1, 4, 8 );
  31. const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
  32. const capsule = new THREE.Mesh( geometry, material ); scene.add( capsule );
  33. </code>
  34. <h2>المنشئ (Constructor)</h2>
  35. <h3>
  36. [name]([param:Float radius], [param:Float length], [param:Integer capSegments], [param:Integer radialSegments])
  37. </h3>
  38. <p>
  39. radius — نصف قطر الكبسولة. اختياري؛ الافتراضي هو 1.<br />
  40. length — طول القسم الأوسط. اختياري؛ الافتراضي هو 1.<br />
  41. capSegments — عدد قطاعات المنحنى المستخدمة لبناء الأغطية. اختياري؛
  42. الافتراضي هو 4.<br />
  43. radialSegments — عدد الوجوه المقسمة حول محيط
  44. الكبسولة. اختياري؛ الافتراضي هو 8.<br />
  45. </p>
  46. <h2>الخصائص (Properties)</h2>
  47. <p>انظر فئة [page:BufferGeometry] الأساسية للخصائص المشتركة.</p>
  48. <h3>[property:Object parameters]</h3>
  49. <p>
  50. كائن يحتوي على خاصية لكل من معلمات المنشئ. أي تعديل بعد التجسيد لا يغير
  51. الهندسة.
  52. </p>
  53. <h2>الطرق (Methods)</h2>
  54. <p>انظر فئة [page:BufferGeometry] الأساسية للطرق المشتركة.</p>
  55. <h2>المصدر (Source)</h2>
  56. <p>
  57. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  58. </p>
  59. </body>
  60. </html>