9
9
input ,
10
10
untracked ,
11
11
} from '@angular/core' ;
12
- import { injectStore , NgtArgs , NgtSelection , omit , pick , resolveRef } from 'angular-three' ;
12
+ import { injectStore , NgtArgs , NgtSelectionApi , omit , pick , resolveRef } from 'angular-three' ;
13
13
import { mergeInputs } from 'ngxtension/inject-inputs' ;
14
14
import { OutlineEffect } from 'postprocessing' ;
15
15
import * as THREE from 'three' ;
@@ -36,7 +36,7 @@ const defaultOptions: NgtpOutlineOptions = {
36
36
export class NgtpOutline {
37
37
options = input ( defaultOptions , { transform : mergeInputs ( defaultOptions ) } ) ;
38
38
39
- private ngtSelection = inject ( NgtSelection , { optional : true } ) ;
39
+ private selectionApi = inject ( NgtSelectionApi , { optional : true } ) ;
40
40
private effectComposer = inject ( NgtpEffectComposer ) ;
41
41
private store = injectStore ( ) ;
42
42
@@ -135,7 +135,7 @@ export class NgtpOutline {
135
135
136
136
effect ( ( onCleanup ) => {
137
137
// NOTE: we run this effect if declarative NgtSelection is not enabled
138
- if ( ! this . ngtSelection ) {
138
+ if ( ! this . selectionApi ) {
139
139
// NOTE: if NgtSelection is not used and selection is not provided, we throw
140
140
if ( this . selection ( ) === undefined ) {
141
141
throw new Error ( '[NGT PostProcessing]: ngtp-outline requires selection input or use NgtSelection' ) ;
@@ -149,10 +149,10 @@ export class NgtpOutline {
149
149
}
150
150
151
151
// NOTE: we run this effect if declarative NgtSelection is enabled
152
- const selectionEnabled = this . ngtSelection . enabled ( ) ;
152
+ const selectionEnabled = this . selectionApi . enabled ( ) ;
153
153
if ( ! selectionEnabled ) return ;
154
154
const cleanup = this . handleSelectionChangeEffect (
155
- this . ngtSelection . selected ,
155
+ this . selectionApi . selected ,
156
156
this . effect ,
157
157
this . store . invalidate ,
158
158
) ;
0 commit comments