Visualize Your Ideas With Code
feature: configurable background
aarthificial2868756bdd52
diff --git a/src/Project.ts b/src/Project.tsindex df2c3022..5460c628 100644--- a/src/Project.ts+++ b/src/Project.ts@@ -18,6 +18,7 @@ export const ProjectSize = {interface ProjectConfig extends Partial<StageConfig> {scenes: SceneRunner[],+ background: string | false,}export class Project extends Stage {@@ -72,7 +73,8 @@ export class Project extends Stage {width: this.width(),height: this.height(),origin: Origin.TopLeft,- fill: '#141414',+ fill: config.background || '#ff00ff',+ visible: config.background !== false,});this.master = new Layer({name: 'master'});diff --git a/src/bootstrap.ts b/src/bootstrap.tsindex 4d1f537b..a8afb1fd 100644--- a/src/bootstrap.ts+++ b/src/bootstrap.ts@@ -7,6 +7,7 @@ import {hot} from './hot';interface BootstrapConfig {name: string;size?: Size;+ background?: string | false;scenes: SceneRunner[];audio?: {meta: Waveform;@@ -18,6 +19,7 @@ export function bootstrap(config: BootstrapConfig) {const project = new Project({name: config.name,scenes: config.scenes,+ background: config.background ?? '#141414',...(config.size ?? ProjectSize.FullHD),});const player = new Player(project, config.audio);