alanross / AlvaAR

World tracking for WebAR. A Javascript library for Augmented Reality to run SLAM in the browser.
GNU General Public License v3.0
349 stars 73 forks source link

Can you put a three.js example. #4

Closed kordou closed 1 year ago

kordou commented 1 year ago

Hi, thanks for this great lib,

i am trying to run the THREE..Js but i can unresolved promish..

this.alva = await AlvaAR.Initialize(this.THREE);
this.applyPose = AlvaARConnectorTHREE.Initialize(this.THREE);

this.addToAnimLoop(() => {
  this.imageData = ctx.getImageData(0, 0, this.width, this.height);
  this.pose = alva.findCameraPose(this.imageData);

  if (this.pose)
    this.applyPose(this.pose, this.camera.quaternion, this.camera.position);
});

could you write a simple three.js with a cube in order to understant the setup ?

thank you

alanross commented 1 year ago

@kordou Have you had a look at the examples here?