@twinmatrix/spatialverse-sdk-web 0.0.2 → 0.0.4
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/lib/cjs/index.js +9 -9
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js +213 -294
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js +40 -41
- package/lib/cjs/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/3DMap/MainMap.js +170 -196
- package/lib/cjs/meta-atlas-sdk/3DMap/MainMap.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js +167 -215
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js +28 -30
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js +861 -1170
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js +166 -159
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/interfaces.js +6 -6
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/interfaces.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js +6 -6
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routeLayers.js +3 -3
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routeLayers.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js +523 -610
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js +149 -154
- package/lib/cjs/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/customStyles.js +2 -2
- package/lib/cjs/meta-atlas-sdk/customStyles.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/customerLayer.js +15 -29
- package/lib/cjs/meta-atlas-sdk/customerLayer.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/customerLayerVariant.js +5 -5
- package/lib/cjs/meta-atlas-sdk/customerLayerVariant.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/meta-atlas-sdk.js +809 -1033
- package/lib/cjs/meta-atlas-sdk/meta-atlas-sdk.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/helpers.js +32 -49
- package/lib/cjs/meta-atlas-sdk/utils/helpers.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/local-storage.js +21 -34
- package/lib/cjs/meta-atlas-sdk/utils/local-storage.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/mapobjects-store.js +6 -6
- package/lib/cjs/meta-atlas-sdk/utils/mapobjects-store.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/routing-store.js +6 -6
- package/lib/cjs/meta-atlas-sdk/utils/routing-store.js.map +1 -1
- package/lib/cjs/meta-atlas-sdk/utils/routing-visualizer/index.js +363 -491
- package/lib/cjs/meta-atlas-sdk/utils/routing-visualizer/index.js.map +1 -1
- package/lib/cjs/react/MetaAtlasMap.js +127 -0
- package/lib/cjs/react/MetaAtlasMap.js.map +1 -0
- package/lib/cjs/react/hooks/useDrawing/index.js +17 -18
- package/lib/cjs/react/hooks/useDrawing/index.js.map +1 -1
- package/lib/cjs/react/hooks/useFocus/index.js +48 -55
- package/lib/cjs/react/hooks/useFocus/index.js.map +1 -1
- package/lib/cjs/react/hooks/useMapEvents/index.js +40 -47
- package/lib/cjs/react/hooks/useMapEvents/index.js.map +1 -1
- package/lib/cjs/react/hooks/useMapOverlays/index.js +20 -21
- package/lib/cjs/react/hooks/useMapOverlays/index.js.map +1 -1
- package/lib/cjs/react/hooks/useMetaAtlas/index.js +77 -95
- package/lib/cjs/react/hooks/useMetaAtlas/index.js.map +1 -1
- package/lib/cjs/react/hooks/useMetaAtlas.js +78 -96
- package/lib/cjs/react/hooks/useMetaAtlas.js.map +1 -1
- package/lib/cjs/react/hooks/useRouting/index.js +21 -20
- package/lib/cjs/react/hooks/useRouting/index.js.map +1 -1
- package/lib/cjs/react/hooks/useSearch/index.js +35 -34
- package/lib/cjs/react/hooks/useSearch/index.js.map +1 -1
- package/lib/cjs/react/hooks/useStampRally/index.js +26 -23
- package/lib/cjs/react/hooks/useStampRally/index.js.map +1 -1
- package/lib/cjs/react/hooks/useStampRally/utils.js +2 -2
- package/lib/cjs/react/hooks/useStampRally/utils.js.map +1 -1
- package/lib/cjs/react/index.js +31 -31
- package/lib/cjs/react/index.js.map +1 -1
- package/lib/cjs/react/stores/useMapDataStore.js +47 -62
- package/lib/cjs/react/stores/useMapDataStore.js.map +1 -1
- package/lib/cjs/react/stores/useMetaAtlasStore.js +27 -40
- package/lib/cjs/react/stores/useMetaAtlasStore.js.map +1 -1
- package/lib/esm/index.js +3 -7
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js +4 -3
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/CustomThreeJsWrapper.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js +14 -12
- package/lib/esm/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/utils.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/3DMap/MainMap.js +204 -200
- package/lib/esm/meta-atlas-sdk/3DMap/MainMap.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js +6 -6
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetch-published-json.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js +4 -3
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/fetchMapObjectsData.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js +53 -42
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/meta-atlas-sdk-core.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js +18 -16
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/index.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js +3 -3
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/mapObjectsHelper.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js +73 -79
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/routing-helpers.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js +16 -15
- package/lib/esm/meta-atlas-sdk/MetaAtlasCore/routing-core/utils.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/customerLayer.js +4 -1
- package/lib/esm/meta-atlas-sdk/customerLayer.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/meta-atlas-sdk.js +148 -124
- package/lib/esm/meta-atlas-sdk/meta-atlas-sdk.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/utils/helpers.js +4 -2
- package/lib/esm/meta-atlas-sdk/utils/helpers.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/utils/local-storage.js +6 -1
- package/lib/esm/meta-atlas-sdk/utils/local-storage.js.map +1 -1
- package/lib/esm/meta-atlas-sdk/utils/routing-visualizer/index.js +115 -109
- package/lib/esm/meta-atlas-sdk/utils/routing-visualizer/index.js.map +1 -1
- package/lib/esm/react/MetaAtlasMap.js +120 -0
- package/lib/esm/react/MetaAtlasMap.js.map +1 -0
- package/lib/esm/react/hooks/useDrawing/index.js +2 -2
- package/lib/esm/react/hooks/useDrawing/index.js.map +1 -1
- package/lib/esm/react/hooks/useFocus/index.js +4 -3
- package/lib/esm/react/hooks/useFocus/index.js.map +1 -1
- package/lib/esm/react/hooks/useMapEvents/index.js +9 -6
- package/lib/esm/react/hooks/useMapEvents/index.js.map +1 -1
- package/lib/esm/react/hooks/useMapOverlays/index.js +2 -2
- package/lib/esm/react/hooks/useMapOverlays/index.js.map +1 -1
- package/lib/esm/react/hooks/useMetaAtlas/index.js +162 -60
- package/lib/esm/react/hooks/useMetaAtlas/index.js.map +1 -1
- package/lib/esm/react/hooks/useMetaAtlas.js +162 -60
- package/lib/esm/react/hooks/useMetaAtlas.js.map +1 -1
- package/lib/esm/react/hooks/useRouting/index.js +2 -2
- package/lib/esm/react/hooks/useRouting/index.js.map +1 -1
- package/lib/esm/react/hooks/useSearch/index.js +2 -2
- package/lib/esm/react/hooks/useSearch/index.js.map +1 -1
- package/lib/esm/react/hooks/useStampRally/index.js +15 -12
- package/lib/esm/react/hooks/useStampRally/index.js.map +1 -1
- package/lib/esm/react/hooks/useStampRally/utils.js +1 -1
- package/lib/esm/react/hooks/useStampRally/utils.js.map +1 -1
- package/lib/esm/react/index.js +11 -15
- package/lib/esm/react/index.js.map +1 -1
- package/lib/esm/react/stores/useMapDataStore.js +17 -21
- package/lib/esm/react/stores/useMapDataStore.js.map +1 -1
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.d.ts +30 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraSync.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.d.ts +5 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/CameraUtils.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.d.ts +21 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/constants.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.d.ts +27 -0
- package/lib/types/meta-atlas-sdk/3DMap/CustomThreeJsWrapper/utility/suncalc.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.d.ts +18 -0
- package/lib/types/meta-atlas-sdk/mapbox_draw_custom_modes/draw_marker.d.ts.map +1 -0
- package/lib/types/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.d.ts +37 -0
- package/lib/types/meta-atlas-sdk/mapbox_draw_custom_modes/marker_select.d.ts.map +1 -0
- package/package.json +10 -7
|
@@ -3,44 +3,34 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
var _CustomThreeJsWrapper = _interopRequireDefault(require("./CustomThreeJsWrapper/CustomThreeJsWrapper"));
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _CustomThreeJsWrapper = _interopRequireDefault(require("./CustomThreeJsWrapper/CustomThreeJsWrapper.js"));
|
|
8
8
|
var _troikaThreeText = require("troika-three-text");
|
|
9
9
|
var turf = _interopRequireWildcard(require("@turf/turf"));
|
|
10
10
|
var THREE = _interopRequireWildcard(require("three"));
|
|
11
|
-
var _utils = require("./CustomThreeJsWrapper/utility/utils");
|
|
11
|
+
var _utils = require("./CustomThreeJsWrapper/utility/utils.js");
|
|
12
12
|
var _threeSpritetext = _interopRequireDefault(require("three-spritetext"));
|
|
13
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : {
|
|
15
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
16
|
-
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
17
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
18
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
19
|
-
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
23
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
24
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
25
17
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
26
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" ==
|
|
27
|
-
function _toPrimitive(t, r) { if ("object" !=
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
_defineProperty(this, "getAllPolygonCoordinates", function () {
|
|
33
|
-
var map = _this.map;
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
class MainMap {
|
|
21
|
+
constructor(metaAtlasCore) {
|
|
22
|
+
_defineProperty(this, "getAllPolygonCoordinates", () => {
|
|
23
|
+
const map = this.map;
|
|
34
24
|
if (!map) return [];
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
const polygonFeatures = [];
|
|
26
|
+
const source = map.getSource('custom');
|
|
37
27
|
if (source) {
|
|
38
|
-
|
|
28
|
+
const features = map.querySourceFeatures('custom', {
|
|
39
29
|
sourceLayer: 'geojson',
|
|
40
30
|
filter: ['==', ['geometry-type'], 'Polygon']
|
|
41
31
|
});
|
|
42
32
|
if (features && features.length > 0) {
|
|
43
|
-
features.forEach(
|
|
33
|
+
features.forEach(feature => {
|
|
44
34
|
if ((feature.geometry.type === 'Polygon' || feature.geometry.type === 'MultiPolygon') && feature.properties.dimension_what === 'what.booth') {
|
|
45
35
|
var _feature$properties;
|
|
46
36
|
polygonFeatures.push({
|
|
@@ -57,137 +47,129 @@ var MainMap = exports["default"] = /*#__PURE__*/function () {
|
|
|
57
47
|
}
|
|
58
48
|
return polygonFeatures;
|
|
59
49
|
});
|
|
60
|
-
_defineProperty(this, "updatePolygons",
|
|
61
|
-
features.map(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
coordinates = feature.geometry.coordinates; // const centroid = feature.properties.center;
|
|
68
|
-
polygon = turf.polygon(coordinates);
|
|
69
|
-
centroid = turf.centroid(polygon).geometry.coordinates; // const modelPosition = projectToWorld(centroid);
|
|
70
|
-
// const vertex1 = projectToWorld(coordinates[0][0]);
|
|
71
|
-
// const vertex2 = projectToWorld(coordinates[0][1]);
|
|
72
|
-
// const angle = vertex1.angleTo(vertex2);
|
|
73
|
-
// console.log(angle);
|
|
74
|
-
// await modelLoader.loadModel({
|
|
75
|
-
// modelPath: feature.properties.modelPath,
|
|
76
|
-
// feature,
|
|
77
|
-
// wrapper: wrapper.current!,
|
|
78
|
-
// onProgress: (progress) => {
|
|
79
|
-
// setLoadingProgress((prev) => ({
|
|
80
|
-
// ...prev,
|
|
81
|
-
// [feature.properties.id]: progress,
|
|
82
|
-
// }));
|
|
83
|
-
// },
|
|
84
|
-
// onError: (error) => {
|
|
85
|
-
// console.error(
|
|
86
|
-
// `Failed to load model ${feature.properties.id}:`,
|
|
87
|
-
// error
|
|
88
|
-
// );
|
|
89
|
-
// },
|
|
90
|
-
// });
|
|
91
|
-
if (!feature.properties.hasImage && feature.properties.dimension_where && feature.properties.dimension_where === 'where.lima.mahsuri_center.exhibition_floor') {
|
|
92
|
-
myText = new _threeSpritetext["default"]();
|
|
93
|
-
myText.color = 'black';
|
|
94
|
-
text = feature.properties.title;
|
|
95
|
-
text = _this.addNewLine(text);
|
|
50
|
+
_defineProperty(this, "updatePolygons", features => {
|
|
51
|
+
features.map(async feature => {
|
|
52
|
+
const coordinates = feature.geometry.coordinates;
|
|
53
|
+
// const centroid = feature.properties.center;
|
|
54
|
+
const polygon = turf.polygon(coordinates);
|
|
55
|
+
const centroid = turf.centroid(polygon).geometry.coordinates;
|
|
56
|
+
// const modelPosition = projectToWorld(centroid);
|
|
96
57
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
58
|
+
// const vertex1 = projectToWorld(coordinates[0][0]);
|
|
59
|
+
// const vertex2 = projectToWorld(coordinates[0][1]);
|
|
60
|
+
// const angle = vertex1.angleTo(vertex2);
|
|
61
|
+
// console.log(angle);
|
|
62
|
+
|
|
63
|
+
// await modelLoader.loadModel({
|
|
64
|
+
// modelPath: feature.properties.modelPath,
|
|
65
|
+
// feature,
|
|
66
|
+
// wrapper: wrapper.current!,
|
|
67
|
+
// onProgress: (progress) => {
|
|
68
|
+
// setLoadingProgress((prev) => ({
|
|
69
|
+
// ...prev,
|
|
70
|
+
// [feature.properties.id]: progress,
|
|
71
|
+
// }));
|
|
72
|
+
// },
|
|
73
|
+
// onError: (error) => {
|
|
74
|
+
// console.error(
|
|
75
|
+
// `Failed to load model ${feature.properties.id}:`,
|
|
76
|
+
// error
|
|
77
|
+
// );
|
|
78
|
+
// },
|
|
79
|
+
// });
|
|
80
|
+
|
|
81
|
+
if (!feature.properties.hasImage && feature.properties.dimension_where && feature.properties.dimension_where === 'where.lima.mahsuri_center.exhibition_floor') {
|
|
82
|
+
const myText = new _threeSpritetext.default();
|
|
83
|
+
myText.color = 'black';
|
|
84
|
+
let text = feature.properties.title;
|
|
85
|
+
text = this.addNewLine(text);
|
|
86
|
+
|
|
87
|
+
// Set properties to configure:
|
|
88
|
+
myText.text = text;
|
|
89
|
+
myText.textHeight = 100;
|
|
90
|
+
// myText.textHeight = 1;
|
|
91
|
+
// myText.backgroundColor = '';
|
|
92
|
+
const textPosition = (0, _utils.projectToWorld)(centroid);
|
|
93
|
+
myText.rotation.x = Math.PI;
|
|
94
|
+
myText.rotation.y = Math.PI;
|
|
95
|
+
myText.scale.set(0.1, 0.1, 0.01);
|
|
96
|
+
myText.position.set(textPosition.x, textPosition.y,
|
|
97
|
+
// feature.properties.height > 0 ? 0.4 : 0.25
|
|
98
|
+
0.1);
|
|
99
|
+
this.threebox.add(myText);
|
|
100
|
+
} else {
|
|
101
|
+
// Load Texture
|
|
102
|
+
// const textureLoader = new THREE.TextureLoader();
|
|
103
|
+
// textureLoader.load('/sk.png', (texture: THREE.Texture) => {
|
|
104
|
+
// // Create a plane geometry and material with the loaded texture
|
|
105
|
+
// const geometry = new THREE.PlaneGeometry(
|
|
106
|
+
// texture.image.width,
|
|
107
|
+
// texture.image.height
|
|
108
|
+
// );
|
|
109
|
+
// geometry.computeBoundingBox();
|
|
110
|
+
// const material = new THREE.MeshStandardMaterial({
|
|
111
|
+
// map: texture,
|
|
112
|
+
// transparent: true, // Enable transparency
|
|
113
|
+
// opacity: 1,
|
|
114
|
+
// });
|
|
115
|
+
// const plane = new THREE.Mesh(geometry, material);
|
|
116
|
+
// const group = new THREE.Group();
|
|
117
|
+
// const childContainer = new THREE.Group();
|
|
118
|
+
// childContainer.add(plane);
|
|
119
|
+
// childContainer.rotateZ(Math.PI / 2);
|
|
120
|
+
// childContainer.rotateZ(1);
|
|
121
|
+
// childContainer.updateMatrixWorld();
|
|
122
|
+
// group.add(childContainer);
|
|
123
|
+
// const geojsonbbox = turf.bbox(polygon);
|
|
124
|
+
// const bbox1 = new THREE.Box3(
|
|
125
|
+
// projectToWorld([geojsonbbox[2], geojsonbbox[3]]),
|
|
126
|
+
// projectToWorld([geojsonbbox[0], geojsonbbox[1]])
|
|
127
|
+
// );
|
|
128
|
+
// const bbox2 = new THREE.Box3().setFromObject(plane);
|
|
129
|
+
// const size1 = new THREE.Vector3();
|
|
130
|
+
// bbox1.getSize(size1);
|
|
131
|
+
// size1.setZ(1);
|
|
132
|
+
// const size2 = new THREE.Vector3();
|
|
133
|
+
// bbox2.getSize(size2);
|
|
134
|
+
// size2.setZ(1);
|
|
135
|
+
// const ratio = size1.divide(size2);
|
|
136
|
+
// const ratioCopy = ratio.clone().multiplyScalar(0.85);
|
|
137
|
+
// plane.scale.set(
|
|
138
|
+
// plane.scale.x * ratioCopy.x,
|
|
139
|
+
// plane.scale.y * ratioCopy.y,
|
|
140
|
+
// plane.scale.z * ratioCopy.z
|
|
141
|
+
// );
|
|
142
|
+
// // // Set the position of the plane to the centroid
|
|
143
|
+
// group.position.set(modelPosition.x, modelPosition.y, 0.11);
|
|
144
|
+
// this.threebox.add(group);
|
|
145
|
+
// });
|
|
146
|
+
}
|
|
147
|
+
});
|
|
166
148
|
});
|
|
167
|
-
_defineProperty(this, "addLogo",
|
|
168
|
-
|
|
169
|
-
|
|
149
|
+
_defineProperty(this, "addLogo", (logo, position) => {
|
|
150
|
+
const textureLoader = new THREE.TextureLoader();
|
|
151
|
+
const texture = textureLoader.load(logo);
|
|
170
152
|
|
|
171
153
|
// Define rectangle dimensions
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
154
|
+
const width = 4;
|
|
155
|
+
const height = 0;
|
|
156
|
+
const depth = 2;
|
|
175
157
|
|
|
176
158
|
// Create a box geometry instead of cylinder
|
|
177
|
-
|
|
159
|
+
const geometry = new THREE.BoxGeometry(width, height, depth);
|
|
178
160
|
|
|
179
161
|
// Create materials: [right, left, top, bottom, front, back]
|
|
180
|
-
|
|
162
|
+
const sideMaterial = new THREE.MeshBasicMaterial({
|
|
181
163
|
color: new THREE.Color(0xffffff)
|
|
182
164
|
});
|
|
183
|
-
|
|
165
|
+
const topMaterial = new THREE.MeshStandardMaterial({
|
|
184
166
|
map: texture,
|
|
185
167
|
side: THREE.DoubleSide,
|
|
186
168
|
transparent: true
|
|
187
169
|
});
|
|
188
170
|
|
|
189
171
|
// Create an array of materials for each face of the box
|
|
190
|
-
|
|
172
|
+
const materials = [sideMaterial,
|
|
191
173
|
// right
|
|
192
174
|
sideMaterial,
|
|
193
175
|
// left
|
|
@@ -201,19 +183,19 @@ var MainMap = exports["default"] = /*#__PURE__*/function () {
|
|
|
201
183
|
];
|
|
202
184
|
|
|
203
185
|
// Create the mesh with geometry and materials
|
|
204
|
-
|
|
186
|
+
const logoMesh = new THREE.Mesh(geometry, materials);
|
|
205
187
|
|
|
206
188
|
// Adjust rotation to match your previous orientation
|
|
207
189
|
logoMesh.rotation.x = Math.PI / 2;
|
|
208
190
|
logoMesh.rotation.y = -Math.PI / 1.45;
|
|
209
191
|
logoMesh.position.set(position.x + 0.5, position.y - 0.3, position.z);
|
|
210
|
-
|
|
192
|
+
this.threebox.add(logoMesh);
|
|
211
193
|
return logoMesh;
|
|
212
194
|
});
|
|
213
195
|
// Function to add text using Troika Text library at a specified position
|
|
214
|
-
_defineProperty(this, "addTitle",
|
|
196
|
+
_defineProperty(this, "addTitle", (title, position) => {
|
|
215
197
|
// Create a new Text instance
|
|
216
|
-
|
|
198
|
+
const textMesh = new _troikaThreeText.Text();
|
|
217
199
|
|
|
218
200
|
// Configure text properties
|
|
219
201
|
textMesh.text = title;
|
|
@@ -227,7 +209,7 @@ var MainMap = exports["default"] = /*#__PURE__*/function () {
|
|
|
227
209
|
textMesh.rotation.z = -Math.PI / 1.45;
|
|
228
210
|
|
|
229
211
|
// Add text to the scene
|
|
230
|
-
|
|
212
|
+
this.threebox.add(textMesh);
|
|
231
213
|
|
|
232
214
|
// Update the text rendering
|
|
233
215
|
textMesh.sync();
|
|
@@ -239,59 +221,51 @@ var MainMap = exports["default"] = /*#__PURE__*/function () {
|
|
|
239
221
|
MainMap.mainInstance = this;
|
|
240
222
|
this.metaAtlasCore = metaAtlasCore;
|
|
241
223
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
this.initThreebox();
|
|
247
|
-
}
|
|
224
|
+
init(map2D) {
|
|
225
|
+
this.map = map2D;
|
|
226
|
+
this.initThreebox();
|
|
227
|
+
}
|
|
248
228
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
// wrapper.scene.environment = texture;
|
|
264
|
-
// });
|
|
229
|
+
/**
|
|
230
|
+
* Creates a Threebox instance of the class.
|
|
231
|
+
* @param map Maplibre instance to initialize threebox
|
|
232
|
+
* @returns Threebox class instance created
|
|
233
|
+
*/
|
|
234
|
+
initThreebox() {
|
|
235
|
+
const map = this.map;
|
|
236
|
+
const wrapper = new _CustomThreeJsWrapper.default(map);
|
|
237
|
+
wrapper.setEnvironment();
|
|
238
|
+
// const hdrLoader = new HDRLoader();
|
|
239
|
+
// hdrLoader.load('./golden_gate_hills_1k.hdr', texture => {
|
|
240
|
+
// texture.mapping = EquirectangularReflectionMapping;
|
|
241
|
+
// wrapper.scene.environment = texture;
|
|
242
|
+
// });
|
|
265
243
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
244
|
+
map.addLayer({
|
|
245
|
+
id: '3d-model-layer',
|
|
246
|
+
type: 'custom',
|
|
247
|
+
renderingMode: '3d',
|
|
248
|
+
onAdd: () => {
|
|
249
|
+
console.log('onAdd _initThreebox');
|
|
250
|
+
},
|
|
251
|
+
render: () => {
|
|
252
|
+
wrapper.update();
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
this.threebox = wrapper;
|
|
256
|
+
return wrapper;
|
|
257
|
+
}
|
|
280
258
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
return input.replace(/ /g, '\r\n');
|
|
293
|
-
}
|
|
294
|
-
}]);
|
|
295
|
-
}();
|
|
259
|
+
/**
|
|
260
|
+
* Get the threebox instance for 3D model operations
|
|
261
|
+
*/
|
|
262
|
+
getThreebox() {
|
|
263
|
+
return this.threebox;
|
|
264
|
+
}
|
|
265
|
+
addNewLine(input) {
|
|
266
|
+
return input.replace(/ /g, '\r\n');
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
exports.default = MainMap;
|
|
296
270
|
_defineProperty(MainMap, "mainInstance", null);
|
|
297
271
|
//# sourceMappingURL=MainMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainMap.js","names":["_CustomThreeJsWrapper","_interopRequireDefault","require","_troikaThreeText","turf","_interopRequireWildcard","THREE","_utils","_threeSpritetext","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Symbol","iterator","constructor","prototype","_regenerator","toStringTag","c","Generator","u","create","_regeneratorDefine2","p","y","G","v","a","d","bind","length","l","TypeError","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","displayName","w","m","_regeneratorDefine","_invoke","enumerable","configurable","writable","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","ownKeys","keys","getOwnPropertySymbols","filter","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_classCallCheck","_defineProperties","_toPropertyKey","key","_createClass","_toPrimitive","toPrimitive","String","Number","MainMap","exports","metaAtlasCore","_this","map","polygonFeatures","source","getSource","features","querySourceFeatures","sourceLayer","feature","geometry","type","properties","dimension_what","_feature$properties","id","mapObjectId","name","title","coordinates","hasImage","Math","round","random","_ref","_callee","polygon","centroid","myText","text","textPosition","_context","dimension_where","SpriteText","color","addNewLine","textHeight","projectToWorld","rotation","x","PI","scale","position","threebox","add","_x","logo","textureLoader","TextureLoader","texture","load","width","height","depth","BoxGeometry","sideMaterial","MeshBasicMaterial","Color","topMaterial","MeshStandardMaterial","side","DoubleSide","transparent","materials","logoMesh","Mesh","z","textMesh","Text","fontSize","anchorX","anchorY","fontWeight","textAlign","sync","mainInstance","init","map2D","initThreebox","wrapper","CustomThreeJSWrapper","setEnvironment","addLayer","renderingMode","onAdd","console","log","render","update","getThreebox","input","replace"],"sources":["../../../../src/meta-atlas-sdk/3DMap/MainMap.ts"],"sourcesContent":["import { Map as MaplibreMap } from 'maplibre-gl';\n\nimport CustomThreeJSWrapper from './CustomThreeJsWrapper/CustomThreeJsWrapper';\nimport { Text } from 'troika-three-text';\n\nimport { EquirectangularReflectionMapping } from 'three';\nimport { MetaAtlasCore } from '../MetaAtlasCore/meta-atlas-sdk-core';\nimport * as turf from '@turf/turf';\nimport * as THREE from 'three';\nimport { projectToWorld } from './CustomThreeJsWrapper/utility/utils';\nimport SpriteText from 'three-spritetext';\nimport { HDRLoader } from 'three/examples/jsm/loaders/HDRLoader';\n\nexport default class MainMap {\n public static mainInstance: MainMap | null = null;\n public map!: MaplibreMap;\n public threebox!: CustomThreeJSWrapper;\n public metaAtlasCore!: MetaAtlasCore;\n\n constructor(metaAtlasCore: MetaAtlasCore) {\n if (MainMap.mainInstance) {\n return MainMap.mainInstance;\n }\n\n MainMap.mainInstance = this;\n\n this.metaAtlasCore = metaAtlasCore;\n }\n\n public init(map2D: MaplibreMap) {\n this.map = map2D;\n this.initThreebox();\n }\n\n /**\n * Creates a Threebox instance of the class.\n * @param map Maplibre instance to initialize threebox\n * @returns Threebox class instance created\n */\n private initThreebox() {\n const map = this.map;\n const wrapper = new CustomThreeJSWrapper(map);\n wrapper.setEnvironment();\n // const hdrLoader = new HDRLoader();\n // hdrLoader.load('./golden_gate_hills_1k.hdr', texture => {\n // texture.mapping = EquirectangularReflectionMapping;\n // wrapper.scene.environment = texture;\n // });\n\n map.addLayer({\n id: '3d-model-layer',\n type: 'custom',\n renderingMode: '3d',\n onAdd: () => {\n console.log('onAdd _initThreebox');\n },\n render: () => {\n wrapper.update();\n }\n });\n\n this.threebox = wrapper;\n return wrapper;\n }\n\n /**\n * Get the threebox instance for 3D model operations\n */\n getThreebox() {\n return this.threebox;\n }\n\n getAllPolygonCoordinates = () => {\n const map = this.map;\n\n if (!map) return [];\n\n const polygonFeatures: any[] = [];\n const source = map.getSource('custom');\n if (source) {\n const features = map.querySourceFeatures('custom', {\n sourceLayer: 'geojson',\n filter: ['==', ['geometry-type'], 'Polygon']\n });\n\n if (features && features.length > 0) {\n features.forEach(feature => {\n if (\n (feature.geometry.type === 'Polygon' || feature.geometry.type === 'MultiPolygon') &&\n feature.properties.dimension_what === 'what.booth'\n ) {\n polygonFeatures.push({\n id: feature.properties.mapObjectId,\n name: feature.properties?.title || 'Unnamed Polygon',\n coordinates: feature.geometry.coordinates,\n properties: {\n ...feature.properties,\n hasImage: !!Math.round(Math.random())\n }\n });\n }\n });\n }\n }\n\n return polygonFeatures;\n };\n\n addNewLine(input: string): string {\n return input.replace(/ /g, '\\r\\n');\n }\n\n updatePolygons = (features: any[]) => {\n features.map(async (feature: any) => {\n const coordinates = feature.geometry.coordinates;\n // const centroid = feature.properties.center;\n const polygon = turf.polygon(coordinates);\n const centroid = turf.centroid(polygon).geometry.coordinates;\n // const modelPosition = projectToWorld(centroid);\n\n // const vertex1 = projectToWorld(coordinates[0][0]);\n // const vertex2 = projectToWorld(coordinates[0][1]);\n // const angle = vertex1.angleTo(vertex2);\n // console.log(angle);\n\n // await modelLoader.loadModel({\n // modelPath: feature.properties.modelPath,\n // feature,\n // wrapper: wrapper.current!,\n // onProgress: (progress) => {\n // setLoadingProgress((prev) => ({\n // ...prev,\n // [feature.properties.id]: progress,\n // }));\n // },\n // onError: (error) => {\n // console.error(\n // `Failed to load model ${feature.properties.id}:`,\n // error\n // );\n // },\n // });\n\n if (\n !feature.properties.hasImage &&\n feature.properties.dimension_where &&\n feature.properties.dimension_where === 'where.lima.mahsuri_center.exhibition_floor'\n ) {\n const myText = new SpriteText();\n myText.color = 'black';\n let text = feature.properties.title;\n text = this.addNewLine(text);\n\n // Set properties to configure:\n myText.text = text;\n myText.textHeight = 100;\n // myText.textHeight = 1;\n // myText.backgroundColor = '';\n const textPosition = projectToWorld(centroid);\n myText.rotation.x = Math.PI;\n myText.rotation.y = Math.PI;\n myText.scale.set(0.1, 0.1, 0.01);\n\n myText.position.set(\n textPosition.x,\n textPosition.y,\n // feature.properties.height > 0 ? 0.4 : 0.25\n 0.1\n );\n this.threebox.add(myText);\n } else {\n // Load Texture\n // const textureLoader = new THREE.TextureLoader();\n // textureLoader.load('/sk.png', (texture: THREE.Texture) => {\n // // Create a plane geometry and material with the loaded texture\n // const geometry = new THREE.PlaneGeometry(\n // texture.image.width,\n // texture.image.height\n // );\n // geometry.computeBoundingBox();\n // const material = new THREE.MeshStandardMaterial({\n // map: texture,\n // transparent: true, // Enable transparency\n // opacity: 1,\n // });\n // const plane = new THREE.Mesh(geometry, material);\n // const group = new THREE.Group();\n // const childContainer = new THREE.Group();\n // childContainer.add(plane);\n // childContainer.rotateZ(Math.PI / 2);\n // childContainer.rotateZ(1);\n // childContainer.updateMatrixWorld();\n // group.add(childContainer);\n // const geojsonbbox = turf.bbox(polygon);\n // const bbox1 = new THREE.Box3(\n // projectToWorld([geojsonbbox[2], geojsonbbox[3]]),\n // projectToWorld([geojsonbbox[0], geojsonbbox[1]])\n // );\n // const bbox2 = new THREE.Box3().setFromObject(plane);\n // const size1 = new THREE.Vector3();\n // bbox1.getSize(size1);\n // size1.setZ(1);\n // const size2 = new THREE.Vector3();\n // bbox2.getSize(size2);\n // size2.setZ(1);\n // const ratio = size1.divide(size2);\n // const ratioCopy = ratio.clone().multiplyScalar(0.85);\n // plane.scale.set(\n // plane.scale.x * ratioCopy.x,\n // plane.scale.y * ratioCopy.y,\n // plane.scale.z * ratioCopy.z\n // );\n // // // Set the position of the plane to the centroid\n // group.position.set(modelPosition.x, modelPosition.y, 0.11);\n // this.threebox.add(group);\n // });\n }\n });\n };\n\n addLogo = (logo: string, position: THREE.Vector3) => {\n const textureLoader = new THREE.TextureLoader();\n const texture = textureLoader.load(logo);\n\n // Define rectangle dimensions\n const width = 4;\n const height = 0;\n const depth = 2;\n\n // Create a box geometry instead of cylinder\n const geometry = new THREE.BoxGeometry(width, height, depth);\n\n // Create materials: [right, left, top, bottom, front, back]\n const sideMaterial = new THREE.MeshBasicMaterial({ color: new THREE.Color(0xffffff) });\n const topMaterial = new THREE.MeshStandardMaterial({\n map: texture,\n side: THREE.DoubleSide,\n transparent: true\n });\n\n // Create an array of materials for each face of the box\n const materials = [\n sideMaterial, // right\n sideMaterial, // left\n topMaterial, // top (with logo texture)\n sideMaterial, // bottom\n sideMaterial, // front\n sideMaterial // back\n ];\n\n // Create the mesh with geometry and materials\n const logoMesh = new THREE.Mesh(geometry, materials);\n\n // Adjust rotation to match your previous orientation\n logoMesh.rotation.x = Math.PI / 2;\n logoMesh.rotation.y = -Math.PI / 1.45;\n logoMesh.position.set(position.x + 0.5, position.y - 0.3, position.z);\n\n this.threebox.add(logoMesh);\n\n return logoMesh;\n };\n\n // Function to add text using Troika Text library at a specified position\n addTitle = (title: string, position: THREE.Vector3) => {\n // Create a new Text instance\n const textMesh = new Text();\n\n // Configure text properties\n textMesh.text = title;\n textMesh.fontSize = 0.2;\n textMesh.color = 0x000000;\n textMesh.anchorX = '50%';\n textMesh.anchorY = 'bottom-baseline';\n textMesh.fontWeight = 'bold';\n textMesh.textAlign = 'center';\n\n textMesh.position.set(position.x, position.y, position.z);\n textMesh.rotation.z = -Math.PI / 1.45;\n\n // Add text to the scene\n this.threebox.add(textMesh);\n\n // Update the text rendering\n textMesh.sync();\n\n return textMesh;\n };\n}\n"],"mappings":";;;;;;AAEA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAIA,IAAAE,IAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,uBAAA,CAAAH,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAP,sBAAA,CAAAC,OAAA;AAA0C,SAAAG,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,wBAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,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A,EAGA,SAAAoI,WAAWA,CAAA,EAAG;MACZ,OAAO,IAAI,CAAC9C,QAAQ;IACtB;EAAC;IAAAnD,GAAA;IAAAnC,KAAA,EAsCD,SAAA8E,UAAUA,CAACuD,KAAa,EAAU;MAChC,OAAOA,KAAK,CAACC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;IACpC;EAAC;AAAA;AAAAzG,eAAA,CAjGkBY,OAAO,kBACmB,IAAI","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"MainMap.js","names":["_troikaThreeText","require","turf","_interopRequireWildcard","THREE","_utils","_threeSpritetext","_interopRequireDefault","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","MainMap","constructor","metaAtlasCore","map","polygonFeatures","source","getSource","features","querySourceFeatures","sourceLayer","feature","geometry","type","properties","dimension_what","_feature$properties","id","mapObjectId","name","title","coordinates","hasImage","Math","round","random","polygon","centroid","dimension_where","myText","SpriteText","color","text","addNewLine","textHeight","textPosition","projectToWorld","rotation","x","PI","y","scale","position","threebox","add","logo","textureLoader","TextureLoader","texture","load","width","height","depth","BoxGeometry","sideMaterial","MeshBasicMaterial","Color","topMaterial","MeshStandardMaterial","side","DoubleSide","transparent","materials","logoMesh","Mesh","z","textMesh","Text","fontSize","anchorX","anchorY","fontWeight","textAlign","sync","mainInstance","init","map2D","initThreebox","wrapper","CustomThreeJSWrapper","setEnvironment","addLayer","renderingMode","onAdd","console","log","render","update","getThreebox","input","replace","exports"],"sources":["../../../../src/meta-atlas-sdk/3DMap/MainMap.ts"],"sourcesContent":["import { Map as MaplibreMap } from 'maplibre-gl';\n\nimport CustomThreeJSWrapper from './CustomThreeJsWrapper/CustomThreeJsWrapper';\nimport { Text } from 'troika-three-text';\n\nimport { EquirectangularReflectionMapping } from 'three';\nimport { MetaAtlasCore } from '../MetaAtlasCore/meta-atlas-sdk-core';\nimport * as turf from '@turf/turf';\nimport * as THREE from 'three';\nimport { projectToWorld } from './CustomThreeJsWrapper/utility/utils';\nimport SpriteText from 'three-spritetext';\nimport { HDRLoader } from 'three/examples/jsm/loaders/HDRLoader';\n\nexport default class MainMap {\n public static mainInstance: MainMap | null = null;\n public map!: MaplibreMap;\n public threebox!: CustomThreeJSWrapper;\n public metaAtlasCore!: MetaAtlasCore;\n\n constructor(metaAtlasCore: MetaAtlasCore) {\n if (MainMap.mainInstance) {\n return MainMap.mainInstance;\n }\n\n MainMap.mainInstance = this;\n\n this.metaAtlasCore = metaAtlasCore;\n }\n\n public init(map2D: MaplibreMap) {\n this.map = map2D;\n this.initThreebox();\n }\n\n /**\n * Creates a Threebox instance of the class.\n * @param map Maplibre instance to initialize threebox\n * @returns Threebox class instance created\n */\n private initThreebox() {\n const map = this.map;\n const wrapper = new CustomThreeJSWrapper(map);\n wrapper.setEnvironment();\n // const hdrLoader = new HDRLoader();\n // hdrLoader.load('./golden_gate_hills_1k.hdr', texture => {\n // texture.mapping = EquirectangularReflectionMapping;\n // wrapper.scene.environment = texture;\n // });\n\n map.addLayer({\n id: '3d-model-layer',\n type: 'custom',\n renderingMode: '3d',\n onAdd: () => {\n console.log('onAdd _initThreebox');\n },\n render: () => {\n wrapper.update();\n }\n });\n\n this.threebox = wrapper;\n return wrapper;\n }\n\n /**\n * Get the threebox instance for 3D model operations\n */\n getThreebox() {\n return this.threebox;\n }\n\n getAllPolygonCoordinates = () => {\n const map = this.map;\n\n if (!map) return [];\n\n const polygonFeatures: any[] = [];\n const source = map.getSource('custom');\n if (source) {\n const features = map.querySourceFeatures('custom', {\n sourceLayer: 'geojson',\n filter: ['==', ['geometry-type'], 'Polygon']\n });\n\n if (features && features.length > 0) {\n features.forEach(feature => {\n if (\n (feature.geometry.type === 'Polygon' || feature.geometry.type === 'MultiPolygon') &&\n feature.properties.dimension_what === 'what.booth'\n ) {\n polygonFeatures.push({\n id: feature.properties.mapObjectId,\n name: feature.properties?.title || 'Unnamed Polygon',\n coordinates: feature.geometry.coordinates,\n properties: {\n ...feature.properties,\n hasImage: !!Math.round(Math.random())\n }\n });\n }\n });\n }\n }\n\n return polygonFeatures;\n };\n\n addNewLine(input: string): string {\n return input.replace(/ /g, '\\r\\n');\n }\n\n updatePolygons = (features: any[]) => {\n features.map(async (feature: any) => {\n const coordinates = feature.geometry.coordinates;\n // const centroid = feature.properties.center;\n const polygon = turf.polygon(coordinates);\n const centroid = turf.centroid(polygon).geometry.coordinates;\n // const modelPosition = projectToWorld(centroid);\n\n // const vertex1 = projectToWorld(coordinates[0][0]);\n // const vertex2 = projectToWorld(coordinates[0][1]);\n // const angle = vertex1.angleTo(vertex2);\n // console.log(angle);\n\n // await modelLoader.loadModel({\n // modelPath: feature.properties.modelPath,\n // feature,\n // wrapper: wrapper.current!,\n // onProgress: (progress) => {\n // setLoadingProgress((prev) => ({\n // ...prev,\n // [feature.properties.id]: progress,\n // }));\n // },\n // onError: (error) => {\n // console.error(\n // `Failed to load model ${feature.properties.id}:`,\n // error\n // );\n // },\n // });\n\n if (\n !feature.properties.hasImage &&\n feature.properties.dimension_where &&\n feature.properties.dimension_where === 'where.lima.mahsuri_center.exhibition_floor'\n ) {\n const myText = new SpriteText();\n myText.color = 'black';\n let text = feature.properties.title;\n text = this.addNewLine(text);\n\n // Set properties to configure:\n myText.text = text;\n myText.textHeight = 100;\n // myText.textHeight = 1;\n // myText.backgroundColor = '';\n const textPosition = projectToWorld(centroid);\n myText.rotation.x = Math.PI;\n myText.rotation.y = Math.PI;\n myText.scale.set(0.1, 0.1, 0.01);\n\n myText.position.set(\n textPosition.x,\n textPosition.y,\n // feature.properties.height > 0 ? 0.4 : 0.25\n 0.1\n );\n this.threebox.add(myText);\n } else {\n // Load Texture\n // const textureLoader = new THREE.TextureLoader();\n // textureLoader.load('/sk.png', (texture: THREE.Texture) => {\n // // Create a plane geometry and material with the loaded texture\n // const geometry = new THREE.PlaneGeometry(\n // texture.image.width,\n // texture.image.height\n // );\n // geometry.computeBoundingBox();\n // const material = new THREE.MeshStandardMaterial({\n // map: texture,\n // transparent: true, // Enable transparency\n // opacity: 1,\n // });\n // const plane = new THREE.Mesh(geometry, material);\n // const group = new THREE.Group();\n // const childContainer = new THREE.Group();\n // childContainer.add(plane);\n // childContainer.rotateZ(Math.PI / 2);\n // childContainer.rotateZ(1);\n // childContainer.updateMatrixWorld();\n // group.add(childContainer);\n // const geojsonbbox = turf.bbox(polygon);\n // const bbox1 = new THREE.Box3(\n // projectToWorld([geojsonbbox[2], geojsonbbox[3]]),\n // projectToWorld([geojsonbbox[0], geojsonbbox[1]])\n // );\n // const bbox2 = new THREE.Box3().setFromObject(plane);\n // const size1 = new THREE.Vector3();\n // bbox1.getSize(size1);\n // size1.setZ(1);\n // const size2 = new THREE.Vector3();\n // bbox2.getSize(size2);\n // size2.setZ(1);\n // const ratio = size1.divide(size2);\n // const ratioCopy = ratio.clone().multiplyScalar(0.85);\n // plane.scale.set(\n // plane.scale.x * ratioCopy.x,\n // plane.scale.y * ratioCopy.y,\n // plane.scale.z * ratioCopy.z\n // );\n // // // Set the position of the plane to the centroid\n // group.position.set(modelPosition.x, modelPosition.y, 0.11);\n // this.threebox.add(group);\n // });\n }\n });\n };\n\n addLogo = (logo: string, position: THREE.Vector3) => {\n const textureLoader = new THREE.TextureLoader();\n const texture = textureLoader.load(logo);\n\n // Define rectangle dimensions\n const width = 4;\n const height = 0;\n const depth = 2;\n\n // Create a box geometry instead of cylinder\n const geometry = new THREE.BoxGeometry(width, height, depth);\n\n // Create materials: [right, left, top, bottom, front, back]\n const sideMaterial = new THREE.MeshBasicMaterial({ color: new THREE.Color(0xffffff) });\n const topMaterial = new THREE.MeshStandardMaterial({\n map: texture,\n side: THREE.DoubleSide,\n transparent: true\n });\n\n // Create an array of materials for each face of the box\n const materials = [\n sideMaterial, // right\n sideMaterial, // left\n topMaterial, // top (with logo texture)\n sideMaterial, // bottom\n sideMaterial, // front\n sideMaterial // back\n ];\n\n // Create the mesh with geometry and materials\n const logoMesh = new THREE.Mesh(geometry, materials);\n\n // Adjust rotation to match your previous orientation\n logoMesh.rotation.x = Math.PI / 2;\n logoMesh.rotation.y = -Math.PI / 1.45;\n logoMesh.position.set(position.x + 0.5, position.y - 0.3, position.z);\n\n this.threebox.add(logoMesh);\n\n return logoMesh;\n };\n\n // Function to add text using Troika Text library at a specified position\n addTitle = (title: string, position: THREE.Vector3) => {\n // Create a new Text instance\n const textMesh = new Text();\n\n // Configure text properties\n textMesh.text = title;\n textMesh.fontSize = 0.2;\n textMesh.color = 0x000000;\n textMesh.anchorX = '50%';\n textMesh.anchorY = 'bottom-baseline';\n textMesh.fontWeight = 'bold';\n textMesh.textAlign = 'center';\n\n textMesh.position.set(position.x, position.y, position.z);\n textMesh.rotation.z = -Math.PI / 1.45;\n\n // Add text to the scene\n this.threebox.add(textMesh);\n\n // Update the text rendering\n textMesh.sync();\n\n return textMesh;\n };\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,gBAAA,GAAAC,OAAA;AAIA,IAAAC,IAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,uBAAA,CAAAF,OAAA;AAA+B,IAAAI,MAAA,GAAAJ,OAAA;AAE/B,IAAAK,gBAAA,GAAAC,sBAAA,CAAAN,OAAA;AAA0C,SAAAE,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iB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