@ohuoy/easymap 1.0.13 → 1.0.15

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/main.js CHANGED
@@ -15,6 +15,7 @@ import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPa
15
15
  import { LineGeometry } from 'three/addons/lines/LineGeometry.js';
16
16
  import { Line2 } from 'three/addons/lines/Line2.js';
17
17
  import {LineMaterial} from 'three/examples/jsm/lines/LineMaterial.js'
18
+ import { FontLoader } from 'three/addons/loaders/FontLoader.js';
18
19
  import {
19
20
  GammaCorrectionShader
20
21
  } from 'three/examples/jsm/shaders/GammaCorrectionShader.js';
@@ -43,6 +44,7 @@ export {
43
44
  OutlinePass,
44
45
  LineGeometry,
45
46
  LineMaterial,
47
+ FontLoader,
46
48
  FXAAShader,
47
49
  GammaCorrectionShader
48
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohuoy/easymap",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "self map easy use",
5
5
  "main": "main.js",
6
6
  "scripts": {
@@ -15,6 +15,7 @@ import ThreeWallLayer from './layer/ThreeWallLayer'
15
15
  import AnimationBarbsLayer from './layer/AnimationBarbsLayer'
16
16
  import PathLineLayer from './layer/PathLineLayer'
17
17
  import ExtrusionLayer from './layer/ExtrusionLayer'
18
+ import MarkerAreaLayer from './layer/MarkerAreaLayer'
18
19
  export{
19
20
  EasyMapMarker,
20
21
  LineTool,
@@ -28,5 +29,6 @@ export{
28
29
  ThreeWallLayer,
29
30
  AnimationBarbsLayer,
30
31
  PathLineLayer,
31
- ExtrusionLayer
32
+ ExtrusionLayer,
33
+ MarkerAreaLayer
32
34
  }
@@ -0,0 +1,40 @@
1
+
2
+ import {hasProperty,transform,downloadFileByBase64, sleep} from '../../utils/util'
3
+ import mapboxgl from '../../../lib/mapbox-gl/dist/mapbox-gl.js';
4
+ import * as THREE from 'three'
5
+ import { Threebox } from 'threebox-plugin';
6
+ var tb = {};
7
+ let markerGroup = new THREE.Group();
8
+ export default class MarkerAreaLayer{
9
+ markerArr = []
10
+ opacity = 0.8
11
+ textClass = ''
12
+ constructor(id,config) {
13
+ this.id = id;
14
+ this.opacity = config?.opacity ? Number(config.opacity):0.8
15
+ this.type = 'custom';
16
+ this.renderingMode = '2d';
17
+ }
18
+
19
+ addMarkerList(markerList){
20
+ let
21
+ }
22
+
23
+ onAdd(map, gl) {
24
+ this.map = map;
25
+ tb = new Threebox(
26
+ map,
27
+ gl, //get the context from Mapbox
28
+ { defaultLights: true ,passiveRendering:false}
29
+ );
30
+ tb.add(markerGroup)
31
+ }
32
+ render(gl, matrix) {
33
+ tb.update();
34
+ this.map.triggerRepaint();
35
+ }
36
+
37
+
38
+ }
39
+
40
+