Integrate templates project
This commit is contained in:
		
							parent
							
								
									3a5d4b9756
								
							
						
					
					
						commit
						76f5246814
					
				
					 55 changed files with 11946 additions and 144 deletions
				
			
		
							
								
								
									
										84
									
								
								templates/src/music/features/visualizer/cube.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								templates/src/music/features/visualizer/cube.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,84 @@ | |||
| /**  * A hand-written 3d model of a cube. | ||||
|  * | ||||
|  * If this ever needs to be more than this, consider moving it to a | ||||
|  * proper .obj model. | ||||
|  */ | ||||
| const Cube = { | ||||
|     // prettier-ignore
 | ||||
|     vertices: new Float32Array([ | ||||
|        -1.0, -1.0,  1.0, | ||||
|         1.0, -1.0,  1.0, | ||||
|         1.0,  1.0,  1.0, | ||||
|        -1.0,  1.0,  1.0, | ||||
| 
 | ||||
|        -1.0, -1.0, -1.0, | ||||
|        -1.0,  1.0, -1.0, | ||||
|         1.0,  1.0, -1.0, | ||||
|         1.0, -1.0, -1.0, | ||||
| 
 | ||||
|        -1.0,  1.0, -1.0, | ||||
|        -1.0,  1.0,  1.0, | ||||
|         1.0,  1.0,  1.0, | ||||
|         1.0,  1.0, -1.0, | ||||
| 
 | ||||
|        -1.0, -1.0, -1.0, | ||||
|         1.0, -1.0, -1.0, | ||||
|         1.0, -1.0,  1.0, | ||||
|        -1.0, -1.0,  1.0, | ||||
| 
 | ||||
|         1.0, -1.0, -1.0, | ||||
|         1.0,  1.0, -1.0, | ||||
|         1.0,  1.0,  1.0, | ||||
|         1.0, -1.0,  1.0, | ||||
| 
 | ||||
|        -1.0, -1.0, -1.0, | ||||
|        -1.0, -1.0,  1.0, | ||||
|        -1.0,  1.0,  1.0, | ||||
|        -1.0,  1.0, -1.0, | ||||
|     ]), | ||||
| 
 | ||||
|     // prettier-ignore
 | ||||
|     indices: new Uint16Array([ | ||||
|         0,  1,  2,   0,  2,  3, | ||||
|         4,  5,  6,   4,  6,  7, | ||||
|         8,  9, 10,   8, 10, 11, | ||||
|         12, 13, 14,  12, 14, 15, | ||||
|         16, 17, 18,  16, 18, 19, | ||||
|         20, 21, 22,  20, 22, 23, | ||||
|     ]), | ||||
| 
 | ||||
|     // prettier-ignore
 | ||||
|     normals: new Float32Array([ | ||||
|         0.0,  0.0,  1.0, | ||||
|         0.0,  0.0,  1.0, | ||||
|         0.0,  0.0,  1.0, | ||||
|         0.0,  0.0,  1.0, | ||||
| 
 | ||||
|         0.0,  0.0, -1.0, | ||||
|         0.0,  0.0, -1.0, | ||||
|         0.0,  0.0, -1.0, | ||||
|         0.0,  0.0, -1.0, | ||||
| 
 | ||||
|         0.0,  1.0,  0.0, | ||||
|         0.0,  1.0,  0.0, | ||||
|         0.0,  1.0,  0.0, | ||||
|         0.0,  1.0,  0.0, | ||||
| 
 | ||||
|         0.0, -1.0,  0.0, | ||||
|         0.0, -1.0,  0.0, | ||||
|         0.0, -1.0,  0.0, | ||||
|         0.0, -1.0,  0.0, | ||||
| 
 | ||||
|         1.0,  0.0,  0.0, | ||||
|         1.0,  0.0,  0.0, | ||||
|         1.0,  0.0,  0.0, | ||||
|         1.0,  0.0,  0.0, | ||||
| 
 | ||||
|         -1.0,  0.0,  0.0, | ||||
|         -1.0,  0.0,  0.0, | ||||
|         -1.0,  0.0,  0.0, | ||||
|         -1.0,  0.0,  0.0 | ||||
|     ]), | ||||
| }; | ||||
| 
 | ||||
| export { Cube }; | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue