Skip to content

Commit f785e1d

Browse files
committed
feat: use ngxtension
1 parent 36d2f58 commit f785e1d

File tree

68 files changed

+393
-366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+393
-366
lines changed

apps/sandbox/src/app/aviator/components/airplane/pilot/pilot.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { CUSTOM_ELEMENTS_SCHEMA, Component, Input, inject } from '@angular/core';
2-
import { NgtArgs, NgtRepeat, type NgtAfterAttach, type NgtBeforeRenderEvent } from 'angular-three';
2+
import { NgtArgs, type NgtAfterAttach, type NgtBeforeRenderEvent } from 'angular-three';
3+
import { Repeat } from 'ngxtension/repeat';
34
import * as THREE from 'three';
45
import { GameService } from '../../../services/game.service';
56
import { Colors } from '../../../utils/colors';
@@ -8,7 +9,7 @@ import { Colors } from '../../../utils/colors';
89
selector: 'app-pilot',
910
standalone: true,
1011
templateUrl: './pilot.component.html',
11-
imports: [NgtArgs, NgtRepeat],
12+
imports: [NgtArgs, Repeat],
1213
schemas: [CUSTOM_ELEMENTS_SCHEMA],
1314
})
1415
export class Pilot {

apps/sandbox/src/app/aviator/components/sky/cloud/cloud.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { NgIf } from '@angular/common';
22
import { CUSTOM_ELEMENTS_SCHEMA, Component, EventEmitter, Output } from '@angular/core';
3-
import { NgtArgs, NgtRepeat, injectNgtRef, type NgtAfterAttach, type NgtBeforeRenderEvent } from 'angular-three';
3+
import { NgtArgs, injectNgtRef, type NgtAfterAttach, type NgtBeforeRenderEvent } from 'angular-three';
4+
import { Repeat } from 'ngxtension/repeat';
45
import { Colors } from '../../../utils/colors';
56

67
@Component({
78
selector: 'app-cloud',
89
standalone: true,
910
templateUrl: './cloud.component.html',
10-
imports: [NgtArgs, NgtRepeat, NgIf],
11+
imports: [NgtArgs, Repeat, NgIf],
1112
schemas: [CUSTOM_ELEMENTS_SCHEMA],
1213
})
1314
export class Cloud {

apps/sandbox/src/app/aviator/components/sky/sky.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { CUSTOM_ELEMENTS_SCHEMA, Component, inject } from '@angular/core';
2-
import { NgtArgs, NgtRepeat, type NgtBeforeRenderEvent } from 'angular-three';
2+
import { NgtArgs, type NgtBeforeRenderEvent } from 'angular-three';
3+
import { Repeat } from 'ngxtension/repeat';
34
import { GameService } from '../../services/game.service';
45
import { WorldService } from '../../services/world.service';
56
import { Cloud } from './cloud/cloud.component';
@@ -8,7 +9,7 @@ import { Cloud } from './cloud/cloud.component';
89
selector: 'app-sky',
910
standalone: true,
1011
templateUrl: './sky.component.html',
11-
imports: [NgtArgs, NgtRepeat, Cloud],
12+
imports: [NgtArgs, Cloud, Repeat],
1213
schemas: [CUSTOM_ELEMENTS_SCHEMA],
1314
})
1415
export class Sky {

apps/sandbox/src/app/skydiving/components/wind-effect.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { CUSTOM_ELEMENTS_SCHEMA, Component, computed } from '@angular/core';
2-
import { NgtArgs, NgtRepeat, injectBeforeRender, injectNgtRef, injectNgtStore } from 'angular-three';
2+
import { NgtArgs, injectBeforeRender, injectNgtRef, injectNgtStore } from 'angular-three';
33
import { NgtsInstance, NgtsInstances, PositionMesh } from 'angular-three-soba/performances';
44
import { NgtsSobaContent } from 'angular-three-soba/utils';
5+
import { Repeat } from 'ngxtension/repeat';
56
import * as THREE from 'three';
67

78
@Component({
@@ -65,7 +66,7 @@ export class WindShape {
6566
</ngts-instances>
6667
</ngt-group>
6768
`,
68-
imports: [NgtsInstances, NgtsSobaContent, NgtArgs, WindShape, NgtRepeat],
69+
imports: [NgtsInstances, NgtsSobaContent, NgtArgs, WindShape, Repeat],
6970
schemas: [CUSTOM_ELEMENTS_SCHEMA],
7071
})
7172
export class WindEffect {

libs/cannon/debug/src/lib/debug.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { Component, CUSTOM_ELEMENTS_SCHEMA, forwardRef, Input, type OnInit } from '@angular/core';
22
import { propsToBody, type BodyProps, type BodyShapeType } from '@pmndrs/cannon-worker-api';
3-
import { createInjectionToken, injectBeforeRender, NgtArgs } from 'angular-three';
3+
import { injectBeforeRender, NgtArgs } from 'angular-three';
44
import { injectNgtcPhysicsApi } from 'angular-three-cannon';
55
import type { Body, Quaternion as CQuarternion, Vec3, World } from 'cannon-es';
66
import CannonDebugger from 'cannon-es-debugger';
7+
import { createInjectionToken } from 'ngxtension/create-injection-token';
78
import * as THREE from 'three';
89

910
const q = new THREE.Quaternion();

libs/cannon/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"angular-three": "^2.0.0",
3030
"cannon-es": "^0.20.0",
3131
"cannon-es-debugger": "^1.0.0",
32+
"ngxtension": "^0.1.0",
3233
"three": ">=0.148.0"
3334
},
3435
"dependencies": {

libs/cannon/services/src/lib/body.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ import type {
2525
Triplet,
2626
VectorName,
2727
} from '@pmndrs/cannon-worker-api';
28-
import { assertInjector, injectNgtRef, type NgtAnyRecord, type NgtInjectedRef } from 'angular-three';
28+
import { injectNgtRef, type NgtAnyRecord, type NgtInjectedRef } from 'angular-three';
2929
import { injectNgtcPhysicsApi, type NgtcCannonEvents } from 'angular-three-cannon';
3030
import { injectNgtcDebugApi } from 'angular-three-cannon/debug';
31+
import { assertInjector } from 'ngxtension/assert-injector';
3132
import * as THREE from 'three';
3233

3334
export type NgtcAtomicApi<K extends AtomicName> = {

libs/cannon/services/src/lib/constraints.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import type {
55
HingeConstraintOpts,
66
PointToPointConstraintOpts,
77
} from '@pmndrs/cannon-worker-api';
8-
import { assertInjector, injectNgtRef, is, makeId, type NgtAnyRecord, type NgtInjectedRef } from 'angular-three';
8+
import { injectNgtRef, is, makeId, type NgtAnyRecord, type NgtInjectedRef } from 'angular-three';
99
import { injectNgtcPhysicsApi } from 'angular-three-cannon';
10+
import { assertInjector } from 'ngxtension/assert-injector';
1011
import * as THREE from 'three';
1112

1213
export type NgtcConstraintApi = {

libs/cannon/services/src/lib/contact-material.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { effect, runInInjectionContext, untracked, type Injector } from '@angular/core';
22
import type { ContactMaterialOptions, MaterialOptions } from '@pmndrs/cannon-worker-api';
3-
import { assertInjector, makeId, type NgtAnyRecord } from 'angular-three';
3+
import { makeId, type NgtAnyRecord } from 'angular-three';
44
import { injectNgtcPhysicsApi } from 'angular-three-cannon';
5+
import { assertInjector } from 'ngxtension/assert-injector';
56

67
export function injectContactMaterial(
78
materialB: MaterialOptions,

libs/cannon/services/src/lib/ray.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { effect, runInInjectionContext, untracked, type Injector } from '@angular/core';
22
import type { RayMode, RayOptions, RayhitEvent } from '@pmndrs/cannon-worker-api';
3-
import { assertInjector, makeId, type NgtAnyRecord } from 'angular-three';
3+
import { makeId, type NgtAnyRecord } from 'angular-three';
44
import { injectNgtcPhysicsApi } from 'angular-three-cannon';
5+
import { assertInjector } from 'ngxtension/assert-injector';
56

67
export type NgtcRayOptions = {
78
options: () => RayOptions;

0 commit comments

Comments
 (0)