Procházet zdrojové kódy

A-Frame plugin: fix ar-image-tracker.resolution

customisations
alemart před 5 měsíci
rodič
revize
b066bc0b85
1 změnil soubory, kde provedl 6 přidání a 3 odebrání
  1. 6
    3
      plugins/aframe-with-encantar.js

+ 6
- 3
plugins/aframe-with-encantar.js Zobrazit soubor

918
 
918
 
919
     /* async */ tracker()
919
     /* async */ tracker()
920
     {
920
     {
921
-        const tracker = AR.Tracker.Image();
921
+        const tracker = AR.Tracker.Image({
922
+            resolution: this.data.resolution
923
+        });
922
         const referenceImages = [];
924
         const referenceImages = [];
923
 
925
 
924
-        tracker.resolution = this.data.resolution;
925
-
926
         for(const child of this.el.children) {
926
         for(const child of this.el.children) {
927
             if(child.components !== undefined) {
927
             if(child.components !== undefined) {
928
                 for(const name in child.components) {
928
                 for(const name in child.components) {
946
 AFRAME.registerPrimitive('ar-image-tracker', {
946
 AFRAME.registerPrimitive('ar-image-tracker', {
947
     defaultComponents: {
947
     defaultComponents: {
948
         'ar-image-tracker': {}
948
         'ar-image-tracker': {}
949
+    },
950
+    mappings: {
951
+        'resolution': 'ar-image-tracker.resolution',
949
     }
952
     }
950
 });
953
 });
951
 
954
 

Načítá se…
Zrušit
Uložit