@anov/3d-ability 0.0.140 → 0.0.142

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 (266) hide show
  1. package/dist/business/Animation/motion/index.js +35 -56
  2. package/dist/business/Animation/motion/index.js.map +1 -1
  3. package/dist/business/Animation/type.js +2 -2
  4. package/dist/business/Area/Fence/FenceBase.js +146 -187
  5. package/dist/business/Area/Fence/FenceBase.js.map +1 -1
  6. package/dist/business/Area/Fence/fence_base_01.js +120 -112
  7. package/dist/business/Area/Fence/fence_base_01.js.map +1 -1
  8. package/dist/business/Area/Fence/fence_feeting_01.js +218 -130
  9. package/dist/business/Area/Fence/fence_feeting_01.js.map +1 -1
  10. package/dist/business/Area/Fence/fence_roll_01.js +140 -130
  11. package/dist/business/Area/Fence/fence_roll_01.js.map +1 -1
  12. package/dist/business/Area/FillArea/FillAreaBase.js +87 -126
  13. package/dist/business/Area/FillArea/FillAreaBase.js.map +1 -1
  14. package/dist/business/Area/FillArea/fillArea_face_01.js +72 -98
  15. package/dist/business/Area/FillArea/fillArea_face_01.js.map +1 -1
  16. package/dist/business/Area/FillArea/fillArea_line_01.js +66 -94
  17. package/dist/business/Area/FillArea/fillArea_line_01.js.map +1 -1
  18. package/dist/business/Area/index.js +267 -483
  19. package/dist/business/Area/index.js.map +1 -1
  20. package/dist/business/Area/tool.js +14 -26
  21. package/dist/business/Area/tool.js.map +1 -1
  22. package/dist/business/Base/ObjectLayer.js +21 -46
  23. package/dist/business/Base/ObjectLayer.js.map +1 -1
  24. package/dist/business/Batch/index.js +189 -234
  25. package/dist/business/Batch/index.js.map +1 -1
  26. package/dist/business/Box/index.js +52 -81
  27. package/dist/business/Box/index.js.map +1 -1
  28. package/dist/business/Cylinder/index.js +51 -79
  29. package/dist/business/Cylinder/index.js.map +1 -1
  30. package/dist/business/Flyline/bubble/CircleBubble.js +1 -9
  31. package/dist/business/Flyline/bubble/CircleBubble.js.map +1 -1
  32. package/dist/business/Flyline/bubble/index.js +7 -21
  33. package/dist/business/Flyline/bubble/index.js.map +1 -1
  34. package/dist/business/Flyline/index.js +96 -162
  35. package/dist/business/Flyline/index.js.map +1 -1
  36. package/dist/business/Flyline/line/ArcLine.js +208 -291
  37. package/dist/business/Flyline/line/ArcLine.js.map +1 -1
  38. package/dist/business/Flyline/line/index.js +8 -22
  39. package/dist/business/Flyline/line/index.js.map +1 -1
  40. package/dist/business/HeatMap/HeatMap.js +380 -467
  41. package/dist/business/HeatMap/HeatMap.js.map +1 -1
  42. package/dist/business/HeatMap/core.js +405 -525
  43. package/dist/business/HeatMap/core.js.map +1 -1
  44. package/dist/business/HeatMap/shader.js +69 -3
  45. package/dist/business/HeatMap/shader.js.map +1 -1
  46. package/dist/business/InfoPanel/index.js +201 -242
  47. package/dist/business/InfoPanel/index.js.map +1 -1
  48. package/dist/business/Line/index.js +55 -88
  49. package/dist/business/Line/index.js.map +1 -1
  50. package/dist/business/Mark/KeyframeAnimation.js +145 -176
  51. package/dist/business/Mark/KeyframeAnimation.js.map +1 -1
  52. package/dist/business/Mark/index.js +196 -294
  53. package/dist/business/Mark/index.js.map +1 -1
  54. package/dist/business/Mark/shader/tanhao.js +36 -3
  55. package/dist/business/Mark/shader/tanhao.js.map +1 -1
  56. package/dist/business/Mark/type.js +1 -1
  57. package/dist/business/MaterialSwitch/MaterialSwitchSystem.js +377 -551
  58. package/dist/business/MaterialSwitch/MaterialSwitchSystem.js.map +1 -1
  59. package/dist/business/MaterialSwitch/inject.js +92 -58
  60. package/dist/business/MaterialSwitch/inject.js.map +1 -1
  61. package/dist/business/MaterialSwitch/shader/finalFade.js +74 -2
  62. package/dist/business/MaterialSwitch/shader/finalFade.js.map +1 -1
  63. package/dist/business/MaterialSwitch/shader/ground.js +95 -16
  64. package/dist/business/MaterialSwitch/shader/ground.js.map +1 -1
  65. package/dist/business/MaterialSwitch/shader/groundBase64.js +9 -3
  66. package/dist/business/MaterialSwitch/shader/groundBase64.js.map +1 -1
  67. package/dist/business/MaterialSwitch/shader/realFade.js +48 -9
  68. package/dist/business/MaterialSwitch/shader/realFade.js.map +1 -1
  69. package/dist/business/Plane/index.js +51 -78
  70. package/dist/business/Plane/index.js.map +1 -1
  71. package/dist/business/Poi/index.d.ts +5 -0
  72. package/dist/business/Poi/index.js +256 -295
  73. package/dist/business/Poi/index.js.map +1 -1
  74. package/dist/business/Poi/link/Cylinder.js +56 -89
  75. package/dist/business/Poi/link/Cylinder.js.map +1 -1
  76. package/dist/business/Poi/link/Pyramid.js +104 -165
  77. package/dist/business/Poi/link/Pyramid.js.map +1 -1
  78. package/dist/business/Poi/link/index.d.ts +1 -1
  79. package/dist/business/Poi/link/index.js +54 -114
  80. package/dist/business/Poi/link/index.js.map +1 -1
  81. package/dist/business/Poi/panel/index.d.ts +124 -0
  82. package/dist/business/Poi/panel/index.js +474 -0
  83. package/dist/business/Poi/panel/index.js.map +1 -0
  84. package/dist/business/Poi/panel/interfaces.d.ts +67 -0
  85. package/dist/business/Poi/panel/interfaces.js +2 -0
  86. package/dist/business/Poi/panel/interfaces.js.map +1 -0
  87. package/dist/business/Poi/panel/utils.d.ts +72 -0
  88. package/dist/business/Poi/panel/utils.js +126 -0
  89. package/dist/business/Poi/panel/utils.js.map +1 -0
  90. package/dist/business/Poi/particle/DoubleCircle.js +71 -107
  91. package/dist/business/Poi/particle/DoubleCircle.js.map +1 -1
  92. package/dist/business/Poi/particle/DynamicCircle.js +75 -111
  93. package/dist/business/Poi/particle/DynamicCircle.js.map +1 -1
  94. package/dist/business/Poi/particle/SingleCircle.js +62 -98
  95. package/dist/business/Poi/particle/SingleCircle.js.map +1 -1
  96. package/dist/business/Poi/particle/index.js +49 -117
  97. package/dist/business/Poi/particle/index.js.map +1 -1
  98. package/dist/business/Poi/shader/circle.js +31 -3
  99. package/dist/business/Poi/shader/circle.js.map +1 -1
  100. package/dist/business/Poi/shader/cylinder.js +37 -3
  101. package/dist/business/Poi/shader/cylinder.js.map +1 -1
  102. package/dist/business/Poi/shader/doubleCircle.js +55 -3
  103. package/dist/business/Poi/shader/doubleCircle.js.map +1 -1
  104. package/dist/business/Poi/shader/dynamicCircle.js +67 -3
  105. package/dist/business/Poi/shader/dynamicCircle.js.map +1 -1
  106. package/dist/business/Poi/title/Border.js +7 -27
  107. package/dist/business/Poi/title/Border.js.map +1 -1
  108. package/dist/business/Poi/title/Ellipse.js +7 -27
  109. package/dist/business/Poi/title/Ellipse.js.map +1 -1
  110. package/dist/business/Poi/title/index.js +208 -292
  111. package/dist/business/Poi/title/index.js.map +1 -1
  112. package/dist/business/Poi/tools.js +22 -19
  113. package/dist/business/Poi/tools.js.map +1 -1
  114. package/dist/business/Poi/types.d.ts +3 -0
  115. package/dist/business/Poi/types.js.map +1 -1
  116. package/dist/business/Sphere/index.js +47 -72
  117. package/dist/business/Sphere/index.js.map +1 -1
  118. package/dist/business/Spline/index.js +190 -245
  119. package/dist/business/Spline/index.js.map +1 -1
  120. package/dist/business/SplitBuilding/index.js +327 -536
  121. package/dist/business/SplitBuilding/index.js.map +1 -1
  122. package/dist/business/SplitBuilding/type.js +2 -2
  123. package/dist/business/TrafficComponents/RealismTraffic/RealismTraffic.js +218 -275
  124. package/dist/business/TrafficComponents/RealismTraffic/RealismTraffic.js.map +1 -1
  125. package/dist/business/TrafficComponents/StreamerTraffic/StreamerTraffic.js +132 -177
  126. package/dist/business/TrafficComponents/StreamerTraffic/StreamerTraffic.js.map +1 -1
  127. package/dist/business/TrafficComponents/StreamerTraffic/fragmentShader.js +51 -1
  128. package/dist/business/TrafficComponents/StreamerTraffic/fragmentShader.js.map +1 -1
  129. package/dist/business/TrafficComponents/StreamerTraffic/vertexShader.js +6 -1
  130. package/dist/business/TrafficComponents/StreamerTraffic/vertexShader.js.map +1 -1
  131. package/dist/business/TrafficComponents/base.js +32 -55
  132. package/dist/business/TrafficComponents/base.js.map +1 -1
  133. package/dist/business/TrafficComponents/utils.d.ts +1 -1
  134. package/dist/business/TrafficComponents/utils.js +26 -25
  135. package/dist/business/TrafficComponents/utils.js.map +1 -1
  136. package/dist/business/Utils/Curve.js +40 -56
  137. package/dist/business/Utils/Curve.js.map +1 -1
  138. package/dist/business/Utils/constant.js +1 -1
  139. package/dist/business/Utils/constant.js.map +1 -1
  140. package/dist/business/Utils/defineProps.js +13 -14
  141. package/dist/business/Utils/defineProps.js.map +1 -1
  142. package/dist/business/Utils/round-curve.js +127 -153
  143. package/dist/business/Utils/round-curve.js.map +1 -1
  144. package/dist/business/VideoPanel/index.js +258 -319
  145. package/dist/business/VideoPanel/index.js.map +1 -1
  146. package/dist/business/Water/index.js +78 -108
  147. package/dist/business/Water/index.js.map +1 -1
  148. package/dist/business/Water/types.js +1 -1
  149. package/dist/business/Water/types.js.map +1 -1
  150. package/dist/core/Camera/PerspectiveCamera/CameraExpand.js +383 -449
  151. package/dist/core/Camera/PerspectiveCamera/CameraExpand.js.map +1 -1
  152. package/dist/core/Camera/PerspectiveCamera/FollowOrbitControls.js +107 -142
  153. package/dist/core/Camera/PerspectiveCamera/FollowOrbitControls.js.map +1 -1
  154. package/dist/core/Controls/FirstViewControl/index.js +84 -96
  155. package/dist/core/Controls/FirstViewControl/index.js.map +1 -1
  156. package/dist/core/Controls/ThirdViewControl/action/input.js +77 -98
  157. package/dist/core/Controls/ThirdViewControl/action/input.js.map +1 -1
  158. package/dist/core/Controls/ThirdViewControl/config/constants.js +1 -1
  159. package/dist/core/Controls/ThirdViewControl/config/constants.js.map +1 -1
  160. package/dist/core/Controls/ThirdViewControl/index.js +19 -28
  161. package/dist/core/Controls/ThirdViewControl/index.js.map +1 -1
  162. package/dist/core/Controls/ThirdViewControl/player/animation.js +126 -155
  163. package/dist/core/Controls/ThirdViewControl/player/animation.js.map +1 -1
  164. package/dist/core/Controls/ThirdViewControl/player/camera.js +47 -63
  165. package/dist/core/Controls/ThirdViewControl/player/camera.js.map +1 -1
  166. package/dist/core/Controls/ThirdViewControl/player/control.js +39 -49
  167. package/dist/core/Controls/ThirdViewControl/player/control.js.map +1 -1
  168. package/dist/core/Controls/ThirdViewControl/player.js +66 -91
  169. package/dist/core/Controls/ThirdViewControl/player.js.map +1 -1
  170. package/dist/core/Controls/base.js +14 -30
  171. package/dist/core/Controls/base.js.map +1 -1
  172. package/dist/core/Curve/RoundedCornersCurve/RoundedCornersCurve.js +92 -131
  173. package/dist/core/Curve/RoundedCornersCurve/RoundedCornersCurve.js.map +1 -1
  174. package/dist/core/Debug/PerformanceInfo/Performance.js +22 -47
  175. package/dist/core/Debug/PerformanceInfo/Performance.js.map +1 -1
  176. package/dist/core/Light/PointLight/PointLightExt.js +4 -21
  177. package/dist/core/Light/PointLight/PointLightExt.js.map +1 -1
  178. package/dist/core/Material/FinirMaterial/FinirMaterial.js +37 -57
  179. package/dist/core/Material/FinirMaterial/FinirMaterial.js.map +1 -1
  180. package/dist/core/Material/PristineGridMaterial/PristineGridMaterial.js +116 -153
  181. package/dist/core/Material/PristineGridMaterial/PristineGridMaterial.js.map +1 -1
  182. package/dist/core/Material/PristineGridMaterial/shader/fragment.js +95 -1
  183. package/dist/core/Material/PristineGridMaterial/shader/fragment.js.map +1 -1
  184. package/dist/core/Material/PristineGridMaterial/shader/vertex.js +26 -1
  185. package/dist/core/Material/PristineGridMaterial/shader/vertex.js.map +1 -1
  186. package/dist/core/Material/SurfaceMaterial/index.js +76 -172
  187. package/dist/core/Material/SurfaceMaterial/index.js.map +1 -1
  188. package/dist/core/Material/decorators.js +6 -11
  189. package/dist/core/Material/decorators.js.map +1 -1
  190. package/dist/core/PostEffects/addACESFilmicToneMappingPass.js +16 -12
  191. package/dist/core/PostEffects/addACESFilmicToneMappingPass.js.map +1 -1
  192. package/dist/core/PostEffects/addBrightnessContrastPass.js +17 -13
  193. package/dist/core/PostEffects/addBrightnessContrastPass.js.map +1 -1
  194. package/dist/core/PostEffects/bloomPass.js +17 -10
  195. package/dist/core/PostEffects/bloomPass.js.map +1 -1
  196. package/dist/core/PostEffects/bloomSelect.js +60 -43
  197. package/dist/core/PostEffects/bloomSelect.js.map +1 -1
  198. package/dist/core/PostEffects/colorifyPass.js +17 -13
  199. package/dist/core/PostEffects/colorifyPass.js.map +1 -1
  200. package/dist/core/PostEffects/index.js +28 -22
  201. package/dist/core/PostEffects/index.js.map +1 -1
  202. package/dist/core/PostEffects/outlinePass.js +37 -50
  203. package/dist/core/PostEffects/outlinePass.js.map +1 -1
  204. package/dist/core/PostEffects/postprocessing.js +14 -12
  205. package/dist/core/PostEffects/postprocessing.js.map +1 -1
  206. package/dist/core/PostEffects/saoPass.js +15 -10
  207. package/dist/core/PostEffects/saoPass.js.map +1 -1
  208. package/dist/core/PostEffects/shader/colorify.js +22 -3
  209. package/dist/core/PostEffects/shader/colorify.js.map +1 -1
  210. package/dist/core/PostEffects/shader/gammaCorrectionShader.js +27 -3
  211. package/dist/core/PostEffects/shader/gammaCorrectionShader.js.map +1 -1
  212. package/dist/core/PostEffects/shader/mapping.js +66 -3
  213. package/dist/core/PostEffects/shader/mapping.js.map +1 -1
  214. package/dist/core/PostEffects/shader/thermalMaging.js +28 -3
  215. package/dist/core/PostEffects/shader/thermalMaging.js.map +1 -1
  216. package/dist/core/SceneEffect/grow/grow.js +85 -101
  217. package/dist/core/SceneEffect/grow/grow.js.map +1 -1
  218. package/dist/core/SceneEffect/grow/style_down.js +60 -77
  219. package/dist/core/SceneEffect/grow/style_down.js.map +1 -1
  220. package/dist/core/SceneEffect/grow/style_up.js +64 -81
  221. package/dist/core/SceneEffect/grow/style_up.js.map +1 -1
  222. package/dist/core/SceneEffect/grow/type.js +2 -2
  223. package/dist/core/SceneEffect/grow/type.js.map +1 -1
  224. package/dist/core/WeatherSystem/DynamicWeatherSystem.js +51 -76
  225. package/dist/core/WeatherSystem/DynamicWeatherSystem.js.map +1 -1
  226. package/dist/core/WeatherSystem/hdr/index.js +69 -105
  227. package/dist/core/WeatherSystem/hdr/index.js.map +1 -1
  228. package/dist/core/WeatherSystem/index.js +77 -124
  229. package/dist/core/WeatherSystem/index.js.map +1 -1
  230. package/dist/core/WeatherSystem/objects/fog/index.js +52 -80
  231. package/dist/core/WeatherSystem/objects/fog/index.js.map +1 -1
  232. package/dist/core/WeatherSystem/objects/rain/index.js +72 -84
  233. package/dist/core/WeatherSystem/objects/rain/index.js.map +1 -1
  234. package/dist/core/WeatherSystem/objects/rain/lineRain.js +88 -118
  235. package/dist/core/WeatherSystem/objects/rain/lineRain.js.map +1 -1
  236. package/dist/core/WeatherSystem/objects/rain/plane.js +116 -146
  237. package/dist/core/WeatherSystem/objects/rain/plane.js.map +1 -1
  238. package/dist/core/WeatherSystem/objects/rain/point.js +100 -148
  239. package/dist/core/WeatherSystem/objects/rain/point.js.map +1 -1
  240. package/dist/core/WeatherSystem/objects/sky/cloud.js +71 -104
  241. package/dist/core/WeatherSystem/objects/sky/cloud.js.map +1 -1
  242. package/dist/core/WeatherSystem/objects/sky/index.js +66 -84
  243. package/dist/core/WeatherSystem/objects/sky/index.js.map +1 -1
  244. package/dist/core/WeatherSystem/objects/sky/outline.js +25 -45
  245. package/dist/core/WeatherSystem/objects/sky/outline.js.map +1 -1
  246. package/dist/core/WeatherSystem/shaders/cloud.js +74 -3
  247. package/dist/core/WeatherSystem/shaders/cloud.js.map +1 -1
  248. package/dist/core/WeatherSystem/shaders/fog.js +103 -3
  249. package/dist/core/WeatherSystem/shaders/fog.js.map +1 -1
  250. package/dist/core/WeatherSystem/shaders/rain.js +206 -7
  251. package/dist/core/WeatherSystem/shaders/rain.js.map +1 -1
  252. package/dist/core/WeatherSystem/shaders/sky.js +87 -3
  253. package/dist/core/WeatherSystem/shaders/sky.js.map +1 -1
  254. package/dist/core/WeatherSystem/sky/index.js +104 -135
  255. package/dist/core/WeatherSystem/sky/index.js.map +1 -1
  256. package/dist/core/WeatherSystem/utils/constant.js +44 -38
  257. package/dist/core/WeatherSystem/utils/constant.js.map +1 -1
  258. package/dist/core/WeatherSystem/utils/math.js +18 -25
  259. package/dist/core/WeatherSystem/utils/math.js.map +1 -1
  260. package/dist/core/WeatherSystem/utils/type.js +1 -1
  261. package/dist/core/WeatherSystem/utils/type.js.map +1 -1
  262. package/dist/core/WeatherSystem/weather/index.js +96 -141
  263. package/dist/core/WeatherSystem/weather/index.js.map +1 -1
  264. package/dist/utils/index.js +1 -1
  265. package/dist/utils/index.js.map +1 -1
  266. package/package.json +3 -3
@@ -1,12 +1,51 @@
1
- export var ver_pre = /* glsl */"\nvarying highp vec2 vUv;\nvarying vec3 vWorldPosition;\nvarying vec3 vViewDirection;\n";
2
- export var ver = /* glsl */"\n#include <begin_vertex>\n\nvec4 worldPosition1 = modelMatrix * vec4(position, 1.0);\nvWorldPosition = worldPosition1.xyz;\n // \u8BA1\u7B97\u89C6\u7EBF\u65B9\u5411\uFF08\u4ECE\u9876\u70B9\u6307\u5411\u76F8\u673A\uFF09\nvViewDirection = normalize(cameraPosition - worldPosition1.xyz);\n";
3
- export var frag_pre = /* glsl */"\nvarying highp vec2 vUv;\nvarying vec3 vWorldPosition;\nuniform float progress;\nuniform float objSize;\nuniform bool isFadeIn;\nuniform vec3 center;\n";
4
- export var frag = /* glsl */"\n#include <map_fragment>\nvec3 myWorldPosition = vWorldPosition / objSize;\n\nif (progress == 0.0) {\n diffuseColor.w = 0.0;\n} else if (progress == 1.0) {\n \n} else{\nif (isFadeIn) {\n float circle1 = step(distance(center / objSize, myWorldPosition), progress - 0.002);\n float circle2 = step(distance(center / objSize, myWorldPosition), progress);\n\n diffuseColor.xyz += vec3(circle2 - circle1) * 3.;\n diffuseColor.w *= circle2;\n} else {\n float circle = step(distance(center / objSize, myWorldPosition), progress);\n diffuseColor.w *= step(circle, 0.);\n}\n}\n\n";
5
- var RealFadeObjS = {
6
- ver_pre: ver_pre,
7
- ver: ver,
8
- frag_pre: frag_pre,
9
- frag: frag
1
+ export const ver_pre = /* glsl */`
2
+ varying highp vec2 vUv;
3
+ varying vec3 vWorldPosition;
4
+ varying vec3 vViewDirection;
5
+ `;
6
+ export const ver = /* glsl */`
7
+ #include <begin_vertex>
8
+
9
+ vec4 worldPosition1 = modelMatrix * vec4(position, 1.0);
10
+ vWorldPosition = worldPosition1.xyz;
11
+ // 计算视线方向(从顶点指向相机)
12
+ vViewDirection = normalize(cameraPosition - worldPosition1.xyz);
13
+ `;
14
+ export const frag_pre = /* glsl */`
15
+ varying highp vec2 vUv;
16
+ varying vec3 vWorldPosition;
17
+ uniform float progress;
18
+ uniform float objSize;
19
+ uniform bool isFadeIn;
20
+ uniform vec3 center;
21
+ `;
22
+ export const frag = /* glsl */`
23
+ #include <map_fragment>
24
+ vec3 myWorldPosition = vWorldPosition / objSize;
25
+
26
+ if (progress == 0.0) {
27
+ diffuseColor.w = 0.0;
28
+ } else if (progress == 1.0) {
29
+
30
+ } else{
31
+ if (isFadeIn) {
32
+ float circle1 = step(distance(center / objSize, myWorldPosition), progress - 0.002);
33
+ float circle2 = step(distance(center / objSize, myWorldPosition), progress);
34
+
35
+ diffuseColor.xyz += vec3(circle2 - circle1) * 3.;
36
+ diffuseColor.w *= circle2;
37
+ } else {
38
+ float circle = step(distance(center / objSize, myWorldPosition), progress);
39
+ diffuseColor.w *= step(circle, 0.);
40
+ }
41
+ }
42
+
43
+ `;
44
+ const RealFadeObjS = {
45
+ ver_pre,
46
+ ver,
47
+ frag_pre,
48
+ frag
10
49
  };
11
50
  export default RealFadeObjS;
12
51
  //# sourceMappingURL=realFade.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ver_pre","ver","frag_pre","frag","RealFadeObjS"],"sources":["../../../../src/business/MaterialSwitch/shader/realFade.ts"],"sourcesContent":["export const ver_pre = /* glsl */ `\nvarying highp vec2 vUv;\nvarying vec3 vWorldPosition;\nvarying vec3 vViewDirection;\n`\n\nexport const ver = /* glsl */ `\n#include <begin_vertex>\n\nvec4 worldPosition1 = modelMatrix * vec4(position, 1.0);\nvWorldPosition = worldPosition1.xyz;\n // 计算视线方向(从顶点指向相机)\nvViewDirection = normalize(cameraPosition - worldPosition1.xyz);\n`\n\nexport const frag_pre = /* glsl */ `\nvarying highp vec2 vUv;\nvarying vec3 vWorldPosition;\nuniform float progress;\nuniform float objSize;\nuniform bool isFadeIn;\nuniform vec3 center;\n`\n\nexport const frag = /* glsl */ `\n#include <map_fragment>\nvec3 myWorldPosition = vWorldPosition / objSize;\n\nif (progress == 0.0) {\n diffuseColor.w = 0.0;\n} else if (progress == 1.0) {\n \n} else{\nif (isFadeIn) {\n float circle1 = step(distance(center / objSize, myWorldPosition), progress - 0.002);\n float circle2 = step(distance(center / objSize, myWorldPosition), progress);\n\n diffuseColor.xyz += vec3(circle2 - circle1) * 3.;\n diffuseColor.w *= circle2;\n} else {\n float circle = step(distance(center / objSize, myWorldPosition), progress);\n diffuseColor.w *= step(circle, 0.);\n}\n}\n\n`\n\nconst RealFadeObjS = { ver_pre, ver, frag_pre, frag }\n\nexport default RealFadeObjS"],"mappings":"AAAA,OAAO,IAAMA,OAAO,GAAG,mGAItB;AAED,OAAO,IAAMC,GAAG,GAAG,8SAOlB;AAED,OAAO,IAAMC,QAAQ,GAAG,oKAOvB;AAED,OAAO,IAAMC,IAAI,GAAG,6lBAqBnB;AAED,IAAMC,YAAY,GAAG;EAAEJ,OAAO,EAAPA,OAAO;EAAEC,GAAG,EAAHA,GAAG;EAAEC,QAAQ,EAARA,QAAQ;EAAEC,IAAI,EAAJA;AAAK,CAAC;AAErD,eAAeC,YAAY"}
1
+ {"version":3,"names":["ver_pre","ver","frag_pre","frag","RealFadeObjS"],"sources":["../../../../src/business/MaterialSwitch/shader/realFade.ts"],"sourcesContent":["export const ver_pre = /* glsl */ `\nvarying highp vec2 vUv;\nvarying vec3 vWorldPosition;\nvarying vec3 vViewDirection;\n`\n\nexport const ver = /* glsl */ `\n#include <begin_vertex>\n\nvec4 worldPosition1 = modelMatrix * vec4(position, 1.0);\nvWorldPosition = worldPosition1.xyz;\n // 计算视线方向(从顶点指向相机)\nvViewDirection = normalize(cameraPosition - worldPosition1.xyz);\n`\n\nexport const frag_pre = /* glsl */ `\nvarying highp vec2 vUv;\nvarying vec3 vWorldPosition;\nuniform float progress;\nuniform float objSize;\nuniform bool isFadeIn;\nuniform vec3 center;\n`\n\nexport const frag = /* glsl */ `\n#include <map_fragment>\nvec3 myWorldPosition = vWorldPosition / objSize;\n\nif (progress == 0.0) {\n diffuseColor.w = 0.0;\n} else if (progress == 1.0) {\n \n} else{\nif (isFadeIn) {\n float circle1 = step(distance(center / objSize, myWorldPosition), progress - 0.002);\n float circle2 = step(distance(center / objSize, myWorldPosition), progress);\n\n diffuseColor.xyz += vec3(circle2 - circle1) * 3.;\n diffuseColor.w *= circle2;\n} else {\n float circle = step(distance(center / objSize, myWorldPosition), progress);\n diffuseColor.w *= step(circle, 0.);\n}\n}\n\n`\n\nconst RealFadeObjS = { ver_pre, ver, frag_pre, frag }\n\nexport default RealFadeObjS"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,UAAY;AACnC;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,GAAG,GAAG,UAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,QAAQ,GAAG,UAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,IAAI,GAAG,UAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,YAAY,GAAG;EAAEJ,OAAO;EAAEC,GAAG;EAAEC,QAAQ;EAAEC;AAAK,CAAC;AAErD,eAAeC,YAAY"}
@@ -1,19 +1,8 @@
1
- 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); }
2
1
  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; }
3
2
  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; }
4
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
- 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); } }
6
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
8
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
11
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
12
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
14
3
  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; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
16
- 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); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ 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); }
17
6
  /*
18
7
  * @Descripttion:
19
8
  * @version:
@@ -28,71 +17,55 @@ import ObjectLayer from "../Base/ObjectLayer";
28
17
  import { PlaneGeometry, MeshBasicMaterial, Mesh } from '@anov/3d-core';
29
18
  import _ from 'lodash';
30
19
  import { defineProps } from "../Utils/defineProps";
31
- export var Plane = /*#__PURE__*/function (_ObjectLayer) {
32
- _inherits(Plane, _ObjectLayer);
33
- var _super = _createSuper(Plane);
34
- function Plane(options) {
35
- var _this;
36
- _classCallCheck(this, Plane);
37
- _this = _super.call(this);
38
- _defineProperty(_assertThisInitialized(_this), "mesh", void 0);
39
- _defineProperty(_assertThisInitialized(_this), "currentOptions", void 0);
40
- _this.currentOptions = options;
41
- _this.mesh = _this.createPlane(options);
42
- _this.add(_this.mesh);
43
- defineProps(_assertThisInitialized(_this), ['width', 'length', 'widthSegment', 'lengthSegment'], ['wireframe', 'color'], 'updatePlane');
44
- return _this;
20
+ export class Plane extends ObjectLayer {
21
+ constructor(options) {
22
+ super();
23
+ _defineProperty(this, "mesh", void 0);
24
+ _defineProperty(this, "currentOptions", void 0);
25
+ this.currentOptions = options;
26
+ this.mesh = this.createPlane(options);
27
+ this.add(this.mesh);
28
+ defineProps(this, ['width', 'length', 'widthSegment', 'lengthSegment'], ['wireframe', 'color'], 'updatePlane');
45
29
  }
46
- _createClass(Plane, [{
47
- key: "createPlane",
48
- value: function createPlane(options) {
49
- var _options$length = options.length,
50
- length = _options$length === void 0 ? 1 : _options$length,
51
- _options$width = options.width,
52
- width = _options$width === void 0 ? 1 : _options$width,
53
- _options$lengthSegmen = options.lengthSegment,
54
- lengthSegment = _options$lengthSegmen === void 0 ? 1 : _options$lengthSegmen,
55
- _options$widthSegment = options.widthSegment,
56
- widthSegment = _options$widthSegment === void 0 ? 1 : _options$widthSegment,
57
- _options$material = options.material,
58
- material = _options$material === void 0 ? {} : _options$material;
30
+ createPlane(options) {
31
+ const {
32
+ length = 1,
33
+ width = 1,
34
+ lengthSegment = 1,
35
+ widthSegment = 1,
36
+ material = {}
37
+ } = options;
59
38
 
60
- // 默认材质参数
61
- var defaultMat = {
62
- color: 0xffffff,
63
- opacity: 1,
64
- transparent: false,
65
- wireframe: false,
66
- visible: true,
67
- side: 2
68
- };
69
- var geometry = new PlaneGeometry(width, length, widthSegment, lengthSegment);
70
- var mat = new MeshBasicMaterial(_objectSpread(_objectSpread({}, defaultMat), material));
71
- return new Mesh(geometry, mat);
72
- }
73
- }, {
74
- key: "updatePlane",
75
- value: function updatePlane(options) {
76
- if (!this.mesh) return;
77
- _.mergeWith(this.currentOptions, options);
78
- this.remove(this.mesh);
79
- this.mesh.geometry.dispose();
80
- this.mesh.material.dispose();
81
- this.mesh = this.createPlane(this.currentOptions);
82
- this.add(this.mesh);
83
- }
84
- /** 销毁释放资源 */
85
- }, {
86
- key: "destroy",
87
- value: function destroy() {
88
- if (!this.mesh) return;
89
- this.remove(this.mesh);
90
- this.mesh.geometry.dispose();
91
- this.mesh.material.dispose();
92
- // @ts-ignore
93
- this.mesh = null;
94
- }
95
- }]);
96
- return Plane;
97
- }(ObjectLayer);
39
+ // 默认材质参数
40
+ const defaultMat = {
41
+ color: 0xffffff,
42
+ opacity: 1,
43
+ transparent: false,
44
+ wireframe: false,
45
+ visible: true,
46
+ side: 2
47
+ };
48
+ const geometry = new PlaneGeometry(width, length, widthSegment, lengthSegment);
49
+ const mat = new MeshBasicMaterial(_objectSpread(_objectSpread({}, defaultMat), material));
50
+ return new Mesh(geometry, mat);
51
+ }
52
+ updatePlane(options) {
53
+ if (!this.mesh) return;
54
+ _.mergeWith(this.currentOptions, options);
55
+ this.remove(this.mesh);
56
+ this.mesh.geometry.dispose();
57
+ this.mesh.material.dispose();
58
+ this.mesh = this.createPlane(this.currentOptions);
59
+ this.add(this.mesh);
60
+ }
61
+ /** 销毁释放资源 */
62
+ destroy() {
63
+ if (!this.mesh) return;
64
+ this.remove(this.mesh);
65
+ this.mesh.geometry.dispose();
66
+ this.mesh.material.dispose();
67
+ // @ts-ignore
68
+ this.mesh = null;
69
+ }
70
+ }
98
71
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ObjectLayer","PlaneGeometry","MeshBasicMaterial","Mesh","_","defineProps","Plane","_ObjectLayer","_inherits","_super","_createSuper","options","_this","_classCallCheck","call","_defineProperty","_assertThisInitialized","currentOptions","mesh","createPlane","add","_createClass","key","value","_options$length","length","_options$width","width","_options$lengthSegmen","lengthSegment","_options$widthSegment","widthSegment","_options$material","material","defaultMat","color","opacity","transparent","wireframe","visible","side","geometry","mat","_objectSpread","updatePlane","mergeWith","remove","dispose","destroy"],"sources":["../../../src/business/Plane/index.ts"],"sourcesContent":["/*\n * @Descripttion: \n * @version: \n * @Author: 周志国\n * @Date: 2025-09-09 14:27:25\n * @LastEditors: 周志国\n * @LastEditTime: 2025-09-15 10:47:49\n * @changeLog: \n * @FilePath: /anov-3d-webgl/packages/anov-3d-ability/src/business/Plane/index.ts\n */\nimport ObjectLayer from '../Base/ObjectLayer'\nimport type { options } from './types'\nimport { IPlane } from './interface'\nimport {\n PlaneGeometry,\n MeshBasicMaterial,\n MeshBasicMaterialParameters,\n Mesh,\n} from '@anov/3d-core'\nimport _ from 'lodash'\nimport { defineProps } from '../Utils/defineProps'\nexport class Plane extends ObjectLayer implements IPlane {\n private mesh!: Mesh\n private currentOptions!: options\n constructor(options: options) {\n super()\n this.currentOptions = options\n this.mesh = this.createPlane(options)\n this.add(this.mesh)\n defineProps(\n this,\n ['width', 'length', 'widthSegment', 'lengthSegment'],\n ['wireframe', 'color'],\n 'updatePlane'\n )\n }\n public createPlane(options: options): Mesh {\n const {\n length = 1,\n width = 1,\n lengthSegment = 1,\n widthSegment = 1,\n material = {},\n } = options\n\n // 默认材质参数\n const defaultMat: MeshBasicMaterialParameters = {\n color: 0xffffff,\n opacity: 1,\n transparent: false,\n wireframe: false,\n visible: true,\n side: 2,\n }\n const geometry = new PlaneGeometry(width, length, widthSegment, lengthSegment)\n const mat = new MeshBasicMaterial({ ...defaultMat, ...material })\n return new Mesh(geometry, mat)\n }\n updatePlane(options: options): void {\n if (!this.mesh) return\n _.mergeWith(this.currentOptions, options)\n this.remove(this.mesh)\n this.mesh.geometry.dispose();\n (this.mesh.material as any).dispose()\n this.mesh = this.createPlane(this.currentOptions)\n this.add(this.mesh)\n }\n /** 销毁释放资源 */\n public destroy() {\n if (!this.mesh) return\n this.remove(this.mesh)\n this.mesh.geometry.dispose()\n ; (this.mesh.material as any).dispose()\n // @ts-ignore\n this.mesh = null\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"names":["ObjectLayer","PlaneGeometry","MeshBasicMaterial","Mesh","_","defineProps","Plane","constructor","options","_defineProperty","currentOptions","mesh","createPlane","add","length","width","lengthSegment","widthSegment","material","defaultMat","color","opacity","transparent","wireframe","visible","side","geometry","mat","_objectSpread","updatePlane","mergeWith","remove","dispose","destroy"],"sources":["../../../src/business/Plane/index.ts"],"sourcesContent":["/*\n * @Descripttion: \n * @version: \n * @Author: 周志国\n * @Date: 2025-09-09 14:27:25\n * @LastEditors: 周志国\n * @LastEditTime: 2025-09-15 10:47:49\n * @changeLog: \n * @FilePath: /anov-3d-webgl/packages/anov-3d-ability/src/business/Plane/index.ts\n */\nimport ObjectLayer from '../Base/ObjectLayer'\nimport type { options } from './types'\nimport { IPlane } from './interface'\nimport {\n PlaneGeometry,\n MeshBasicMaterial,\n MeshBasicMaterialParameters,\n Mesh,\n} from '@anov/3d-core'\nimport _ from 'lodash'\nimport { defineProps } from '../Utils/defineProps'\nexport class Plane extends ObjectLayer implements IPlane {\n private mesh!: Mesh\n private currentOptions!: options\n constructor(options: options) {\n super()\n this.currentOptions = options\n this.mesh = this.createPlane(options)\n this.add(this.mesh)\n defineProps(\n this,\n ['width', 'length', 'widthSegment', 'lengthSegment'],\n ['wireframe', 'color'],\n 'updatePlane'\n )\n }\n public createPlane(options: options): Mesh {\n const {\n length = 1,\n width = 1,\n lengthSegment = 1,\n widthSegment = 1,\n material = {},\n } = options\n\n // 默认材质参数\n const defaultMat: MeshBasicMaterialParameters = {\n color: 0xffffff,\n opacity: 1,\n transparent: false,\n wireframe: false,\n visible: true,\n side: 2,\n }\n const geometry = new PlaneGeometry(width, length, widthSegment, lengthSegment)\n const mat = new MeshBasicMaterial({ ...defaultMat, ...material })\n return new Mesh(geometry, mat)\n }\n updatePlane(options: options): void {\n if (!this.mesh) return\n _.mergeWith(this.currentOptions, options)\n this.remove(this.mesh)\n this.mesh.geometry.dispose();\n (this.mesh.material as any).dispose()\n this.mesh = this.createPlane(this.currentOptions)\n this.add(this.mesh)\n }\n /** 销毁释放资源 */\n public destroy() {\n if (!this.mesh) return\n this.remove(this.mesh)\n this.mesh.geometry.dispose()\n ; (this.mesh.material as any).dispose()\n // @ts-ignore\n this.mesh = null\n }\n}\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,WAAW;AAGlB,SACEC,aAAa,EACbC,iBAAiB,EAEjBC,IAAI,QACC,eAAe;AACtB,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,WAAW;AACpB,OAAO,MAAMC,KAAK,SAASN,WAAW,CAAmB;EAGvDO,WAAWA,CAACC,OAAgB,EAAE;IAC5B,KAAK,CAAC,CAAC;IAAAC,eAAA;IAAAA,eAAA;IACP,IAAI,CAACC,cAAc,GAAGF,OAAO;IAC7B,IAAI,CAACG,IAAI,GAAG,IAAI,CAACC,WAAW,CAACJ,OAAO,CAAC;IACrC,IAAI,CAACK,GAAG,CAAC,IAAI,CAACF,IAAI,CAAC;IACnBN,WAAW,CACT,IAAI,EACJ,CAAC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,CAAC,EACpD,CAAC,WAAW,EAAE,OAAO,CAAC,EACtB,aACF,CAAC;EACH;EACOO,WAAWA,CAACJ,OAAgB,EAAQ;IACzC,MAAM;MACJM,MAAM,GAAG,CAAC;MACVC,KAAK,GAAG,CAAC;MACTC,aAAa,GAAG,CAAC;MACjBC,YAAY,GAAG,CAAC;MAChBC,QAAQ,GAAG,CAAC;IACd,CAAC,GAAGV,OAAO;;IAEX;IACA,MAAMW,UAAuC,GAAG;MAC9CC,KAAK,EAAE,QAAQ;MACfC,OAAO,EAAE,CAAC;MACVC,WAAW,EAAE,KAAK;MAClBC,SAAS,EAAE,KAAK;MAChBC,OAAO,EAAE,IAAI;MACbC,IAAI,EAAE;IACR,CAAC;IACD,MAAMC,QAAQ,GAAG,IAAIzB,aAAa,CAACc,KAAK,EAAED,MAAM,EAAEG,YAAY,EAAED,aAAa,CAAC;IAC9E,MAAMW,GAAG,GAAG,IAAIzB,iBAAiB,CAAA0B,aAAA,CAAAA,aAAA,KAAMT,UAAU,GAAKD,QAAQ,CAAE,CAAC;IACjE,OAAO,IAAIf,IAAI,CAACuB,QAAQ,EAAEC,GAAG,CAAC;EAChC;EACAE,WAAWA,CAACrB,OAAgB,EAAQ;IAClC,IAAI,CAAC,IAAI,CAACG,IAAI,EAAE;IAChBP,CAAC,CAAC0B,SAAS,CAAC,IAAI,CAACpB,cAAc,EAAEF,OAAO,CAAC;IACzC,IAAI,CAACuB,MAAM,CAAC,IAAI,CAACpB,IAAI,CAAC;IACtB,IAAI,CAACA,IAAI,CAACe,QAAQ,CAACM,OAAO,CAAC,CAAC;IAC3B,IAAI,CAACrB,IAAI,CAACO,QAAQ,CAASc,OAAO,CAAC,CAAC;IACrC,IAAI,CAACrB,IAAI,GAAG,IAAI,CAACC,WAAW,CAAC,IAAI,CAACF,cAAc,CAAC;IACjD,IAAI,CAACG,GAAG,CAAC,IAAI,CAACF,IAAI,CAAC;EACrB;EACA;EACOsB,OAAOA,CAAA,EAAG;IACf,IAAI,CAAC,IAAI,CAACtB,IAAI,EAAE;IAChB,IAAI,CAACoB,MAAM,CAAC,IAAI,CAACpB,IAAI,CAAC;IACtB,IAAI,CAACA,IAAI,CAACe,QAAQ,CAACM,OAAO,CAAC,CAAC;IACvB,IAAI,CAACrB,IAAI,CAACO,QAAQ,CAASc,OAAO,CAAC,CAAC;IACzC;IACA,IAAI,CAACrB,IAAI,GAAG,IAAI;EAClB;AACF"}
@@ -6,6 +6,7 @@ declare class Poi extends ObjectLayer implements IPoi {
6
6
  private _titleMesh;
7
7
  private _linkMesh;
8
8
  private _particleMesh;
9
+ private _panel?;
9
10
  private _disposeCallbacks;
10
11
  private _style;
11
12
  private _autoScale;
@@ -13,8 +14,10 @@ declare class Poi extends ObjectLayer implements IPoi {
13
14
  private _text;
14
15
  private _model;
15
16
  private _particle;
17
+ private _content;
16
18
  type: string;
17
19
  constructor(option: Option);
20
+ get content(): TextOption;
18
21
  get mesh(): Group<import("@anov/3d-core").Object3DEventMap>;
19
22
  get style(): string;
20
23
  get autoScale(): boolean;
@@ -26,6 +29,8 @@ declare class Poi extends ObjectLayer implements IPoi {
26
29
  get particle(): ParticleOption;
27
30
  destroy(): void;
28
31
  private init;
32
+ /** 初始化卡片样式 */
33
+ private initCard;
29
34
  /** 布局计算 */
30
35
  private calculateLayout;
31
36
  private getBoxSize;