How to get access to interpolationFactor in ARnft? #327
-
Hi! I cannot edit interpolationFactor, while in the react-three-arnft library interpolationFactor can be changed for Or I can edit it only without ARnft class as in the example: https://kalwalt.github.io/jsartoolkit5/examples/nft_improved_worker/main_threejs_wasm_worker.html import * as THREE from "three";
import { ARnft } from "@webarkit/ar-nft";
import ARnftThreejs from "@webarkit/arnft-threejs";
let width = window.innerWidth;
let height = window.innerHeight;
ARnft.init(
width,
height,
[["/DataNFT/pinball"]],
[["pinball"]],
"/configs/config.json",
0
)
.then((nft) => {
document.addEventListener("containerEvent", function (ev) {
let canvas = document.getElementById("canvas");
let fov = (0.8 * 180) / Math.PI;
let ratio = width / height;
let config = {
renderer: {
alpha: true,
antialias: true,
context: null,
precision: "mediump",
premultipliedAlpha: true,
stencil: true,
depth: true,
logarithmicDepthBuffer: true,
},
camera: {
fov: fov,
ratio: ratio,
near: 0.01,
far: 1000,
},
};
let sceneThreejs = new ARnftThreejs.SceneRendererTJS(
config,
canvas,
nft.uuid,
true
);
sceneThreejs.initRenderer();
let nftAddTJS = new ARnftThreejs.NFTaddTJS(nft.uuid);
let imgConfig = { w: 1, h: 1, ws: 1, hs: 1 };
nftAddTJS.addImage(
"https://cdn.culture.ru/c/641257.jpg",
"pinball",
0xbbbbff,
180,
imgConfig,
false
);
const tick = () => {
sceneThreejs.draw();
window.requestAnimationFrame(tick);
};
tick();
});
})
.catch((error) => {
console.log(error);
}); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
HI @v-litvintsev ARnft don't use interpoaltionFactor because use One Euro Filtering routine instead, Anyway you can't edit via parameters, sorry i haven't added this feature yet, definetely a must. I will move this discussion to the issue tracker so i can keep track of this. Lines 89 to 90 in bb68831 You need to build the libs for every changes. Not an handy solution.. |
Beta Was this translation helpful? Give feedback.
HI @v-litvintsev ARnft don't use interpoaltionFactor because use One Euro Filtering routine instead, Anyway you can't edit via parameters, sorry i haven't added this feature yet, definetely a must. I will move this discussion to the issue tracker so i can keep track of this.
Of course you can modify the values in the Worker.ts
ARnft/src/Worker.ts
Lines 89 to 90 in bb68831
You need to build the libs for every changes. Not an handy solution..