Преглед изворни кода

Clock, Timer: drop support for "Date.now" (#29233)

* Clock: drop support for "Date.now"

* Timer: drop support for "Date.now"
satelllte пре 1 година
родитељ
комит
f833405ca7
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      examples/jsm/misc/Timer.js
  2. 1 1
      src/core/Clock.js

+ 1 - 1
examples/jsm/misc/Timer.js

@@ -115,7 +115,7 @@ class FixedTimer extends Timer {
 
 function now() {
 
-	return ( typeof performance === 'undefined' ? Date : performance ).now();
+	return performance.now();
 
 }
 

+ 1 - 1
src/core/Clock.js

@@ -67,7 +67,7 @@ class Clock {
 
 function now() {
 
-	return ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732
+	return performance.now();
 
 }
 

粤ICP备19079148号