AR-js-org / AR.js

Image tracking, Location Based AR, Marker tracking. All on the Web.
MIT License
5.3k stars 909 forks source link

Tutorial: location-based-three #568

Open YasserB94 opened 9 months ago

YasserB94 commented 9 months ago

Do you want to request a feature or report a bug? 🐞Report a bug 🐞


What is the current behavior? On the first step of the tutorial as long as I can correctly render the red box using ThreeJS Once I add the AR.js related code I start running into issues.

I am greeted by several errors and warnings in the console:

SHADER_INFO_LOG:
ERROR: 0:327: 'uvundefined' : undeclared identifier
ERROR: 0:327: 'constructor' : not enough data provided for construction
VERTEX
322: void main() {
  323: #if defined( USE_UV ) || defined( USE_ANISOTROPY )
  324:  vUv = vec3( uv, 1 ).xy;
  325: #endif
  326: #ifdef USE_MAP
> 327:  vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
  328: #endif
  329: #ifdef USE_ALPHAMAP
  330:  vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
  331: #endif
  332: #ifdef USE_LIGHTMAP
  333:  vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
three.module.js:19936:12

Then a couple more warnings and: 🐞After reporting 32, no further warnings will be reported for this WebGL context.🐞


If the current behavior is a bug, please provide the steps to reproduce.

Reproduce by following the tutorial about location-based-arjs-with-threejs from the official documentation website.


Please mention other relevant information such as the browser version, Operating System and Device Name Tested on:

If this is a feature request, what is motivation or use case for changing the behavior?

froston commented 5 months ago

Hey. I figured out installing older version of three.js fixes some of the issues. However I'm still having a problem with three objects quickly appearing in the beggining and then dissapearing from the scene. Found a hacky fix for it but I would appreaciate AR.js fixing the location based bugs.

{
  "dependencies": {
    "@ar-js-org/ar.js": "3.4.5",
    "three": "0.150.0"
  },
}