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.

25 lines (24 loc) 959 B
import { Material, Mesh, Texture, Vector4 } from "three"; import type { Context } from "../engine/engine_setup.js"; export declare class RendererLightmap { get lightmap(): Texture | null; set lightmap(tex: Texture | null); private lightmapIndex; private lightmapScaleOffset; private context; private gameObject; private lightmapTexture; private lightmapScaleOffsetUniform; private lightmapUniform; constructor(gameObject: Mesh, context: Context); init(lightmapIndex: number, lightmapScaleOffset: Vector4, lightmapTexture: Texture): void; updateLightmapUniforms(material: Material): void; /** * Apply the lightmap to the object. This will clone the material and set the lightmap texture and scale/offset */ applyLightmap(): void; private ensureLightmapMaterial; private assignLightmapTexture; private onBeforeCompile; private setLightmapDebugMaterial; }