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

75 lines
2.7 KiB

2 years ago
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:BufferGeometry] &rarr;
<h1>[name]</h1>
<p class="desc">
[name] è una classe di geometria per un cuboide rettangolare con una determinata 'larghezza' (width), 'altezza' (height) e 'profondità' (depth).
Al momento della creazione, il cuboide è centrato nell'origine, con ciascun bordo parallelo ad uno degli assi.
</p>
<iframe id="scene" src="scenes/geometry-browser.html#BoxGeometry"></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>Codice di Esempio</h2>
<code>const geometry = new THREE.BoxGeometry( 1, 1, 1 );
const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
const cube = new THREE.Mesh( geometry, material );
scene.add( cube );
</code>
<h2>Costruttore</h2>
<h3>[name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])</h3>
<p>
width — Larghezza; cioè la lunghezza dei bordi paralleli all'asse X. Opzionale; il valore predefinito è 1.<br />
height — Altezza; cioè la lunghezza dei bordi paralleli all'asse Y. Opzionale; il valore predefinito è 1.<br />
depth — Profondità; cioè la lunghezza dei bordi paralleli all'asse Z. Opzionale; il valore predefinito è 1.<br />
widthSegments — Numero di facce rettangolari segmentate lungo la larghezza dei lati. Opzionale; il valore predefinito è 1.<br />
heightSegments — Numero di facce rettangolari segmentate lungo l'altezza dei lati. Opzionale; il valore predefinito è 1.<br />
depthSegments — Numero di facce rettangolari segmentate lungo la profondità dei lati. Opzionale; il valore predefinito è 1.<br />
</p>
<h2>Proprietà</h2>
<p>Vedi la classe base [page:BufferGeometry] per le proprietà comuni.</p>
<h3>[property:Object parameters]</h3>
<p>
Un oggetto con una proprietà per ognuno dei parametri del costruttore. Qualsiasi modifica dopo l'istanziazione non cambia la geometria.
</p>
<h2>Metodi</h2>
<p>Vedi la classe base [page:BufferGeometry] per i metodi comuni.</p>
<h2>Source</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>