@loaders.gl/loader-utils
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -6,3 +6,3 @@ import type { LoaderWithParser } from '../../loader-types'; | ||
*/ | ||
export declare function createLoaderWorker(loader: LoaderWithParser): void; | ||
export declare function createLoaderWorker(loader: LoaderWithParser): Promise<void>; | ||
//# sourceMappingURL=create-loader-worker.d.ts.map |
import { WorkerBody } from '@loaders.gl/worker-utils'; | ||
let requestId = 0; | ||
export function createLoaderWorker(loader) { | ||
if (!WorkerBody.inWorkerThread()) { | ||
export async function createLoaderWorker(loader) { | ||
if (!(await WorkerBody.inWorkerThread())) { | ||
return; | ||
@@ -6,0 +6,0 @@ } |
{ | ||
"name": "@loaders.gl/loader-utils", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Framework-independent loaders for 3D graphics formats", | ||
@@ -50,6 +50,6 @@ "license": "MIT", | ||
"@babel/runtime": "^7.3.1", | ||
"@loaders.gl/worker-utils": "4.0.1", | ||
"@loaders.gl/worker-utils": "4.0.2", | ||
"@probe.gl/stats": "^4.0.2" | ||
}, | ||
"gitHead": "765e5a26a6bf3f2cc02cabffc4a1e3665ec92a53" | ||
"gitHead": "471058d109d5652f28c32c1f296fd632f9a5c806" | ||
} |
@@ -33,2 +33,3 @@ // loaders.gl, MIT license | ||
// TODO - move to loaders.gl/polyfills | ||
if (typeof Buffer !== 'undefined' && binaryData instanceof ArrayBuffer) { | ||
@@ -35,0 +36,0 @@ return Buffer.from(binaryData); |
@@ -12,5 +12,5 @@ /* eslint-disable no-restricted-globals */ | ||
*/ | ||
export function createLoaderWorker(loader: LoaderWithParser) { | ||
export async function createLoaderWorker(loader: LoaderWithParser) { | ||
// Check that we are actually in a worker thread | ||
if (!WorkerBody.inWorkerThread()) { | ||
if (!(await WorkerBody.inWorkerThread())) { | ||
return; | ||
@@ -17,0 +17,0 @@ } |
@@ -37,4 +37,2 @@ // loaders.gl, MIT license | ||
// encodeText?: EncodeText; | ||
// encode?: Encode; | ||
encode?(data: DataT, options?: WriterOptionsT): Promise<ArrayBuffer>; | ||
@@ -41,0 +39,0 @@ encodeSync?(data: DataT, options?: WriterOptionsT): ArrayBuffer; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
436305
6442
+ Added@loaders.gl/worker-utils@4.0.2(transitive)
- Removed@loaders.gl/worker-utils@4.0.1(transitive)