Hoimar / Planet-Generator

A procedural planet generator addon for Godot with terrain LOD.
Other
209 stars 23 forks source link

Doesn't work on HTML5 #18

Closed ultrazar closed 3 years ago

ultrazar commented 3 years ago

It simply doesn't patch the terrain, goes completely black.

Specs:

And throws this error every time that tries to generate the terrain:

ultrazar commented 3 years ago

Update: Threads are not currently available in godot for HTML5. Simply the TerrainJobs doesn't run.

Hoimar commented 3 years ago

Hey, thanks for the report. You could try to export in "Thread" mode (in export settings under "Variant"). Your browser needs to have SharedArrayBuffer enabled (see here for example).

You could try to turn off multithreading in const.gd, though it will tank performance obviously.

ultrazar commented 3 years ago

Hey, thanks for the report. You could try to export in "Thread" mode (in export settings under "Variant"). Your browser needs to have SharedArrayBuffer enabled (see here for example).

You could try to turn of mutlithreading in const.gd, though it will tank performance obviously.

Now it works perfect! Thanks! BTW I can't see any constant for turning off the multithreading

Hoimar commented 3 years ago

That's great to hear, I didn't even expect it to work flawlessly!

Oh, you're probably working on the master branch, sorry. You will have to check out the dev branch to find the constant THREADS_ENABLED in constants.gd:5.