Skip to content

Commit

Permalink
feat: update code (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
cptbtptpbcptdtptp authored Jul 23, 2024
1 parent 3682198 commit d78f731
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/xr/src/trackable/XRTrackedObjectManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export abstract class XRTrackedObjectManager<T extends XRTracked> extends Script
private _trackIdToIndex: number[] = [];
private _trackedComponents: Array<TrackedComponent<T>> = [];

constructor(entity: Entity, feature: any) {
constructor(entity: Entity, feature: TFeatureConstructor<XRTrackableFeature>) {
super(entity);
this._feature = feature;
this._onTrackedChanged = this._onTrackedChanged.bind(this);
Expand Down Expand Up @@ -130,8 +130,7 @@ export abstract class XRTrackedObjectManager<T extends XRTracked> extends Script
origin.addChild(entity);
}

const trackedComponent = entity.addComponent(TrackedComponent<T>);
return trackedComponent;
return entity.addComponent(TrackedComponent<T>);
}
}

Expand Down

0 comments on commit d78f731

Please sign in to comment.