Skip to content

Commit d2748c2

Browse files
committed
removing proxy from Readme.md
1 parent ebd85fb commit d2748c2

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ Please follow these simple steps:
108108
embedded
109109
arjs="trackingMethod: best; sourceType: webcam;debugUIEnabled: false;"
110110
>
111-
<!-- we use cors proxy to avoid cross-origin problems -->
111+
<!-- we use cors proxy to avoid cross-origin problems ATTENTION! you need to set up your server -->
112112
<a-nft
113113
type="nft"
114-
url="https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/trex-image/trex"
114+
url="your-server/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/trex-image/trex"
115115
smooth="true"
116116
smoothCount="10"
117117
smoothTolerance=".01"
118118
smoothThreshold="5"
119119
>
120120
<a-entity
121-
gltf-model="https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf"
121+
gltf-model="your-server/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf"
122122
scale="5 5 5"
123123
position="50 150 0"
124124
>
@@ -187,17 +187,22 @@ Please follow this simple steps:
187187
<body style="margin : 0px; overflow: hidden;">
188188
<a-scene embedded arjs>
189189
<a-marker preset="hiro">
190+
<!-- we use cors proxy to avoid cross-origin problems ATTENTION! you need to set up your server -->
190191
<a-entity
191192
position="0 -1 0"
192193
scale="0.05 0.05 0.05"
193-
gltf-model="https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf"
194+
gltf-model="your-server/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf"
194195
></a-entity>
195196
</a-marker>
196197
<a-entity camera></a-entity>
197198
</a-scene>
198199
</body>
199200
</html>
200201
```
202+
Important! Be aware that if you are referring to external resources, in any app, especially those using NFT, you will encounter CORS problems if those resources are not in the same server of the code. If you can’t see the tracking, please open your Browser Dev Tools and check if you have CORS errors in the console. If so, you have to fix those errors in order to see your content. The correct fix is to place your resources on the same server of your code.
203+
204+
If you cannot do that, you can host a proxy anywhere server to solve that (https://github.com/Rob--W/cors-anywhere).
205+
Please note that several hosting services have policies that does not permit to use such server. Always check hosting services policies before using them to avoid account suspensions
201206

202207
Learn more on the [AR.js Official Documentation](https://ar-js-org.github.io/AR.js-Docs/).
203208

aframe/examples/marker-based/basic.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
position="0 0 0"
1111
rotation="0 0 0"
1212
scale="0.05 0.05 0.05"
13-
gltf-model="https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf"
13+
gltf-model="../image-tracking/nft/trex/scene.gltf"
1414
></a-entity>
1515
</a-marker>
1616
<a-entity camera></a-entity>

0 commit comments

Comments
 (0)