update hash

This commit is contained in:
Jade (Rose) Rowland 2025-11-23 20:25:13 -05:00
parent 4caacb0de1
commit 20016fd9aa
4 changed files with 25 additions and 10 deletions

View file

@ -63,7 +63,7 @@ async function getModule(name) {
const initialCode = `// LOADING`;
export function useReplContext() {
const { isSyncEnabled, audioEngineTarget, prebakeScript } = useSettings();
const { isSyncEnabled, audioEngineTarget, prebakeScript, includePrebakeScriptInShare } = useSettings();
const shouldUseWebaudio = audioEngineTarget !== audioEngineTargets.osc;
const defaultOutput = shouldUseWebaudio ? webaudioOutput : superdirtOutput;
const getTime = shouldUseWebaudio ? getAudioContextCurrentTime : getPerformanceTimeSeconds;
@ -218,7 +218,13 @@ export function useReplContext() {
editorRef.current.repl.evaluate(code);
};
const handleShare = async () => shareCode(replState.code);
const handleShare = async () => {
let code = replState.code;
if (includePrebakeScriptInShare) {
code = prebakeScript + '\n' + code;
}
shareCode(code);
};
const context = {
started,
pending,