@ohuoy/easymap 1.0.19 → 1.0.21
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/bundle.js +318 -290
- package/dist/example - /345/211/257/346/234/254/bundle.js" +318 -290
- package/dist/example - /345/211/257/346/234/254/index.html" +11 -11
- package/index.js +4 -0
- package/lib/threebox-plugin/CHANGELOG.md +665 -0
- package/lib/threebox-plugin/LICENSE.txt +97 -0
- package/lib/threebox-plugin/README.md +199 -0
- package/lib/threebox-plugin/exports.js +2 -0
- package/lib/threebox-plugin/main.js +8 -0
- package/lib/threebox-plugin/package.json +44 -0
- package/lib/threebox-plugin/server.stop.js +13 -0
- package/lib/threebox-plugin/src/Threebox.js +1216 -0
- package/lib/threebox-plugin/src/animation/AnimationManager.js +483 -0
- package/lib/threebox-plugin/src/camera/CameraSync.js +302 -0
- package/lib/threebox-plugin/src/objects/CSS2DRenderer.js +245 -0
- package/lib/threebox-plugin/src/objects/LabelRenderer.js +71 -0
- package/lib/threebox-plugin/src/objects/Object3D.js +34 -0
- package/lib/threebox-plugin/src/objects/effects/BuildingShadows.js +115 -0
- package/lib/threebox-plugin/src/objects/extrusion.js +61 -0
- package/lib/threebox-plugin/src/objects/fflate.min.js +15 -0
- package/lib/threebox-plugin/src/objects/label.js +29 -0
- package/lib/threebox-plugin/src/objects/line.js +1386 -0
- package/lib/threebox-plugin/src/objects/loadObj.js +142 -0
- package/lib/threebox-plugin/src/objects/loaders/ColladaLoader.js +3751 -0
- package/lib/threebox-plugin/src/objects/loaders/FBXLoader.js +3864 -0
- package/lib/threebox-plugin/src/objects/loaders/GLTFLoader.js +3857 -0
- package/lib/threebox-plugin/src/objects/loaders/MTLLoader.js +498 -0
- package/lib/threebox-plugin/src/objects/loaders/OBJLoader.js +818 -0
- package/lib/threebox-plugin/src/objects/objects.js +1113 -0
- package/lib/threebox-plugin/src/objects/sphere.js +28 -0
- package/lib/threebox-plugin/src/objects/tooltip.js +27 -0
- package/lib/threebox-plugin/src/objects/tube.js +35 -0
- package/lib/threebox-plugin/src/three.js +6 -0
- package/lib/threebox-plugin/src/three.module.js +54571 -0
- package/lib/threebox-plugin/src/utils/ValueGenerator.js +11 -0
- package/lib/threebox-plugin/src/utils/constants.js +21 -0
- package/lib/threebox-plugin/src/utils/material.js +52 -0
- package/lib/threebox-plugin/src/utils/suncalc.js +322 -0
- package/lib/threebox-plugin/src/utils/utils.js +424 -0
- package/lib/threebox-plugin/src/utils/validate.js +115 -0
- package/package.json +18 -18
- package/src/components/EasyMapMarker.js +8 -0
- package/src/components/control/DrawBar.js +5 -0
- package/src/components/control/TilesBar.js +116 -27
- package/src/components/control/Toobars.js +20 -1
- package/src/components/layer/AlarmLayer.js +4 -1
- package/src/components/layer/AnimationBarbsLayer.js +1 -1
- package/src/components/layer/AnimationLayer copy.js +1 -1
- package/src/components/layer/AnimationLayer.js +11 -3
- package/src/components/layer/CustomIconLayer.js +1 -1
- package/src/components/layer/ExtrusionLayer.js +1 -1
- package/src/components/layer/ExtrusionLayerold.js +2 -1
- package/src/components/layer/MarkerAreaLayer.js +1 -1
- package/src/components/layer/PathLineLayer.js +1 -1
- package/src/components/layer/ThreeScanLayer.js +51 -14
- package/src/components/layer/ThreeWallLayer.js +1 -1
- package/webpack.config.js +2 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author peterqliu / https://github.com/peterqliu
|
|
3
|
+
* @author jscastro / https://github.com/jscastro76
|
|
4
|
+
*/
|
|
5
|
+
import utils from '../utils/utils.js';
|
|
6
|
+
import material from '../utils/material.js';
|
|
7
|
+
import * as THREE from '../three.module.js'
|
|
8
|
+
import Objects from './objects.js';
|
|
9
|
+
import Object3D from './Object3D.js';
|
|
10
|
+
// const utils = require("../utils/utils.js");
|
|
11
|
+
// const material = require("../utils/material.js");
|
|
12
|
+
// const THREE = require('../three.js');
|
|
13
|
+
// const Objects = require('./objects.js');
|
|
14
|
+
// const Object3D = require('./Object3D.js');
|
|
15
|
+
|
|
16
|
+
function Sphere(opt) {
|
|
17
|
+
|
|
18
|
+
opt = utils._validate(opt, Objects.prototype._defaults.sphere);
|
|
19
|
+
let geometry = new THREE.SphereBufferGeometry(opt.radius, opt.sides, opt.sides);
|
|
20
|
+
let mat = material(opt)
|
|
21
|
+
let output = new THREE.Mesh(geometry, mat);
|
|
22
|
+
//[jscastro] we convert it in Object3D to add methods, bounding box, model, tooltip...
|
|
23
|
+
return new Object3D({ obj: output, units: opt.units, anchor: opt.anchor, adjustment: opt.adjustment, bbox: opt.bbox, tooltip: opt.tooltip, raycasted: opt.raycasted });
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default Sphere
|
|
28
|
+
//module.exports = exports = Sphere;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import utils from '../utils/utils.js';
|
|
2
|
+
import Objects from './objects.js';
|
|
3
|
+
import CSS2D from './CSS2DRenderer.js';
|
|
4
|
+
// const Objects = require('./objects.js');
|
|
5
|
+
// const CSS2D = require('./CSS2DRenderer.js');
|
|
6
|
+
import * as THREE from '../three.module.js'
|
|
7
|
+
// var THREE = require("../three.js");
|
|
8
|
+
|
|
9
|
+
function Tooltip(obj) {
|
|
10
|
+
|
|
11
|
+
obj = utils._validate(obj, Objects.prototype._defaults.tooltip);
|
|
12
|
+
|
|
13
|
+
if (obj.text) {
|
|
14
|
+
|
|
15
|
+
let divToolTip = Objects.prototype.drawTooltip(obj.text, obj.mapboxStyle);
|
|
16
|
+
|
|
17
|
+
let tooltip = new CSS2D.CSS2DObject(divToolTip);
|
|
18
|
+
tooltip.visible = false;
|
|
19
|
+
tooltip.name = "tooltip";
|
|
20
|
+
var userScaleGroup = Objects.prototype._makeGroup(tooltip, obj);
|
|
21
|
+
Objects.prototype._addMethods(userScaleGroup);
|
|
22
|
+
return userScaleGroup;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
export default Tooltip
|
|
27
|
+
// module.exports = exports = Tooltip;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author peterqliu / https://github.com/peterqliu
|
|
3
|
+
* @author jscastro / https://github.com/jscastro76
|
|
4
|
+
*/
|
|
5
|
+
import * as THREE from '../three.module.js'
|
|
6
|
+
import utils from '../utils/utils.js';
|
|
7
|
+
import material from '../utils/material.js';
|
|
8
|
+
import Objects from './objects.js';
|
|
9
|
+
import Object3D from './Object3D.js';
|
|
10
|
+
// const utils = require("../utils/utils.js");
|
|
11
|
+
// const material = require("../utils/material.js");
|
|
12
|
+
// const Objects = require('./objects.js');
|
|
13
|
+
// const THREE = require("../three.js");
|
|
14
|
+
// const Object3D = require('./Object3D.js');
|
|
15
|
+
|
|
16
|
+
function tube(opt, world){
|
|
17
|
+
|
|
18
|
+
// validate and prep input geometry
|
|
19
|
+
opt = utils._validate(opt, Objects.prototype._defaults.tube);
|
|
20
|
+
|
|
21
|
+
let points = []
|
|
22
|
+
opt.geometry.forEach(p => {
|
|
23
|
+
points.push(new THREE.Vector3(p[0], p[1], p[2]));
|
|
24
|
+
})
|
|
25
|
+
const curve = new THREE.CatmullRomCurve3(points);
|
|
26
|
+
let tube = new THREE.TubeGeometry(curve, points.length, opt.radius, opt.sides, false);
|
|
27
|
+
let mat = material(opt);
|
|
28
|
+
let obj = new THREE.Mesh(tube, mat);
|
|
29
|
+
//[jscastro] we convert it in Object3D to add methods, bounding box, model, tooltip...
|
|
30
|
+
return new Object3D({ obj: obj, units: opt.units, anchor: opt.anchor, adjustment: opt.adjustment, bbox: opt.bbox, tooltip: opt.tooltip, raycasted: opt.raycasted });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default tube
|
|
34
|
+
// module.exports = exports = tube;
|
|
35
|
+
|