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.

46 lines (45 loc) 2.32 kB
import type { LOD_Results } from "@needle-tools/gltf-progressive"; import { LODsManager as _LODsManager, NEEDLE_progressive_plugin } from "@needle-tools/gltf-progressive"; import { Camera, Mesh, Scene, WebGLRenderer } from "three"; import type { Context } from "./engine_context.js"; /** * Needle Engine LODs manager. Wrapper around the internal LODs manager. * It uses the [@needle-tools/gltf-progressive](https://npmjs.com/package/@needle-tools/gltf-progressive) package to manage LODs. * * For lower-level control (e.g. configuring max concurrent loading tasks, queue settings, or other progressive loading specifics), use {@link NEEDLE_progressive} directly. * @link https://npmjs.com/package/@needle-tools/gltf-progressive */ export declare class LODsManager implements NEEDLE_progressive_plugin { /** The type of the @needle-tools/gltf-progressive LODsManager - can be used to set static settings */ static readonly GLTF_PROGRESSIVE_LODSMANAGER_TYPE: typeof _LODsManager; readonly context: Context; private _lodsManager?; private _settings; /** * The internal LODs manager. See @needle-tools/gltf-progressive for more information. * @link https://npmjs.com/package/@needle-tools/gltf-progressive */ get manager(): _LODsManager | undefined; /** * The interval (in seconds) at which the bounding volumes of skinned meshes are automatically updated. * If set to 0, automatic updates are disabled and bounding volumes will only be updated when the mesh is loaded or when the `updateSkinnedMeshBounds` method is called manually. * @default 0 */ get skinnedMeshAutoUpdateBoundsInterval(): number; set skinnedMeshAutoUpdateBoundsInterval(value: number); /** * The target triangle density is the desired max amount of triangles on screen when the mesh is filling the screen. * @default 200_000 */ get targetTriangleDensity(): number; set targetTriangleDensity(value: number); /** @internal */ constructor(context: Context); private applySettings; /** @internal */ setRenderer(renderer: WebGLRenderer): void; disable(): void; /** @internal */ onAfterUpdatedLOD(_renderer: WebGLRenderer, _scene: Scene, camera: Camera, mesh: Mesh, level: LOD_Results): void; private onRenderDebug; }