ng-cw-v12
Version:
Angular UI Component Library
67 lines (66 loc) • 3.08 kB
TypeScript
import { OnInit, OnDestroy, AfterViewInit, ElementRef, OnChanges, SimpleChanges, NgZone } from '@angular/core';
import * as i0 from "@angular/core";
export declare type NcLightRaysOriginType = 'top-left' | 'top-center' | 'top-right' | 'left' | 'right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
export declare class LightRaysBackgroundComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {
private ngZone;
containerRef: ElementRef<HTMLDivElement>;
/** 光线发射源位置。可选项: 'top-center', 'top-left', 'top-right', 'right', 'left', 'bottom-center', 'bottom-right', 'bottom-left' */
ncRaysOrigin: NcLightRaysOriginType;
/** 射线颜色,十六进制格式 */
ncRaysColor: string;
/** 射线动画速度(0.1-3) */
ncRaysSpeed: number;
/** 光线扩散宽度(0.1-2) */
ncLightSpread: number;
/** 光线的最大长度/范围(0.5-3)*/
ncRayLength: number;
/** 启用脉动(闪烁)动画效果 */
private _pulsating;
set ncPulsating(val: boolean | string);
get ncPulsating(): boolean;
/** 射线从源头开始淡出的距离(0.5-2)*/
ncFadeDistance: number;
/** 颜色饱和度(0-1)*/
ncSaturation: number;
/** 让光线向鼠标光标方向旋转 */
private _followMouse;
set ncFollowMouse(val: boolean | string);
get ncFollowMouse(): boolean;
/** 鼠标对光线的影响程度(0-1)*/
ncMouseInfluence: number;
/** 给光线添加噪点/颗粒感(0-1)*/
ncNoiseAmount: number;
/** 对光线应用波形扭曲(0-1)*/
ncDistortion: number;
/** 背景颜色 */
ncBgColor: string;
private renderer;
private material;
private scene;
private camera;
private resizeObserver;
private intersectionObserver;
private rafId;
private resizeRafId;
private isVisible;
private running;
private mouse;
private smoothMouse;
constructor(ngZone: NgZone);
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
private initWebGL;
private _onVisibility;
private updatePlacement;
private loop;
private start;
private pause;
private setupResizeObserver;
private setupIntersectionObserver;
private cleanup;
onMouseMove(event: MouseEvent): void;
static ɵfac: i0.ɵɵFactoryDeclaration<LightRaysBackgroundComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<LightRaysBackgroundComponent, "nc-light-rays-background", never, { "ncRaysOrigin": "ncRaysOrigin"; "ncRaysColor": "ncRaysColor"; "ncRaysSpeed": "ncRaysSpeed"; "ncLightSpread": "ncLightSpread"; "ncRayLength": "ncRayLength"; "ncPulsating": "ncPulsating"; "ncFadeDistance": "ncFadeDistance"; "ncSaturation": "ncSaturation"; "ncFollowMouse": "ncFollowMouse"; "ncMouseInfluence": "ncMouseInfluence"; "ncNoiseAmount": "ncNoiseAmount"; "ncDistortion": "ncDistortion"; "ncBgColor": "ncBgColor"; }, {}, never, ["*"]>;
}