soonspacejs 2.5.27 → 2.5.28
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.esm.js +3 -3
- package/package.json +2 -2
- package/types/index.d.ts +9 -1
- package/types/tools/index.d.ts +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soonspacejs",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.28",
|
|
4
4
|
"homepage": "http://www.xwbuilders.com:8800/",
|
|
5
5
|
"description": "soonspacejs 2.x",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"@tweenjs/tween.js": "^18.6.4",
|
|
27
27
|
"@types/three": "0.141.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "96bd42ee5258c343c59f1259edc734b4c3ac9007"
|
|
30
30
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface SoonSpaceConstructor {
|
|
|
25
25
|
import * as THREE from 'three';
|
|
26
26
|
export * from 'three';
|
|
27
27
|
export * from './Interface';
|
|
28
|
-
import { BoxSpace, FindObjectsNearPosition } from './tools/index';
|
|
28
|
+
import { BoxSpace, FindObjectsNearPosition, FindNearbyObjects } from './tools/index';
|
|
29
29
|
declare global {
|
|
30
30
|
interface Window {
|
|
31
31
|
THREE: typeof THREE;
|
|
@@ -1234,5 +1234,13 @@ export declare class SoonSpace {
|
|
|
1234
1234
|
* @returns 用于查找的函数
|
|
1235
1235
|
*/
|
|
1236
1236
|
createFindObjectsInSphereNearPosition(radius: number, objects: Object3D[]): FindObjectsNearPosition;
|
|
1237
|
+
/**
|
|
1238
|
+
* 创建 查找路径附近的范围内的物体
|
|
1239
|
+
*
|
|
1240
|
+
* @param points - 描述路径的点
|
|
1241
|
+
* @param radius - 描述查找半径
|
|
1242
|
+
* @returns 用于查找的函数
|
|
1243
|
+
*/
|
|
1244
|
+
createFindObjectsNearPath(points: Vector3[], radius: number): FindNearbyObjects;
|
|
1237
1245
|
}
|
|
1238
1246
|
export default SoonSpace;
|
package/types/tools/index.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ export interface BoxSpace {
|
|
|
17
17
|
* @returns 所有包含在指定空间的对象
|
|
18
18
|
*/
|
|
19
19
|
export declare type FindObjectsNearPosition = (position: Vector3) => Object3D[];
|
|
20
|
+
/**
|
|
21
|
+
* 查找附近的对象
|
|
22
|
+
* @param objs - 所有需要被查找的对象
|
|
23
|
+
*/
|
|
24
|
+
export declare type FindNearbyObjects = (objs: Object3D[]) => Object3D[];
|
|
20
25
|
/**
|
|
21
26
|
* 创建 查找位置附近的 box 空间范围内的物体
|
|
22
27
|
* @param boxSpace - 描述查找空间的信息对象
|
|
@@ -32,3 +37,11 @@ export declare function createFindObjectsInBoxNearPosition(boxSpace: BoxSpace, o
|
|
|
32
37
|
* @returns 用于查找的函数
|
|
33
38
|
*/
|
|
34
39
|
export declare function createFindObjectsInSphereNearPosition(radius: number, objects: Object3D[]): FindObjectsNearPosition;
|
|
40
|
+
/**
|
|
41
|
+
* 创建 查找路径附近的范围内的物体
|
|
42
|
+
*
|
|
43
|
+
* @param points - 描述路径的点
|
|
44
|
+
* @param radius - 描述查找半径
|
|
45
|
+
* @returns 用于查找的函数
|
|
46
|
+
*/
|
|
47
|
+
export declare function createFindObjectsNearPath(points: Vector3[], radius: number): FindNearbyObjects;
|