soonspacejs 2.8.12 → 2.8.14
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soonspacejs",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.14",
|
|
4
4
|
"homepage": "http://www.xwbuilders.com:8800/",
|
|
5
5
|
"description": "soonspacejs 2.x",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"three": ">=0.152.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "edd814a0d1c5d8b994a43ec1579b9c384d62dfe8"
|
|
32
32
|
}
|
package/types/Library/Poi.d.ts
CHANGED
|
@@ -7,13 +7,14 @@ interface PoiInfo extends BaseObject3DInfo {
|
|
|
7
7
|
type?: PoiType;
|
|
8
8
|
namePosition?: IVector3;
|
|
9
9
|
nameScale?: IVector3;
|
|
10
|
+
nameCanvasInfo?: NameCanvasInfo;
|
|
10
11
|
iconScale?: IVector3;
|
|
11
|
-
scaleFixed?: ScaleFixed;
|
|
12
|
+
scaleFixed?: ScaleFixed | null;
|
|
12
13
|
}
|
|
13
|
-
interface
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
interface NameCanvasInfo {
|
|
15
|
+
font?: string;
|
|
16
|
+
fillStyle?: CanvasFillStrokeStyles['fillStyle'];
|
|
17
|
+
strokeStyle?: CanvasFillStrokeStyles['strokeStyle'];
|
|
17
18
|
textAlign?: CanvasTextAlign;
|
|
18
19
|
textBaseline?: CanvasTextBaseline;
|
|
19
20
|
}
|
|
@@ -29,4 +30,4 @@ declare class Poi extends BaseObject3D {
|
|
|
29
30
|
getBoundingBox(padding?: number): Box3;
|
|
30
31
|
copy(source: this, recursive?: boolean): this;
|
|
31
32
|
}
|
|
32
|
-
export { Poi, PoiInfo,
|
|
33
|
+
export { Poi, PoiInfo, NameCanvasInfo, };
|
|
@@ -7,7 +7,7 @@ interface PoiNodeInfo extends BaseObject3DInfo {
|
|
|
7
7
|
elementAutoDisplay?: boolean;
|
|
8
8
|
occlude?: boolean;
|
|
9
9
|
onChange?: (visible: boolean) => void;
|
|
10
|
-
scaleFixed?: ScaleFixed;
|
|
10
|
+
scaleFixed?: ScaleFixed | null;
|
|
11
11
|
}
|
|
12
12
|
declare class PoiNode extends BaseObject3D {
|
|
13
13
|
readonly elementType?: PoiNodeInfo['type'];
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { SpriteMaterial, Texture } from 'three';
|
|
2
2
|
import DefaultManage from './DefaultManage';
|
|
3
|
-
import { Poi, PoiInfo, Group, GroupInfo, BaseObject3D, Icon } from '../Library';
|
|
3
|
+
import { Poi, PoiInfo, Group, GroupInfo, BaseObject3D, Icon, NameCanvasInfo } from '../Library';
|
|
4
4
|
import { ClonePoiInfo, ManageCache, PoiType } from '../Interface';
|
|
5
5
|
import Viewport from '../Viewport';
|
|
6
|
-
interface CanvasTextInfo {
|
|
7
|
-
fontFamily?: string;
|
|
8
|
-
fontSize?: number;
|
|
9
|
-
color?: string;
|
|
10
|
-
textAlign?: CanvasTextAlign;
|
|
11
|
-
textBaseline?: CanvasTextBaseline;
|
|
12
|
-
}
|
|
13
6
|
declare class PoiManage extends DefaultManage {
|
|
14
7
|
readonly viewport: Viewport;
|
|
15
8
|
readonly cache: ManageCache;
|
|
@@ -18,7 +11,7 @@ declare class PoiManage extends DefaultManage {
|
|
|
18
11
|
_createIcon(info: PoiInfo): Icon;
|
|
19
12
|
_createText(info: ClonePoiInfo): Icon;
|
|
20
13
|
_createTextMaterial(info: ClonePoiInfo): SpriteMaterial;
|
|
21
|
-
_createTextCanvas(text: string, info?:
|
|
14
|
+
_createTextCanvas(text: string, info?: NameCanvasInfo): HTMLCanvasElement;
|
|
22
15
|
_computeMaterialSizeAttenuation(material: SpriteMaterial, iconType?: PoiType): SpriteMaterial;
|
|
23
16
|
protected _create(info: PoiInfo): Poi;
|
|
24
17
|
create(info: PoiInfo): Poi;
|
|
@@ -23,7 +23,7 @@ declare class Scener {
|
|
|
23
23
|
*/
|
|
24
24
|
strokeStore: typeof localforage;
|
|
25
25
|
constructor(signals: SignalsState, viewportState: ViewportState);
|
|
26
|
-
addObject(object: Object3D, parent?: Object3D): void;
|
|
26
|
+
addObject(object: Object3D, parent?: Object3D | null): void;
|
|
27
27
|
removeObject(object: Object3D): void;
|
|
28
28
|
openSceneFog(options?: FogOptions): void;
|
|
29
29
|
closeSceneFog(): void;
|
package/types/index.d.ts
CHANGED