CylinderGeometry.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">فئة لإنشاء هندسة الأسطوانة.</p>
  13. <iframe
  14. id="scene"
  15. src="scenes/geometry-browser.html#CylinderGeometry"
  16. ></iframe>
  17. <script>
  18. // iOS iframe auto-resize workaround
  19. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  20. const scene = document.getElementById( 'scene' );
  21. scene.style.width = getComputedStyle( scene ).width;
  22. scene.style.height = getComputedStyle( scene ).height;
  23. scene.setAttribute( 'scrolling', 'no' );
  24. }
  25. </script>
  26. <h2>مثال الكود</h2>
  27. <code>
  28. const geometry = new THREE.CylinderGeometry( 5, 5, 20, 32 );
  29. const material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
  30. const cylinder = new THREE.Mesh( geometry, material ); scene.add( cylinder );
  31. </code>
  32. <h2>المنشئ (Constructor)</h2>
  33. <h3>
  34. [name]([param:Float radiusTop], [param:Float radiusBottom], [param:Float height], [param:Integer radialSegments], [param:Integer heightSegments],
  35. [param:Boolean openEnded], [param:Float thetaStart], [param:Float thetaLength])
  36. </h3>
  37. <p>
  38. radiusTop — نصف قطر الأسطوانة في الأعلى. الافتراضي هو 1.<br />
  39. radiusBottom — نصف قطر الأسطوانة في الأسفل. الافتراضي هو 1.<br />
  40. height — ارتفاع الأسطوانة. الافتراضي هو 1.<br />
  41. radialSegments — عدد الوجوه المقسمة حول محيط
  42. الأسطوانة. الافتراضي هو 32<br />
  43. heightSegments — عدد صفوف الوجوه على طول ارتفاع الأسطوانة.
  44. الافتراضي هو 1.<br />
  45. openEnded — مؤشر منطقي يشير إلى ما إذا كانت طرفي الأسطوانة مفتوحة
  46. أو مغلقة. الافتراضي هو false، أي مغلق.<br />
  47. thetaStart — زاوية البدء للشريحة الأولى، الافتراضي = 0 (موقع الساعة
  48. الثالثة).<br />
  49. thetaLength — الزاوية المركزية، وغالبًا ما تسمى ثيتا، للقطاع الدائري. الافتراضي هو 2 * Pi، مما يجعله أسطوانة كاملة.
  50. </p>
  51. <h2>الخصائص (Properties)</h2>
  52. <p>انظر فئة [page:BufferGeometry] الأساسية للخصائص المشتركة.</p>
  53. <h3>[property:Object parameters]</h3>
  54. <p>
  55. كائن يحتوي على خاصية لكل من معلمات المنشئ. أي تعديل بعد التجسيد لا يغير
  56. الهندسة.
  57. </p>
  58. <h2>الطرق (Methods)</h2>
  59. <p>انظر فئة [page:BufferGeometry] الأساسية للطرق المشتركة.</p>
  60. <h2>المصدر (Source)</h2>
  61. <p>
  62. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  63. </p>
  64. </body>
  65. </html>