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.
		
		
		
		
			
				
					147 lines
				
				5.5 KiB
			
		
		
			
		
	
	
					147 lines
				
				5.5 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:Camera] →
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h1>[name]</h1>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<p class="desc">
							 | 
						||
| 
								 | 
							
								      Telecamera che utilizza la [link:https://en.wikipedia.org/wiki/Orthographic_projection proiezione ortografica].<br /><br />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      In questa modalità di proiezione, la dimensione di un oggetto nell'immagine visualizzata rimane costante indipendentemente
							 | 
						||
| 
								 | 
							
								      dalla sua distanza dalla telecamera.<br /><br />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      Questa telecamera, tra le altre cose, può essere utile per il rendering di scene 2D ed elementi della UI.
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h2>Codice di Esempio</h2>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<code>
							 | 
						||
| 
								 | 
							
										const camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
							 | 
						||
| 
								 | 
							
										scene.add( camera );
							 | 
						||
| 
								 | 
							
										</code>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h2>Esempi</h2>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
											[example:webgl_camera camera ]<br />
							 | 
						||
| 
								 | 
							
											[example:webgl_interactive_cubes_ortho interactive / cubes / ortho ]<br />
							 | 
						||
| 
								 | 
							
											[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]<br />
							 | 
						||
| 
								 | 
							
											[example:webgl_postprocessing_advanced postprocessing / advanced ]<br />
							 | 
						||
| 
								 | 
							
											[example:webgl_postprocessing_dof2 postprocessing / dof2 ]<br />
							 | 
						||
| 
								 | 
							
											[example:webgl_postprocessing_godrays postprocessing / godrays ]<br />
							 | 
						||
| 
								 | 
							
											[example:webgl_rtt rtt ]<br />
							 | 
						||
| 
								 | 
							
											[example:webgl_shaders_tonemapping shaders / tonemapping ]<br />
							 | 
						||
| 
								 | 
							
											[example:webgl_shadowmap shadowmap ]
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h2>Costruttore</h2>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[name]( [param:Number left], [param:Number right], [param:Number top], [param:Number bottom], [param:Number near], [param:Number far] )</h3>
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
								      left — Piano sinistro del frustum della telecamera.<br />
							 | 
						||
| 
								 | 
							
								      right — Piano destro del frustum della telecamera.<br />
							 | 
						||
| 
								 | 
							
								      top — Piano superiore del frustum della telecamera.<br />
							 | 
						||
| 
								 | 
							
								      bottom — Piano inferiore del frustum della telecamera.<br />
							 | 
						||
| 
								 | 
							
								      near — Piano near del frustum della telecamera.<br />
							 | 
						||
| 
								 | 
							
								      far — Piano far del frustum della telecamera.<br /><br />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      Queste proprietà insieme definiscono il [link:https://en.wikipedia.org/wiki/Viewing_frustum frustum visivo] della telecamera.
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h2>Proprietà</h2>
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
								      Vedi la classe base [page:Camera] per le proprietà comuni.<br>
							 | 
						||
| 
								 | 
							
								      Si noti che dopo aver apportato modifiche alla maggior parte di queste proprietà 
							 | 
						||
| 
								 | 
							
								      sarà necessario chiamare il metodo [page:OrthographicCamera.updateProjectionMatrix .updateProjectionMatrix]
							 | 
						||
| 
								 | 
							
								      affinché le modifiche abbiano effetto.
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[property:Float bottom]</h3>
							 | 
						||
| 
								 | 
							
										<p>Piano inferiore del frustum della telecamera.</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[property:Float far]</h3>
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
								      Piano far del frustum della telecamera. Il valore predefinito è `2000`.<br /><br />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      Deve essere maggiore del valore corrente del piano [page:.near near].
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[property:Boolean isOrthographicCamera]</h3>
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
								      Flag di sola lettura per verificare se un dato oggetto è di tipo [name].
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[property:Float left]</h3>
							 | 
						||
| 
								 | 
							
										<p>Piano sinistro del frustum della telecamera.</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[property:Float near]</h3>
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
								      Piano near del frustum della telecamera. Il valore predefinito è `0.1`.<br /><br />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      L'intervallo valido è tra `0` e il valore corrente del piano [page:.far far].
							 | 
						||
| 
								 | 
							
								      Si noti che, diversamente dalla [page:PerspectiveCamera], `0` è un valore valido 
							 | 
						||
| 
								 | 
							
								      per il piano near della OrthographicCamera.
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[property:Float right]</h3>
							 | 
						||
| 
								 | 
							
										<p>Piano destro del frustum della telecamera.</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[property:Float top]</h3>
							 | 
						||
| 
								 | 
							
										<p>Piano superiore del frustum della telecamera.</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[property:Object view]</h3>
							 | 
						||
| 
								 | 
							
										<p>Impostato da [page:OrthographicCamera.setViewOffset setViewOffset]. Il valore predefinito è `null`.</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[property:number zoom]</h3>
							 | 
						||
| 
								 | 
							
										<p>Ottiene o imposta il fattore zoom della telecamera. Il valore predefinito è `1`.</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h2>Metodi</h2>
							 | 
						||
| 
								 | 
							
										<p>Vedi la classe base [page:Camera] per i metodi comuni.</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[method:undefined setViewOffset]( [param:Float fullWidth], [param:Float fullHeight], [param:Float x], [param:Float y], [param:Float width], [param:Float height] )</h3>
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
								      fullWidth — Larghezza totale dell'impostazione multiview<br />
							 | 
						||
| 
								 | 
							
								      fullHeight — Altezza totale dell'impostazione multiview<br />
							 | 
						||
| 
								 | 
							
								      x — Offset orizzontale della telecamera secondaria<br />
							 | 
						||
| 
								 | 
							
								      y — Offset verticale della telecamera secondaria<br />
							 | 
						||
| 
								 | 
							
								      width — Larghezza della telecamera secondaria<br />
							 | 
						||
| 
								 | 
							
								      height — Altezza della telecamera secondaria<br /><br />
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      Imposta un offset in un [link:https://en.wikipedia.org/wiki/Viewing_frustum frustum visivo] più ampio.
							 | 
						||
| 
								 | 
							
								      È utile per le configurazioni multi-window o multi-monitor/multi-machine.
							 | 
						||
| 
								 | 
							
								      Per un esempio di utilizzo, consultare [page:PerspectiveCamera.setViewOffset PerspectiveCamera].
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[method:undefined clearViewOffset]()</h3>
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
								      Rimuove qualsiasi offset impostato dal metodo .setViewOffset.
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[method:undefined updateProjectionMatrix]()</h3>
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
								      Aggiorna la matrice di proiezione della telecamera. Deve essere chiamato dopo ogni modifica dei parametri.
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h3>[method:Object toJSON]([param:Object meta])</h3>
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
										  meta -- oggetto contenente metadati come texture o immagini nei discendenti degli oggetti.<br />
							 | 
						||
| 
								 | 
							
								      Converte la fotocamera nel [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 formato JSON Object/Scene] di three.js.
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<h2>Source</h2>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										<p>
							 | 
						||
| 
								 | 
							
											[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
							 | 
						||
| 
								 | 
							
										</p>
							 | 
						||
| 
								 | 
							
									</body>
							 | 
						||
| 
								 | 
							
								</html>
							 |