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.
		
		
		
		
		
			
		
			
				
					
					
						
							35 lines
						
					
					
						
							1.0 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							35 lines
						
					
					
						
							1.0 KiB
						
					
					
				
								<!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>
							 | 
						|
										<h1>Controllo compatibilità WebGL ([name])</h1>
							 | 
						|
								    <p>
							 | 
						|
								      Anche se questo sta diventano sempre meno un problema, alcuni dispositivi o browser potrebbero ancora non supportare WebGL.
							 | 
						|
								      Il seguente codice è utile per controllare se WebGL è supportato, infatti se non lo fosse viene mostrato un messaggio di errore all'utente.
							 | 
						|
										</p>
							 | 
						|
								
							 | 
						|
								    <p>
							 | 
						|
											Aggiungere il seguente link [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/capabilities/WebGL.js]
							 | 
						|
											al file javascript ed inserire il seguente codice prima di provare a renderizzare qualsiasi cosa:
							 | 
						|
										</p>
							 | 
						|
								
							 | 
						|
										<code>
							 | 
						|
										if ( WebGL.isWebGLAvailable() ) {
							 | 
						|
								
							 | 
						|
											// Avviare qui la funzione o altre inizializzazioni
							 | 
						|
											animate();
							 | 
						|
								
							 | 
						|
										} else {
							 | 
						|
								
							 | 
						|
											const warning = WebGL.getWebGLErrorMessage();
							 | 
						|
											document.getElementById( 'container' ).appendChild( warning );
							 | 
						|
								
							 | 
						|
										}
							 | 
						|
										</code>
							 | 
						|
									</body>
							 | 
						|
								</html>
							 | 
						|
								
							 |