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.

68 lines (67 loc) 2.21 kB
import { Behaviour } from "./Component.js"; /** * GroundProjectedEnv creates a ground projection of the current environment map. * @category Rendering * @group Components */ export declare class GroundProjectedEnv extends Behaviour { /** * If true the projection will be created on awake and onEnable * @default false */ applyOnAwake: boolean; /** * When enabled the position of the projected environment will be adjusted to be centered in the scene (and ground level). * @default true */ autoFit: boolean; /** * Radius of the projection sphere. Set it large enough so the camera stays inside (make sure the far plane is also large enough) * @default 50 */ set radius(val: number); get radius(): number; private _radius; /** * How far the camera that took the photo was above the ground. A larger value will magnify the downward part of the image. * @default 3 */ set height(val: number); get height(): number; private _height; /** * Blending factor for the AR projection being blended with the scene background. * 0 = not visible in AR - 1 = blended with real world background. * Values between 0 and 1 control the smoothness of the blend while lower values result in smoother blending. * @default 0 */ set arBlending(val: number); get arBlending(): number; private _arblending; private _lastBackground?; private _lastRadius?; private _lastHeight?; private _projection?; private _watcher?; /** @internal */ awake(): void; /** @internal */ onEnable(): void; /** @internal */ onDisable(): void; /** @internal */ onEnterXR(): void; /** @internal */ onLeaveXR(): Promise<void>; /** @internal */ onBeforeRender(): void; private updateAndCreate; private _needsTextureUpdate; /** * Updates the ground projection. This is called automatically when the environment or settings change. */ updateProjection(): void; private _blurrynessShader; private _lastBlurriness; private updateBlurriness; }