@zappar/zappar-cv
Advanced tools
Comparing version 2.1.1 to 2.1.3-beta.1
import { mat4, vec3 } from "gl-matrix"; | ||
import { profile } from "./profile"; | ||
export function projectionMatrix(params, screenWidth, screenHeight, near = 0.01, far = 100.0) { | ||
@@ -44,3 +45,3 @@ let cam_x = params[2] * 2; | ||
export function cameraRotationForScreenOrientation(isUserFacing) { | ||
if (window.screen.orientation) { | ||
if (window.screen.orientation && !profile.forceWindowOrientation) { | ||
switch (window.screen.orientation.type) { | ||
@@ -47,0 +48,0 @@ case "portrait-primary": |
@@ -0,1 +1,2 @@ | ||
import { profile } from "./profile"; | ||
import { compileShader, linkProgram } from "./shader"; | ||
@@ -126,3 +127,3 @@ import { mat4, vec3 } from "gl-matrix"; | ||
function cameraRotationForScreenOrientation() { | ||
if (window.screen.orientation) { | ||
if (window.screen.orientation && !profile.forceWindowOrientation) { | ||
switch (window.screen.orientation.type) { | ||
@@ -129,0 +130,0 @@ case "portrait-primary": |
@@ -19,2 +19,3 @@ export declare enum EmbeddedVideoImplementation { | ||
ios164CameraSelection: boolean; | ||
forceWindowOrientation: boolean; | ||
}; |
@@ -20,3 +20,4 @@ import * as UAParser from "ua-parser-js"; | ||
preferImageBitmapCamera: false, | ||
ios164CameraSelection: false | ||
ios164CameraSelection: false, | ||
forceWindowOrientation: false, | ||
}; | ||
@@ -50,2 +51,3 @@ if (typeof window !== "undefined") { | ||
function iDevice(version) { | ||
profile.forceWindowOrientation = true; | ||
let versionParts = version.split("."); | ||
@@ -52,0 +54,0 @@ if (versionParts.length >= 2) { |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.1.1"; | ||
export declare const VERSION = "2.1.3-beta.1"; |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "2.1.1"; | ||
export const VERSION = "2.1.3-beta.1"; |
{ | ||
"name": "@zappar/zappar-cv", | ||
"version": "2.1.1", | ||
"version": "2.1.3-beta.1", | ||
"description": "Zappar's core computer vision library, supporting image, face and world tracking.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -21,6 +21,6 @@ # Zappar CV | ||
``` | ||
<script src="https://libs.zappar.com/zappar-cv/2.1.1/zappar-cv.js"></script> | ||
<script src="https://libs.zappar.com/zappar-cv/2.1.3-beta.1/zappar-cv.js"></script> | ||
``` | ||
Or you can download and host our standalone JavaScript bundle: | ||
[https://libs.zappar.com/zappar-cv/2.1.1/zappar-cv.zip](https://libs.zappar.com/zappar-cv/2.1.1/zappar-cv.zip) | ||
[https://libs.zappar.com/zappar-cv/2.1.3-beta.1/zappar-cv.zip](https://libs.zappar.com/zappar-cv/2.1.3-beta.1/zappar-cv.zip) |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
15079370
563
9312
2