@anov/3d 0.0.137 → 0.0.139

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.
Files changed (206) hide show
  1. package/dist/anov3d.js +10 -10
  2. package/dist/anov3d.js.map +1 -1
  3. package/dist/applicationApi.js +17 -9
  4. package/dist/applicationApi.js.map +1 -1
  5. package/dist/factory/3d.js +6 -7
  6. package/dist/factory/3d.js.map +1 -1
  7. package/dist/factory/globalControl.js +3 -3
  8. package/dist/factory/globalControl.js.map +1 -1
  9. package/dist/factory/unit/CameraPoi.js +5 -6
  10. package/dist/factory/unit/CameraPoi.js.map +1 -1
  11. package/dist/factory/unit/areaBoundingBox.js +3 -3
  12. package/dist/factory/unit/areaBoundingBox.js.map +1 -1
  13. package/dist/factory/unit/circle.js +4 -4
  14. package/dist/factory/unit/circle.js.map +1 -1
  15. package/dist/factory/unit/cylinder.js +5 -5
  16. package/dist/factory/unit/cylinder.js.map +1 -1
  17. package/dist/factory/unit/districtLine.js +4 -4
  18. package/dist/factory/unit/districtLine.js.map +1 -1
  19. package/dist/factory/unit/glsl/heat/frag.js.map +1 -1
  20. package/dist/factory/unit/glsl/heat/ver.js.map +1 -1
  21. package/dist/factory/unit/glsl/highway/fragmentShader.js.map +1 -1
  22. package/dist/factory/unit/glsl/highway/fragmentShader2.js.map +1 -1
  23. package/dist/factory/unit/glsl/highway/vertexShader.js.map +1 -1
  24. package/dist/factory/unit/handle.js +3 -3
  25. package/dist/factory/unit/handle.js.map +1 -1
  26. package/dist/factory/unit/index.js +13 -14
  27. package/dist/factory/unit/index.js.map +1 -1
  28. package/dist/factory/unit/inspection/InspectionObject.js +4 -4
  29. package/dist/factory/unit/inspection/InspectionObject.js.map +1 -1
  30. package/dist/factory/unit/inspection/defaultFirstPerspectiveControls.js +3 -3
  31. package/dist/factory/unit/inspection/defaultFirstPerspectiveControls.js.map +1 -1
  32. package/dist/factory/unit/inspection/index.js +6 -8
  33. package/dist/factory/unit/inspection/index.js.map +1 -1
  34. package/dist/factory/unit/inspection/lineData.js.map +1 -1
  35. package/dist/factory/unit/inspection/map.js +3 -3
  36. package/dist/factory/unit/inspection/map.js.map +1 -1
  37. package/dist/factory/unit/inspection/tubeGeometry.js +3 -3
  38. package/dist/factory/unit/inspection/tubeGeometry.js.map +1 -1
  39. package/dist/factory/unit/layer/rise.js.map +1 -1
  40. package/dist/factory/unit/line.js +3 -3
  41. package/dist/factory/unit/line.js.map +1 -1
  42. package/dist/factory/unit/poi.js +5 -5
  43. package/dist/factory/unit/poi.js.map +1 -1
  44. package/dist/factory/unit/region.js +3 -3
  45. package/dist/factory/unit/region.js.map +1 -1
  46. package/dist/factory/unit/slice.js +3 -3
  47. package/dist/factory/unit/slice.js.map +1 -1
  48. package/dist/factory/unit/wall.js +3 -3
  49. package/dist/factory/unit/wall.js.map +1 -1
  50. package/dist/factory/utils/areaBoundingBox.js.map +1 -1
  51. package/dist/factory/utils/constant.js +6 -6
  52. package/dist/factory/utils/constant.js.map +1 -1
  53. package/dist/factory/utils/finirMaterial.js +0 -1
  54. package/dist/factory/utils/finirMaterial.js.map +1 -1
  55. package/dist/factory/utils/fontMesh.js +3 -3
  56. package/dist/factory/utils/fontMesh.js.map +1 -1
  57. package/dist/factory/utils/ground.js.map +1 -1
  58. package/dist/factory/utils/index.js.map +1 -1
  59. package/dist/factory/utils/observe.js +1 -1
  60. package/dist/factory/utils/observe.js.map +1 -1
  61. package/dist/factory/utils/switchMaterial.js.map +1 -1
  62. package/dist/hooksManager.js +1 -1
  63. package/dist/hooksManager.js.map +1 -1
  64. package/dist/index.js.map +1 -1
  65. package/dist/messageStatus.js +3 -3
  66. package/dist/messageStatus.js.map +1 -1
  67. package/dist/module/camera/index.js +3 -3
  68. package/dist/module/camera/index.js.map +1 -1
  69. package/dist/module/develop/index.js +3 -3
  70. package/dist/module/develop/index.js.map +1 -1
  71. package/dist/module/entity/baseEntity.js +146 -0
  72. package/dist/module/entity/baseEntity.js.map +1 -0
  73. package/dist/module/entity/dispose.js.map +1 -1
  74. package/dist/module/entity/hybridList.js +3 -3
  75. package/dist/module/entity/hybridList.js.map +1 -1
  76. package/dist/module/entity/index.js +149 -150
  77. package/dist/module/entity/index.js.map +1 -1
  78. package/dist/module/entity/model/index.js +116 -0
  79. package/dist/module/entity/model/index.js.map +1 -0
  80. package/dist/module/entity/model/load/loadGlb.js +19 -0
  81. package/dist/module/entity/model/load/loadGlb.js.map +1 -0
  82. package/dist/module/entity/model/load.js +47 -0
  83. package/dist/module/entity/model/load.js.map +1 -0
  84. package/dist/module/entity/poi/index.js +22 -43
  85. package/dist/module/entity/poi/index.js.map +1 -1
  86. package/dist/module/entity/poi/style/base.js +104 -0
  87. package/dist/module/entity/poi/style/base.js.map +1 -0
  88. package/dist/module/entity/poi/style/index.js +67 -0
  89. package/dist/module/entity/poi/style/index.js.map +1 -0
  90. package/dist/module/entity/poi/style/title_01.js +62 -0
  91. package/dist/module/entity/poi/style/title_01.js.map +1 -0
  92. package/dist/module/entity/poi/style/title_pin_01.js +68 -0
  93. package/dist/module/entity/poi/style/title_pin_01.js.map +1 -0
  94. package/dist/module/entity/poi/style/title_pin_02.js +70 -0
  95. package/dist/module/entity/poi/style/title_pin_02.js.map +1 -0
  96. package/dist/module/entity/poi/type.js.map +1 -1
  97. package/dist/module/entity/spline/index.js +29 -0
  98. package/dist/module/entity/spline/index.js.map +1 -0
  99. package/dist/module/entity/spline/resource.js +2 -0
  100. package/dist/module/entity/spline/resource.js.map +1 -0
  101. package/dist/module/entity/spline/style/index.js +47 -0
  102. package/dist/module/entity/spline/style/index.js.map +1 -0
  103. package/dist/module/entity/spline/style/line_01.js +67 -0
  104. package/dist/module/entity/spline/style/line_01.js.map +1 -0
  105. package/dist/module/entity/spline/style/line_texture_01.js +85 -0
  106. package/dist/module/entity/spline/style/line_texture_01.js.map +1 -0
  107. package/dist/module/entity/spline/type.js +2 -0
  108. package/dist/module/entity/spline/type.js.map +1 -0
  109. package/dist/module/entity/strategy.js +45 -2
  110. package/dist/module/entity/strategy.js.map +1 -1
  111. package/dist/module/entity/type.js +2 -0
  112. package/dist/module/entity/type.js.map +1 -0
  113. package/dist/module/entity/utils.js +14 -0
  114. package/dist/module/entity/utils.js.map +1 -1
  115. package/dist/module/environment/index.js +6 -6
  116. package/dist/module/environment/index.js.map +1 -1
  117. package/dist/module/environment/season/index.js +6 -8
  118. package/dist/module/environment/season/index.js.map +1 -1
  119. package/dist/module/environment/time/index.js.map +1 -1
  120. package/dist/module/eventBus/index.js +3 -3
  121. package/dist/module/eventBus/index.js.map +1 -1
  122. package/dist/module/model/index.js +6 -6
  123. package/dist/module/model/index.js.map +1 -1
  124. package/dist/module/scene/index.js +3 -3
  125. package/dist/module/scene/index.js.map +1 -1
  126. package/dist/sdkEntry.js +3 -3
  127. package/dist/sdkEntry.js.map +1 -1
  128. package/dist/utils/abstract.js +3 -3
  129. package/dist/utils/abstract.js.map +1 -1
  130. package/dist/utils/index.js +1 -1
  131. package/dist/utils/index.js.map +1 -1
  132. package/dist/utils/messageFn.js +8 -8
  133. package/dist/utils/messageFn.js.map +1 -1
  134. package/package.json +5 -4
  135. package/dist/anov3d.d.ts +0 -27
  136. package/dist/applicationApi.d.ts +0 -68
  137. package/dist/factory/3d.d.ts +0 -72
  138. package/dist/factory/globalControl.d.ts +0 -7
  139. package/dist/factory/globalData.d.ts +0 -1
  140. package/dist/factory/regionData.d.ts +0 -36
  141. package/dist/factory/type.d.ts +0 -10
  142. package/dist/factory/unit/CameraPoi.d.ts +0 -66
  143. package/dist/factory/unit/areaBoundingBox.d.ts +0 -7
  144. package/dist/factory/unit/circle.d.ts +0 -22
  145. package/dist/factory/unit/cylinder.d.ts +0 -24
  146. package/dist/factory/unit/districtLine.d.ts +0 -22
  147. package/dist/factory/unit/glsl/heat/frag.d.ts +0 -2
  148. package/dist/factory/unit/glsl/heat/ver.d.ts +0 -2
  149. package/dist/factory/unit/glsl/highway/fragmentShader.d.ts +0 -2
  150. package/dist/factory/unit/glsl/highway/fragmentShader2.d.ts +0 -2
  151. package/dist/factory/unit/glsl/highway/vertexShader.d.ts +0 -2
  152. package/dist/factory/unit/handle.d.ts +0 -42
  153. package/dist/factory/unit/index.d.ts +0 -9
  154. package/dist/factory/unit/inspection/InspectionObject.d.ts +0 -49
  155. package/dist/factory/unit/inspection/defaultFirstPerspectiveControls.d.ts +0 -6
  156. package/dist/factory/unit/inspection/index.d.ts +0 -52
  157. package/dist/factory/unit/inspection/lineData.d.ts +0 -26
  158. package/dist/factory/unit/inspection/map.d.ts +0 -11
  159. package/dist/factory/unit/inspection/tubeGeometry.d.ts +0 -16
  160. package/dist/factory/unit/layer/rise.d.ts +0 -6
  161. package/dist/factory/unit/line.d.ts +0 -13
  162. package/dist/factory/unit/poi.d.ts +0 -21
  163. package/dist/factory/unit/region.d.ts +0 -12
  164. package/dist/factory/unit/slice.d.ts +0 -12
  165. package/dist/factory/unit/wall.d.ts +0 -16
  166. package/dist/factory/utils/areaBoundingBox.d.ts +0 -14
  167. package/dist/factory/utils/constant.d.ts +0 -12
  168. package/dist/factory/utils/finirMaterial.d.ts +0 -4
  169. package/dist/factory/utils/fontMesh.d.ts +0 -10
  170. package/dist/factory/utils/ground.d.ts +0 -40
  171. package/dist/factory/utils/index.d.ts +0 -2
  172. package/dist/factory/utils/observe.d.ts +0 -3
  173. package/dist/factory/utils/switchMaterial.d.ts +0 -17
  174. package/dist/hooksManager.d.ts +0 -2
  175. package/dist/index.d.ts +0 -18
  176. package/dist/messageStatus.d.ts +0 -52
  177. package/dist/module/camera/index.d.ts +0 -74
  178. package/dist/module/develop/index.d.ts +0 -19
  179. package/dist/module/entity/dispose.d.ts +0 -6
  180. package/dist/module/entity/hybridList.d.ts +0 -11
  181. package/dist/module/entity/index.d.ts +0 -68
  182. package/dist/module/entity/poi/constant.d.ts +0 -48
  183. package/dist/module/entity/poi/constant.js +0 -54
  184. package/dist/module/entity/poi/constant.js.map +0 -1
  185. package/dist/module/entity/poi/index.d.ts +0 -13
  186. package/dist/module/entity/poi/label.d.ts +0 -9
  187. package/dist/module/entity/poi/label.js +0 -46
  188. package/dist/module/entity/poi/label.js.map +0 -1
  189. package/dist/module/entity/poi/resource.d.ts +0 -4
  190. package/dist/module/entity/poi/title.d.ts +0 -77
  191. package/dist/module/entity/poi/title.js +0 -265
  192. package/dist/module/entity/poi/title.js.map +0 -1
  193. package/dist/module/entity/poi/type.d.ts +0 -88
  194. package/dist/module/entity/strategy.d.ts +0 -3
  195. package/dist/module/entity/utils.d.ts +0 -4
  196. package/dist/module/environment/index.d.ts +0 -50
  197. package/dist/module/environment/season/index.d.ts +0 -22
  198. package/dist/module/environment/time/index.d.ts +0 -10
  199. package/dist/module/environment/weather/type.d.ts +0 -15
  200. package/dist/module/eventBus/index.d.ts +0 -27
  201. package/dist/module/model/index.d.ts +0 -15
  202. package/dist/module/scene/index.d.ts +0 -16
  203. package/dist/sdkEntry.d.ts +0 -5
  204. package/dist/utils/abstract.d.ts +0 -6
  205. package/dist/utils/index.d.ts +0 -30
  206. package/dist/utils/messageFn.d.ts +0 -19
@@ -1,265 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
9
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
10
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
11
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
12
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
13
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
18
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
- import { Poi, RenderType } from '@anov/3d-ability';
20
- import { Vector3, use } from '@anov/3d-core';
21
- import { BORDER_01, ICON_01, NEEDLE_01, NEEDLE_02 } from "./resource";
22
- var SpriteScale = 80;
23
- var TitlePoi = /*#__PURE__*/function () {
24
- function TitlePoi() {
25
- _classCallCheck(this, TitlePoi);
26
- _defineProperty(this, "mesh", void 0);
27
- }
28
- _createClass(TitlePoi, [{
29
- key: "generateDom",
30
- value: function generateDom(property) {
31
- // 根据property还原dom
32
- var type = property.style;
33
- var style = this.getStyle();
34
- var dom;
35
- switch (true) {
36
- case type.includes('title_pin_01'):
37
- dom = this.pin01(property, style);
38
- break;
39
- case type.includes('title_pin_02'):
40
- dom = this.pin02(property, style);
41
- break;
42
- case type.includes('title_'):
43
- dom = this.title01(property, style);
44
- break;
45
- default:
46
- }
47
- var container = document.createElement('div');
48
- container.appendChild(dom);
49
- return container;
50
- }
51
- }, {
52
- key: "create",
53
- value: function () {
54
- var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(property) {
55
- var dom, poi;
56
- return _regeneratorRuntime().wrap(function _callee$(_context) {
57
- while (1) switch (_context.prev = _context.next) {
58
- case 0:
59
- dom = this.generateDom(property);
60
- poi = new Poi(property.renderType, dom);
61
- _context.next = 4;
62
- return poi.loaded;
63
- case 4:
64
- this.mesh = poi.mesh;
65
- this.setScale(this.mesh, property, dom);
66
- property.position && this.mesh.position.copy(new Vector3().fromArray(property.position));
67
- use.useScene().scene.add(this.mesh);
68
- return _context.abrupt("return", this.mesh);
69
- case 9:
70
- case "end":
71
- return _context.stop();
72
- }
73
- }, _callee, this);
74
- }));
75
- function create(_x) {
76
- return _create.apply(this, arguments);
77
- }
78
- return create;
79
- }()
80
- }, {
81
- key: "update",
82
- value: function () {
83
- var _update = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(property) {
84
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
85
- while (1) switch (_context2.prev = _context2.next) {
86
- case 0:
87
- this.mesh.removeFromParent();
88
- this.mesh.remove();
89
- _context2.next = 4;
90
- return this.create(property);
91
- case 4:
92
- return _context2.abrupt("return", this.mesh);
93
- case 5:
94
- case "end":
95
- return _context2.stop();
96
- }
97
- }, _callee2, this);
98
- }));
99
- function update(_x2) {
100
- return _update.apply(this, arguments);
101
- }
102
- return update;
103
- }()
104
- }, {
105
- key: "setScale",
106
- value: function setScale(mesh, property, dom) {
107
- var _this$getDomSize = this.getDomSize(dom),
108
- width = _this$getDomSize.width,
109
- height = _this$getDomSize.height;
110
- var _property$scale = property.scale,
111
- scale = _property$scale === void 0 ? [0, 0, 0] : _property$scale,
112
- renderType = property.renderType;
113
- var _scale = scale,
114
- _scale2 = _slicedToArray(_scale, 3),
115
- x = _scale2[0],
116
- y = _scale2[1],
117
- z = _scale2[2];
118
- if (renderType === RenderType.Sprite) {
119
- scale = [x + SpriteScale, y + height / width * SpriteScale, z];
120
- mesh.scale.copy(new Vector3().fromArray(scale));
121
- } else if (renderType === RenderType.Fixed) {
122
- dom.style.transform = "scale(".concat(x, ")");
123
- } else if (renderType === RenderType.Plane) {
124
- mesh.scale.copy(new Vector3().fromArray(scale));
125
- }
126
- }
127
- }, {
128
- key: "getDomSize",
129
- value: function getDomSize(dom) {
130
- var cloneDom = dom.cloneNode(true);
131
- cloneDom.style.top = '-1000px';
132
- cloneDom.style.position = 'absolute';
133
- document.body.appendChild(cloneDom);
134
- var rect = cloneDom.getBoundingClientRect();
135
- var _ref = [rect.width, rect.height],
136
- width = _ref[0],
137
- height = _ref[1];
138
- document.body.removeChild(cloneDom);
139
- return {
140
- width: width,
141
- height: height
142
- };
143
- }
144
- }, {
145
- key: "applyStyles",
146
- value: function applyStyles(element, styles) {
147
- Object.assign(element.style, styles);
148
- }
149
- }, {
150
- key: "createElementWithStyles",
151
- value: function createElementWithStyles(tag, styles, textContent) {
152
- var element = document.createElement(tag);
153
- this.applyStyles(element, styles);
154
- if (textContent) element.textContent = textContent;
155
- return element;
156
- }
157
- }, {
158
- key: "createPOIBase",
159
- value: function createPOIBase(property, style) {
160
- if (property.textProperty) {
161
- style.text = _objectSpread(_objectSpread({}, style.text), property.textProperty);
162
- var fontSize = style.text.fontSize;
163
- if (!isNaN(fontSize)) style.text.fontSize = "".concat(fontSize, "px");
164
- }
165
- if (property.icon) style.icon.background = "url(".concat(property.icon, ") no-repeat center center");
166
- var container = this.createElementWithStyles('div', style.container);
167
- var border = this.createElementWithStyles('div', style.border);
168
- var icon = this.createElementWithStyles('div', style.icon);
169
- var text = this.createElementWithStyles('div', style.text, property.text);
170
- border.append(icon, text);
171
- container.appendChild(border);
172
- return container;
173
- }
174
- }, {
175
- key: "title01",
176
- value: function title01(property, style) {
177
- return this.createPOIBase(property, style);
178
- }
179
- }, {
180
- key: "pin01",
181
- value: function pin01(property, style) {
182
- style.container = _objectSpread(_objectSpread({}, style.container), style.style.title_pin_01.container);
183
- style.needle = _objectSpread(_objectSpread({}, style.needle), style.style.title_pin_01.needle);
184
- var container = this.createPOIBase(property, style);
185
- var needle = this.createElementWithStyles('div', style.needle);
186
- container.appendChild(needle);
187
- return container;
188
- }
189
- }, {
190
- key: "pin02",
191
- value: function pin02(property, style) {
192
- style.container = _objectSpread(_objectSpread({}, style.container), style.style.title_pin_02.container);
193
- style.needle = _objectSpread(_objectSpread({}, style.needle), style.style.title_pin_02.needle);
194
- var container = this.createPOIBase(property, style);
195
- var needle = this.createElementWithStyles('div', style.needle);
196
- container.appendChild(needle);
197
- return container;
198
- }
199
- }, {
200
- key: "getStyle",
201
- value: function getStyle() {
202
- return {
203
- container: {
204
- 'position': 'relative',
205
- 'display': 'flex',
206
- 'align-items': 'center'
207
- },
208
- border: {
209
- 'text-align': 'center',
210
- 'background': "url(".concat(BORDER_01, ") no-repeat"),
211
- 'background-size': '100% 100%',
212
- 'display': 'flex',
213
- 'align-items': 'center',
214
- 'padding': '8px 20px'
215
- // 'justify-content': 'center',
216
- // 'border-image-source': 'url(./poi/border01.png)',
217
- // 'border-image-slice': '18 18 fill', /* 九宫格裁剪,填充方式为拉伸 */
218
- // 'border-image-width': '18px 18px',
219
- },
220
-
221
- icon: {
222
- 'width': '36px',
223
- 'height': '36px',
224
- 'background': "url(".concat(ICON_01, ") no-repeat center center"),
225
- 'background-size': 'contain'
226
- },
227
- text: {
228
- 'font-size': '18px',
229
- 'color': '#ffffff',
230
- 'margin-left': '16px'
231
- },
232
- needle: {},
233
- style: {
234
- title_pin_01: {
235
- container: {
236
- 'flex-flow': 'column'
237
- },
238
- needle: {
239
- 'width': '43px',
240
- 'height': '200px',
241
- 'background': "url(".concat(NEEDLE_01, ") no-repeat center center"),
242
- 'background-size': 'contain'
243
- }
244
- },
245
- title_pin_02: {
246
- container: {
247
- 'flex-flow': 'row-reverse'
248
- },
249
- needle: {
250
- 'width': '124px',
251
- 'height': '53px',
252
- 'margin-top': '20px',
253
- 'margin-right': '4px',
254
- 'background': "url(".concat(NEEDLE_02, ") no-repeat center center"),
255
- 'background-size': 'contain'
256
- }
257
- }
258
- }
259
- };
260
- }
261
- }]);
262
- return TitlePoi;
263
- }();
264
- export default TitlePoi;
265
- //# sourceMappingURL=title.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Poi","RenderType","Vector3","use","BORDER_01","ICON_01","NEEDLE_01","NEEDLE_02","SpriteScale","TitlePoi","property","type","style","getStyle","dom","includes","pin01","pin02","title01","container","document","createElement","appendChild","generateDom","poi","renderType","loaded","mesh","setScale","position","copy","fromArray","useScene","scene","add","removeFromParent","remove","create","getDomSize","width","height","scale","x","y","z","Sprite","Fixed","transform","Plane","cloneDom","cloneNode","top","body","rect","getBoundingClientRect","removeChild","element","styles","Object","assign","tag","textContent","applyStyles","textProperty","text","fontSize","isNaN","icon","background","createElementWithStyles","border","append","createPOIBase","title_pin_01","needle","title_pin_02"],"sources":["../../../../src/module/entity/poi/title.ts"],"sourcesContent":["import { Poi, RenderType } from '@anov/3d-ability'\nimport type { Object3D } from '@anov/3d-core'\nimport { Vector3, use } from '@anov/3d-core'\nimport { BORDER_01, ICON_01, NEEDLE_01, NEEDLE_02 } from './resource'\nimport type { PoiDataOpts } from './type'\n\nconst SpriteScale = 80\nclass TitlePoi {\n mesh: Object3D\n\n generateDom(property: PoiDataOpts) {\n // 根据property还原dom\n const { style: type } = property\n const style = this.getStyle()\n\n let dom\n switch (true) {\n case type.includes('title_pin_01'):\n dom = this.pin01(property, style)\n break\n case type.includes('title_pin_02'):\n dom = this.pin02(property, style)\n break\n case type.includes('title_'):\n dom = this.title01(property, style)\n break\n default:\n }\n\n const container = document.createElement('div')\n container.appendChild(dom)\n return container\n }\n\n async create(property: PoiDataOpts) {\n const dom = this.generateDom(property)\n const poi = new Poi(property.renderType, dom)\n await poi.loaded\n this.mesh = poi.mesh\n this.setScale(this.mesh, property, dom)\n property.position && this.mesh.position.copy(new Vector3().fromArray(property.position))\n use.useScene().scene.add(this.mesh)\n\n return this.mesh\n }\n\n async update(property: PoiDataOpts) {\n this.mesh.removeFromParent()\n this.mesh.remove()\n await this.create(property)\n return this.mesh\n }\n\n setScale(mesh, property, dom) {\n const { width, height } = this.getDomSize(dom)\n let { scale = [0, 0, 0], renderType } = property\n const [x, y, z] = scale\n if (renderType === RenderType.Sprite) {\n scale = [x + SpriteScale, y + height / width * SpriteScale, z]\n mesh.scale.copy(new Vector3().fromArray(scale))\n }\n else if (renderType === RenderType.Fixed) {\n dom.style.transform = `scale(${x})`\n }\n else if (renderType === RenderType.Plane) {\n mesh.scale.copy(new Vector3().fromArray(scale))\n }\n }\n\n getDomSize(dom) {\n const cloneDom = dom.cloneNode(true)\n cloneDom.style.top = '-1000px'\n cloneDom.style.position = 'absolute'\n\n document.body.appendChild(cloneDom)\n const rect = cloneDom.getBoundingClientRect()\n const [width, height] = [rect.width, rect.height]\n document.body.removeChild(cloneDom)\n return { width, height }\n }\n\n applyStyles(element: HTMLElement, styles: { [key: string]: string }) {\n Object.assign(element.style, styles)\n }\n\n createElementWithStyles(tag: string, styles: { [key: string]: string }, textContent?: string): HTMLElement {\n const element = document.createElement(tag)\n this.applyStyles(element, styles)\n if (textContent)\n element.textContent = textContent\n\n return element\n }\n\n createPOIBase(property: PoiDataOpts, style: any): HTMLElement {\n if (property.textProperty) {\n style.text = { ...style.text, ...property.textProperty }\n const { fontSize } = style.text\n if (!isNaN(fontSize))\n style.text.fontSize = `${fontSize}px`\n }\n if (property.icon)\n style.icon.background = `url(${property.icon}) no-repeat center center`\n\n const container = this.createElementWithStyles('div', style.container)\n const border = this.createElementWithStyles('div', style.border)\n const icon = this.createElementWithStyles('div', style.icon)\n const text = this.createElementWithStyles('div', style.text, property.text)\n\n border.append(icon, text)\n container.appendChild(border)\n\n return container\n }\n\n title01(property: PoiDataOpts, style: any): HTMLElement {\n return this.createPOIBase(property, style)\n }\n\n pin01(property: PoiDataOpts, style: any): HTMLElement {\n style.container = { ...style.container, ...style.style.title_pin_01.container }\n style.needle = { ...style.needle, ...style.style.title_pin_01.needle }\n\n const container = this.createPOIBase(property, style)\n const needle = this.createElementWithStyles('div', style.needle)\n container.appendChild(needle)\n return container\n }\n\n pin02(property: PoiDataOpts, style: any): HTMLElement {\n style.container = { ...style.container, ...style.style.title_pin_02.container }\n style.needle = { ...style.needle, ...style.style.title_pin_02.needle }\n\n const container = this.createPOIBase(property, style)\n const needle = this.createElementWithStyles('div', style.needle)\n container.appendChild(needle)\n return container\n }\n\n getStyle() {\n return {\n container: {\n 'position': 'relative',\n 'display': 'flex',\n 'align-items': 'center',\n },\n border: {\n 'text-align': 'center',\n 'background': `url(${BORDER_01}) no-repeat`,\n 'background-size': '100% 100%',\n 'display': 'flex',\n 'align-items': 'center',\n 'padding': '8px 20px',\n // 'justify-content': 'center',\n // 'border-image-source': 'url(./poi/border01.png)',\n // 'border-image-slice': '18 18 fill', /* 九宫格裁剪,填充方式为拉伸 */\n // 'border-image-width': '18px 18px',\n },\n icon: {\n 'width': '36px',\n 'height': '36px',\n 'background': `url(${ICON_01}) no-repeat center center`,\n 'background-size': 'contain',\n },\n text: {\n 'font-size': '18px',\n 'color': '#ffffff',\n 'margin-left': '16px',\n },\n needle: {},\n style: {\n title_pin_01: {\n container: {\n 'flex-flow': 'column',\n },\n needle: {\n 'width': '43px',\n 'height': '200px',\n 'background': `url(${NEEDLE_01}) no-repeat center center`,\n 'background-size': 'contain',\n },\n },\n title_pin_02: {\n container: {\n 'flex-flow': 'row-reverse',\n },\n needle: {\n 'width': '124px',\n 'height': '53px',\n 'margin-top': '20px',\n 'margin-right': '4px',\n 'background': `url(${NEEDLE_02}) no-repeat center center`,\n 'background-size': 'contain',\n },\n },\n },\n }\n }\n}\n\nexport default TitlePoi"],"mappings":";;;;;;;;;+CACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADA,SAASA,GAAG,EAAEC,UAAU,QAAQ,kBAAkB;AAElD,SAASC,OAAO,EAAEC,GAAG,QAA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T,UAAU,EAAE,UAAU;UACtB,SAAS,EAAE,MAAM;UACjB,aAAa,EAAE;QACjB,CAAC;QACDmD,MAAM,EAAE;UACN,YAAY,EAAE,QAAQ;UACtB,YAAY,gBAASlE,SAAS,gBAAa;UAC3C,iBAAiB,EAAE,WAAW;UAC9B,SAAS,EAAE,MAAM;UACjB,aAAa,EAAE,QAAQ;UACvB,SAAS,EAAE;UACX;UACA;UACA;UACA;QACF,CAAC;;QACD+D,IAAI,EAAE;UACJ,OAAO,EAAE,MAAM;UACf,QAAQ,EAAE,MAAM;UAChB,YAAY,gBAAS9D,OAAO,8BAA2B;UACvD,iBAAiB,EAAE;QACrB,CAAC;QACD2D,IAAI,EAAE;UACJ,WAAW,EAAE,MAAM;UACnB,OAAO,EAAE,SAAS;UAClB,aAAa,EAAE;QACjB,CAAC;QACDU,MAAM,EAAE,CAAC,CAAC;QACV9D,KAAK,EAAE;UACL6D,YAAY,EAAE;YACZtD,SAAS,EAAE;cACT,WAAW,EAAE;YACf,CAAC;YACDuD,MAAM,EAAE;cACN,OAAO,EAAE,MAAM;cACf,QAAQ,EAAE,OAAO;cACjB,YAAY,gBAASpE,SAAS,8BAA2B;cACzD,iBAAiB,EAAE;YACrB;UACF,CAAC;UACDqE,YAAY,EAAE;YACZxD,SAAS,EAAE;cACT,WAAW,EAAE;YACf,CAAC;YACDuD,MAAM,EAAE;cACN,OAAO,EAAE,OAAO;cAChB,QAAQ,EAAE,MAAM;cAChB,YAAY,EAAE,MAAM;cACpB,cAAc,EAAE,KAAK;cACrB,YAAY,gBAASnE,SAAS,8BAA2B;cACzD,iBAAiB,EAAE;YACrB;UACF;QACF;MACF,CAAC;IACH;EAAC;EAAA;AAAA;AAGH,eAAeE,QAAQ"}
@@ -1,88 +0,0 @@
1
- import type { RenderType } from '@anov/3d-ability';
2
- import type { Enhance } from '../index';
3
- declare type Triple = [number, number, number];
4
- declare type BaseProperty = {
5
- id: string;
6
- visible?: boolean;
7
- position?: Triple;
8
- scale?: Triple;
9
- rotation?: Triple;
10
- renderType?: RenderType;
11
- };
12
- export declare type TextProperty = BaseProperty & {
13
- text?: string;
14
- fontSize?: number;
15
- fontColor?: string;
16
- fontWeight?: 'normal' | 'bold';
17
- fontFamily?: string;
18
- offset?: number;
19
- };
20
- export declare type IconProperty = BaseProperty & {
21
- icon?: string;
22
- color?: string;
23
- offset?: number;
24
- };
25
- export declare type ImageProperty = BaseProperty & {
26
- image?: string;
27
- color?: string;
28
- offset?: number;
29
- };
30
- export declare type TitleProperty = BaseProperty & {
31
- type: string;
32
- text?: string;
33
- icon?: string;
34
- image?: string;
35
- textProperty?: TextProperty;
36
- iconPropery?: IconProperty;
37
- imageProperty?: ImageProperty;
38
- };
39
- declare type TextPropertyOpts = {
40
- fontSize: number | string;
41
- fontColor: string;
42
- fontWeight: number;
43
- fontFamily: string;
44
- offset: number;
45
- scale: number;
46
- } & Enhance;
47
- declare type IconPropertyOpts = {
48
- color: string;
49
- offset: number;
50
- scale: number;
51
- } & Enhance;
52
- declare type LegendsOpts = {
53
- name: string;
54
- type: string;
55
- textProperty?: Partial<TextPropertyOpts>;
56
- iconProperty?: Partial<IconPropertyOpts>;
57
- imageProperty?: Partial<ImageProperty>;
58
- } & Enhance;
59
- export declare type PoiDataOpts = Partial<{
60
- text: string;
61
- icon: string;
62
- image: string;
63
- visible: boolean;
64
- position: number[];
65
- scale: number[];
66
- rotation: number[];
67
- coord: number[];
68
- renderType: RenderType;
69
- legends: string;
70
- style: string;
71
- textProperty?: Partial<TextPropertyOpts>;
72
- iconProperty?: Partial<IconPropertyOpts>;
73
- imageProperty?: Partial<ImageProperty>;
74
- }> & {
75
- id: string;
76
- type: string;
77
- } & Enhance;
78
- export declare type PoiOpts = {
79
- id: string;
80
- name?: string;
81
- type: 'poi';
82
- legends?: LegendsOpts[];
83
- data: PoiDataOpts | PoiDataOpts[];
84
- };
85
- export declare const TypeMappings: {
86
- [key: string]: string;
87
- };
88
- export {};
@@ -1,3 +0,0 @@
1
- export declare const entityStrategy: {
2
- poi: () => Promise<typeof import("./poi").default>;
3
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * todo: convert return entity
3
- */
4
- export declare const convertReturn: () => void;
@@ -1,50 +0,0 @@
1
- import type { Vector3 } from '@anov/3d-core';
2
- import type { BaseModule } from '../../utils/abstract';
3
- import type Anov3D from '../../sdkEntry';
4
- import createTimeSkySystem from './time';
5
- declare class Environment implements BaseModule {
6
- app: Anov3D;
7
- private opts?;
8
- private setDate;
9
- private snow;
10
- private rain;
11
- private cloudReturn;
12
- private sky;
13
- private renderer;
14
- private seasonSystem;
15
- sunPosition: Vector3;
16
- sun: ReturnType<typeof createTimeSkySystem>['sun'];
17
- skyControl: ReturnType<typeof createTimeSkySystem>['skyControl'];
18
- constructor(app: Anov3D);
19
- private initConfigSet;
20
- private setWeatherStrategy;
21
- /**
22
- * setTime
23
- * @param newTime
24
- * @param changeTime
25
- */
26
- setTime(params: {
27
- time: number;
28
- duration?: number;
29
- }): {
30
- newTime: number;
31
- };
32
- /**
33
- * setWeather
34
- * @param type
35
- * @param changeTime
36
- */
37
- setWeather(params: {
38
- weatherType: string;
39
- duration?: number;
40
- }): {
41
- weatherType: string;
42
- };
43
- setSeason(params: {
44
- season: string;
45
- duration?: number;
46
- }): {
47
- season: string;
48
- };
49
- }
50
- export default Environment;
@@ -1,22 +0,0 @@
1
- import type { Material, Texture } from '@anov/3d-core';
2
- import type Anov3D from '../../../sdkEntry';
3
- declare class Season {
4
- app: Anov3D;
5
- textureLeaf: Texture;
6
- textureBole: Texture;
7
- textureLand: Texture;
8
- textureMassif: Texture;
9
- textureNoise: Texture;
10
- uniforms: any;
11
- leafMaterial: Material;
12
- landMaterial: Material;
13
- massifMaterial: Material;
14
- haveSetMaterial: boolean;
15
- constructor(app: Anov3D);
16
- init(): void;
17
- setSeason(type: any, duration?: number): void;
18
- setLeafMaterial(): void;
19
- setLandMaterial(): void;
20
- setMassifMaterial(): void;
21
- }
22
- export default Season;
@@ -1,10 +0,0 @@
1
- /**
2
- * create time sky system
3
- * @param date
4
- * @param latitude
5
- * @param longitude
6
- * @param sunRadius
7
- * @returns
8
- */
9
- declare const createTimeSkySystem: (date: Date, latitude?: number, longitude?: number, sunRadius?: number) => any;
10
- export default createTimeSkySystem;
@@ -1,15 +0,0 @@
1
- export declare const EWeatherType: {
2
- Clear_Skies: string;
3
- Cloudy: string;
4
- Foggy: string;
5
- Overcast: string;
6
- Partly_Cloudy: string;
7
- Rain: string;
8
- Rain_Light: string;
9
- Rain_Thunderstorm: string;
10
- Sand_Dust_Calm: string;
11
- Sand_Dust_Storm: string;
12
- Snow: string;
13
- Snow_Blizzard: string;
14
- Snow_Light: string;
15
- };
@@ -1,27 +0,0 @@
1
- import type { BaseModule } from '../../utils/abstract';
2
- import type Anov3D from '../../sdkEntry';
3
- /**
4
- * notes: 区别于前端概念,3端统一API特定
5
- */
6
- declare class EventBus implements BaseModule {
7
- eventMap: Map<string, boolean>;
8
- app: Anov3D;
9
- constructor(app: Anov3D);
10
- /**
11
- * open event
12
- * @param params
13
- */
14
- on(params: {
15
- eventName: string;
16
- id?: string;
17
- }): {
18
- eventName: string;
19
- };
20
- off(params: {
21
- eventName: string;
22
- entityId?: string;
23
- }): {
24
- eventName: string;
25
- };
26
- }
27
- export default EventBus;
@@ -1,15 +0,0 @@
1
- import { Vector3 } from '@anov/3d-core';
2
- declare class Model {
3
- private scene;
4
- constructor();
5
- /**
6
- * model load, now just to test
7
- * @param source
8
- * @param isCache
9
- * @param position
10
- * @param onProgress
11
- * @param onError
12
- */
13
- load(source: string, isCache?: boolean, position?: Vector3, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): Promise<void>;
14
- }
15
- export default Model;
@@ -1,16 +0,0 @@
1
- import type { GrowOption } from '@anov/3d-ability';
2
- import type { BaseModule } from '../../utils/abstract';
3
- import type Anov3D from '../../sdkEntry';
4
- export declare class Scene implements BaseModule {
5
- app: Anov3D;
6
- private grow;
7
- private opt;
8
- constructor(app: Anov3D);
9
- growInit(opt?: GrowOption): Promise<unknown>;
10
- growIn(): Promise<unknown>;
11
- growOut(): Promise<unknown>;
12
- toPage(params: any): void;
13
- setTheme(params: {
14
- name: 'Real' | 'Fresnel' | 'Pure';
15
- }): void;
16
- }
@@ -1,5 +0,0 @@
1
- import Anov3DCore from './anov3d';
2
- export declare type Override<P, S> = Omit<P, keyof S> & S;
3
- declare class App extends Anov3DCore {
4
- }
5
- export default App;
@@ -1,6 +0,0 @@
1
- import type Anov3D from '../sdkEntry';
2
- export declare const provide: (modules: any) => any;
3
- export declare class BaseModule {
4
- app: Anov3D;
5
- constructor(app: Anov3D);
6
- }
@@ -1,30 +0,0 @@
1
- import type { Scene } from '@anov/3d-core';
2
- import { Vector3 } from '@anov/3d-core';
3
- import type Anov3D from '..';
4
- interface ObjectType {
5
- [key: string]: any;
6
- }
7
- /**
8
- * get value by key
9
- * notic: to mark proxy, so need take it layer by layer
10
- * @param obj
11
- * @param key
12
- */
13
- export declare const getValueByKey: <T extends ObjectType>(obj: T, key: string) => T;
14
- /**
15
- * getFnByFnkey
16
- * @param iEngine
17
- * @param fnkey
18
- */
19
- export declare const getFnByFnkey: (iEngine: Anov3D, fnkey: string, id: string) => any;
20
- export declare const object2Vector3: (obj: {
21
- x: number;
22
- y: number;
23
- z: number;
24
- }) => Vector3;
25
- export declare const getSceneInfo: (scene: Scene) => {
26
- objects: number;
27
- vertices: number;
28
- triangles: number;
29
- };
30
- export {};
@@ -1,19 +0,0 @@
1
- export declare enum MessageType {
2
- Event = 0,
3
- Api = 1
4
- }
5
- declare type MessageDataType = {
6
- messageType: MessageType;
7
- messageName: string;
8
- status?: number;
9
- id?: string;
10
- };
11
- /**
12
- * sendToMessage
13
- * @param messageName
14
- * @param status
15
- * @param res
16
- * @returns
17
- */
18
- export declare const sendToMessage: (messageBody: MessageDataType, res?: unknown) => void;
19
- export {};