Compare commits
	
		
			No commits in common. "773abb4d36cd27499c32d62768f55783f56ab1ae" and "7791aee7216464196b8e4cb46c73a165e9ac9d80" have entirely different histories.
		
	
	
		
			773abb4d36
			...
			7791aee721
		
	
		
							
								
								
									
										15
									
								
								src/index.md
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								src/index.md
									
									
									
									
									
								
							| @ -21,6 +21,8 @@ import random from "npm:random"; | |||||||
| 
 | 
 | ||||||
| import * as resvg from 'npm:@resvg/resvg-wasm'; | import * as resvg from 'npm:@resvg/resvg-wasm'; | ||||||
| 
 | 
 | ||||||
|  | await resvg.initWasm(fetch('https://unpkg.com/@resvg/resvg-wasm/index_bg.wasm')); | ||||||
|  | 
 | ||||||
| const CELL = 10; | const CELL = 10; | ||||||
| const MAG = 2; | const MAG = 2; | ||||||
| const WIDTH = 20; | const WIDTH = 20; | ||||||
| @ -59,14 +61,6 @@ const randomise_all = view(Inputs.button("Random", {label:"all"})); | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
| ```js |  | ||||||
| // in its own code block so that it doesn't slow down load for the rest |  | ||||||
| // of the page |  | ||||||
| await resvg.initWasm(fetch('https://unpkg.com/@resvg/resvg-wasm/index_bg.wasm')); |  | ||||||
| 
 |  | ||||||
| const wasm_init = "ready"; |  | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -170,11 +164,6 @@ display(download(() => { | |||||||
|   const thing = download_as_svg(svg.node()) |   const thing = download_as_svg(svg.node()) | ||||||
|   return thing; |   return thing; | ||||||
| }, "poptimal.svg", "Save as SVG")); | }, "poptimal.svg", "Save as SVG")); | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
| ```js |  | ||||||
| 
 |  | ||||||
| await wasm_init; |  | ||||||
| 
 | 
 | ||||||
| display(download(() => { | display(download(() => { | ||||||
|   console.log("PNG value"); |   console.log("PNG value"); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user