How to make a scene using EngineFactory.CreateAsync?

Ola,

I’d like to support WebGPU whenever possible, and CreateAsync is the perfect solution for this. Whenever used with typescript though, it returns a ThinEngine type, which is incompatable with the Scene constructor:

	const engine: ThinEngine = await EngineFactory.CreateAsync(canvas, {
		antialiasing: true
	});

    //Argument of type 'ThinEngine' is not assignable to parameter of type 'Engine'.
	const scene = new Scene(engine, {
		useMaterialMeshMap: true,
		useGeometryUniqueIdsMap: true,
		useClonedMeshMap: true
	});

Is it still possible to make sure of CreateAsync and making a scene with it?

1 Like

Yup actually this should return an engine, the fix will be in the next release, thanks for reporting it.

1 Like