@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/dist/example - /345/211/257/346/234/254/createVideo/STHUPO.TTF +0 -0
- package/dist/example - /345/211/257/346/234/254/createVideo/msyhbd.ttc +0 -0
- package/dist/example - /345/211/257/346/234/254/createVideo/simhei.ttf +0 -0
- package/main.js +2 -0
- package/package.json +1 -1
- package/src/components/index.js +3 -1
- package/src/components/layer/MarkerAreaLayer.js +40 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
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
package/src/components/index.js
CHANGED
|
@@ -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
|
+
|