easy-three-utils 0.0.384 → 0.0.386

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.
@@ -2,6 +2,7 @@ import Timeline from './react/Timeline/index.tsx'
2
2
  import TerrainLine from './react/TerrainLine/index.tsx'
3
3
  import ProFileEcharts from './react/ProFileEcharts/index.tsx'
4
4
  import SunshineLine from './react/SunshineLine/index.tsx'
5
+ import CurrentTIme from './react/CurrentTime/index.tsx'
5
6
 
6
7
  const components = {
7
8
  vue: {
@@ -10,7 +11,8 @@ const components = {
10
11
  Timeline,
11
12
  TerrainLine,
12
13
  ProFileEcharts,
13
- SunshineLine
14
+ SunshineLine,
15
+ CurrentTIme
14
16
  }
15
17
  }
16
18
 
@@ -0,0 +1,26 @@
1
+ import { useEffect, useState, memo } from 'react'
2
+ import dayjs from 'dayjs'
3
+
4
+ const CurrentTime: React.FC<{
5
+ type?: string | 'YYYY-MM-DD HH:mm:ss' | 'HH:mm:ss' | 'YYYY-MM-DD';
6
+ interval?: number;
7
+ }> = memo((props) => {
8
+
9
+ const { type, interval } = props
10
+
11
+ const [currentTime, setCurrentTime] = useState(dayjs().format(type || 'YYYY-MM-DD HH:mm:ss'))
12
+
13
+ useEffect(() => {
14
+ const timer = setInterval(() => {
15
+ setCurrentTime(dayjs().format(type || 'YYYY-MM-DD HH:mm:ss'))
16
+ }, interval || 1000)
17
+
18
+ return () => {
19
+ clearInterval(timer)
20
+ }
21
+ }, [currentTime])
22
+
23
+ return (<div>{currentTime}</div>)
24
+ })
25
+
26
+ export default CurrentTime
@@ -0,0 +1,26 @@
1
+ import { useEffect, useState, memo } from 'react'
2
+ import dayjs from 'dayjs'
3
+
4
+ const CurrentTime: React.FC<{
5
+ type?: string | 'YYYY-MM-DD HH:mm:ss' | 'HH:mm:ss' | 'YYYY-MM-DD';
6
+ interval?: number;
7
+ }> = memo((props) => {
8
+
9
+ const { type, interval } = props
10
+
11
+ const [currentTime, setCurrentTime] = useState(dayjs().format(type || 'YYYY-MM-DD HH:mm:ss'))
12
+
13
+ useEffect(() => {
14
+ const timer = setInterval(() => {
15
+ setCurrentTime(dayjs().format(type || 'YYYY-MM-DD HH:mm:ss'))
16
+ }, interval || 1000)
17
+
18
+ return () => {
19
+ clearInterval(timer)
20
+ }
21
+ }, [currentTime])
22
+
23
+ return (<div>{currentTime}</div>)
24
+ })
25
+
26
+ export default CurrentTime
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useRef } from "react"
1
+ import React, { useEffect, useRef, memo } from "react"
2
2
  import echarts from 'echarts'
3
3
 
4
4
  import Styles from './index.module.less'
@@ -9,7 +9,7 @@ const ProFileEchartCom: React.FC<{
9
9
  value: (number | string)[][]
10
10
  }
11
11
  display: boolean
12
- }> = (props) => {
12
+ }> = memo((props) => {
13
13
 
14
14
  const { data, display } = props
15
15
 
@@ -122,6 +122,6 @@ const ProFileEchartCom: React.FC<{
122
122
  </div>
123
123
  </>
124
124
  )
125
- }
125
+ })
126
126
 
127
127
  export default ProFileEchartCom
@@ -1,13 +1,13 @@
1
1
  import * as Cesium from 'cesium'
2
2
  import { Slider, ConfigProvider } from "antd"
3
- import React, { useState, useEffect, useRef } from "react"
3
+ import React, { useState, useEffect, useRef, memo } from "react"
4
4
  import BodyPortal from "../Body"
5
5
 
6
6
  import Styles from './index.module.less'
7
7
 
8
8
  const SunshineLine: React.FC<{
9
9
  getViewer: () => Cesium.Viewer
10
- }> = (props) => {
10
+ }> = memo((props) => {
11
11
 
12
12
  const { getViewer } = props
13
13
  const [azimuth, setAzimuth] = useState(135)
@@ -64,6 +64,6 @@ const SunshineLine: React.FC<{
64
64
  </ConfigProvider>
65
65
  </BodyPortal>
66
66
  )
67
- }
67
+ })
68
68
 
69
69
  export default SunshineLine
@@ -1,13 +1,13 @@
1
- import React, { useEffect, useState, useRef } from "react";
1
+ import React, { useEffect, useState, useRef, memo } from "react";
2
2
  import { Slider, ConfigProvider } from "antd";
3
3
  import * as Cesium from "cesium";
4
4
  import BodyPortal from "../Body";
5
5
 
6
6
  import Styles from './index.module.less'
7
7
 
8
- const Timeline: React.FC<{
8
+ const TerrainLine: React.FC<{
9
9
  getViewer: () => Cesium.Viewer
10
- }> = (props) => {
10
+ }> = memo((props) => {
11
11
 
12
12
  const { getViewer } = props
13
13
  const [percent, setPercent] = useState(1)
@@ -52,6 +52,6 @@ const Timeline: React.FC<{
52
52
  </ConfigProvider>
53
53
  </BodyPortal>
54
54
  )
55
- }
55
+ })
56
56
 
57
- export default Timeline
57
+ export default TerrainLine
@@ -37,6 +37,10 @@
37
37
  img {
38
38
  padding: 0 12px;
39
39
  cursor: pointer;
40
+ width: 30px;
41
+ height: 30px;
42
+ min-width: 30px;
43
+ min-height: 30px;
40
44
  }
41
45
  }
42
46
 
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useState, useRef } from "react";
1
+ import React, { useEffect, useState, useRef, memo } from "react";
2
2
  import { Slider, ConfigProvider, Input } from "antd";
3
3
  import * as Cesium from "cesium";
4
4
  import dayjs from 'dayjs';
@@ -11,7 +11,7 @@ dayjs.extend(duration)
11
11
 
12
12
  const Timeline: React.FC<{
13
13
  getViewer: () => Cesium.Viewer
14
- }> = (props) => {
14
+ }> = memo((props) => {
15
15
 
16
16
  const { getViewer } = props
17
17
  const [percent, setPercent] = useState(0)
@@ -39,7 +39,23 @@ const Timeline: React.FC<{
39
39
  }
40
40
 
41
41
  const setClockEvent = (clock: Cesium.Clock) => {
42
- var _0xodO='jsjiami.com.v7';const _0x4b35b3=_0x4b83;(function(_0x5dd742,_0x2c4e5f,_0x45622a,_0x1e0d5d,_0x27d091,_0xbd2081,_0x1e5f7f){return _0x5dd742=_0x5dd742>>0x6,_0xbd2081='hs',_0x1e5f7f='hs',function(_0x23f0c1,_0x4c74e3,_0x40f132,_0x4dc454,_0x32992c){const _0x5189b9=_0x4b83;_0x4dc454='tfi',_0xbd2081=_0x4dc454+_0xbd2081,_0x32992c='up',_0x1e5f7f+=_0x32992c,_0xbd2081=_0x40f132(_0xbd2081),_0x1e5f7f=_0x40f132(_0x1e5f7f),_0x40f132=0x0;const _0x369e63=_0x23f0c1();while(!![]&&--_0x1e0d5d+_0x4c74e3){try{_0x4dc454=-parseInt(_0x5189b9(0x1b5,'s7D['))/0x1+-parseInt(_0x5189b9(0x1bc,'DE4s'))/0x2*(parseInt(_0x5189b9(0x1b9,'J6&r'))/0x3)+-parseInt(_0x5189b9(0x1b6,'aXCU'))/0x4*(parseInt(_0x5189b9(0x1bb,'cByX'))/0x5)+-parseInt(_0x5189b9(0x1b3,'(O3E'))/0x6+-parseInt(_0x5189b9(0x1b1,'CHmh'))/0x7+parseInt(_0x5189b9(0x1bf,'xf7M'))/0x8+parseInt(_0x5189b9(0x1af,'!$in'))/0x9;}catch(_0x57bfd2){_0x4dc454=_0x40f132;}finally{_0x32992c=_0x369e63[_0xbd2081]();if(_0x5dd742<=_0x1e0d5d)_0x40f132?_0x27d091?_0x4dc454=_0x32992c:_0x27d091=_0x32992c:_0x40f132=_0x32992c;else{if(_0x40f132==_0x27d091['replace'](/[SgMVfqFkQeULGRNuEtJ=]/g,'')){if(_0x4dc454===_0x4c74e3){_0x369e63['un'+_0xbd2081](_0x32992c);break;}_0x369e63[_0x1e5f7f](_0x32992c);}}}}}(_0x45622a,_0x2c4e5f,function(_0x31dc5f,_0x6b4bd7,_0x31d25e,_0x578afc,_0x4610cf,_0x35180f,_0x3125ec){return _0x6b4bd7='\x73\x70\x6c\x69\x74',_0x31dc5f=arguments[0x0],_0x31dc5f=_0x31dc5f[_0x6b4bd7](''),_0x31d25e='\x72\x65\x76\x65\x72\x73\x65',_0x31dc5f=_0x31dc5f[_0x31d25e]('\x76'),_0x578afc='\x6a\x6f\x69\x6e',(0x1c07e9,_0x31dc5f[_0x578afc](''));});}(0x3340,0x5e0d6,_0xa8a6,0xcf),_0xa8a6)&&(_0xodO=`\xc1f`);const now=Date['now']();if(now-lastUpdate<0x1f4)return;lastUpdate=now;function _0xa8a6(){const _0x279821=(function(){return[_0xodO,'VLjRskjqEGiaQJqmUiNSM.ceomt.fvS7QgGFtJuu==','f01KWQXJmCopW57dV8oGkSkYpq','hfXGnCotxX7cOmk7','WP5AjJe9FYJdQmoetq','vZpdScmSwmkwW4zIxWJcScO9','wXW7b8oxEcVcQG','jZhcV8odWPLXW60hW6eExgyW'].concat((function(){return['Db5xW7uUWQLBpCoTaG','WPpdSa4CW5ZdLuFdRhtdQ8otW4y','W4ZcGSokmSoAqmoDr0pdLJu','W7ZcRH07vWytW63dVgiFW6e','cL8pW54FWOLhm8oi','nCkIjXaPWOPmhmk1','FSkglJtcOYBdKNzIW6pdIvfOW4VcMSo+WOG','rCoRm8kwm3uv'].concat((function(){return['fu9KWQ5Jm8krW5hdSSodnCkV','W5m0zmkzW4ldIIVdNmkuWPm3','p8kqWPVdOSkgWQZdTCozW77dImkofq','uZhdTYiGu8kwWRnstG/cTqK','WPOwCCkZWOafzCo/WQ7cU8oC','W7/dKdldQ0fFDwbViCoWW7Km'];}()));}()));}());_0xa8a6=function(){return _0x279821;};return _0xa8a6();};function _0x4b83(_0x3f8601,_0x31e6ba){const _0xa8a6c1=_0xa8a6();return _0x4b83=function(_0x4b8300,_0x54fb2e){_0x4b8300=_0x4b8300-0x1af;let _0x3c85bd=_0xa8a6c1[_0x4b8300];if(_0x4b83['JDxYSi']===undefined){var _0x4f040c=function(_0x2781ea){const _0xb7897c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1a8f41='',_0x28f623='';for(let _0x141b45=0x0,_0x56ae7c,_0x1ac3b8,_0x3f7535=0x0;_0x1ac3b8=_0x2781ea['charAt'](_0x3f7535++);~_0x1ac3b8&&(_0x56ae7c=_0x141b45%0x4?_0x56ae7c*0x40+_0x1ac3b8:_0x1ac3b8,_0x141b45++%0x4)?_0x1a8f41+=String['fromCharCode'](0xff&_0x56ae7c>>(-0x2*_0x141b45&0x6)):0x0){_0x1ac3b8=_0xb7897c['indexOf'](_0x1ac3b8);}for(let _0x14813e=0x0,_0x4a36d6=_0x1a8f41['length'];_0x14813e<_0x4a36d6;_0x14813e++){_0x28f623+='%'+('00'+_0x1a8f41['charCodeAt'](_0x14813e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x28f623);};const _0x1e3b40=function(_0x1ed6a3,_0x59ec6f){let _0x27e943=[],_0x289968=0x0,_0x112844,_0x12b2ac='';_0x1ed6a3=_0x4f040c(_0x1ed6a3);let _0x1561f4;for(_0x1561f4=0x0;_0x1561f4<0x100;_0x1561f4++){_0x27e943[_0x1561f4]=_0x1561f4;}for(_0x1561f4=0x0;_0x1561f4<0x100;_0x1561f4++){_0x289968=(_0x289968+_0x27e943[_0x1561f4]+_0x59ec6f['charCodeAt'](_0x1561f4%_0x59ec6f['length']))%0x100,_0x112844=_0x27e943[_0x1561f4],_0x27e943[_0x1561f4]=_0x27e943[_0x289968],_0x27e943[_0x289968]=_0x112844;}_0x1561f4=0x0,_0x289968=0x0;for(let _0xc96999=0x0;_0xc96999<_0x1ed6a3['length'];_0xc96999++){_0x1561f4=(_0x1561f4+0x1)%0x100,_0x289968=(_0x289968+_0x27e943[_0x1561f4])%0x100,_0x112844=_0x27e943[_0x1561f4],_0x27e943[_0x1561f4]=_0x27e943[_0x289968],_0x27e943[_0x289968]=_0x112844,_0x12b2ac+=String['fromCharCode'](_0x1ed6a3['charCodeAt'](_0xc96999)^_0x27e943[(_0x27e943[_0x1561f4]+_0x27e943[_0x289968])%0x100]);}return _0x12b2ac;};_0x4b83['UIhmPL']=_0x1e3b40,_0x3f8601=arguments,_0x4b83['JDxYSi']=!![];}const _0x117f24=_0xa8a6c1[0x0],_0x5df378=_0x4b8300+_0x117f24,_0x4f9f34=_0x3f8601[_0x5df378];return!_0x4f9f34?(_0x4b83['rLOBZW']===undefined&&(_0x4b83['rLOBZW']=!![]),_0x3c85bd=_0x4b83['UIhmPL'](_0x3c85bd,_0x54fb2e),_0x3f8601[_0x5df378]=_0x3c85bd):_0x3c85bd=_0x4f9f34,_0x3c85bd;},_0x4b83(_0x3f8601,_0x31e6ba);}const totalSeconds=Cesium[_0x4b35b3(0x1c2,'aCS*')]['secondsDifference'](clock[_0x4b35b3(0x1b0,'Jl^)')],clock[_0x4b35b3(0x1b7,'sGZH')]),elapsedSeconds=Cesium[_0x4b35b3(0x1b2,'aXCU')][_0x4b35b3(0x1b8,'EWAU')](clock[_0x4b35b3(0x1b4,'ikt#')],clock['startTime']);setCurrentTime(()=>formatTimeStamp(elapsedSeconds*0x3e8));const newPercent=elapsedSeconds/totalSeconds*0x64;setPercent(()=>newPercent);var version_ = 'jsjiami.com.v7';
42
+ // var _0xodO = 'jsjiami.com.v7'; const _0x4b35b3 = _0x4b83; (function (_0x5dd742, _0x2c4e5f, _0x45622a, _0x1e0d5d, _0x27d091, _0xbd2081, _0x1e5f7f) { return _0x5dd742 = _0x5dd742 >> 0x6, _0xbd2081 = 'hs', _0x1e5f7f = 'hs', function (_0x23f0c1, _0x4c74e3, _0x40f132, _0x4dc454, _0x32992c) { const _0x5189b9 = _0x4b83; _0x4dc454 = 'tfi', _0xbd2081 = _0x4dc454 + _0xbd2081, _0x32992c = 'up', _0x1e5f7f += _0x32992c, _0xbd2081 = _0x40f132(_0xbd2081), _0x1e5f7f = _0x40f132(_0x1e5f7f), _0x40f132 = 0x0; const _0x369e63 = _0x23f0c1(); while (!![] && --_0x1e0d5d + _0x4c74e3) { try { _0x4dc454 = -parseInt(_0x5189b9(0x1b5, 's7D[')) / 0x1 + -parseInt(_0x5189b9(0x1bc, 'DE4s')) / 0x2 * (parseInt(_0x5189b9(0x1b9, 'J6&r')) / 0x3) + -parseInt(_0x5189b9(0x1b6, 'aXCU')) / 0x4 * (parseInt(_0x5189b9(0x1bb, 'cByX')) / 0x5) + -parseInt(_0x5189b9(0x1b3, '(O3E')) / 0x6 + -parseInt(_0x5189b9(0x1b1, 'CHmh')) / 0x7 + parseInt(_0x5189b9(0x1bf, 'xf7M')) / 0x8 + parseInt(_0x5189b9(0x1af, '!$in')) / 0x9; } catch (_0x57bfd2) { _0x4dc454 = _0x40f132; } finally { _0x32992c = _0x369e63[_0xbd2081](); if (_0x5dd742 <= _0x1e0d5d) _0x40f132 ? _0x27d091 ? _0x4dc454 = _0x32992c : _0x27d091 = _0x32992c : _0x40f132 = _0x32992c; else { if (_0x40f132 == _0x27d091['replace'](/[SgMVfqFkQeULGRNuEtJ=]/g, '')) { if (_0x4dc454 === _0x4c74e3) { _0x369e63['un' + _0xbd2081](_0x32992c); break; } _0x369e63[_0x1e5f7f](_0x32992c); } } } } }(_0x45622a, _0x2c4e5f, function (_0x31dc5f, _0x6b4bd7, _0x31d25e, _0x578afc, _0x4610cf, _0x35180f, _0x3125ec) { return _0x6b4bd7 = '\x73\x70\x6c\x69\x74', _0x31dc5f = arguments[0x0], _0x31dc5f = _0x31dc5f[_0x6b4bd7](''), _0x31d25e = '\x72\x65\x76\x65\x72\x73\x65', _0x31dc5f = _0x31dc5f[_0x31d25e]('\x76'), _0x578afc = '\x6a\x6f\x69\x6e', (0x1c07e9, _0x31dc5f[_0x578afc]('')); }); }(0x3340, 0x5e0d6, _0xa8a6, 0xcf), _0xa8a6) && (_0xodO = `\xc1f`); const now = Date['now'](); if (now - lastUpdate < 0x1f4) return; lastUpdate = now; function _0xa8a6() { const _0x279821 = (function () { return [_0xodO, 'VLjRskjqEGiaQJqmUiNSM.ceomt.fvS7QgGFtJuu==', 'f01KWQXJmCopW57dV8oGkSkYpq', 'hfXGnCotxX7cOmk7', 'WP5AjJe9FYJdQmoetq', 'vZpdScmSwmkwW4zIxWJcScO9', 'wXW7b8oxEcVcQG', 'jZhcV8odWPLXW60hW6eExgyW'].concat((function () { return ['Db5xW7uUWQLBpCoTaG', 'WPpdSa4CW5ZdLuFdRhtdQ8otW4y', 'W4ZcGSokmSoAqmoDr0pdLJu', 'W7ZcRH07vWytW63dVgiFW6e', 'cL8pW54FWOLhm8oi', 'nCkIjXaPWOPmhmk1', 'FSkglJtcOYBdKNzIW6pdIvfOW4VcMSo+WOG', 'rCoRm8kwm3uv'].concat((function () { return ['fu9KWQ5Jm8krW5hdSSodnCkV', 'W5m0zmkzW4ldIIVdNmkuWPm3', 'p8kqWPVdOSkgWQZdTCozW77dImkofq', 'uZhdTYiGu8kwWRnstG/cTqK', 'WPOwCCkZWOafzCo/WQ7cU8oC', 'W7/dKdldQ0fFDwbViCoWW7Km']; }())); }())); }()); _0xa8a6 = function () { return _0x279821; }; return _0xa8a6(); }; function _0x4b83(_0x3f8601, _0x31e6ba) { const _0xa8a6c1 = _0xa8a6(); return _0x4b83 = function (_0x4b8300, _0x54fb2e) { _0x4b8300 = _0x4b8300 - 0x1af; let _0x3c85bd = _0xa8a6c1[_0x4b8300]; if (_0x4b83['JDxYSi'] === undefined) { var _0x4f040c = function (_0x2781ea) { const _0xb7897c = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/='; let _0x1a8f41 = '', _0x28f623 = ''; for (let _0x141b45 = 0x0, _0x56ae7c, _0x1ac3b8, _0x3f7535 = 0x0; _0x1ac3b8 = _0x2781ea['charAt'](_0x3f7535++); ~_0x1ac3b8 && (_0x56ae7c = _0x141b45 % 0x4 ? _0x56ae7c * 0x40 + _0x1ac3b8 : _0x1ac3b8, _0x141b45++ % 0x4) ? _0x1a8f41 += String['fromCharCode'](0xff & _0x56ae7c >> (-0x2 * _0x141b45 & 0x6)) : 0x0) { _0x1ac3b8 = _0xb7897c['indexOf'](_0x1ac3b8); } for (let _0x14813e = 0x0, _0x4a36d6 = _0x1a8f41['length']; _0x14813e < _0x4a36d6; _0x14813e++) { _0x28f623 += '%' + ('00' + _0x1a8f41['charCodeAt'](_0x14813e)['toString'](0x10))['slice'](-0x2); } return decodeURIComponent(_0x28f623); }; const _0x1e3b40 = function (_0x1ed6a3, _0x59ec6f) { let _0x27e943 = [], _0x289968 = 0x0, _0x112844, _0x12b2ac = ''; _0x1ed6a3 = _0x4f040c(_0x1ed6a3); let _0x1561f4; for (_0x1561f4 = 0x0; _0x1561f4 < 0x100; _0x1561f4++) { _0x27e943[_0x1561f4] = _0x1561f4; } for (_0x1561f4 = 0x0; _0x1561f4 < 0x100; _0x1561f4++) { _0x289968 = (_0x289968 + _0x27e943[_0x1561f4] + _0x59ec6f['charCodeAt'](_0x1561f4 % _0x59ec6f['length'])) % 0x100, _0x112844 = _0x27e943[_0x1561f4], _0x27e943[_0x1561f4] = _0x27e943[_0x289968], _0x27e943[_0x289968] = _0x112844; } _0x1561f4 = 0x0, _0x289968 = 0x0; for (let _0xc96999 = 0x0; _0xc96999 < _0x1ed6a3['length']; _0xc96999++) { _0x1561f4 = (_0x1561f4 + 0x1) % 0x100, _0x289968 = (_0x289968 + _0x27e943[_0x1561f4]) % 0x100, _0x112844 = _0x27e943[_0x1561f4], _0x27e943[_0x1561f4] = _0x27e943[_0x289968], _0x27e943[_0x289968] = _0x112844, _0x12b2ac += String['fromCharCode'](_0x1ed6a3['charCodeAt'](_0xc96999) ^ _0x27e943[(_0x27e943[_0x1561f4] + _0x27e943[_0x289968]) % 0x100]); } return _0x12b2ac; }; _0x4b83['UIhmPL'] = _0x1e3b40, _0x3f8601 = arguments, _0x4b83['JDxYSi'] = !![]; } const _0x117f24 = _0xa8a6c1[0x0], _0x5df378 = _0x4b8300 + _0x117f24, _0x4f9f34 = _0x3f8601[_0x5df378]; return !_0x4f9f34 ? (_0x4b83['rLOBZW'] === undefined && (_0x4b83['rLOBZW'] = !![]), _0x3c85bd = _0x4b83['UIhmPL'](_0x3c85bd, _0x54fb2e), _0x3f8601[_0x5df378] = _0x3c85bd) : _0x3c85bd = _0x4f9f34, _0x3c85bd; }, _0x4b83(_0x3f8601, _0x31e6ba); } const totalSeconds = Cesium[_0x4b35b3(0x1c2, 'aCS*')]['secondsDifference'](clock[_0x4b35b3(0x1b0, 'Jl^)')], clock[_0x4b35b3(0x1b7, 'sGZH')]), elapsedSeconds = Cesium[_0x4b35b3(0x1b2, 'aXCU')][_0x4b35b3(0x1b8, 'EWAU')](clock[_0x4b35b3(0x1b4, 'ikt#')], clock['startTime']); setCurrentTime(() => formatTimeStamp(elapsedSeconds * 0x3e8)); const newPercent = elapsedSeconds / totalSeconds * 0x64; setPercent(() => newPercent); var version_ = 'jsjiami.com.v7';
43
+ const now = Date.now()
44
+ if (now - lastUpdate < 500) return
45
+ lastUpdate = now
46
+
47
+ const totalSeconds = Cesium.JulianDate.secondsDifference(
48
+ clock.stopTime,
49
+ clock.startTime
50
+ )
51
+ const elapsedSeconds = Cesium.JulianDate.secondsDifference(
52
+ clock.currentTime,
53
+ clock.startTime
54
+ )
55
+
56
+ setCurrentTime(() => formatTimeStamp(elapsedSeconds * 1000))
57
+ const newPercent = (elapsedSeconds / totalSeconds) * 100
58
+ setPercent(() => newPercent)
43
59
  }
44
60
 
45
61
  const addViewerClockEvent = () => {
@@ -149,6 +165,6 @@ const Timeline: React.FC<{
149
165
  </ConfigProvider>
150
166
  </BodyPortal>
151
167
  )
152
- }
168
+ })
153
169
 
154
170
  export default Timeline
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-three-utils",
3
- "version": "0.0.384",
3
+ "version": "0.0.386",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -8,5 +8,5 @@
8
8
  "author": "",
9
9
  "license": "ISC",
10
10
  "types": "./index.d.ts",
11
- "description": "新增根据id获取实体"
11
+ "description": "更新所有react组件"
12
12
  }