Procházet zdrojové kódy

Make it so ids do not need to be sequential.

Alex Tran před 5 roky
rodič
revize
2c6cf29599
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/XR/features/WebXRFeaturePointSystem.ts

+ 1 - 1
src/XR/features/WebXRFeaturePointSystem.ts

@@ -121,7 +121,7 @@ export class WebXRFeaturePointSystem extends WebXRAbstractFeature {
                 const id = featurePointRawData[rawIndex + 4];
 
                 // IDs should be durable across frames and strictly increasing from 0 up, so use them as indexing into the feature point array.
-                if (id >= this._featurePointCloud.length) {
+                if (!this._featurePointCloud[id]) {
                     this._featurePointCloud[id] = { position: new Vector3(), confidenceValue: 0 };
                     addedFeaturePoints.push(id);
                 } else {