ricmzn / BeepboxSynthesizer

Experimental project integrating https://beepbox.co into Godot using V8 (requires godot-rust)
6 stars 1 forks source link

Parser Error: Could not find type "Synthesizer" in the current scope. #1

Open Kovadon opened 4 days ago

Kovadon commented 4 days ago

image

ricmzn commented 3 days ago

That can happen if the GDExtension is not loaded, either because the compiled version is missing, or there was an issue loading it.

The compiled version is not included in the repository, so you need to compile it yourself, using a rust compiler and the instructions in the readme. Can you try it?

If you did compile it already, the next thing to check is if Godot reports any errors in the editor's output console. Can you show that?

Kovadon commented 2 days ago

Here are the steps I took:

https://gyazo.com/b674a0353fdcff59bf4054bb7a6e1864 https://gyazo.com/641265de243a454ee7c6522cc10bdbd5

image

Kovadon commented 1 day ago

As for errors, it just shows this:

image

I was getting an issue with bash not running, as I'm on Windows 11. Someone else tried to get around this by making this compile-synth.bat instead:

:: Compile synth/synth.ts into build/synth/synth.js and dependencies
npx tsc -p tsconfig_synth_only.json || exit /b %ERRORLEVEL%

:: Combine build/synth/synth.js and dependencies into website/beepbox_synth.js
npx rollup build/synth/synth.js ^
    --file website/beepbox_synth.js ^
    --format iife ^
    --output.name beepbox ^
    --context exports ^
    --sourcemap ^
    --plugin rollup-plugin-sourcemaps ^
    --plugin @rollup/plugin-node-resolve || exit /b %ERRORLEVEL%

:: Minify website/beepbox_synth.js into website/beepbox_synth.min.js
npx terser ^
    website/beepbox_synth.js ^
    --source-map "content='website/beepbox_synth.js.map',url=beepbox_synth.min.js.map" ^
    -o website/beepbox_synth.min.js ^
    --compress ^
    --mangle ^
    --mangle-props regex="/^_.+/;" || exit /b %ERRORLEVEL%

which almost worked but then it couldn't find beepbox_synth.js:

image