Testing babylon

Hello there,

I’m trying to test some function using typescript with esm that wrap babylon functionalities, eg. as simple as:

async loadGltf(url: string, positionY: number = 1) {
const { meshes } = await SceneLoader.AppendAsync(url, "", this.scene);
    if (meshes[0]) meshes[0].position.y = positionY;
    this._gltfMeshes = meshes;
  }

It’s my first time testing webgl so if anyone had the opportunity to do so I’d love to know the basic or the resources I can look into. (for reference I tried emulating babylon tests without success but I wasn’t really able to fully understand the setting used there)
The main issue I’m facing right now is making esm work with webgl

Thanks in advance :slight_smile:

I would recommend to start from this - GitHub - RaananW/babylonjs-webpack-es6: Babylon.js basic scene with typescript, webpack, es6 modules, editorconfig, eslint, hot loading and more. Will even make coffee if you ask nicely.
Unit and snapshot tests are included :slight_smile:

2 Likes

Thank you, I’ll surely try this one.
Thank you for the repo :smiley:

1 Like