@zappar/zappar
Advanced tools
Comparing version 0.3.13 to 0.3.14
# Changelog | ||
## [0.3.14] - 2021-09-22 | ||
### Added | ||
- loaded() function which returns true once the library is fully loaded and available for use | ||
- loadedPromise() function which returns a promise that resolves once the library is fully loaded and available for use | ||
### Changed | ||
- Bucket 172.* IP address range into one license check. | ||
### Fixed | ||
- Issues with other browsers on iOS, including social browsers | ||
## [0.3.13] - 2021-08-20 | ||
@@ -4,0 +18,0 @@ |
@@ -14,2 +14,2 @@ export { ImageTracker, ImageAnchor } from "./imagetracker"; | ||
export { Event, Event1 } from "./event"; | ||
export { cameraDefaultDeviceID, invert, drawPlane, projectionMatrixFromCameraModel, browserIncompatible, browserIncompatibleUI } from "./zappar"; | ||
export { cameraDefaultDeviceID, invert, drawPlane, projectionMatrixFromCameraModel, browserIncompatible, browserIncompatibleUI, loaded, loadedPromise } from "./zappar"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.browserIncompatibleUI = exports.browserIncompatible = exports.projectionMatrixFromCameraModel = exports.drawPlane = exports.invert = exports.cameraDefaultDeviceID = exports.Event1 = exports.Event = exports.logLevel = exports.setLogLevel = exports.LogLevel = exports.Permission = exports.permissionRequestUI = exports.permissionRequest = exports.permissionDenied = exports.permissionGranted = exports.permissionDeniedUI = exports.FaceLandmark = exports.FaceLandmarkName = exports.Pipeline = exports.HTMLElementSource = exports.CameraSource = exports.FaceMesh = exports.FaceTracker = exports.BarcodeFinder = exports.InstantWorldTracker = exports.ImageTracker = void 0; | ||
exports.loadedPromise = exports.loaded = exports.browserIncompatibleUI = exports.browserIncompatible = exports.projectionMatrixFromCameraModel = exports.drawPlane = exports.invert = exports.cameraDefaultDeviceID = exports.Event1 = exports.Event = exports.logLevel = exports.setLogLevel = exports.LogLevel = exports.Permission = exports.permissionRequestUI = exports.permissionRequest = exports.permissionDenied = exports.permissionGranted = exports.permissionDeniedUI = exports.FaceLandmark = exports.FaceLandmarkName = exports.Pipeline = exports.HTMLElementSource = exports.CameraSource = exports.FaceMesh = exports.FaceTracker = exports.BarcodeFinder = exports.InstantWorldTracker = exports.ImageTracker = void 0; | ||
var imagetracker_1 = require("./imagetracker"); | ||
@@ -44,1 +44,3 @@ Object.defineProperty(exports, "ImageTracker", { enumerable: true, get: function () { return imagetracker_1.ImageTracker; } }); | ||
Object.defineProperty(exports, "browserIncompatibleUI", { enumerable: true, get: function () { return zappar_1.browserIncompatibleUI; } }); | ||
Object.defineProperty(exports, "loaded", { enumerable: true, get: function () { return zappar_1.loaded; } }); | ||
Object.defineProperty(exports, "loadedPromise", { enumerable: true, get: function () { return zappar_1.loadedPromise; } }); |
/** | ||
* SDK version. | ||
*/ | ||
export declare const VERSION = "0.3.13"; | ||
export declare const VERSION = "0.3.14"; |
@@ -7,2 +7,2 @@ "use strict"; | ||
*/ | ||
exports.VERSION = "0.3.13"; | ||
exports.VERSION = "0.3.14"; |
@@ -20,3 +20,3 @@ import { Zappar } from "@zappar/zappar-cv"; | ||
/** | ||
* Calculates the projection matrix from a given camera model (i.e. intrinsic camera parameters)≥ | ||
* Calculates the projection matrix from a given camera model (i.e. intrinsic camera parameters) | ||
* @param model - The camera model. | ||
@@ -45,1 +45,15 @@ * @param renderWidth - The width of the canvas. | ||
export declare function browserIncompatibleUI(): void; | ||
/** | ||
* Check if the Zappar library is fully loaded and ready to process data. | ||
* Note that you can still use the full API before this function returns true - it's here to help implement loading screens. | ||
* | ||
* @returns 'true' if the library is fully loaded. | ||
*/ | ||
export declare function loaded(): boolean; | ||
/** | ||
* Gets a promise that resolves when the Zappar library is fully loaded and ready to process data. | ||
* Note that you can still use the full API before this promise is resolved - it's here to help implement loading screens. | ||
* | ||
* @returns a promise that resolves when the library is fully loaded. | ||
*/ | ||
export declare function loadedPromise(): Promise<void>; |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.browserIncompatibleUI = exports.browserIncompatible = exports.drawPlane = exports.projectionMatrixFromCameraModel = exports.invert = exports.cameraDefaultDeviceID = exports.z = void 0; | ||
exports.loadedPromise = exports.loaded = exports.browserIncompatibleUI = exports.browserIncompatible = exports.drawPlane = exports.projectionMatrixFromCameraModel = exports.invert = exports.cameraDefaultDeviceID = exports.z = void 0; | ||
const zappar_cv_1 = require("@zappar/zappar-cv"); | ||
@@ -41,3 +50,3 @@ const gl_matrix_1 = require("gl-matrix"); | ||
/** | ||
* Calculates the projection matrix from a given camera model (i.e. intrinsic camera parameters)≥ | ||
* Calculates the projection matrix from a given camera model (i.e. intrinsic camera parameters) | ||
* @param model - The camera model. | ||
@@ -78,1 +87,30 @@ * @param renderWidth - The width of the canvas. | ||
exports.browserIncompatibleUI = browserIncompatibleUI; | ||
/** | ||
* Check if the Zappar library is fully loaded and ready to process data. | ||
* Note that you can still use the full API before this function returns true - it's here to help implement loading screens. | ||
* | ||
* @returns 'true' if the library is fully loaded. | ||
*/ | ||
function loaded() { | ||
return z().loaded(); | ||
} | ||
exports.loaded = loaded; | ||
/** | ||
* Gets a promise that resolves when the Zappar library is fully loaded and ready to process data. | ||
* Note that you can still use the full API before this promise is resolved - it's here to help implement loading screens. | ||
* | ||
* @returns a promise that resolves when the library is fully loaded. | ||
*/ | ||
function loadedPromise() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
while (true) { | ||
if (loaded()) | ||
return; | ||
yield delay(50); | ||
} | ||
}); | ||
} | ||
exports.loadedPromise = loadedPromise; | ||
function delay(ms) { | ||
return new Promise(resolve => setTimeout(resolve, ms)); | ||
} |
{ | ||
"name": "@zappar/zappar", | ||
"version": "0.3.13", | ||
"version": "0.3.14", | ||
"description": "Zappar's computer vision for JavaScript, supporting image, face and instant world tracking, and barcode scanning.", | ||
@@ -54,4 +54,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@zappar/zappar-cv": "^0.3.9" | ||
"@zappar/zappar-cv": "^0.3.11" | ||
} | ||
} |
@@ -61,3 +61,3 @@ # Zappar for JavaScript/TypeScript | ||
<!-- Added by: zapparadmin, at: Fri Aug 20 15:58:02 BST 2021 --> | ||
<!-- Added by: zapparadmin, at: Wed Sep 22 12:05:34 BST 2021 --> | ||
@@ -74,3 +74,3 @@ <!--te--> | ||
Download the bundle from this link: | ||
https://libs.zappar.com/zappar-js/0.3.13/zappar-js.zip | ||
https://libs.zappar.com/zappar-js/0.3.14/zappar-js.zip | ||
@@ -86,3 +86,3 @@ Unzip into your web project and reference from your HTML like this: | ||
```html | ||
<script src="https://libs.zappar.com/zappar-js/0.3.13/zappar.js"></script> | ||
<script src="https://libs.zappar.com/zappar-js/0.3.14/zappar.js"></script> | ||
``` | ||
@@ -89,0 +89,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
6387350
2460
Updated@zappar/zappar-cv@^0.3.11