Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@webarkit/jsartoolkit-nft

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webarkit/jsartoolkit-nft - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

js/one-euro-filter-ES6.js

0

.prettierc.json

@@ -0,0 +0,0 @@ {

@@ -32,2 +32,4 @@ var browser = (function () {

}
// Import OneEuroFilter class into the worker.
importScripts("./one-euro-filter.js");

@@ -53,2 +55,10 @@ self.onmessage = function (e) {

const WARM_UP_TOLERANCE = 5;
let tickCount = 0;
// initialize the OneEuroFilter
let filterMinCF = 0.0001;
let filterBeta = 0.01;
const filter = new OneEuroFilter({ minCutOff: filterMinCF, beta: filterBeta });
function load(msg) {

@@ -62,6 +72,10 @@ console.debug("Loading marker at: ", msg.marker);

ar.addEventListener("getNFTMarker", function (ev) {
markerResult = {
type: "found",
matrixGL_RH: JSON.stringify(ev.data.matrixGL_RH),
};
tickCount += 1;
if (tickCount > WARM_UP_TOLERANCE) {
var mat = filter.filter(Date.now(), ev.data.matrixGL_RH);
markerResult = {
type: "found",
matrixGL_RH: JSON.stringify(mat),
};
}
});

@@ -68,0 +82,0 @@

@@ -35,2 +35,5 @@ var browser = (function () {

// Import OneEuroFilter class into the worker.
importScripts("./one-euro-filter.js");
self.onmessage = function (e) {

@@ -61,2 +64,22 @@ var msg = e.data;

const WARM_UP_TOLERANCE = 5;
let tickCount = 0;
// initialize the OneEuroFilter
var oef = true;
let filterMinCF = 0.0001;
let filterBeta = 0.01;
const filter = new OneEuroFilter({ minCutOff: filterMinCF, beta: filterBeta });
function oefFilter(matrixGL_RH) {
tickCount += 1;
var mat;
if (tickCount > WARM_UP_TOLERANCE) {
mat = filter.filter(Date.now(), matrixGL_RH);
} else {
mat = matrixGL_RH;
}
return mat;
}
function load(msg) {

@@ -75,8 +98,18 @@ console.debug("Loading marker at: ", msg.marker);

ar.addEventListener("getNFTMarker", function (ev) {
var mat;
if (oef == true) {
mat = oefFilter(ev.data.matrixGL_RH)
} else {
mat = ev.data.matrixGL_RH
}
markerResult = {
type: "found",
matrixGL_RH: JSON.stringify(ev.data.matrixGL_RH),
matrixGL_RH: JSON.stringify(mat),
};
});
ar.addEventListener("lostNFTMarker", function (ev) {
filter.reset();
});
ar.loadNFTMarker(msg.marker, function (id) {

@@ -83,0 +116,0 @@ ar.trackNFTMarkerId(id);

2

js/artoolkitNFT_ES6.api.js

@@ -61,3 +61,3 @@ var scope;

this.version = '1.4.0';
this.version = '1.4.1';
console.info('JsartoolkitNFT ', this.version);

@@ -64,0 +64,0 @@

@@ -32,2 +32,4 @@ var browser = (function () {

}
// Import OneEuroFilter class into the worker.
importScripts("./one-euro-filter.js");

@@ -53,2 +55,25 @@ self.onmessage = function (e) {

const WARM_UP_TOLERANCE = 5;
let tickCount = 0;
// initialize the OneEuroFilter
var oef = true;
let filterMinCF = 0.0001;
let filterBeta = 0.01;
const filter = new OneEuroFilter({
minCutOff: filterMinCF,
beta: filterBeta
});
function oefFilter(matrixGL_RH) {
tickCount += 1;
var mat;
if (tickCount > WARM_UP_TOLERANCE) {
mat = filter.filter(Date.now(), matrixGL_RH);
} else {
mat = matrixGL_RH;
}
return mat;
}
function load(msg) {

@@ -62,8 +87,18 @@ console.debug("Loading marker at: ", msg.marker);

ar.addEventListener("getNFTMarker", function (ev) {
var mat;
if (oef == true) {
mat = oefFilter(ev.data.matrixGL_RH)
} else {
mat = ev.data.matrixGL_RH
}
markerResult = {
type: "found",
matrixGL_RH: JSON.stringify(ev.data.matrixGL_RH),
matrixGL_RH: JSON.stringify(mat),
};
});
ar.addEventListener("lostNFTMarker", function (ev) {
filter.reset();
});
ar.loadNFTMarker(msg.marker, function (id) {

@@ -73,5 +108,11 @@ ar.trackNFTMarkerId(id);

console.log("nftMarker data: ", marker);
postMessage({ type: "markerInfos", marker: marker });
postMessage({
type: "markerInfos",
marker: marker
});
console.log("loadNFTMarker -> ", id);
postMessage({ type: "endLoading", end: true });
postMessage({
type: "endLoading",
end: true
});
}).catch(function (err) {

@@ -81,3 +122,6 @@ console.log("Error in loading marker on Worker", err);

postMessage({ type: "loaded", proj: JSON.stringify(cameraMatrix) });
postMessage({
type: "loaded",
proj: JSON.stringify(cameraMatrix)
});
};

@@ -93,6 +137,6 @@

ARToolkitNFT.ARControllerNFT.initWithDimensions(
msg.pw,
msg.ph,
msg.camera_para
)
msg.pw,
msg.ph,
msg.camera_para
)
.then(onLoad)

@@ -112,6 +156,8 @@ .catch(onError);

} else {
postMessage({ type: "not found" });
postMessage({
type: "not found"
});
}
next = null;
}
}

@@ -32,2 +32,4 @@ var browser = (function () {

}
// Import OneEuroFilter class into the worker.
importScripts("./one-euro-filter.js");

@@ -53,2 +55,10 @@ self.onmessage = function (e) {

const WARM_UP_TOLERANCE = 5;
let tickCount = 0;
// initialize the OneEuroFilter
let filterMinCF = 0.0001;
let filterBeta = 0.01;
const filter = new OneEuroFilter({minCutOff: filterMinCF, beta: filterBeta});
function load(msg) {

@@ -62,9 +72,17 @@ console.debug("Loading marker at: ", msg.marker);

ar.addEventListener("getNFTMarker", function (ev) {
markerResult = {
type: "found",
index: JSON.stringify(ev.data.index),
matrixGL_RH: JSON.stringify(ev.data.matrixGL_RH),
};
tickCount += 1;
if (tickCount > WARM_UP_TOLERANCE) {
var mat = filter.filter(Date.now(), ev.data.matrixGL_RH);
markerResult = {
type: "found",
index: JSON.stringify(ev.data.index),
matrixGL_RH: JSON.stringify(mat),
};
}
});
ar.addEventListener("lostNFTMarker", function(ev) {
filter.reset();
});
ar.loadNFTMarkers(msg.marker, function (ids) {

@@ -71,0 +89,0 @@ for (var i = 0; i < ids.length; i++) {

@@ -64,3 +64,3 @@ ; (function () {

this.version = '1.4.0';
this.version = '1.4.1';
console.info('JsartoolkitNFT ', this.version);

@@ -67,0 +67,0 @@ console.warn("This library is deprecated, use the ES6 version instead!! It will be removed in a future release.")

import ARToolkitNFT from "../build/artoolkitNFT_embed_ES6_wasm.js";
// Import OneEuroFilter class into the worker.
import { OneEuroFilter } from "./one-euro-filter-ES6.js"

@@ -23,2 +25,22 @@ self.onmessage = function (e) {

const WARM_UP_TOLERANCE = 5;
let tickCount = 0;
// initialize the OneEuroFilter
var oef = true;
let filterMinCF = 0.0001;
let filterBeta = 0.01;
const filter = new OneEuroFilter({ minCutOff: filterMinCF, beta: filterBeta });
function oefFilter(matrixGL_RH) {
tickCount += 1;
var mat;
if (tickCount > WARM_UP_TOLERANCE) {
mat = filter.filter(Date.now(), matrixGL_RH);
} else {
mat = matrixGL_RH;
}
return mat;
}
async function load(msg) {

@@ -36,8 +58,18 @@ const arTK = await ARToolkitNFT();

ar.addEventListener("getNFTMarker", function (ev) {
var mat;
if (oef == true) {
mat = oefFilter(ev.data.matrixGL_RH)
} else {
mat = ev.data.matrixGL_RH
}
markerResult = {
type: "found",
matrixGL_RH: JSON.stringify(ev.data.matrixGL_RH),
matrixGL_RH: JSON.stringify(mat),
};
});
ar.addEventListener("lostNFTMarker", function (ev) {
filter.reset();
});
ar.loadNFTMarker(msg.marker, function (id) {

@@ -44,0 +76,0 @@ ar.trackNFTMarkerId(id);

@@ -32,2 +32,4 @@ var browser = (function () {

}
// Import OneEuroFilter class into the worker.
importScripts("./one-euro-filter.js");

@@ -54,2 +56,10 @@ self.onmessage = function (e) {

const WARM_UP_TOLERANCE = 5;
let tickCount = 0;
// initialize the OneEuroFilter
let filterMinCF = 0.0001;
let filterBeta = 0.01;
const filter = new OneEuroFilter({minCutOff: filterMinCF, beta: filterBeta});
function load(msg) {

@@ -64,9 +74,17 @@ self.addEventListener("artoolkitNFT-loaded", function () {

ar.addEventListener("getNFTMarker", function (ev) {
markerResult = {
type: "found",
index: JSON.stringify(ev.data.index),
matrixGL_RH: JSON.stringify(ev.data.matrixGL_RH),
};
tickCount += 1;
if (tickCount > WARM_UP_TOLERANCE) {
var mat = filter.filter(Date.now(), ev.data.matrixGL_RH);
markerResult = {
type: "found",
index: JSON.stringify(ev.data.index),
matrixGL_RH: JSON.stringify(mat),
};
}
});
ar.addEventListener("lostNFTMarker", function(ev) {
filter.reset();
});
ar.loadNFTMarkers(msg.marker, function (ids) {

@@ -73,0 +91,0 @@ for (var i = 0; i < ids.length; i++) {

@@ -32,2 +32,4 @@ var browser = (function () {

}
// Import OneEuroFilter class into the worker.
importScripts("./one-euro-filter.js");

@@ -54,2 +56,10 @@ self.onmessage = function (e) {

const WARM_UP_TOLERANCE = 5;
let tickCount = 0;
// initialize the OneEuroFilter
let filterMinCF = 0.0001;
let filterBeta = 0.01;
const filter = new OneEuroFilter({minCutOff: filterMinCF, beta: filterBeta});
function load(msg) {

@@ -64,8 +74,16 @@ self.addEventListener("artoolkitNFT-loaded", function () {

ar.addEventListener("getNFTMarker", function (ev) {
markerResult = {
type: "found",
matrixGL_RH: JSON.stringify(ev.data.matrixGL_RH),
};
tickCount += 1;
if (tickCount > WARM_UP_TOLERANCE) {
var mat = filter.filter(Date.now(), ev.data.matrixGL_RH);
markerResult = {
type: "found",
matrixGL_RH: JSON.stringify(mat),
};
}
});
ar.addEventListener("lostNFTMarker", function(ev) {
filter.reset();
});
ar.loadNFTMarker(msg.marker, function (id) {

@@ -72,0 +90,0 @@ ar.trackNFTMarkerId(id);

@@ -0,0 +0,0 @@ GNU LESSER GENERAL PUBLIC LICENSE

{
"name": "@webarkit/jsartoolkit-nft",
"version": "1.4.0",
"version": "1.4.1",
"main": "dist/ARToolkitNFT.js",

@@ -39,3 +39,3 @@ "types": "types/src/index.d.ts",

"devDependencies": {
"@babel/core": "^7.21.0",
"@babel/core": "^7.21.3",
"@babel/plugin-transform-runtime": "^7.21.0",

@@ -48,8 +48,8 @@ "@babel/preset-env": "^7.20.2",

"karma-qunit": "^4.1.2",
"prettier": "^2.8.4",
"prettier": "^2.8.7",
"qunit": "^2.19.4",
"ts-loader": "^9.4.2",
"typedoc": "^0.23.26",
"typescript": "^4.9.5",
"webpack": "^5.75.0",
"typedoc": "^0.23.28",
"typescript": "^5.0.2",
"webpack": "^5.76.3",
"webpack-cli": "^5.0.1"

@@ -56,0 +56,0 @@ },

@@ -0,0 +0,0 @@ ![github releases](https://flat.badgen.net/github/release/webarkit/jsartoolkitNFT)

@@ -0,0 +0,0 @@ import { IImageObj } from "./CommonInterfaces";

@@ -0,0 +0,0 @@ import { INFTMarkerInfo } from "./CommonInterfaces";

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ {

export default Module;
declare function Module(Module?: {}): any;
export default Module;
declare function Module(Module?: {}): any;

@@ -0,0 +0,0 @@ import { IImageObj } from "./CommonInterfaces";

@@ -0,0 +0,0 @@ export interface IImageObj extends HTMLCanvasElement {

@@ -0,0 +0,0 @@ import { INFTMarkerInfo } from "./CommonInterfaces";

@@ -0,0 +0,0 @@ import { INFTMarkerInfo, IImageObj, INFTMarker } from "./abstractions/CommonInterfaces";

@@ -0,0 +0,0 @@ import { INFTMarkerInfo, IImageObj, INFTMarker } from "./abstractions/CommonInterfaces";

@@ -0,0 +0,0 @@ import { IARToolkitNFT } from "./abstractions/IARToolkitNFT";

@@ -0,0 +0,0 @@ import { IARToolkitNFT } from "./abstractions/IARToolkitNFT";

@@ -0,0 +0,0 @@ import ARToolkitNFT from "./ARToolkitNFT_simd";

@@ -0,0 +0,0 @@ import ARToolkitNFT from "./ARToolkitNFT";

@@ -0,0 +0,0 @@ export default class Utils {

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 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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc