You could use something like this … that will let you use WebGPU at some point too. Engine examples do this.
const gfxOptions = {
deviceTypes: [deviceType],
glslangUrl: '/static/lib/glslang/glslang.js',
twgslUrl: '/static/lib/twgsl/twgsl.js',
antialias: false
};
pc.createGraphicsDevice(canvas, gfxOptions).then((device: pc.GraphicsDevice) => {
otherwise look at the WebglGraphicsDevice constructor / Application constructor on what can be passed to it.