migrating instruction generation logic to pxt
This commit is contained in:
		@@ -1,19 +1,10 @@
 | 
			
		||||
namespace pxsim.visuals {
 | 
			
		||||
    export function mkBoardView(opts: BoardHostOpts): BoardView {
 | 
			
		||||
        if (opts.boardDef.visual === "microbit") {
 | 
			
		||||
            return new visuals.MicrobitBoardSvg({
 | 
			
		||||
                runtime: runtime,
 | 
			
		||||
                theme: visuals.randomTheme(),
 | 
			
		||||
                disableTilt: false,
 | 
			
		||||
                wireframe: opts.wireframe,
 | 
			
		||||
            });
 | 
			
		||||
        } else {
 | 
			
		||||
            let boardVis = opts.boardDef.visual as BoardImageDefinition;
 | 
			
		||||
            return new visuals.GenericBoardSvg({
 | 
			
		||||
                visualDef: boardVis,
 | 
			
		||||
                wireframe: opts.wireframe,
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    mkBoardView = (opts: BoardViewOptions): BoardView => {
 | 
			
		||||
        return new visuals.MicrobitBoardSvg({
 | 
			
		||||
            runtime: runtime,
 | 
			
		||||
            theme: visuals.randomTheme(),
 | 
			
		||||
            disableTilt: false,
 | 
			
		||||
            wireframe: opts.wireframe,
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user