pixijs/floss

electron 14 removes remote module

Opened this issue · 1 comments

Electron 14 has breaking changes for floss. Electron docs here https://github.com/electron/electron/blob/v13.1.4/docs/api/remote.md

Electron 14 is also the first version that allows you to enable webgpu by doing:

const {app, BrowserWindow} = require('electron')
app.commandLine.appendSwitch('enable-unsafe-webgpu')

(being able to test webgpu is really the only reason why it matters to me)

As you may guess, I'd like to have webgpu enabled in floss if possible too! I'm willing to fix and send a pr for both , but would like some guidance on what'd be acceptable to you. Just a fyi, browsing random sites with enable-unsafe-webgpu is supposedly unsafe because cross origin can read gpu data, i seriously dont think that matters though, especially for local testing.

The easiest thing to get floss working with v14 would be to just change the remote import to "@electron/remote" , so like a 1 line change.

enabling webgpu is also just 1 line, but the decision may or may not require some discussion with others.

Thanks for pointing this out.

  • Going to make an immediate patch release and restrict electron to <14
  • You should be able pass Chrome feature flags like this: floss --path "test/*.js" -- --enable-unsafe-webgpu
  • Will work on an update to support @electron/remote