@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.
31 lines (30 loc) • 1.35 kB
TypeScript
/// <reference types="webxr" />
import { Mesh, Texture } from "three";
import type { NeedleXREventArgs } from "../../engine/engine_xr.js";
import { RGBAColor } from "../../engine/js-extensions/index.js";
import { Behaviour } from "../Component.js";
/**
* WebARCameraBackground is a component that allows to display the camera feed as a background in an AR session to more easily blend the real world with the virtual world or applying effects to the camera feed.
*/
export declare class WebARCameraBackground extends Behaviour {
/** @internal */
onBeforeXR(_mode: XRSessionMode, args: XRSessionInit): void;
/** @internal */
onEnterXR(_args: NeedleXREventArgs): void;
/** @internal */
onLeaveXR(_args: NeedleXREventArgs): void;
/**
* The tint color of the camera feed
*/
backgroundTint: RGBAColor;
get background(): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap> | undefined;
private backgroundPlane?;
private threeTexture?;
private forceTextureInitialization;
/** @internal */
private preRender;
/** @internal */
onBeforeRender(_frame: XRFrame | null): void;
private updateFromFrame;
setTexture(texture: Texture): void;
}