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.
94 lines
3.1 KiB
94 lines
3.1 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:Object3D] →
|
||
|
|
||
|
<h1>[name]</h1>
|
||
|
|
||
|
<p class="desc">
|
||
|
Una classe che rappresenta oggetti basati su [link:https://en.wikipedia.org/wiki/Polygon_mesh mesh poligonali] triangolari.
|
||
|
Serve anche come base per altre classi come [page:SkinnedMesh].
|
||
|
</p>
|
||
|
|
||
|
<h2>Codice di Esempio</h2>
|
||
|
|
||
|
<code>
|
||
|
const geometry = new THREE.BoxGeometry( 1, 1, 1 );
|
||
|
const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||
|
const mesh = new THREE.Mesh( geometry, material );
|
||
|
scene.add( mesh );
|
||
|
</code>
|
||
|
|
||
|
<h2>Costruttore</h2>
|
||
|
|
||
|
<h3>[name]( [param:BufferGeometry geometry], [param:Material material] )</h3>
|
||
|
<p>
|
||
|
[page:BufferGeometry geometry] — (opzionale) un'istanza di [page:BufferGeometry]. Il valore predefinito è una nuova [page:BufferGeometry].<br />
|
||
|
[page:Material material] — (opzionale) un singolo o un array di [page:Material Material]. Il valore predefinito è una nuova [page:MeshBasicMaterial].
|
||
|
</p>
|
||
|
|
||
|
<h2>Proprietà</h2>
|
||
|
<p>Vedi la classe base [page:Object3D] per le proprietà comuni.</p>
|
||
|
|
||
|
<h3>[property:BufferGeometry geometry]</h3>
|
||
|
<p>
|
||
|
Un'istanza di [page:BufferGeometry] (o classi derivate), che definisce la struttura dell'oggetto.
|
||
|
</p>
|
||
|
|
||
|
<h3>[property:Boolean isMesh]</h3>
|
||
|
<p>
|
||
|
Flag di sola lettura per verificare se l'oggetto dato è di tipo [name].
|
||
|
</p>
|
||
|
|
||
|
<h3>[property:Material material]</h3>
|
||
|
<p>
|
||
|
Un'istanza di materiale derivata dalla classe base [page:Material] o un array di materiali, che definisce
|
||
|
l'aspetto dell'oggetto. Il valore predefinito è [page:MeshBasicMaterial].
|
||
|
</p>
|
||
|
|
||
|
<h3>[property:Array morphTargetInfluences]</h3>
|
||
|
<p>
|
||
|
Un array di pesi solitamente da 0 a 1 che specifica la quantità di morph applicata.
|
||
|
Non definito per impostazione predefinita, ma reimpostato su un array vuoto da [page:Mesh.updateMorphTargets updateMorphTargets].
|
||
|
</p>
|
||
|
|
||
|
<h3>[property:Object morphTargetDictionary]</h3>
|
||
|
<p>
|
||
|
Un dizionario di morphTargets basato sulla proprietà morphTarget.name.
|
||
|
Non definito per impostazione predefinita, ma ricompilato [page:Mesh.updateMorphTargets updateMorphTargets].
|
||
|
</p>
|
||
|
|
||
|
<h2>Metodi</h2>
|
||
|
<p>Vedi la classe base [page:Object3D] per i metodi comuni.</p>
|
||
|
|
||
|
<h3>[method:Mesh clone]()</h3>
|
||
|
<p>Restituisce un clone di questo oggetto [name] e i suoi discendenti.</p>
|
||
|
|
||
|
<h3>[method:undefined raycast]( [param:Raycaster raycaster], [param:Array intersects] )</h3>
|
||
|
<p>
|
||
|
Ottiene le intersezioni tra un raggio lanciato e questa mesh.
|
||
|
[page:Raycaster.intersectObject] chiamerà questo metodo, ma i risultati non saranno ordinati.
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:undefined updateMorphTargets]()</h3>
|
||
|
<p>
|
||
|
Aggiorna i morphTargets in modo che non abbiano influenza sull'oggetto. Reimposta le proprietà
|
||
|
[page:Mesh.morphTargetInfluences morphTargetInfluences] e
|
||
|
[page:Mesh.morphTargetDictionary morphTargetDictionary].
|
||
|
</p>
|
||
|
|
||
|
|
||
|
<h2>Source</h2>
|
||
|
|
||
|
<p>
|
||
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||
|
</p>
|
||
|
</body>
|
||
|
</html>
|