eval init script when loading a universe
This commit is contained in:
@ -224,6 +224,7 @@ export class UserAPI {
|
|||||||
return bar.some(b => bar_list.includes(b % n))
|
return bar.some(b => bar_list.includes(b % n))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: bugfix here
|
||||||
onbeat(...beat: number[]): boolean {
|
onbeat(...beat: number[]): boolean {
|
||||||
let final_pulses: boolean[] = []
|
let final_pulses: boolean[] = []
|
||||||
beat.forEach(b => {
|
beat.forEach(b => {
|
||||||
|
|||||||
@ -20,8 +20,8 @@ import {
|
|||||||
template_universe,
|
template_universe,
|
||||||
template_universes,
|
template_universes,
|
||||||
} from "./AppSettings";
|
} from "./AppSettings";
|
||||||
import { tryEvaluate } from "./Evaluator";
|
|
||||||
import { oneDark } from "@codemirror/theme-one-dark";
|
import { oneDark } from "@codemirror/theme-one-dark";
|
||||||
|
import { tryEvaluate } from "./Evaluator";
|
||||||
|
|
||||||
|
|
||||||
export class Editor {
|
export class Editor {
|
||||||
@ -373,6 +373,7 @@ export class Editor {
|
|||||||
this.closeBuffersModal();
|
this.closeBuffersModal();
|
||||||
// Focus on the editor
|
// Focus on the editor
|
||||||
this.view.focus();
|
this.view.focus();
|
||||||
|
tryEvaluate(this, this.universes[this.selected_universe.toString()].init)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user