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.
		
		
		
		
			
				
					86 lines
				
				2.4 KiB
			
		
		
			
		
	
	
					86 lines
				
				2.4 KiB
			| 
											3 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] → [page:Mesh] → | ||
|  | 
 | ||
|  | 		<h1>[name]</h1> | ||
|  | 
 | ||
|  | 		<p class="desc"> | ||
|  |       Questo mostra un oggetto helper costituito da una [page:Mesh] sferica per la visualizzazione di  | ||
|  |       un [page:PointLight]. | ||
|  | 		 </p> | ||
|  | 
 | ||
|  | 		 <h2>Codice di Esempio</h2> | ||
|  | 
 | ||
|  | 		<code> | ||
|  | 		const pointLight = new THREE.PointLight( 0xff0000, 1, 100 ); | ||
|  | 		pointLight.position.set( 10, 10, 10 ); | ||
|  | 		scene.add( pointLight ); | ||
|  | 
 | ||
|  | 		const sphereSize = 1; | ||
|  | 		const pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize ); | ||
|  | 		scene.add( pointLightHelper ); | ||
|  | 		</code> | ||
|  | 
 | ||
|  | 		<h2>Esempi</h2> | ||
|  | 
 | ||
|  | 		<p> | ||
|  | 			[example:webgl_helpers WebGL /  helpers] | ||
|  | 		</p> | ||
|  | 
 | ||
|  | 		<h2>Costruttore</h2> | ||
|  | 
 | ||
|  | 		<h3>[name]( [param:PointLight light], [param:Float sphereSize], [param:Hex color] )</h3> | ||
|  | 		<p> | ||
|  | 		[page:PointLight light] -- La luce da visualizzare. <br /><br /> | ||
|  | 
 | ||
|  | 		[page:Float sphereSize] -- (opzionale) La dimensione della sfera. Il valore predefinito è `1`.<br /><br /> | ||
|  | 
 | ||
|  | 		[page:Hex color] -- (opzionale) Se non è impostato l'helper prenderà il colore della luce. | ||
|  | 		</p> | ||
|  | 
 | ||
|  |     <h2>Proprietà</h2> | ||
|  | 		<p>Vedi la classe base [page:Mesh] per le proprietà in comune.</p> | ||
|  | 
 | ||
|  | 		<h3>[property:PointLight light]</h3> | ||
|  | 		<p>La [page:PointLight] che viene visualizzata.</p> | ||
|  | 
 | ||
|  | 		<h3>[property:Object matrix]</h3> | ||
|  | 		<p>Riferimento alla [page:Object3D.matrixWorld matrixWorld] del pointLight.</p> | ||
|  | 
 | ||
|  | 		<h3>[property:Object matrixAutoUpdate]</h3> | ||
|  | 		<p> | ||
|  | 			Vedi [page:Object3D.matrixAutoUpdate]. In questo caso è impostato su `false`, poiché l'helper sta usando | ||
|  | 			[page:Object3D.matrixWorld matrixWorld] della telecamera. | ||
|  | 		</p> | ||
|  | 
 | ||
|  | 		<h3>[property:hex color]</h3> | ||
|  | 		<p> | ||
|  | 			Il parametro colore passato nel costruttore. Il valore predefinito è `undefined`. Se viene modificato, | ||
|  |       il colore dell'helper sarà aggiornato la prossima volta che il metodo [page:.update update] venga chiamato. | ||
|  | 		</p> | ||
|  | 
 | ||
|  | 		<h2>Metodi</h2> | ||
|  | 		<p>Vedi la classe base [page:Mesh] per i metodi comuni.</p> | ||
|  | 
 | ||
|  | 		<h3>[method:undefined dispose]()</h3> | ||
|  | 		<p>Elimina il pointLightHelper.</p> | ||
|  | 
 | ||
|  | 
 | ||
|  | 		<h3>[method:undefined update]()</h3> | ||
|  | 		<p>Aggiorna l'helper in modo che corrisponda alla posizione della [page:.light luce].</p> | ||
|  | 
 | ||
|  | 		<h2>Source</h2> | ||
|  | 
 | ||
|  | 		<p> | ||
|  | 			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] | ||
|  | 		</p> | ||
|  | 	</body> | ||
|  | </html> |