A collection of utility methods for quickly spinning up test environments

Constructors

Methods

  • Use this method to quickly setup a scene to compare multiple models.

    Parameters

    • opts: ComparisonSceneOptions

    Returns Promise<{
        camera: any;
        scene: any;
    }>

    Example

    const files = [
    "https://threejs.org/examples/models/gltf/RobotExpressive/RobotExpressive.glb",
    "https://threejs.org/examples/models/gltf/Lantern/glTF-Binary/Lantern.glb",
    ];
    const { scene, camera } = await TestUtils.createComparisonScene({ files });
    // this could now be assigned to the Needle Engine Context
    context.scene = scene;
    context.mainCamera = camera;

Generated using TypeDoc