rayvo 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +253 -169
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4507,6 +4507,8 @@ declare class WorldStore {
|
|
|
4507
4507
|
* @returns 是否有表真正降了 capacity
|
|
4508
4508
|
*/
|
|
4509
4509
|
shrinkToFit(targetCapacity?: number): boolean;
|
|
4510
|
+
/** 共享几何的包围盒槽跟着 mesh 走。mesh 已卸掉时归还,便于下一份 Store 再绑。 */
|
|
4511
|
+
releaseIdleBounds(): void;
|
|
4510
4512
|
dispose(): void;
|
|
4511
4513
|
}
|
|
4512
4514
|
|
|
@@ -6650,6 +6652,11 @@ declare class BufferGeometry {
|
|
|
6650
6652
|
weakSelf: WeakRef<this>;
|
|
6651
6653
|
worldStore: WorldStore | null;
|
|
6652
6654
|
switchStore(worldStore: WorldStore | null): void;
|
|
6655
|
+
/**
|
|
6656
|
+
* 已无存活 mesh 时归还包围盒槽。
|
|
6657
|
+
* 共享几何离开当前 WorldStore 后才能进入下一个;仍被引用时不动。
|
|
6658
|
+
*/
|
|
6659
|
+
releaseStoreIfIdle(): void;
|
|
6653
6660
|
transfer(): void;
|
|
6654
6661
|
constructor();
|
|
6655
6662
|
/** @internal MorphAttributeMap 的结构脏入口。 */
|
|
@@ -7995,15 +8002,6 @@ declare class LineSegments extends Line {
|
|
|
7995
8002
|
computeLineDistances(): this;
|
|
7996
8003
|
}
|
|
7997
8004
|
|
|
7998
|
-
/**
|
|
7999
|
-
* 点列表。画几何自己的顶点或索引,不把三角形收成点。
|
|
8000
|
-
* WebGPU point-list 光栅点固定 1 像素,与 glTF POINTS 一致。
|
|
8001
|
-
*/
|
|
8002
|
-
declare class Points extends Mesh {
|
|
8003
|
-
type: string;
|
|
8004
|
-
readonly topology = GPUPrimitiveTopology.PointList;
|
|
8005
|
-
}
|
|
8006
|
-
|
|
8007
8005
|
/**
|
|
8008
8006
|
* 始终朝向相机的四边形。画面由 SpriteMaterial 在观察空间摆好,网格旋转不转画面。
|
|
8009
8007
|
* 默认锚点 (0.5, 0.5) 共用一张几何,同材质的精灵进同一 family 批。
|
|
@@ -8055,6 +8053,21 @@ declare class ClippingMesh extends Object3D {
|
|
|
8055
8053
|
dispose(): void;
|
|
8056
8054
|
}
|
|
8057
8055
|
|
|
8056
|
+
declare class Points extends Mesh {
|
|
8057
|
+
type: string;
|
|
8058
|
+
readonly isPoints: true;
|
|
8059
|
+
readonly topology: GPUPrimitiveTopology;
|
|
8060
|
+
constructor(geometry?: BufferGeometry, material?: MaterialNode);
|
|
8061
|
+
/**
|
|
8062
|
+
* 点拾取。threshold 对齐 Three `raycaster.params.Points.threshold`(默认 1)。
|
|
8063
|
+
* @hot 射线拾取
|
|
8064
|
+
* @noalloc 未命中零分配
|
|
8065
|
+
*/
|
|
8066
|
+
raycast(raycaster: RaycasterLike, intersects: Intersection[]): void;
|
|
8067
|
+
/** Mesh.raycast 若被直接调到,仍走点测距而非三角面。 */
|
|
8068
|
+
protected _computeIntersections(raycaster: RaycasterLike, intersects: Intersection[], rayOriginLocal: Vector3, rayDirectionLocal: Vector3): void;
|
|
8069
|
+
}
|
|
8070
|
+
|
|
8058
8071
|
/**
|
|
8059
8072
|
* WebGPU 有效像素点尺寸的点云。
|
|
8060
8073
|
*
|
|
@@ -8505,6 +8518,236 @@ declare class CustomLight extends Light {
|
|
|
8505
8518
|
registerShareWgsl(): void;
|
|
8506
8519
|
}
|
|
8507
8520
|
|
|
8521
|
+
/**
|
|
8522
|
+
* 三维线段。
|
|
8523
|
+
*/
|
|
8524
|
+
|
|
8525
|
+
declare class Line3 {
|
|
8526
|
+
start: Vector3;
|
|
8527
|
+
end: Vector3;
|
|
8528
|
+
constructor(start?: Vector3, end?: Vector3);
|
|
8529
|
+
set(start: Vector3, end: Vector3): this;
|
|
8530
|
+
copy(line: Line3): this;
|
|
8531
|
+
clone(): Line3;
|
|
8532
|
+
getCenter(target: Vector3): Vector3;
|
|
8533
|
+
delta(target: Vector3): Vector3;
|
|
8534
|
+
distanceSq(): number;
|
|
8535
|
+
distance(): number;
|
|
8536
|
+
at(t: number, target: Vector3): Vector3;
|
|
8537
|
+
closestPointToPointParameter(point: Vector3, clampToLine: boolean): number;
|
|
8538
|
+
closestPointToPoint(point: Vector3, clampToLine: boolean, target: Vector3): Vector3;
|
|
8539
|
+
/**
|
|
8540
|
+
* 两线段最近点的平方距离。c1 / c2 收到各自线段上的最近点。
|
|
8541
|
+
* Ericson, Real-Time Collision Detection 5.1.9。
|
|
8542
|
+
*/
|
|
8543
|
+
distanceSqToLine3(line: Line3, c1?: Vector3, c2?: Vector3): number;
|
|
8544
|
+
applyMatrix4(matrix: Matrix4): this;
|
|
8545
|
+
equals(line: Line3): boolean;
|
|
8546
|
+
}
|
|
8547
|
+
|
|
8548
|
+
/**
|
|
8549
|
+
* 平面,Hessian 法式:n 为单位法线,constant 是原点到平面的有符号距离(n·p + constant = 0)。
|
|
8550
|
+
*/
|
|
8551
|
+
|
|
8552
|
+
declare class Plane {
|
|
8553
|
+
normal: Vector3;
|
|
8554
|
+
constant: number;
|
|
8555
|
+
constructor(normal?: Vector3, constant?: number);
|
|
8556
|
+
set(normal: Vector3, constant: number): this;
|
|
8557
|
+
setComponents(x: number, y: number, z: number, w: number): this;
|
|
8558
|
+
setFromNormalAndCoplanarPoint(normal: Vector3, point: Vector3): this;
|
|
8559
|
+
setFromCoplanarPoints(a: Vector3, b: Vector3, c: Vector3): this;
|
|
8560
|
+
copy(plane: Plane): this;
|
|
8561
|
+
clone(): Plane;
|
|
8562
|
+
normalize(): this;
|
|
8563
|
+
negate(): this;
|
|
8564
|
+
distanceToPoint(point: Vector3): number;
|
|
8565
|
+
distanceToSphere(sphere: Sphere): number;
|
|
8566
|
+
projectPoint(point: Vector3, target: Vector3): Vector3;
|
|
8567
|
+
/** 线段与平面交点。平行且共面时返回起点;不相交返回 null。 */
|
|
8568
|
+
intersectLine(line: Line3, target: Vector3, clampToLine?: boolean): Vector3 | null;
|
|
8569
|
+
intersectsLine(line: Line3): boolean;
|
|
8570
|
+
intersectsBox(box: Box3): boolean;
|
|
8571
|
+
intersectsSphere(sphere: Sphere): boolean;
|
|
8572
|
+
coplanarPoint(target: Vector3): Vector3;
|
|
8573
|
+
applyMatrix4(matrix: Matrix4, optionalNormalMatrix?: Matrix3): this;
|
|
8574
|
+
translate(offset: Vector3): this;
|
|
8575
|
+
equals(plane: Plane): boolean;
|
|
8576
|
+
}
|
|
8577
|
+
|
|
8578
|
+
/**
|
|
8579
|
+
* 球。radius < 0 表示空,半径 0 只含球心。
|
|
8580
|
+
*/
|
|
8581
|
+
|
|
8582
|
+
declare class Sphere {
|
|
8583
|
+
center: Vector3;
|
|
8584
|
+
radius: number;
|
|
8585
|
+
constructor(center?: Vector3, radius?: number);
|
|
8586
|
+
set(center: Vector3, radius: number): this;
|
|
8587
|
+
setFromPoints(points: ArrayLike<Vector3>, optionalCenter?: Vector3): this;
|
|
8588
|
+
copy(sphere: Sphere): this;
|
|
8589
|
+
clone(): Sphere;
|
|
8590
|
+
isEmpty(): boolean;
|
|
8591
|
+
makeEmpty(): this;
|
|
8592
|
+
containsPoint(point: Vector3): boolean;
|
|
8593
|
+
distanceToPoint(point: Vector3): number;
|
|
8594
|
+
intersectsSphere(sphere: Sphere): boolean;
|
|
8595
|
+
intersectsBox(box: Box3): boolean;
|
|
8596
|
+
intersectsPlane(plane: Plane): boolean;
|
|
8597
|
+
clampPoint(point: Vector3, target: Vector3): Vector3;
|
|
8598
|
+
getBoundingBox(target: Box3): Box3;
|
|
8599
|
+
applyMatrix4(matrix: Matrix4): this;
|
|
8600
|
+
translate(offset: Vector3): this;
|
|
8601
|
+
expandByPoint(point: Vector3): this;
|
|
8602
|
+
union(sphere: Sphere): this;
|
|
8603
|
+
equals(sphere: Sphere): boolean;
|
|
8604
|
+
}
|
|
8605
|
+
|
|
8606
|
+
/**
|
|
8607
|
+
* 三角形。重心坐标 (a, b, c) 之和为 1。
|
|
8608
|
+
*/
|
|
8609
|
+
|
|
8610
|
+
declare class Triangle {
|
|
8611
|
+
a: Vector3;
|
|
8612
|
+
b: Vector3;
|
|
8613
|
+
c: Vector3;
|
|
8614
|
+
constructor(a?: Vector3, b?: Vector3, c?: Vector3);
|
|
8615
|
+
static getNormal(a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3;
|
|
8616
|
+
/** 退化三角形返回 null,target 被写成 0。结果是 (wa, wb, wc)。 */
|
|
8617
|
+
static getBarycoord(point: Vector3, a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3 | null;
|
|
8618
|
+
static containsPoint(point: Vector3, a: Vector3, b: Vector3, c: Vector3): boolean;
|
|
8619
|
+
static getInterpolation(point: Vector3, p1: Vector3, p2: Vector3, p3: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3 | null;
|
|
8620
|
+
static isFrontFacing(a: Vector3, b: Vector3, c: Vector3, direction: Vector3): boolean;
|
|
8621
|
+
set(a: Vector3, b: Vector3, c: Vector3): this;
|
|
8622
|
+
setFromPointsAndIndices(points: ArrayLike<Vector3>, i0: number, i1: number, i2: number): this;
|
|
8623
|
+
copy(triangle: Triangle): this;
|
|
8624
|
+
clone(): Triangle;
|
|
8625
|
+
getArea(): number;
|
|
8626
|
+
getMidpoint(target: Vector3): Vector3;
|
|
8627
|
+
getNormal(target: Vector3): Vector3;
|
|
8628
|
+
getPlane(target: Plane): Plane;
|
|
8629
|
+
getBarycoord(point: Vector3, target: Vector3): Vector3 | null;
|
|
8630
|
+
getInterpolation(point: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3 | null;
|
|
8631
|
+
containsPoint(point: Vector3): boolean;
|
|
8632
|
+
isFrontFacing(direction: Vector3): boolean;
|
|
8633
|
+
intersectsBox(box: Box3): boolean;
|
|
8634
|
+
/** Ericson 5.1.5,按 Voronoi 区域落到顶点、边或面。 */
|
|
8635
|
+
closestPointToPoint(p: Vector3, target: Vector3): Vector3;
|
|
8636
|
+
equals(triangle: Triangle): boolean;
|
|
8637
|
+
}
|
|
8638
|
+
|
|
8639
|
+
/**
|
|
8640
|
+
* 三维轴对齐包围盒。空盒是任一轴 max < min。
|
|
8641
|
+
* applyMatrix4 直接扫 8 个角,不分配临时点。
|
|
8642
|
+
*/
|
|
8643
|
+
|
|
8644
|
+
declare class Box3 {
|
|
8645
|
+
min: Vector3;
|
|
8646
|
+
max: Vector3;
|
|
8647
|
+
constructor(min?: Vector3, max?: Vector3);
|
|
8648
|
+
set(min: Vector3, max: Vector3): this;
|
|
8649
|
+
/** 扁平 xyz。stride 默认 3。 */
|
|
8650
|
+
setFromArray(array: ArrayLike<number>, stride?: number): this;
|
|
8651
|
+
setFromPoints(points: ArrayLike<Vector3>): this;
|
|
8652
|
+
setFromCenterAndSize(center: Vector3, size: Vector3): this;
|
|
8653
|
+
copy(box: Box3): this;
|
|
8654
|
+
clone(): Box3;
|
|
8655
|
+
makeEmpty(): this;
|
|
8656
|
+
isEmpty(): boolean;
|
|
8657
|
+
getCenter(target: Vector3): Vector3;
|
|
8658
|
+
getSize(target: Vector3): Vector3;
|
|
8659
|
+
expandByPoint(point: Vector3): this;
|
|
8660
|
+
expandByVector(vector: Vector3): this;
|
|
8661
|
+
expandByScalar(scalar: number): this;
|
|
8662
|
+
containsPoint(point: Vector3): boolean;
|
|
8663
|
+
containsBox(box: Box3): boolean;
|
|
8664
|
+
getParameter(point: Vector3, target: Vector3): Vector3;
|
|
8665
|
+
intersectsBox(box: Box3): boolean;
|
|
8666
|
+
intersectsSphere(sphere: Sphere): boolean;
|
|
8667
|
+
intersectsPlane(plane: Plane): boolean;
|
|
8668
|
+
/** Akenine-Möller SAT。分离轴上无重叠才算不相交。 */
|
|
8669
|
+
intersectsTriangle(triangle: Triangle): boolean;
|
|
8670
|
+
clampPoint(point: Vector3, target: Vector3): Vector3;
|
|
8671
|
+
distanceToPoint(point: Vector3): number;
|
|
8672
|
+
getBoundingSphere(target: Sphere): Sphere;
|
|
8673
|
+
intersect(box: Box3): this;
|
|
8674
|
+
union(box: Box3): this;
|
|
8675
|
+
applyMatrix4(matrix: Matrix4): this;
|
|
8676
|
+
translate(offset: Vector3): this;
|
|
8677
|
+
equals(box: Box3): boolean;
|
|
8678
|
+
}
|
|
8679
|
+
|
|
8680
|
+
/**
|
|
8681
|
+
* 柱坐标。radius 是到 Y 轴的距离,theta 从 +Z 朝 +X。
|
|
8682
|
+
*/
|
|
8683
|
+
|
|
8684
|
+
declare class Cylindrical {
|
|
8685
|
+
radius: number;
|
|
8686
|
+
theta: number;
|
|
8687
|
+
y: number;
|
|
8688
|
+
constructor(radius?: number, theta?: number, y?: number);
|
|
8689
|
+
set(radius: number, theta: number, y: number): this;
|
|
8690
|
+
copy(other: Cylindrical): this;
|
|
8691
|
+
clone(): Cylindrical;
|
|
8692
|
+
setFromVector3(v: Vector3): this;
|
|
8693
|
+
setFromCartesianCoords(x: number, y: number, z: number): this;
|
|
8694
|
+
toVector3(target: Vector3): Vector3;
|
|
8695
|
+
}
|
|
8696
|
+
|
|
8697
|
+
/**
|
|
8698
|
+
* 射线。三角形相交用 watertight 算法,避免共享边漏测。
|
|
8699
|
+
*/
|
|
8700
|
+
|
|
8701
|
+
declare class Ray {
|
|
8702
|
+
origin: Vector3;
|
|
8703
|
+
direction: Vector3;
|
|
8704
|
+
constructor(origin?: Vector3, direction?: Vector3);
|
|
8705
|
+
set(origin: Vector3, direction: Vector3): this;
|
|
8706
|
+
copy(ray: Ray): this;
|
|
8707
|
+
clone(): Ray;
|
|
8708
|
+
at(t: number, target: Vector3): Vector3;
|
|
8709
|
+
lookAt(v: Vector3): this;
|
|
8710
|
+
recast(t: number): this;
|
|
8711
|
+
closestPointToPoint(point: Vector3, target: Vector3): Vector3;
|
|
8712
|
+
distanceToPoint(point: Vector3): number;
|
|
8713
|
+
distanceSqToPoint(point: Vector3): number;
|
|
8714
|
+
/** 射线到线段的平方距离。可选写出两边的最近点。 */
|
|
8715
|
+
distanceSqToSegment(v0: Vector3, v1: Vector3, pointOnRay?: Vector3, pointOnSegment?: Vector3): number;
|
|
8716
|
+
intersectSphere(sphere: Sphere, target: Vector3): Vector3 | null;
|
|
8717
|
+
intersectsSphere(sphere: Sphere): boolean;
|
|
8718
|
+
distanceToPlane(plane: Plane): number | null;
|
|
8719
|
+
intersectPlane(plane: Plane, target: Vector3): Vector3 | null;
|
|
8720
|
+
intersectsPlane(plane: Plane): boolean;
|
|
8721
|
+
intersectBox(box: Box3, target: Vector3): Vector3 | null;
|
|
8722
|
+
intersectsBox(box: Box3): boolean;
|
|
8723
|
+
/**
|
|
8724
|
+
* Woop / Benthin / Wald, Watertight Ray/Triangle Intersection。
|
|
8725
|
+
* backfaceCulling 为 true 时丢掉背面。
|
|
8726
|
+
*/
|
|
8727
|
+
intersectTriangle(a: Vector3, b: Vector3, c: Vector3, backfaceCulling: boolean, target: Vector3): Vector3 | null;
|
|
8728
|
+
applyMatrix4(matrix: Matrix4): this;
|
|
8729
|
+
equals(ray: Ray): boolean;
|
|
8730
|
+
}
|
|
8731
|
+
|
|
8732
|
+
/**
|
|
8733
|
+
* 球坐标。phi 从 +Y 量起,theta 绕 Y、从 +Z 朝 +X。
|
|
8734
|
+
*/
|
|
8735
|
+
|
|
8736
|
+
declare class Spherical {
|
|
8737
|
+
radius: number;
|
|
8738
|
+
phi: number;
|
|
8739
|
+
theta: number;
|
|
8740
|
+
constructor(radius?: number, phi?: number, theta?: number);
|
|
8741
|
+
set(radius: number, phi: number, theta: number): this;
|
|
8742
|
+
copy(other: Spherical): this;
|
|
8743
|
+
clone(): Spherical;
|
|
8744
|
+
makeSafe(): this;
|
|
8745
|
+
setFromVector3(v: Vector3): this;
|
|
8746
|
+
setFromCartesianCoords(x: number, y: number, z: number): this;
|
|
8747
|
+
/** 写到笛卡尔向量。Vector3 不另挂 setFromSpherical。 */
|
|
8748
|
+
toVector3(target: Vector3): Vector3;
|
|
8749
|
+
}
|
|
8750
|
+
|
|
8508
8751
|
/** 主↔Worker 输入协议。可克隆 POD,不是 DOM Event。 */
|
|
8509
8752
|
declare const INPUT_IN = "sail-in";
|
|
8510
8753
|
declare const INPUT_OUT = "sail-out";
|
|
@@ -10233,165 +10476,6 @@ declare class AxesHelper extends LineSegments {
|
|
|
10233
10476
|
dispose(): void;
|
|
10234
10477
|
}
|
|
10235
10478
|
|
|
10236
|
-
/**
|
|
10237
|
-
* 三维线段。
|
|
10238
|
-
*/
|
|
10239
|
-
|
|
10240
|
-
declare class Line3 {
|
|
10241
|
-
start: Vector3;
|
|
10242
|
-
end: Vector3;
|
|
10243
|
-
constructor(start?: Vector3, end?: Vector3);
|
|
10244
|
-
set(start: Vector3, end: Vector3): this;
|
|
10245
|
-
copy(line: Line3): this;
|
|
10246
|
-
clone(): Line3;
|
|
10247
|
-
getCenter(target: Vector3): Vector3;
|
|
10248
|
-
delta(target: Vector3): Vector3;
|
|
10249
|
-
distanceSq(): number;
|
|
10250
|
-
distance(): number;
|
|
10251
|
-
at(t: number, target: Vector3): Vector3;
|
|
10252
|
-
closestPointToPointParameter(point: Vector3, clampToLine: boolean): number;
|
|
10253
|
-
closestPointToPoint(point: Vector3, clampToLine: boolean, target: Vector3): Vector3;
|
|
10254
|
-
/**
|
|
10255
|
-
* 两线段最近点的平方距离。c1 / c2 收到各自线段上的最近点。
|
|
10256
|
-
* Ericson, Real-Time Collision Detection 5.1.9。
|
|
10257
|
-
*/
|
|
10258
|
-
distanceSqToLine3(line: Line3, c1?: Vector3, c2?: Vector3): number;
|
|
10259
|
-
applyMatrix4(matrix: Matrix4): this;
|
|
10260
|
-
equals(line: Line3): boolean;
|
|
10261
|
-
}
|
|
10262
|
-
|
|
10263
|
-
/**
|
|
10264
|
-
* 平面,Hessian 法式:n 为单位法线,constant 是原点到平面的有符号距离(n·p + constant = 0)。
|
|
10265
|
-
*/
|
|
10266
|
-
|
|
10267
|
-
declare class Plane {
|
|
10268
|
-
normal: Vector3;
|
|
10269
|
-
constant: number;
|
|
10270
|
-
constructor(normal?: Vector3, constant?: number);
|
|
10271
|
-
set(normal: Vector3, constant: number): this;
|
|
10272
|
-
setComponents(x: number, y: number, z: number, w: number): this;
|
|
10273
|
-
setFromNormalAndCoplanarPoint(normal: Vector3, point: Vector3): this;
|
|
10274
|
-
setFromCoplanarPoints(a: Vector3, b: Vector3, c: Vector3): this;
|
|
10275
|
-
copy(plane: Plane): this;
|
|
10276
|
-
clone(): Plane;
|
|
10277
|
-
normalize(): this;
|
|
10278
|
-
negate(): this;
|
|
10279
|
-
distanceToPoint(point: Vector3): number;
|
|
10280
|
-
distanceToSphere(sphere: Sphere): number;
|
|
10281
|
-
projectPoint(point: Vector3, target: Vector3): Vector3;
|
|
10282
|
-
/** 线段与平面交点。平行且共面时返回起点;不相交返回 null。 */
|
|
10283
|
-
intersectLine(line: Line3, target: Vector3, clampToLine?: boolean): Vector3 | null;
|
|
10284
|
-
intersectsLine(line: Line3): boolean;
|
|
10285
|
-
intersectsBox(box: Box3): boolean;
|
|
10286
|
-
intersectsSphere(sphere: Sphere): boolean;
|
|
10287
|
-
coplanarPoint(target: Vector3): Vector3;
|
|
10288
|
-
applyMatrix4(matrix: Matrix4, optionalNormalMatrix?: Matrix3): this;
|
|
10289
|
-
translate(offset: Vector3): this;
|
|
10290
|
-
equals(plane: Plane): boolean;
|
|
10291
|
-
}
|
|
10292
|
-
|
|
10293
|
-
/**
|
|
10294
|
-
* 球。radius < 0 表示空,半径 0 只含球心。
|
|
10295
|
-
*/
|
|
10296
|
-
|
|
10297
|
-
declare class Sphere {
|
|
10298
|
-
center: Vector3;
|
|
10299
|
-
radius: number;
|
|
10300
|
-
constructor(center?: Vector3, radius?: number);
|
|
10301
|
-
set(center: Vector3, radius: number): this;
|
|
10302
|
-
setFromPoints(points: ArrayLike<Vector3>, optionalCenter?: Vector3): this;
|
|
10303
|
-
copy(sphere: Sphere): this;
|
|
10304
|
-
clone(): Sphere;
|
|
10305
|
-
isEmpty(): boolean;
|
|
10306
|
-
makeEmpty(): this;
|
|
10307
|
-
containsPoint(point: Vector3): boolean;
|
|
10308
|
-
distanceToPoint(point: Vector3): number;
|
|
10309
|
-
intersectsSphere(sphere: Sphere): boolean;
|
|
10310
|
-
intersectsBox(box: Box3): boolean;
|
|
10311
|
-
intersectsPlane(plane: Plane): boolean;
|
|
10312
|
-
clampPoint(point: Vector3, target: Vector3): Vector3;
|
|
10313
|
-
getBoundingBox(target: Box3): Box3;
|
|
10314
|
-
applyMatrix4(matrix: Matrix4): this;
|
|
10315
|
-
translate(offset: Vector3): this;
|
|
10316
|
-
expandByPoint(point: Vector3): this;
|
|
10317
|
-
union(sphere: Sphere): this;
|
|
10318
|
-
equals(sphere: Sphere): boolean;
|
|
10319
|
-
}
|
|
10320
|
-
|
|
10321
|
-
/**
|
|
10322
|
-
* 三角形。重心坐标 (a, b, c) 之和为 1。
|
|
10323
|
-
*/
|
|
10324
|
-
|
|
10325
|
-
declare class Triangle {
|
|
10326
|
-
a: Vector3;
|
|
10327
|
-
b: Vector3;
|
|
10328
|
-
c: Vector3;
|
|
10329
|
-
constructor(a?: Vector3, b?: Vector3, c?: Vector3);
|
|
10330
|
-
static getNormal(a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3;
|
|
10331
|
-
/** 退化三角形返回 null,target 被写成 0。结果是 (wa, wb, wc)。 */
|
|
10332
|
-
static getBarycoord(point: Vector3, a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3 | null;
|
|
10333
|
-
static containsPoint(point: Vector3, a: Vector3, b: Vector3, c: Vector3): boolean;
|
|
10334
|
-
static getInterpolation(point: Vector3, p1: Vector3, p2: Vector3, p3: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3 | null;
|
|
10335
|
-
static isFrontFacing(a: Vector3, b: Vector3, c: Vector3, direction: Vector3): boolean;
|
|
10336
|
-
set(a: Vector3, b: Vector3, c: Vector3): this;
|
|
10337
|
-
setFromPointsAndIndices(points: ArrayLike<Vector3>, i0: number, i1: number, i2: number): this;
|
|
10338
|
-
copy(triangle: Triangle): this;
|
|
10339
|
-
clone(): Triangle;
|
|
10340
|
-
getArea(): number;
|
|
10341
|
-
getMidpoint(target: Vector3): Vector3;
|
|
10342
|
-
getNormal(target: Vector3): Vector3;
|
|
10343
|
-
getPlane(target: Plane): Plane;
|
|
10344
|
-
getBarycoord(point: Vector3, target: Vector3): Vector3 | null;
|
|
10345
|
-
getInterpolation(point: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3 | null;
|
|
10346
|
-
containsPoint(point: Vector3): boolean;
|
|
10347
|
-
isFrontFacing(direction: Vector3): boolean;
|
|
10348
|
-
intersectsBox(box: Box3): boolean;
|
|
10349
|
-
/** Ericson 5.1.5,按 Voronoi 区域落到顶点、边或面。 */
|
|
10350
|
-
closestPointToPoint(p: Vector3, target: Vector3): Vector3;
|
|
10351
|
-
equals(triangle: Triangle): boolean;
|
|
10352
|
-
}
|
|
10353
|
-
|
|
10354
|
-
/**
|
|
10355
|
-
* 三维轴对齐包围盒。空盒是任一轴 max < min。
|
|
10356
|
-
* applyMatrix4 直接扫 8 个角,不分配临时点。
|
|
10357
|
-
*/
|
|
10358
|
-
|
|
10359
|
-
declare class Box3 {
|
|
10360
|
-
min: Vector3;
|
|
10361
|
-
max: Vector3;
|
|
10362
|
-
constructor(min?: Vector3, max?: Vector3);
|
|
10363
|
-
set(min: Vector3, max: Vector3): this;
|
|
10364
|
-
/** 扁平 xyz。stride 默认 3。 */
|
|
10365
|
-
setFromArray(array: ArrayLike<number>, stride?: number): this;
|
|
10366
|
-
setFromPoints(points: ArrayLike<Vector3>): this;
|
|
10367
|
-
setFromCenterAndSize(center: Vector3, size: Vector3): this;
|
|
10368
|
-
copy(box: Box3): this;
|
|
10369
|
-
clone(): Box3;
|
|
10370
|
-
makeEmpty(): this;
|
|
10371
|
-
isEmpty(): boolean;
|
|
10372
|
-
getCenter(target: Vector3): Vector3;
|
|
10373
|
-
getSize(target: Vector3): Vector3;
|
|
10374
|
-
expandByPoint(point: Vector3): this;
|
|
10375
|
-
expandByVector(vector: Vector3): this;
|
|
10376
|
-
expandByScalar(scalar: number): this;
|
|
10377
|
-
containsPoint(point: Vector3): boolean;
|
|
10378
|
-
containsBox(box: Box3): boolean;
|
|
10379
|
-
getParameter(point: Vector3, target: Vector3): Vector3;
|
|
10380
|
-
intersectsBox(box: Box3): boolean;
|
|
10381
|
-
intersectsSphere(sphere: Sphere): boolean;
|
|
10382
|
-
intersectsPlane(plane: Plane): boolean;
|
|
10383
|
-
/** Akenine-Möller SAT。分离轴上无重叠才算不相交。 */
|
|
10384
|
-
intersectsTriangle(triangle: Triangle): boolean;
|
|
10385
|
-
clampPoint(point: Vector3, target: Vector3): Vector3;
|
|
10386
|
-
distanceToPoint(point: Vector3): number;
|
|
10387
|
-
getBoundingSphere(target: Sphere): Sphere;
|
|
10388
|
-
intersect(box: Box3): this;
|
|
10389
|
-
union(box: Box3): this;
|
|
10390
|
-
applyMatrix4(matrix: Matrix4): this;
|
|
10391
|
-
translate(offset: Vector3): this;
|
|
10392
|
-
equals(box: Box3): boolean;
|
|
10393
|
-
}
|
|
10394
|
-
|
|
10395
10479
|
/**
|
|
10396
10480
|
* 显示一个 Box3。盒子在 helper 父空间里轴对齐。
|
|
10397
10481
|
* 引擎不逐对象回调 updateMatrixWorld,盒子变化后调用 update()。
|
|
@@ -11864,5 +11948,5 @@ declare class PointChunkSet {
|
|
|
11864
11948
|
private clearCells;
|
|
11865
11949
|
}
|
|
11866
11950
|
|
|
11867
|
-
export { AdmissionFailure, AmbientLight, ArcCurve, ArrayCamera, ArrowHelper, AudioEngine, AxesHelper, BGRABufferAttribute, BasicDepthPacking, Box3Helper, BoxGeometry, BoxHelper, BudgetAccount, BufferAttribute, BufferGeometry, CLIP_PLANE_INACTIVE_W, CachedChunkSource, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CircleGeometry, ClippingMesh, Color, Color4, ColorSpace, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, ConeGeometry, Controls, CoverageCellFlags, CubeCamera, CubeConvolution, CubeTexture, CubicBezierCurve, CubicBezierCurve3, Curve, CurvePath, CustomLight, CylinderGeometry, DEG2RAD, DIRTY_FLAG_MASK, DIRTY_TYPE_MASK, Data3DTexture, DataArrayTexture, DataTexture, DataUtils, DepthTexture, DirectionalLight, DirectionalLightHelper, DodecahedronGeometry, EMPTY_ENTITY_ID, Earcut, EdgesGeometry, EllipseCurve, EntityFlags, EntityStore, Euler, EventBridge, ExtrudeGeometry, FXAA, Float16BufferAttribute, Float32BufferAttribute, FramebufferTexture, GLTFLoader, GPU, GPUAddressMode$1 as GPUAddressMode, GPUBindingAccessMap, GPUBlendFactor, GPUBlendOperation, GPUBufferUsage$1 as GPUBufferUsage, GPUColorWriteFlags, GPUCompareFunction$1 as GPUCompareFunction, GPUCompressSampleFormatMap, GPUCompressTextureFormatType, GPUCullMode, GPUFeatureName, GPUFilterMode$1 as GPUFilterMode, GPUFrontFace, GPUIndexFormat, GPULoadOp, GPUPrimitiveTopology, GPUSamplerBindingType, GPUShaderStage, GPUStoreOp, GPUTextureAspect, GPUTextureDataType, GPUTextureDimension$1 as GPUTextureDimension, GPUTextureFormatMap, GPUTextureFormatObject, GPUTextureFormatType, GPUTextureSampleFormatMap, GPUTextureSampleType$1 as GPUTextureSampleType, GPUTextureViewDimension$1 as GPUTextureViewDimension, GPUVertexFormatLib, GPUWgslTypeLib, GridHelper, GridManifest, Group, HemisphereLight, HemisphereLightHelper, INPUT_IN, INPUT_OUT, INVALID_ENTITY_REF, INVALID_ENTITY_SLOT, INVALID_MANIFEST_ID, IcosahedronGeometry, ImageUtils, Input, InputSurface, InstancedMesh, InstancedModel, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, LatheGeometry, Light, LightHeaderRole, LightManager, Line, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, Loader, MOD_ALT, MOD_CTRL, MOD_META, MOD_SHIFT, MappedChunkSource, Mapping, MaterialNode, MaterialSide, Matrix2, Matrix3, Matrix4, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, Object3D, OctahedronGeometry, OrbitControls, OrthographicCamera, POINTER_CLICK_PX2, PageLane, PagePipeline, PageState, Path, PerspectiveCamera, PlanarReflection, PlaneGeometry, PlaneHelper, Planes, PointChunkSet, PointLight, PointLightHelper, PointerInteraction, Points, Points2, PointsMaterial, PointsMaterial2, PolarGridHelper, PolyhedronGeometry, PostProcessing, ProtoInstanceContent, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, RAD2DEG, RGBADepthPacking, RGBDepthPacking, RGDepthPacking, Raycaster, RectAreaLight, RenderContext, RingGeometry, SMAA, SSAO, Sampler, Scene, ShaderNode, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, SimulationState, Skeleton, SkeletonHelper, Slot, SphereGeometry, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, StereoCamera, Storage3DTexture, StorageArrayTexture, StorageTexture, StreamingPageFlags, StructBufferAttribute, StructUnorm10Attribute, TetrahedronGeometry, Texture, TextureUtils, ToneMapping, TorusGeometry, TorusKnotGeometry, TransformFlags, TubeGeometry, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Unorm10BufferAttribute, Vector2, Vector3, Vector4, VertexStructBuffer, VideoFrameTexture, VideoTexture, VolumeMaterial, WebGPURenderer, WireframeGeometry, WorldRuntime, WorldViewFlags, addColumnCost, addStreamingCost, area, attach, bindHost, buildAttributeRows, buildGridManifest, buildSweptTube, catmullRom, checkColumnAdmission, checkStreamingAdmission, checkUploadSliceAdmission, clamp, commitLineDistance, commitSweptTube, contain, copyPacket, cover, createCurve, cubicBezier, curveConstructors, ellipseSweep, emptyColumnUsage, emptyStreamingUsage, evalCubic, fill, fromHalfFloat, getByteLength, hermite, isClockWise, isPowerOfTwo, lerp, listen, meshMorphWeightsActive, nearestPowerOfTwo, quadraticBezier, quadraticBezierPath, quoteProtoInstanceCost, registerMaterialShade, smoothstep, subColumnCost, subStreamingCost, toHalfFloat, triangulate, triangulateShape, validateGridManifestForBudget, validateStaticL0Cost, validateStreamingBudget, validateStreamingCost };
|
|
11951
|
+
export { AdmissionFailure, AmbientLight, ArcCurve, ArrayCamera, ArrowHelper, AudioEngine, AxesHelper, BGRABufferAttribute, BasicDepthPacking, Box3, Box3Helper, BoxGeometry, BoxHelper, BudgetAccount, BufferAttribute, BufferGeometry, CLIP_PLANE_INACTIVE_W, CachedChunkSource, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CircleGeometry, ClippingMesh, Color, Color4, ColorSpace, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, ConeGeometry, Controls, CoverageCellFlags, CubeCamera, CubeConvolution, CubeTexture, CubicBezierCurve, CubicBezierCurve3, Curve, CurvePath, CustomLight, CylinderGeometry, Cylindrical, DEG2RAD, DIRTY_FLAG_MASK, DIRTY_TYPE_MASK, Data3DTexture, DataArrayTexture, DataTexture, DataUtils, DepthTexture, DirectionalLight, DirectionalLightHelper, DodecahedronGeometry, EMPTY_ENTITY_ID, Earcut, EdgesGeometry, EllipseCurve, EntityFlags, EntityStore, Euler, EventBridge, ExtrudeGeometry, FXAA, Float16BufferAttribute, Float32BufferAttribute, FramebufferTexture, GLTFLoader, GPU, GPUAddressMode$1 as GPUAddressMode, GPUBindingAccessMap, GPUBlendFactor, GPUBlendOperation, GPUBufferUsage$1 as GPUBufferUsage, GPUColorWriteFlags, GPUCompareFunction$1 as GPUCompareFunction, GPUCompressSampleFormatMap, GPUCompressTextureFormatType, GPUCullMode, GPUFeatureName, GPUFilterMode$1 as GPUFilterMode, GPUFrontFace, GPUIndexFormat, GPULoadOp, GPUPrimitiveTopology, GPUSamplerBindingType, GPUShaderStage, GPUStoreOp, GPUTextureAspect, GPUTextureDataType, GPUTextureDimension$1 as GPUTextureDimension, GPUTextureFormatMap, GPUTextureFormatObject, GPUTextureFormatType, GPUTextureSampleFormatMap, GPUTextureSampleType$1 as GPUTextureSampleType, GPUTextureViewDimension$1 as GPUTextureViewDimension, GPUVertexFormatLib, GPUWgslTypeLib, GridHelper, GridManifest, Group, HemisphereLight, HemisphereLightHelper, INPUT_IN, INPUT_OUT, INVALID_ENTITY_REF, INVALID_ENTITY_SLOT, INVALID_MANIFEST_ID, IcosahedronGeometry, ImageUtils, Input, InputSurface, InstancedMesh, InstancedModel, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, LatheGeometry, Light, LightHeaderRole, LightManager, Line, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, Loader, MOD_ALT, MOD_CTRL, MOD_META, MOD_SHIFT, MappedChunkSource, Mapping, MaterialNode, MaterialSide, Matrix2, Matrix3, Matrix4, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, Object3D, OctahedronGeometry, OrbitControls, OrthographicCamera, POINTER_CLICK_PX2, PageLane, PagePipeline, PageState, Path, PerspectiveCamera, PlanarReflection, Plane, PlaneGeometry, PlaneHelper, Planes, PointChunkSet, PointLight, PointLightHelper, PointerInteraction, Points, Points2, PointsMaterial, PointsMaterial2, PolarGridHelper, PolyhedronGeometry, PostProcessing, ProtoInstanceContent, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, RAD2DEG, RGBADepthPacking, RGBDepthPacking, RGDepthPacking, Ray, Raycaster, RectAreaLight, RenderContext, RingGeometry, SMAA, SSAO, Sampler, Scene, ShaderNode, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, SimulationState, Skeleton, SkeletonHelper, Slot, Sphere, SphereGeometry, Spherical, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, StereoCamera, Storage3DTexture, StorageArrayTexture, StorageTexture, StreamingPageFlags, StructBufferAttribute, StructUnorm10Attribute, TetrahedronGeometry, Texture, TextureUtils, ToneMapping, TorusGeometry, TorusKnotGeometry, TransformFlags, Triangle, TubeGeometry, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Unorm10BufferAttribute, Vector2, Vector3, Vector4, VertexStructBuffer, VideoFrameTexture, VideoTexture, VolumeMaterial, WebGPURenderer, WireframeGeometry, WorldRuntime, WorldViewFlags, addColumnCost, addStreamingCost, area, attach, bindHost, buildAttributeRows, buildGridManifest, buildSweptTube, catmullRom, checkColumnAdmission, checkStreamingAdmission, checkUploadSliceAdmission, clamp, commitLineDistance, commitSweptTube, contain, copyPacket, cover, createCurve, cubicBezier, curveConstructors, ellipseSweep, emptyColumnUsage, emptyStreamingUsage, evalCubic, fill, fromHalfFloat, getByteLength, hermite, isClockWise, isPowerOfTwo, lerp, listen, meshMorphWeightsActive, nearestPowerOfTwo, quadraticBezier, quadraticBezierPath, quoteProtoInstanceCost, registerMaterialShade, smoothstep, subColumnCost, subStreamingCost, toHalfFloat, triangulate, triangulateShape, validateGridManifestForBudget, validateStaticL0Cost, validateStreamingBudget, validateStreamingCost };
|
|
11868
11952
|
export type { AudioNode, BridgeOptions, BufferAttributeType, CachedChunkSourceOptions, CatmullRomType, ChunkLoader, ChunkSource, ColumnUsage, ContentDecoder, CoverageCellTable, CoverageLayer, CubeConvolutionOptions, CurveJSON, CurveTypeName, DataNodeValue, DepthMaterialParameters, DepthPacking, DirtyFlags, DistanceMaterialParameters, EngineLastFrame, EntityId, EntityPatch, EntitySpawn, EulerOrder, ExtrudeOptions, ExtrudePath, ExtrudeShape, ExtrudeShapeInput, ExtrudeUVGenerator, ExtrudeVec2, ExtrudeVec3, FrameContext, FramePlugin, FrenetFrames, GLTFResult, GPUTextureFormatConfig, GridManifestBuildLimits, GridManifestData, GridManifestImport, HelperColor, ImportedBundle, ImportedPage, InputInMessage, InputOutMessage, InputPacket, InputType, Intersection, LambertMaterialParameters, LightClusterOptions, LightColorArg, LineBasicMaterialParameters, LineDashedMaterialParameters, MatcapMaterialParameters, MaterialParameters, MaterialShaderNodeParameters, MaterialVarying, NormalMaterialParameters, PagePipelineOptions, PhongMaterialParameters, PhysicalMaterialParameters, PlanarReflectionUpdateOptions, PlayOptions, PointCell, PointChunkOptions, PointGrid, PointLod, PointLodDecision, PointSample, PointSampleView, PointerHitEvent, PointerSnapshot, PointsMaterial2Parameters, PointsMaterialParameters, PostProcessingParameters, PreparedContent, RaycasterLike, RenderOptions, RendererConfig, ResizeSnapshot, ResourceBundleTable, RuntimeGridConfig, SamplerOptions, ShaderNodeParameters, ShadowMaterialParameters, ShapeContour, ShapeInput, ShapeVec2, SpriteMaterialParameters, StandardMaterialParameters, StaticBounds, StreamingBudget, StreamingCost, StreamingPageTable, StreamingUsage, SubmitState, SweptTubeBounds, TextureFit, TextureOptions, ToonMaterialParameters, TransparentPass, TubePath, TubeVec3, Type16Data, Type32Data, TypeDefInfo$1 as TypeDefInfo, VertexSlotSpec, Voice, VolumeMaterialParameters, WgslDepthTextureDim, WgslDepthTextureType, WgslExternalTextureType, WgslHandleType, WgslSampledTextureDim, WgslSampledTextureType, WgslSamplerType, WgslStorageAccess, WgslStorageTextureDim, WgslStorageTextureType, WgslTextureComponentType, WgslTextureType, WorldRuntimeOptions, WorldSpawn, WorldStats, WorldViewDemand, XY };
|