UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

40 lines (39 loc) 1.28 kB
import { PerspectiveCamera, Scene } from "three"; declare type ComparisonSceneOptions = { /** * An array of model urls to load */ files: string[]; /** * Optional dom element to attach the orbit controls to. By default this should be the WebGLRenderer.domElement */ domElement?: HTMLElement; /** * Can be a .hdr or .exr file url */ environment?: string; }; /** * A collection of utility methods for quickly spinning up test environments */ export declare class TestSceneUtils { /** * Use this method to quickly setup a scene to compare multiple models. * @example * ```ts * 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; * ``` */ static createComparisonScene(opts: ComparisonSceneOptions): Promise<{ scene: Scene; camera: PerspectiveCamera; }>; } export {};