soonspacejs 2.8.12 → 2.8.13

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.12",
3
+ "version": "2.8.13",
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": "4b5289f3fabce1ddcbc750bdeeced02bc4b4f397"
31
+ "gitHead": "d5982117927d8f1eccf32efbe1fec6238b7517e6"
32
32
  }
@@ -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
12
  scaleFixed?: ScaleFixed;
12
13
  }
13
- interface CanvasTextInfo {
14
- fontFamily?: string;
15
- fontSize?: number;
16
- color?: string;
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, CanvasTextInfo, };
33
+ export { Poi, PoiInfo, NameCanvasInfo, };
@@ -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?: CanvasTextInfo): HTMLCanvasElement;
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;