You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.7 KiB
HTML

<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
[page:BufferGeometry] &rarr;
<h1>[name]</h1>
<p class="desc">
ينشئ شبكات مع تماثل محوري مثل الفازات. يدور الخراطة حول المحور Y.
</p>
<iframe
id="scene"
src="scenes/geometry-browser.html#LatheGeometry"
></iframe>
<script>
// iOS iframe auto-resize workaround
if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
const scene = document.getElementById( 'scene' );
scene.style.width = getComputedStyle( scene ).width;
scene.style.height = getComputedStyle( scene ).height;
scene.setAttribute( 'scrolling', 'no' );
}
</script>
<h2>مثال الكود</h2>
<code>
const points = [];
for ( let i = 0; i < 10; i ++ ) {
points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) );
}
const geometry = new THREE.LatheGeometry( points );
const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
const lathe = new THREE.Mesh( geometry, material );
scene.add( lathe );
</code>
<h2>المنشئ (Constructor)</h2>
<h3>
[name]([param:Array points], [param:Integer segments], [param:Float
phiStart], [param:Float phiLength])
</h3>
<p>
points — مصفوفة من Vector2s. يجب أن يكون الإحداثي x لكل نقطة أكبر من الصفر. الافتراضي هو مصفوفة مع (0، -0.5) ، (0.5، 0) و (0، 0.5) التي تنشئ شكل الماس البسيط.<br />
segments — عدد قطاعات المحيط التي يتم إنشاؤها. الافتراضي هو
12.<br />
phiStart — الزاوية الابتدائية بالراديان. الافتراضي هو 0.<br />
phiLength — المدى الرادياني (0 إلى 2PI) للقسم الملتوي 2PI هو مخرطة مغلقة ، أقل من 2PI هو جزء. الافتراضي هو 2PI.
</p>
<p>هذا ينشئ [name] بناءً على المعلمات.</p>
<h2>الخصائص (Properties)</h2>
<p>انظر فئة [page:BufferGeometry] الأساسية للخصائص المشتركة.</p>
<h3>[property:Object parameters]</h3>
<p>
كائن به خاصية لكل من معلمات المُنشئ. أي تعديل بعد التجسيد لا يغير الهندسة.
</p>
<h2>الطرق (Methods)</h2>
<p>انظر فئة [page:BufferGeometry] الأساسية للطرق المشتركة.</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>