angular-three 1.0.0-beta.2 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2385,8 +2385,9 @@ class NgtCanvas extends NgtRxStore {
|
|
|
2385
2385
|
}),
|
|
2386
2386
|
], this.envInjector);
|
|
2387
2387
|
this.glRef = this.glAnchor.createComponent(this.scene, { environmentInjector: this.glEnvInjector });
|
|
2388
|
-
this.glRef.changeDetectorRef.detectChanges();
|
|
2389
2388
|
this.glRef.changeDetectorRef.detach();
|
|
2389
|
+
// here, we override the detectChanges to also call detectChanges on the ComponentRef
|
|
2390
|
+
this.overrideDetectChanges();
|
|
2390
2391
|
this.cdr.detectChanges();
|
|
2391
2392
|
});
|
|
2392
2393
|
}
|
|
@@ -2400,6 +2401,13 @@ class NgtCanvas extends NgtRxStore {
|
|
|
2400
2401
|
injectNgtLoader.destroy();
|
|
2401
2402
|
super.ngOnDestroy();
|
|
2402
2403
|
}
|
|
2404
|
+
overrideDetectChanges() {
|
|
2405
|
+
const originalDetectChanges = this.cdr.detectChanges.bind(this.cdr);
|
|
2406
|
+
this.cdr.detectChanges = () => {
|
|
2407
|
+
originalDetectChanges();
|
|
2408
|
+
this.glRef?.changeDetectorRef.detectChanges();
|
|
2409
|
+
};
|
|
2410
|
+
}
|
|
2403
2411
|
}
|
|
2404
2412
|
NgtCanvas.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: NgtCanvas, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2405
2413
|
NgtCanvas.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: NgtCanvas, isStandalone: true, selector: "ngt-canvas", inputs: { scene: "scene", compoundPrefixes: "compoundPrefixes", linear: "linear", legacy: "legacy", flat: "flat", orthographic: "orthographic", frameloop: "frameloop", dpr: "dpr", raycaster: "raycaster", shadows: "shadows", camera: "camera", gl: "gl", eventSource: "eventSource", eventPrefix: "eventPrefix", lookAt: "lookAt", performance: "performance" }, outputs: { created: "created", pointerMissed: "pointerMissed" }, host: { properties: { "class.ngt-canvas": "this.hostClass", "style.pointerEvents": "this.pointerEvents" } }, providers: [NgtStore], viewQueries: [{ propertyName: "glCanvas", first: true, predicate: ["glCanvas"], descendants: true, static: true }, { propertyName: "glAnchor", first: true, predicate: ["glAnchor"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `
|