├── .gitattributes ├── README.md ├── barcode.html ├── basic-scene.html ├── chemistry.html ├── clipping-planes.html ├── css └── index.css ├── custom-patterns.html ├── data ├── camera_para.dat ├── hiro.patt ├── kanji.patt ├── letterA.patt ├── letterB.patt ├── letterC.patt ├── letterD.patt ├── letterF.patt └── letterG.patt ├── globe-multi-marker.html ├── globe.html ├── hello-cube.html ├── hole-box.html ├── hole-plane.html ├── hole-ring.html ├── images ├── arrow-curved.png ├── arrow-double.png ├── arrow-single.png ├── basketball-gray.png ├── basketball.png ├── beach │ ├── negx.jpg │ ├── negy.jpg │ ├── negz.jpg │ ├── posx.jpg │ ├── posy.jpg │ ├── posz.jpg │ └── readme.txt ├── border.png ├── chemistry │ ├── border.png │ ├── card-C.png │ ├── card-Cl.png │ ├── card-H.png │ ├── card-N.png │ ├── card-Na.png │ ├── card-O.png │ ├── card-Si.png │ ├── card-template-GIMP.xcf │ ├── label-C.png │ ├── label-H.png │ ├── label-N.png │ ├── label-O.png │ ├── label-template-GIMP.xcf │ ├── shadow-0.png │ ├── shadow-1.png │ ├── shadow-2.png │ ├── shadow-3.png │ ├── shadow-4.png │ ├── shadow-5.png │ ├── shadow-6.png │ ├── shadow-7.png │ └── shadow-8.png ├── church │ ├── negx.jpg │ ├── negy.jpg │ ├── negz.jpg │ ├── posx.jpg │ ├── posy.jpg │ ├── posz.jpg │ └── readme.txt ├── color-grid.png ├── demo │ ├── basic-scene.png │ ├── camera-movement.png │ ├── clipping-planes.png │ ├── custom-patterns.png │ ├── globe-multi-marker-large.png │ ├── globe-multi-marker.png │ ├── globe.png │ ├── hello-cube.png │ ├── hole-box.png │ ├── hole-ring.png │ ├── magic-cube.png │ ├── mesh-movement.png │ ├── model.png │ ├── parabolic-path.png │ ├── portal-half-keyboard-test.png │ ├── portal-view-AR-large.png │ ├── portal-view-AR.png │ ├── portal-view-large.png │ ├── portal-view.png │ ├── refraction.png │ ├── shader.png │ ├── shadow-balls.png │ ├── shadow.png │ ├── stencil-test.png │ ├── texture.png │ ├── video.png │ ├── water-effect-AR.png │ └── water-effect.png ├── earth-sphere.jpg ├── earth.jpg ├── field-sphere.jpg ├── glow.png ├── key-blank.png ├── mountain │ ├── negx.jpg │ ├── negy.jpg │ ├── negz.jpg │ ├── posx.jpg │ ├── posy.jpg │ ├── posz.jpg │ └── readme.txt ├── movement-controls.png ├── noise.jpg ├── pixels.png ├── sand.jpg ├── scene-sphere-outside.jpg ├── scene-sphere-room.jpg ├── sphere-colored.png ├── sphere-pos-neg.png ├── tiles.jpg ├── water-2.jpg ├── water.jpg ├── xneg.png ├── xpos.png ├── yneg.png ├── ypos.png ├── zneg.png └── zpos.png ├── index.html ├── js ├── LoaderSupport.js ├── MTLLoader.js ├── OBJLoader.js ├── ar.js ├── dat.gui.min.js ├── keyboard.js ├── stats.min.js └── three.js ├── jsartoolkit5 ├── artoolkit.api.js ├── artoolkit.debug.js ├── artoolkit.min.js └── artoolkit.three.js ├── keyboard-camera-move.html ├── keyboard-mesh-move.html ├── keyboard.html ├── magic-cube.html ├── markers ├── 10cm │ ├── kanji.png │ ├── letterA.png │ ├── letterB.png │ ├── letterC.png │ ├── letterD.png │ ├── letterF.png │ └── readme.txt ├── barcode05.png ├── barcodes │ ├── 00.png │ ├── 01.png │ ├── 02.png │ ├── 03.png │ ├── 04.png │ ├── 05.png │ ├── 06.png │ ├── 07.png │ ├── 08.png │ ├── 09.png │ ├── 10.png │ ├── 11.png │ ├── 12.png │ ├── 13.png │ ├── 14.png │ ├── 15.png │ ├── label-00.png │ ├── label-01.png │ ├── label-02.png │ ├── label-03.png │ └── template.png ├── cube.png ├── hiro.png ├── kanji-a.png ├── kanji-abcd.png ├── kanji-b.png ├── kanji-c.png ├── kanji-d.png ├── kanji.png ├── letterA.png ├── letterB.png ├── letterC.png ├── letterD.png ├── letterF.png └── readme.txt ├── model.html ├── models ├── fish-2.mtl ├── fish-2.obj └── fish_texture.png ├── parabolic-path.html ├── portal-half-keyboard-test.html ├── portal-view-AR.html ├── portal-view.html ├── refraction.html ├── screen-hole-QR.png ├── screen-hole.html ├── shader.html ├── shadow-balls.html ├── shadow.html ├── skybox-test.html ├── smoothed-controls.html ├── stencil-test.html ├── synchronized-relative-movement.html ├── texture.html ├── threex ├── threex-arbasecontrols.js ├── threex-armarkercontrols.js ├── threex-arsmoothedcontrols.js ├── threex-artoolkitcontext.js └── threex-artoolkitsource.js ├── video.html ├── video ├── sintel.mp4 └── sintel.ogv ├── water-effect-AR.html └── water-effect.html /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AR-Examples 2 | -------------------------------------------------------------------------------- /barcode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, AR Cube! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /basic-scene.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 25 | 26 | 35 | 36 | 37 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /clipping-planes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /css/index.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-color: #eeeeee; 4 | background-image: url("../images/pixels.png"); 5 | background-repeat: repeat; /* repeat, no-repeat */ 6 | background-attachment: fixed; /* scroll, fixed */ 7 | background-position: top left; /* for no-repeat setting: top/bottom, left/right */ 8 | margin: 2% 5% 0% 5%; /* top, left, bottom, right or TRBL */ 9 | 10 | font-family: Georgia, Serif; /* list font names in order of preference */ 11 | font-weight: normal; /* normal, bold */ 12 | font-style: normal; /* normal, italic */ 13 | font-variant: normal; /* normal, small-caps */ 14 | font-size: 16px; /* font size */ 15 | color: #000000; /* hexadecimal RGB color code */ 16 | text-decoration: none; /* none, underline, overline, line-through */ 17 | text-align: left; /* left, right, center, justify */ 18 | } 19 | 20 | .fancy 21 | { 22 | min-height: 150px; 23 | /* next two lines for elder IE compatibility */ 24 | height: auto !important; 25 | height: 150px; 26 | 27 | /* Background color and gradients */ 28 | background: #eeeeee; 29 | background: -moz-linear-gradient(top, #ffffff, #cccccc); 30 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ffffff), to(#cccccc)); 31 | /* really nifty translucence */ 32 | background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.8), rgba(200, 200, 200, 0.8) ); 33 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from( rgba(255, 255, 255, 0.8) ), to( rgba(200, 200, 200, 0.8) )); 34 | 35 | /* Rounded corners */ 36 | -moz-border-radius: 15px 15px 15px 15px; 37 | -webkit-border-radius: 15px 15px 15px 15px; 38 | border-radius: 15px 15px 15px 15px; 39 | } 40 | 41 | /* Page text links */ 42 | a 43 | { 44 | font-size: 20px; 45 | font-weight: bold; 46 | font-variantx: small-caps; 47 | color:#00c; 48 | text-shadow: 1px 1px 0px #aaa; 49 | margin: 13px 0px 0px 0px; 50 | text-decoration: none; 51 | 52 | -webkit-transition: all 300ms ease-in-out; 53 | -moz-transition: all 300ms ease-in-out; 54 | -o-transition: all 300ms ease-in-out; 55 | -ms-transition: all 300ms ease-in-out; 56 | transition: all 300ms ease-in-out; 57 | } 58 | 59 | .toc 60 | { 61 | font-size: 16px; 62 | } 63 | 64 | a:hover 65 | { 66 | color:#c00; 67 | /*text-shadow: 1px 1px 0px #f00; 68 | /* gradual change */ 69 | -webkit-transition: all 300ms ease-in-out; 70 | -moz-transition: all 300ms ease-in-out; 71 | -o-transition: all 300ms ease-in-out; 72 | -ms-transition: all 300ms ease-in-out; 73 | transition: all 300ms ease-in-out; 74 | } 75 | 76 | .superText 77 | { 78 | color: #000; 79 | text-shadow: 1px 1px 0px #aaa; 80 | } 81 | 82 | a .superImage 83 | { 84 | height: 150px; 85 | width: 225px; 86 | border: 1px solid #000000; 87 | margin: 0px 20px 0px 0px; 88 | float:left; 89 | 90 | 91 | /* Rounded corners */ 92 | -moz-border-radius: 15px 15px 15px 15px; 93 | -webkit-border-radius: 15px 15px 15px 15px; 94 | border-radius: 15px 15px 15px 15px; 95 | 96 | position: relative; 97 | 98 | -webkit-transition: all 300ms ease-in-out; 99 | -moz-transition: all 300ms ease-in-out; 100 | -o-transition: all 300ms ease-in-out; 101 | -ms-transition: all 300ms ease-in-out; 102 | transition: all 300ms ease-in-out; 103 | } 104 | 105 | a:hover .superImage 106 | { 107 | top: -10px; 108 | 109 | /* fallback on standard opaque colors */ 110 | -moz-box-shadow: 10px 10px 5px #888; 111 | -webkit-box-shadow: 10px 10px 5px #888; 112 | box-shadow: 10px 10px 5px #888; 113 | /* translucent: the way shadows should be */ 114 | -moz-box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.5); 115 | -webkit-box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.5); 116 | box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.5); 117 | 118 | -webkit-transition: all 300ms ease-in-out; 119 | -moz-transition: all 300ms ease-in-out; 120 | -o-transition: all 300ms ease-in-out; 121 | -ms-transition: all 300ms ease-in-out; 122 | transition: all 300ms ease-in-out; 123 | } 124 | 125 | .bigTitle 126 | { 127 | font-size: 32px; 128 | font-weight: bold; 129 | font-variantx: small-caps; 130 | color:#004; 131 | text-align: center; 132 | text-shadow: -1px -1px 2px #fff, 1px 1px 3px #000; 133 | } -------------------------------------------------------------------------------- /custom-patterns.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, AR Cubes! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /data/camera_para.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/data/camera_para.dat -------------------------------------------------------------------------------- /globe-multi-marker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 234 | 235 | 236 | -------------------------------------------------------------------------------- /globe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /hello-cube.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, AR Cube! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /hole-box.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /hole-plane.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /hole-ring.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /images/arrow-curved.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/arrow-curved.png -------------------------------------------------------------------------------- /images/arrow-double.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/arrow-double.png -------------------------------------------------------------------------------- /images/arrow-single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/arrow-single.png -------------------------------------------------------------------------------- /images/basketball-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/basketball-gray.png -------------------------------------------------------------------------------- /images/basketball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/basketball.png -------------------------------------------------------------------------------- /images/beach/negx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/beach/negx.jpg -------------------------------------------------------------------------------- /images/beach/negy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/beach/negy.jpg -------------------------------------------------------------------------------- /images/beach/negz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/beach/negz.jpg -------------------------------------------------------------------------------- /images/beach/posx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/beach/posx.jpg -------------------------------------------------------------------------------- /images/beach/posy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/beach/posy.jpg -------------------------------------------------------------------------------- /images/beach/posz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/beach/posz.jpg -------------------------------------------------------------------------------- /images/beach/readme.txt: -------------------------------------------------------------------------------- 1 | Author 2 | ====== 3 | 4 | This is the work of Emil Persson, aka Humus. 5 | http://www.humus.name 6 | 7 | 8 | 9 | License 10 | ======= 11 | 12 | This work is licensed under a Creative Commons Attribution 3.0 Unported License. 13 | http://creativecommons.org/licenses/by/3.0/ 14 | -------------------------------------------------------------------------------- /images/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/border.png -------------------------------------------------------------------------------- /images/chemistry/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/border.png -------------------------------------------------------------------------------- /images/chemistry/card-C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/card-C.png -------------------------------------------------------------------------------- /images/chemistry/card-Cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/card-Cl.png -------------------------------------------------------------------------------- /images/chemistry/card-H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/card-H.png -------------------------------------------------------------------------------- /images/chemistry/card-N.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/card-N.png -------------------------------------------------------------------------------- /images/chemistry/card-Na.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/card-Na.png -------------------------------------------------------------------------------- /images/chemistry/card-O.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/card-O.png -------------------------------------------------------------------------------- /images/chemistry/card-Si.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/card-Si.png -------------------------------------------------------------------------------- /images/chemistry/card-template-GIMP.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/card-template-GIMP.xcf -------------------------------------------------------------------------------- /images/chemistry/label-C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/label-C.png -------------------------------------------------------------------------------- /images/chemistry/label-H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/label-H.png -------------------------------------------------------------------------------- /images/chemistry/label-N.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/label-N.png -------------------------------------------------------------------------------- /images/chemistry/label-O.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/label-O.png -------------------------------------------------------------------------------- /images/chemistry/label-template-GIMP.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/label-template-GIMP.xcf -------------------------------------------------------------------------------- /images/chemistry/shadow-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/shadow-0.png -------------------------------------------------------------------------------- /images/chemistry/shadow-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/shadow-1.png -------------------------------------------------------------------------------- /images/chemistry/shadow-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/shadow-2.png -------------------------------------------------------------------------------- /images/chemistry/shadow-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/shadow-3.png -------------------------------------------------------------------------------- /images/chemistry/shadow-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/shadow-4.png -------------------------------------------------------------------------------- /images/chemistry/shadow-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/shadow-5.png -------------------------------------------------------------------------------- /images/chemistry/shadow-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/shadow-6.png -------------------------------------------------------------------------------- /images/chemistry/shadow-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/shadow-7.png -------------------------------------------------------------------------------- /images/chemistry/shadow-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/chemistry/shadow-8.png -------------------------------------------------------------------------------- /images/church/negx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/church/negx.jpg -------------------------------------------------------------------------------- /images/church/negy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/church/negy.jpg -------------------------------------------------------------------------------- /images/church/negz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/church/negz.jpg -------------------------------------------------------------------------------- /images/church/posx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/church/posx.jpg -------------------------------------------------------------------------------- /images/church/posy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/church/posy.jpg -------------------------------------------------------------------------------- /images/church/posz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/church/posz.jpg -------------------------------------------------------------------------------- /images/church/readme.txt: -------------------------------------------------------------------------------- 1 | Author 2 | ====== 3 | 4 | This is the work of Emil Persson, aka Humus. 5 | http://www.humus.name 6 | 7 | 8 | 9 | License 10 | ======= 11 | 12 | This work is licensed under a Creative Commons Attribution 3.0 Unported License. 13 | http://creativecommons.org/licenses/by/3.0/ 14 | -------------------------------------------------------------------------------- /images/color-grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/color-grid.png -------------------------------------------------------------------------------- /images/demo/basic-scene.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/basic-scene.png -------------------------------------------------------------------------------- /images/demo/camera-movement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/camera-movement.png -------------------------------------------------------------------------------- /images/demo/clipping-planes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/clipping-planes.png -------------------------------------------------------------------------------- /images/demo/custom-patterns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/custom-patterns.png -------------------------------------------------------------------------------- /images/demo/globe-multi-marker-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/globe-multi-marker-large.png -------------------------------------------------------------------------------- /images/demo/globe-multi-marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/globe-multi-marker.png -------------------------------------------------------------------------------- /images/demo/globe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/globe.png -------------------------------------------------------------------------------- /images/demo/hello-cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/hello-cube.png -------------------------------------------------------------------------------- /images/demo/hole-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/hole-box.png -------------------------------------------------------------------------------- /images/demo/hole-ring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/hole-ring.png -------------------------------------------------------------------------------- /images/demo/magic-cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/magic-cube.png -------------------------------------------------------------------------------- /images/demo/mesh-movement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/mesh-movement.png -------------------------------------------------------------------------------- /images/demo/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/model.png -------------------------------------------------------------------------------- /images/demo/parabolic-path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/parabolic-path.png -------------------------------------------------------------------------------- /images/demo/portal-half-keyboard-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/portal-half-keyboard-test.png -------------------------------------------------------------------------------- /images/demo/portal-view-AR-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/portal-view-AR-large.png -------------------------------------------------------------------------------- /images/demo/portal-view-AR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/portal-view-AR.png -------------------------------------------------------------------------------- /images/demo/portal-view-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/portal-view-large.png -------------------------------------------------------------------------------- /images/demo/portal-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/portal-view.png -------------------------------------------------------------------------------- /images/demo/refraction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/refraction.png -------------------------------------------------------------------------------- /images/demo/shader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/shader.png -------------------------------------------------------------------------------- /images/demo/shadow-balls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/shadow-balls.png -------------------------------------------------------------------------------- /images/demo/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/shadow.png -------------------------------------------------------------------------------- /images/demo/stencil-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/stencil-test.png -------------------------------------------------------------------------------- /images/demo/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/texture.png -------------------------------------------------------------------------------- /images/demo/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/video.png -------------------------------------------------------------------------------- /images/demo/water-effect-AR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/water-effect-AR.png -------------------------------------------------------------------------------- /images/demo/water-effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/demo/water-effect.png -------------------------------------------------------------------------------- /images/earth-sphere.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/earth-sphere.jpg -------------------------------------------------------------------------------- /images/earth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/earth.jpg -------------------------------------------------------------------------------- /images/field-sphere.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/field-sphere.jpg -------------------------------------------------------------------------------- /images/glow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/glow.png -------------------------------------------------------------------------------- /images/key-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/key-blank.png -------------------------------------------------------------------------------- /images/mountain/negx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/mountain/negx.jpg -------------------------------------------------------------------------------- /images/mountain/negy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/mountain/negy.jpg -------------------------------------------------------------------------------- /images/mountain/negz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/mountain/negz.jpg -------------------------------------------------------------------------------- /images/mountain/posx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/mountain/posx.jpg -------------------------------------------------------------------------------- /images/mountain/posy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/mountain/posy.jpg -------------------------------------------------------------------------------- /images/mountain/posz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/mountain/posz.jpg -------------------------------------------------------------------------------- /images/mountain/readme.txt: -------------------------------------------------------------------------------- 1 | Author 2 | ====== 3 | 4 | This is the work of Emil Persson, aka Humus. 5 | http://www.humus.name 6 | 7 | 8 | 9 | License 10 | ======= 11 | 12 | This work is licensed under a Creative Commons Attribution 3.0 Unported License. 13 | http://creativecommons.org/licenses/by/3.0/ 14 | -------------------------------------------------------------------------------- /images/movement-controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/movement-controls.png -------------------------------------------------------------------------------- /images/noise.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/noise.jpg -------------------------------------------------------------------------------- /images/pixels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/pixels.png -------------------------------------------------------------------------------- /images/sand.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/sand.jpg -------------------------------------------------------------------------------- /images/scene-sphere-outside.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/scene-sphere-outside.jpg -------------------------------------------------------------------------------- /images/scene-sphere-room.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/scene-sphere-room.jpg -------------------------------------------------------------------------------- /images/sphere-colored.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/sphere-colored.png -------------------------------------------------------------------------------- /images/sphere-pos-neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/sphere-pos-neg.png -------------------------------------------------------------------------------- /images/tiles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/tiles.jpg -------------------------------------------------------------------------------- /images/water-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/water-2.jpg -------------------------------------------------------------------------------- /images/water.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/water.jpg -------------------------------------------------------------------------------- /images/xneg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/xneg.png -------------------------------------------------------------------------------- /images/xpos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/xpos.png -------------------------------------------------------------------------------- /images/yneg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/yneg.png -------------------------------------------------------------------------------- /images/ypos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/ypos.png -------------------------------------------------------------------------------- /images/zneg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/zneg.png -------------------------------------------------------------------------------- /images/zpos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/images/zpos.png -------------------------------------------------------------------------------- /js/keyboard.js: -------------------------------------------------------------------------------- 1 | /* 2 | Keyboard.js - a class for simplifying keyboard interaction. 3 | Created by Lee Stemkoski. 4 | 5 | Usage: 6 | // initialize keyboard 7 | var keyboard = new Keyboard(); 8 | 9 | // in update loop 10 | keyboard.update(); 11 | 12 | // check for discrete input (on key down/up event) 13 | keyboard.isKeyDown("Space"); 14 | keyboard.isKeyUp("X"); 15 | 16 | // check for continuous input (true between key down and key up events) 17 | keyboard.isKeyPressed("ArrowUp"); 18 | */ 19 | 20 | class Keyboard 21 | { 22 | constructor() 23 | { 24 | // Event listeners add keys to Queues. 25 | // Update method updates Sets accordingly. 26 | this.keyDownQueue = new Set(); 27 | this.keyUpQueue = new Set(); 28 | 29 | this.keyDownSet = new Set(); 30 | this.keyPressedSet = new Set(); 31 | this.keyUpSet = new Set(); 32 | 33 | this.onKeyDown = function(key) {}; 34 | this.onKeyUp = function(key) {}; 35 | 36 | let self = this; 37 | 38 | document.addEventListener( "keydown", 39 | function(eventData) 40 | { 41 | let key = eventData.key; 42 | if (key == " ") 43 | key = "Space"; 44 | if (key.length == 1) 45 | key = key.toUpperCase(); 46 | self.keyDownQueue.add( key ); 47 | // activate callback function (only once) 48 | if ( !self.keyPressedSet.has(key) ) 49 | self.onKeyDown(key); 50 | } 51 | ); 52 | 53 | document.addEventListener( "keyup", 54 | function(eventData) 55 | { 56 | let key = eventData.key; 57 | if (key == " ") 58 | key = "Space"; 59 | if (key.length == 1) 60 | key = key.toUpperCase(); 61 | self.keyUpQueue.add( key ); 62 | // activate callback function 63 | self.onKeyUp(key); 64 | } 65 | ); 66 | }; 67 | 68 | update() 69 | { 70 | // clear previous discrete event status 71 | this.keyDownSet.clear(); 72 | this.keyUpSet.clear(); 73 | 74 | // update current event status 75 | for (let k of this.keyDownQueue) 76 | { 77 | // avoid multiple keydown events while holding key 78 | if ( !this.keyPressedSet.has(k) ) 79 | { 80 | this.keyDownSet.add(k); 81 | this.keyPressedSet.add(k); 82 | } 83 | } 84 | 85 | for (let k of this.keyUpQueue) 86 | { 87 | this.keyPressedSet.delete(k); 88 | this.keyUpSet.add(k); 89 | } 90 | 91 | // clear the queues used to store events 92 | this.keyDownQueue.clear(); 93 | this.keyUpQueue.clear(); 94 | }; 95 | 96 | // only true for a single frame after key down 97 | isKeyDown( keyName ) 98 | { 99 | return ( this.keyDownSet.has(keyName) ); 100 | }; 101 | 102 | // true between key down and key up events 103 | isKeyPressed( keyName ) 104 | { 105 | return ( this.keyPressedSet.has(keyName) ); 106 | }; 107 | 108 | // only true for a single frame after key up 109 | isKeyUp( keyName ) 110 | { 111 | return ( this.keyUpSet.has(keyName) ); 112 | }; 113 | 114 | // set callback function 115 | setOnKeyDown( callbackFunction ) 116 | { 117 | this.onKeyDown = callbackFunction; 118 | }; 119 | 120 | // set callback function 121 | setOnKeyUp( callbackFunction ) 122 | { 123 | this.onKeyUp = callbackFunction; 124 | }; 125 | 126 | } 127 | -------------------------------------------------------------------------------- /js/stats.min.js: -------------------------------------------------------------------------------- 1 | // stats.js - http://github.com/mrdoob/stats.js 2 | var Stats=function(){function h(a){c.appendChild(a.dom);return a}function k(a){for(var d=0;de+1E3&&(r.update(1E3*a/(c-e),100),e=c,a=0,t)){var d=performance.memory;t.update(d.usedJSHeapSize/1048576,d.jsHeapSizeLimit/1048576)}return c},update:function(){g=this.end()},domElement:c,setMode:k}}; 4 | Stats.Panel=function(h,k,l){var c=Infinity,g=0,e=Math.round,a=e(window.devicePixelRatio||1),r=80*a,f=48*a,t=3*a,u=2*a,d=3*a,m=15*a,n=74*a,p=30*a,q=document.createElement("canvas");q.width=r;q.height=f;q.style.cssText="width:80px;height:48px";var b=q.getContext("2d");b.font="bold "+9*a+"px Helvetica,Arial,sans-serif";b.textBaseline="top";b.fillStyle=l;b.fillRect(0,0,r,f);b.fillStyle=k;b.fillText(h,t,u);b.fillRect(d,m,n,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d,m,n,p);return{dom:q,update:function(f, 5 | v){c=Math.min(c,f);g=Math.max(g,f);b.fillStyle=l;b.globalAlpha=1;b.fillRect(0,0,r,m);b.fillStyle=k;b.fillText(e(f)+" "+h+" ("+e(c)+"-"+e(g)+")",t,u);b.drawImage(q,d+a,m,n-a,p,d,m,n-a,p);b.fillRect(d+n-a,m,a,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d+n-a,m,a,e((1-f/v)*p))}}};"object"===typeof module&&(module.exports=Stats); 6 | -------------------------------------------------------------------------------- /keyboard-camera-move.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /keyboard-mesh-move.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /keyboard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Open the Javascript console, and while the browser has focus, press the 'A' key. 12 | 13 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /markers/10cm/kanji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/10cm/kanji.png -------------------------------------------------------------------------------- /markers/10cm/letterA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/10cm/letterA.png -------------------------------------------------------------------------------- /markers/10cm/letterB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/10cm/letterB.png -------------------------------------------------------------------------------- /markers/10cm/letterC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/10cm/letterC.png -------------------------------------------------------------------------------- /markers/10cm/letterD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/10cm/letterD.png -------------------------------------------------------------------------------- /markers/10cm/letterF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/10cm/letterF.png -------------------------------------------------------------------------------- /markers/10cm/readme.txt: -------------------------------------------------------------------------------- 1 | All images in this directory are 10cm by 10cm. 2 | -------------------------------------------------------------------------------- /markers/barcode05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcode05.png -------------------------------------------------------------------------------- /markers/barcodes/00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/00.png -------------------------------------------------------------------------------- /markers/barcodes/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/01.png -------------------------------------------------------------------------------- /markers/barcodes/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/02.png -------------------------------------------------------------------------------- /markers/barcodes/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/03.png -------------------------------------------------------------------------------- /markers/barcodes/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/04.png -------------------------------------------------------------------------------- /markers/barcodes/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/05.png -------------------------------------------------------------------------------- /markers/barcodes/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/06.png -------------------------------------------------------------------------------- /markers/barcodes/07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/07.png -------------------------------------------------------------------------------- /markers/barcodes/08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/08.png -------------------------------------------------------------------------------- /markers/barcodes/09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/09.png -------------------------------------------------------------------------------- /markers/barcodes/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/10.png -------------------------------------------------------------------------------- /markers/barcodes/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/11.png -------------------------------------------------------------------------------- /markers/barcodes/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/12.png -------------------------------------------------------------------------------- /markers/barcodes/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/13.png -------------------------------------------------------------------------------- /markers/barcodes/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/14.png -------------------------------------------------------------------------------- /markers/barcodes/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/15.png -------------------------------------------------------------------------------- /markers/barcodes/label-00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/label-00.png -------------------------------------------------------------------------------- /markers/barcodes/label-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/label-01.png -------------------------------------------------------------------------------- /markers/barcodes/label-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/label-02.png -------------------------------------------------------------------------------- /markers/barcodes/label-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/label-03.png -------------------------------------------------------------------------------- /markers/barcodes/template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/barcodes/template.png -------------------------------------------------------------------------------- /markers/cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/cube.png -------------------------------------------------------------------------------- /markers/hiro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/hiro.png -------------------------------------------------------------------------------- /markers/kanji-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/kanji-a.png -------------------------------------------------------------------------------- /markers/kanji-abcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/kanji-abcd.png -------------------------------------------------------------------------------- /markers/kanji-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/kanji-b.png -------------------------------------------------------------------------------- /markers/kanji-c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/kanji-c.png -------------------------------------------------------------------------------- /markers/kanji-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/kanji-d.png -------------------------------------------------------------------------------- /markers/kanji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/kanji.png -------------------------------------------------------------------------------- /markers/letterA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/letterA.png -------------------------------------------------------------------------------- /markers/letterB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/letterB.png -------------------------------------------------------------------------------- /markers/letterC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/letterC.png -------------------------------------------------------------------------------- /markers/letterD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/letterD.png -------------------------------------------------------------------------------- /markers/letterF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/markers/letterF.png -------------------------------------------------------------------------------- /markers/readme.txt: -------------------------------------------------------------------------------- 1 | The pattern images are each 512x512, but the detected part is the inner black square, which translates to 1 unit in the virtual world. The inner black square takes up 80% of the width/height of the entire image, so to cover the entire image (including the outer white area up to the thin black border), use a cube that is 1.25 units on a side. -------------------------------------------------------------------------------- /model.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /models/fish-2.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'None' 2 | # Material Count: 1 3 | 4 | newmtl Material.001 5 | Ns 92.156863 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.050000 0.050000 0.050000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.000000 11 | d 1.000000 12 | illum 2 13 | map_Kd fish_texture.png 14 | -------------------------------------------------------------------------------- /models/fish_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/models/fish_texture.png -------------------------------------------------------------------------------- /parabolic-path.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 228 | 229 | 230 | -------------------------------------------------------------------------------- /portal-half-keyboard-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /portal-view-AR.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, AR Cube! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 273 | 274 | 275 | -------------------------------------------------------------------------------- /refraction.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 36 | 37 | 51 | 52 | 53 | 202 | 203 | 204 | -------------------------------------------------------------------------------- /screen-hole-QR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/screen-hole-QR.png -------------------------------------------------------------------------------- /screen-hole.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 251 | 252 | 253 | -------------------------------------------------------------------------------- /shader.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 35 | 36 | 47 | 48 | 49 | 186 | 187 | 188 | -------------------------------------------------------------------------------- /shadow-balls.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 206 | 207 | 208 | -------------------------------------------------------------------------------- /shadow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /skybox-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /smoothed-controls.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, AR Cube! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 172 | 173 | 174 | -------------------------------------------------------------------------------- /stencil-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 237 | 238 | 239 | -------------------------------------------------------------------------------- /synchronized-relative-movement.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /texture.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /threex/threex-arbasecontrols.js: -------------------------------------------------------------------------------- 1 | var THREEx = THREEx || {} 2 | 3 | THREEx.ArBaseControls = function(object3d){ 4 | this.id = THREEx.ArBaseControls.id++ 5 | 6 | this.object3d = object3d 7 | this.object3d.matrixAutoUpdate = false; 8 | this.object3d.visible = false 9 | 10 | // Events to honor 11 | // this.dispatchEvent({ type: 'becameVisible' }) 12 | // this.dispatchEvent({ type: 'markerVisible' }) // replace markerFound 13 | // this.dispatchEvent({ type: 'becameUnVisible' }) 14 | } 15 | 16 | THREEx.ArBaseControls.id = 0 17 | 18 | Object.assign( THREEx.ArBaseControls.prototype, THREE.EventDispatcher.prototype ); 19 | 20 | ////////////////////////////////////////////////////////////////////////////// 21 | // Functions 22 | ////////////////////////////////////////////////////////////////////////////// 23 | /** 24 | * error catching function for update() 25 | */ 26 | THREEx.ArBaseControls.prototype.update = function(){ 27 | console.assert(false, 'you need to implement your own update') 28 | } 29 | 30 | /** 31 | * error catching function for name() 32 | */ 33 | THREEx.ArBaseControls.prototype.name = function(){ 34 | console.assert(false, 'you need to implement your own .name()') 35 | return 'Not yet implemented - name()' 36 | } 37 | -------------------------------------------------------------------------------- /threex/threex-arsmoothedcontrols.js: -------------------------------------------------------------------------------- 1 | var THREEx = THREEx || {} 2 | 3 | /** 4 | * - lerp position/quaternino/scale 5 | * - minDelayDetected 6 | * - minDelayUndetected 7 | * @param {[type]} object3d [description] 8 | * @param {[type]} parameters [description] 9 | */ 10 | THREEx.ArSmoothedControls = function(object3d, parameters){ 11 | var _this = this 12 | 13 | THREEx.ArBaseControls.call(this, object3d) 14 | 15 | // copy parameters 16 | this.object3d.visible = false 17 | 18 | this._lastLerpStepAt = null 19 | this._visibleStartedAt = null 20 | this._unvisibleStartedAt = null 21 | 22 | // handle default parameters 23 | parameters = parameters || {} 24 | this.parameters = { 25 | // lerp coeficient for the position - between [0,1] - default to 1 26 | lerpPosition: 0.8, 27 | // lerp coeficient for the quaternion - between [0,1] - default to 1 28 | lerpQuaternion: 0.2, 29 | // lerp coeficient for the scale - between [0,1] - default to 1 30 | lerpScale: 0.7, 31 | // delay for lerp fixed steps - in seconds - default to 1/120 32 | lerpStepDelay: 1/60, 33 | // minimum delay the sub-control must be visible before this controls become visible - default to 0 seconds 34 | minVisibleDelay: 0.0, 35 | // minimum delay the sub-control must be unvisible before this controls become unvisible - default to 0 seconds 36 | minUnvisibleDelay: 0.2, 37 | } 38 | 39 | ////////////////////////////////////////////////////////////////////////////// 40 | // setParameters 41 | ////////////////////////////////////////////////////////////////////////////// 42 | setParameters(parameters) 43 | function setParameters(parameters){ 44 | if( parameters === undefined ) return 45 | for( var key in parameters ){ 46 | var newValue = parameters[ key ] 47 | 48 | if( newValue === undefined ){ 49 | console.warn( "THREEx.ArSmoothedControls: '" + key + "' parameter is undefined." ) 50 | continue 51 | } 52 | 53 | var currentValue = _this.parameters[ key ] 54 | 55 | if( currentValue === undefined ){ 56 | console.warn( "THREEx.ArSmoothedControls: '" + key + "' is not a property of this material." ) 57 | continue 58 | } 59 | 60 | _this.parameters[ key ] = newValue 61 | } 62 | } 63 | } 64 | 65 | THREEx.ArSmoothedControls.prototype = Object.create( THREEx.ArBaseControls.prototype ); 66 | THREEx.ArSmoothedControls.prototype.constructor = THREEx.ArSmoothedControls; 67 | 68 | ////////////////////////////////////////////////////////////////////////////// 69 | // update function 70 | ////////////////////////////////////////////////////////////////////////////// 71 | 72 | THREEx.ArSmoothedControls.prototype.update = function(targetObject3d){ 73 | var object3d = this.object3d 74 | var parameters = this.parameters 75 | var wasVisible = object3d.visible 76 | var present = performance.now()/1000 77 | 78 | 79 | ////////////////////////////////////////////////////////////////////////////// 80 | // handle object3d.visible with minVisibleDelay/minUnvisibleDelay 81 | ////////////////////////////////////////////////////////////////////////////// 82 | if( targetObject3d.visible === false ) this._visibleStartedAt = null 83 | if( targetObject3d.visible === true ) this._unvisibleStartedAt = null 84 | 85 | if( targetObject3d.visible === true && this._visibleStartedAt === null ) this._visibleStartedAt = present 86 | if( targetObject3d.visible === false && this._unvisibleStartedAt === null ) this._unvisibleStartedAt = present 87 | 88 | if( wasVisible === false && targetObject3d.visible === true ){ 89 | var visibleFor = present - this._visibleStartedAt 90 | if( visibleFor >= this.parameters.minVisibleDelay ){ 91 | object3d.visible = true 92 | snapDirectlyToTarget() 93 | } 94 | // console.log('visibleFor', visibleFor) 95 | } 96 | 97 | if( wasVisible === true && targetObject3d.visible === false ){ 98 | var unvisibleFor = present - this._unvisibleStartedAt 99 | if( unvisibleFor >= this.parameters.minUnvisibleDelay ){ 100 | object3d.visible = false 101 | } 102 | } 103 | 104 | ////////////////////////////////////////////////////////////////////////////// 105 | // apply lerp on positon/quaternion/scale 106 | ////////////////////////////////////////////////////////////////////////////// 107 | 108 | // apply lerp steps - require fix time steps to behave the same no matter the fps 109 | if( this._lastLerpStepAt === null ){ 110 | applyOneSlerpStep() 111 | this._lastLerpStepAt = present 112 | }else{ 113 | var nStepsToDo = Math.floor( (present - this._lastLerpStepAt)/this.parameters.lerpStepDelay ) 114 | for(var i = 0; i < nStepsToDo; i++){ 115 | applyOneSlerpStep() 116 | this._lastLerpStepAt += this.parameters.lerpStepDelay 117 | } 118 | } 119 | 120 | // disable the lerp by directly copying targetObject3d position/quaternion/scale 121 | if( false ){ 122 | snapDirectlyToTarget() 123 | } 124 | 125 | // update the matrix 126 | this.object3d.updateMatrix() 127 | 128 | ////////////////////////////////////////////////////////////////////////////// 129 | // honor becameVisible/becameUnVisible event 130 | ////////////////////////////////////////////////////////////////////////////// 131 | // honor becameVisible event 132 | if( wasVisible === false && object3d.visible === true ){ 133 | this.dispatchEvent({ type: 'becameVisible' }) 134 | } 135 | // honor becameUnVisible event 136 | if( wasVisible === true && object3d.visible === false ){ 137 | this.dispatchEvent({ type: 'becameUnVisible' }) 138 | } 139 | return 140 | 141 | function snapDirectlyToTarget(){ 142 | object3d.position.copy( targetObject3d.position ) 143 | object3d.quaternion.copy( targetObject3d.quaternion ) 144 | object3d.scale.copy( targetObject3d.scale ) 145 | } 146 | 147 | function applyOneSlerpStep(){ 148 | object3d.position.lerp(targetObject3d.position, parameters.lerpPosition) 149 | object3d.quaternion.slerp(targetObject3d.quaternion, parameters.lerpQuaternion) 150 | object3d.scale.lerp(targetObject3d.scale, parameters.lerpScale) 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /video.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 28 | 29 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /video/sintel.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/video/sintel.mp4 -------------------------------------------------------------------------------- /video/sintel.ogv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsguru-git/AR-Examples/c05f51cee5ec4df212aca686f89698d321c2e978/video/sintel.ogv -------------------------------------------------------------------------------- /water-effect-AR.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 47 | 48 | 65 | 66 | 67 | 240 | 241 | 242 | -------------------------------------------------------------------------------- /water-effect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello, world! 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 37 | 38 | 55 | 56 | 57 | 162 | 163 | 164 | --------------------------------------------------------------------------------