ng-cw-v12
Version:
Angular UI Component Library
77 lines (76 loc) • 4.15 kB
TypeScript
import { OnInit, OnDestroy, AfterViewInit, ElementRef, OnChanges, SimpleChanges, NgZone } from '@angular/core';
import * as i0 from "@angular/core";
export declare class LiquidEtherBackgroundComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {
private ngZone;
containerRef: ElementRef<HTMLDivElement>;
/** 背景颜色 */
ncBgColor: string;
/** 颜色数组,用于映射流体速度场的渲染颜色 */
ncColors: string[];
/** 鼠标拖动产生的流体力度(0-60) */
ncMouseForce: number;
/** 鼠标影响半径(单位:像素 10-300) */
ncCursorSize: number;
/** 是否启用粘性模拟(启用后运动更平滑、更厚重) */
private _isViscous;
set ncIsViscous(val: boolean | string);
get ncIsViscous(): boolean;
/** 粘性系数(仅在 ncIsViscous 为 true 时生效 1-100) */
ncViscous: number;
/** 粘性扩散的迭代次数(仅在ncIsViscous为true时生效 1-64,次数越多,迭代越平滑,速度越慢)) */
ncIterationsViscous: number;
/** 强制不可压缩性所需的压力泊松迭代次数(2-64) */
ncIterationsPoisson: number;
/** 在对流/扩散过程中使用固定的模拟时间步长,数值越小越精确但性能开销更高 */
ncDt: number;
/** 启用BFECC平流(误差补偿)可获得更清晰的流场;禁用可略微提高性能 */
private _bfecc;
set ncBFECC(val: boolean | string);
get ncBFECC(): boolean;
/** 模拟纹理相对于画布大小的比例(0~1,越小性能越好,模糊程度越高) */
ncResolution: number;
/** 是否开启边界反弹模式(流体在边界处反弹而非穿透) */
private _isBounce;
set ncIsBounce(val: boolean | string);
get ncIsBounce(): boolean;
/** 是否开启自动演示模式(无用户操作时自动驱动流体运动) */
private _autoDemo;
set ncAutoDemo(val: boolean | string);
get ncAutoDemo(): boolean;
/** 自动指针运动速度(标准化单位/秒,0-1) */
ncAutoSpeed: number;
/** 在自动模式下,对速度增量应用乘数(0-4) */
ncAutoIntensity: number;
/** 用户移动鼠标时,从自动指针到实际光标的插值时间(秒) */
ncTakeoverDuration: number;
/** 自动模式恢复前,短暂的无操作时间(毫秒) */
ncAutoResumeDelay: number;
/** 激活后,自动移动速度从0加速到全速所需的时间(秒) */
ncAutoRampDuration: number;
private webgl;
private resizeObserver;
private intersectionObserver;
private rafId;
private resizeRafId;
private isVisible;
constructor(ngZone: NgZone);
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
private initWebGL;
private makePaletteTexture;
private createWebGLManager;
private applyOptions;
private applyOptionsToSimulation;
private setupResizeObserver;
private setupIntersectionObserver;
private cleanup;
onMouseMove(event: MouseEvent): void;
onTouchStart(event: TouchEvent): void;
onTouchMove(event: TouchEvent): void;
onTouchEnd(): void;
onMouseLeave(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<LiquidEtherBackgroundComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<LiquidEtherBackgroundComponent, "nc-liquid-ether-background", never, { "ncBgColor": "ncBgColor"; "ncColors": "ncColors"; "ncMouseForce": "ncMouseForce"; "ncCursorSize": "ncCursorSize"; "ncIsViscous": "ncIsViscous"; "ncViscous": "ncViscous"; "ncIterationsViscous": "ncIterationsViscous"; "ncIterationsPoisson": "ncIterationsPoisson"; "ncDt": "ncDt"; "ncBFECC": "ncBFECC"; "ncResolution": "ncResolution"; "ncIsBounce": "ncIsBounce"; "ncAutoDemo": "ncAutoDemo"; "ncAutoSpeed": "ncAutoSpeed"; "ncAutoIntensity": "ncAutoIntensity"; "ncTakeoverDuration": "ncTakeoverDuration"; "ncAutoResumeDelay": "ncAutoResumeDelay"; "ncAutoRampDuration": "ncAutoRampDuration"; }, {}, never, ["*"]>;
}