Skip to content

Commit 6aa5917

Browse files
committed
fix(soba/staging): update injectFBO usages
1 parent c972993 commit 6aa5917

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

libs/soba/staging/src/lib/bounds.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ export class NgtsBounds {
6767
groupRef = viewChild.required<ElementRef<THREE.Group>>('group');
6868

6969
private store = injectStore();
70-
// private camera = this.store.select('camera');
71-
// private invalidate = this.store.select('invalidate');
72-
// private size = this.store.select('size');
73-
// private controls = this.store.select('controls') as unknown as Signal<ControlsProto>;
7470

7571
private clipOption = pick(this.options, 'clip');
7672
private fitOption = pick(this.options, 'fit');
@@ -127,7 +123,6 @@ export class NgtsBounds {
127123
this.observe(),
128124
this.store.size(),
129125
this.store.camera(),
130-
// TODO: (chau) for some reason, if this effect tracks controls changes, the initial bounds doesn't target properly
131126
this.store.controls(),
132127
];
133128

libs/soba/staging/src/lib/caustics.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ const defaultOptions: NgtsCausticsOptions = {
8787
<ngt-caustics-projection-material
8888
transparent
8989
[color]="color()"
90-
[causticsTexture]="causticsTarget().texture"
91-
[causticsTextureB]="causticsTargetB().texture"
90+
[causticsTexture]="causticsTarget.texture"
91+
[causticsTextureB]="causticsTargetB.texture"
9292
[blending]="CustomBlending"
9393
[blendSrc]="OneFactor"
9494
[blendDst]="SrcAlphaFactor"
@@ -205,10 +205,10 @@ export class NgtsCaustics {
205205
? new THREE.Vector3(...lightSource)
206206
: (resolveRef(lightSource) as THREE.Object3D),
207207
}),
208-
normalTarget: this.normalTarget(),
209-
normalTargetB: this.normalTargetB(),
210-
causticsTarget: this.causticsTarget(),
211-
causticsTargetB: this.causticsTargetB(),
208+
normalTarget: this.normalTarget,
209+
normalTargetB: this.normalTargetB,
210+
causticsTarget: this.causticsTarget,
211+
causticsTargetB: this.causticsTargetB,
212212
camera: this.cameraRef().nativeElement,
213213
scene: this.sceneRef().nativeElement,
214214
group: this.groupRef().nativeElement,

libs/soba/staging/src/lib/render-texture.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ let incrementId = 0;
132132
<ng-template portalContent let-injector="injector">
133133
<ng-container
134134
renderTextureContainer
135-
[fbo]="fbo()"
135+
[fbo]="fbo"
136136
[renderPriority]="renderPriority()"
137137
[frames]="frames()"
138138
[ngTemplateOutlet]="content()"
@@ -144,7 +144,7 @@ let incrementId = 0;
144144
</ng-template>
145145
</ngt-portal>
146146
147-
<ngt-primitive *args="[fbo().texture]" [attach]="attach()" [parameters]="parameters()" />
147+
<ngt-primitive *args="[fbo.texture]" [attach]="attach()" [parameters]="parameters()" />
148148
`,
149149
imports: [NgtPortal, NgtsRenderTextureContainer, NgtArgs, NgTemplateOutlet],
150150
schemas: [CUSTOM_ELEMENTS_SCHEMA],
@@ -201,7 +201,7 @@ export class NgtsRenderTextureImpl {
201201
protected compute = computed(() => this.computeFn() || this.uvCompute);
202202

203203
private uvCompute: NgtComputeFunction = (event, root, previous) => {
204-
const fbo = this.fbo();
204+
const fbo = this.fbo;
205205
if (!fbo) return;
206206
const state = root.snapshot;
207207
const previousState = previous?.snapshot;

0 commit comments

Comments
 (0)