README.md 729 字节
Newer Older
J
Jerome Etienne 已提交
1 2
Example of AR.js on babylon.js

J
Jerome Etienne 已提交
3 4 5 6 7 8 9 10 11 12
# ARBJS
Proof of Concept connecting Augmented Reality to Babylon.js for first time with AR.js

The index should run in a local server. 

It includes ar.js with customizations in Matrix math.

There is a single line of code that splices the two environments together so that both Three.js and Babylon run AR.js simultaneously.

That line of code is this:
J
Jerome Etienne 已提交
13
cameraB.computedViewMatrix = new BABYLON.Matrix.FromArray(markerObject3D.matrix.toArray()); //SPLICE-FINAL! 
J
Jerome Etienne 已提交
14 15 16 17 18 19 20 21

In the index file you will find two boilerplate examples. 1st Babylon which populates the cameraB variable.

Second, an AR template rendering a threeJS knot from AR.js.

MIT license. Free to use, extend, reuse. No Warranty.

Cheers.