Augmented Reality and Cesium

My bad check now I changed it to public

1 Like

I did some digging in documention and it looks like cesium has built-in functions to build AR. In Cardboard VR demo tho not a lot is given in documention about VR I guess it gets the Gyro values and matches to camera which does the rotation. Just need to get the accelerometer values and match to the cesium camera it will take care of the camera zooming in/out and slide left/right.

Accessing accelerometer is simple

let acl = new Accelerometer({frequency: 60});

acl.addEventListener('reading', () => {
  console.log("Acceleration along the X-axis " + acl.x);
  console.log("Acceleration along the Y-axis " + acl.y);
  console.log("Acceleration along the Z-axis " + acl.z);
});

acl.start();

I guess we have filter the unwanted noise from the accelerometer to reduce unwanted shakes. just a half way more

Take the VR demo remove splitscreen
Replace with camera background as above
Then add accelerometer

1 Like

This feature is so cool, how did it achieve it? I didn’t seem to have this feature on that website.

@cqliao

I think working through suggestions on this thread would be a great place to start! Maybe @Adrian_Onsen has a repository that they can share with you to help you get started.

-Sam

1 Like

Thanks.I am also looking forward to the official cesium webxr coming out

1 Like

@cqliao

Likewise! We will be sure to keep the community up to date :grinning: :rocket:

-Sam