mise
February 17, 2022, 11:24am
1
I’m on beta 8.
today I changed this line of code
import { UniversalCamera } from ‘@babylonjs /core’;
to this
import { UniversalCamera } from ‘@babylonjs /core/Cameras/universalCamera’;
which resulted in this critical error (only for webgpu, when starting the engine):
this means I am missing import(s) from core somewhere that I’m not using directly (no compile errors).
Does someone see what it is right away?
Are you sure there’s no errors before this one?
createBuffer
is a method of GPUDevice
, so there should be an error that says that WebGPU could not be initialized/the device could not be created.
Are you creating the WebGPU engine with some code like:
const engine = new BABYLON.WebGPUEngine(canvas);
await engine.initAsync();
?
1 Like
mise
February 17, 2022, 1:03pm
3
yes, this is the first error for sure.
I remember there used to be the need to globally reference, but I thought it was resolved (apparently I still had one in my code though ):
ah, that is a simple solution. For now that probably means the bundle will contain all of Babylon, but that is manageable.
Not getting any errors anymore, but not seeing any meshes either. Only an all white screen (which is not the clear color) so I have some work to do .
Thanks for now.
mise
February 18, 2022, 10:03am
4
I needed these imports:
import ‘@babylonjs /core/Engines/WebGPU/Extensions/engine.uniformBuffer’;
import ‘@babylonjs /core/Engines/WebGPU/Extensions/engine.dynamicTexture’;
import ‘@babylonjs /core/Engines/WebGPU/Extensions/engine.alpha’;
import ‘@babylonjs /core/Engines/WebGPU/Extensions/engine.dynamicBuffer’;
1 Like