@lottiefiles/dotlottie-web
Advanced tools
Comparing version 0.12.1 to 0.12.2
@@ -7,3 +7,2 @@ var __defProp = Object.defineProperty; | ||
}; | ||
var IS_NODE = typeof global !== "undefined"; | ||
@@ -43,3 +42,3 @@ // src/animation-frame-manager.ts | ||
__publicField(this, "_strategy"); | ||
this._strategy = IS_NODE ? new NodeAnimationFrameStrategy() : new WebAnimationFrameStrategy(); | ||
this._strategy = typeof requestAnimationFrame === "function" ? new WebAnimationFrameStrategy() : new NodeAnimationFrameStrategy(); | ||
} | ||
@@ -46,0 +45,0 @@ requestAnimationFrame(callback) { |
@@ -5,7 +5,5 @@ /** | ||
declare const IS_BROWSER: boolean; | ||
declare const IS_WEB_WORKER: boolean; | ||
declare const IS_NODE: boolean; | ||
declare const MS_TO_SEC_FACTOR = 1000; | ||
declare const DEFAULT_BG_COLOR = "#00000000"; | ||
export { DEFAULT_BG_COLOR, IS_BROWSER, IS_NODE, IS_WEB_WORKER, MS_TO_SEC_FACTOR }; | ||
export { DEFAULT_BG_COLOR, IS_BROWSER, MS_TO_SEC_FACTOR }; |
// src/constants.ts | ||
var IS_BROWSER = typeof window !== "undefined" && typeof window.document !== "undefined"; | ||
var IS_WEB_WORKER = typeof self !== "undefined" && typeof Window === "undefined"; | ||
var IS_NODE = typeof global !== "undefined"; | ||
var MS_TO_SEC_FACTOR = 1e3; | ||
var DEFAULT_BG_COLOR = "#00000000"; | ||
export { DEFAULT_BG_COLOR, IS_BROWSER, IS_NODE, IS_WEB_WORKER, MS_TO_SEC_FACTOR }; | ||
export { DEFAULT_BG_COLOR, IS_BROWSER, MS_TO_SEC_FACTOR }; |
{ | ||
"name": "@lottiefiles/dotlottie-web", | ||
"version": "0.12.1", | ||
"version": "0.12.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Lottie and DotLottie player for the web", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
723072
12688