UNPKG

@soonspacejs/plugin-heat-map

Version:

Haet-map plugin for SoonSpace.js

36 lines (35 loc) 1.15 kB
import SoonSpace from 'soonspacejs'; import { Matrix3, Vector3, Box2, Matrix4, ShapeGeometry } from 'three'; import { DrawingParam, ScenePolygonDataPoint, StartEventType, StoreValuePolygon } from '.'; export declare function getPolygonGeometryInfo(points: Vector3[]): { geometry: ShapeGeometry; polygonBox: Box2; modelMatrix: Matrix4; planeMatrix: Matrix4; projectionMatrix: Matrix4; position: Vector3; }; /** * 创建平面投影矩阵 * @param points */ export declare function createPlaneMatrix(points: Vector3[]): Matrix3; /** * 创建 uv 变换矩阵 * @remarks * 需要对热力图数据进行y值翻转 * @param points * @returns */ export declare function createUVMatrix(box: Box2): Matrix3; /** * 不需要对热力图数据进行y值翻转 */ /** * 生成区间内随机数 * @param min * @param max * @returns */ export declare function generateRandomNumber(min: number, max: number): number; export declare function getHeatPoint(event: MouseEvent, type: StartEventType, param: DrawingParam, dataPoints: DrawingParam['data'], store: StoreValuePolygon, ssp: SoonSpace): ScenePolygonDataPoint | null;