TorusGeometry.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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#TorusGeometry"
  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.TorusGeometry( 10, 3, 16, 100 );
  29. const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
  30. const torus = new THREE.Mesh( geometry, material ); scene.add( torus );
  31. </code>
  32. <h2>المنشئ (Constructor)</h2>
  33. <h3>
  34. [name]([param:Float radius], [param:Float tube], [param:Integer radialSegments], [param:Integer tubularSegments], [param:Float arc])
  35. </h3>
  36. <p>
  37. radius - نصف قطر الدائرة ، من مركز الدائرة إلى مركز
  38. الأنبوب. الافتراضي هو 1. <br />
  39. tube — نصف قطر الأنبوب. الافتراضي هو 0.4. <br />
  40. radialSegments — الافتراضي هو 12 <br />
  41. tubularSegments — الافتراضي هو 48. <br />
  42. arc — زاوية مركزية. الافتراضي هو Math.PI * 2.
  43. </p>
  44. <h2>الخصائص (Properties)</h2>
  45. <p>انظر فئة [page:BufferGeometry] الأساسية للخصائص المشتركة.</p>
  46. <h3>[property:Object parameters]</h3>
  47. <p>
  48. كائن به خاصية لكل من معلمات المُنشئ. أي تعديل بعد التجسيد لا يغير الهندسة.
  49. </p>
  50. <h2>الطرق (Methods)</h2>
  51. <p>انظر فئة [page:BufferGeometry] الأساسية للطرق المشتركة.</p>
  52. <h2>المصدر (Source)</h2>
  53. <p>
  54. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  55. </p>
  56. </body>
  57. </html>