This repository has been archived by the owner on Feb 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
300 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
// GENERATED | ||
export * from './lib/box/box.directive'; | ||
export * from './lib/plane/plane.directive'; | ||
export * from './lib/cylinder/cylinder.directive'; | ||
export * from './lib/heightfield/heightfield.directive'; | ||
export * from './lib/particle/particle.directive'; | ||
export * from './lib/sphere/sphere.directive'; | ||
export * from './lib/trimesh/trimesh.directive'; | ||
export * from './lib/convex-polyhedron/convex-polyhedron.directive'; | ||
export * from './lib/compound/compound.directive'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/cannon/bodies/src/lib/compound/compound.directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// GENERATED | ||
import { | ||
CompoundBodyProps, | ||
GetByIndex, | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
NGT_PHYSIC_BODY_TYPE, | ||
} from '@angular-three/cannon'; | ||
import { Directive, NgModule } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[ngtPhysicCompound]', | ||
exportAs: 'ngtPhysicCompound', | ||
providers: [ | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
{ provide: NGT_PHYSIC_BODY_TYPE, useValue: 'Compound' }, | ||
], | ||
}) | ||
export class NgtPhysicCompound { | ||
static ngAcceptInputType_getPhysicProps: | ||
| GetByIndex<CompoundBodyProps> | ||
| undefined; | ||
} | ||
|
||
@NgModule({ | ||
declarations: [NgtPhysicCompound], | ||
exports: [NgtPhysicCompound], | ||
}) | ||
export class NgtPhysicCompoundModule {} |
42 changes: 42 additions & 0 deletions
42
packages/cannon/bodies/src/lib/convex-polyhedron/convex-polyhedron.directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// GENERATED | ||
import { | ||
ConvexPolyhedronProps, | ||
GetByIndex, | ||
NGT_PHYSIC_BODY_ARGS_FN, | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
NGT_PHYSIC_BODY_TYPE, | ||
makeTriplet, | ||
} from '@angular-three/cannon'; | ||
import { Directive, NgModule } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[ngtPhysicConvexPolyhedron]', | ||
exportAs: 'ngtPhysicConvexPolyhedron', | ||
providers: [ | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
{ provide: NGT_PHYSIC_BODY_TYPE, useValue: 'ConvexPolyhedron' }, | ||
{ | ||
provide: NGT_PHYSIC_BODY_ARGS_FN, | ||
useValue: (args: ConvexPolyhedronProps['args'] = []) => { | ||
return [ | ||
args[0] ? args[0].map(makeTriplet) : undefined, | ||
args[1], | ||
args[2] ? args[2].map(makeTriplet) : undefined, | ||
args[3] ? args[3].map(makeTriplet) : undefined, | ||
args[4], | ||
]; | ||
}, | ||
}, | ||
], | ||
}) | ||
export class NgtPhysicConvexPolyhedron { | ||
static ngAcceptInputType_getPhysicProps: | ||
| GetByIndex<ConvexPolyhedronProps> | ||
| undefined; | ||
} | ||
|
||
@NgModule({ | ||
declarations: [NgtPhysicConvexPolyhedron], | ||
exports: [NgtPhysicConvexPolyhedron], | ||
}) | ||
export class NgtPhysicConvexPolyhedronModule {} |
33 changes: 33 additions & 0 deletions
33
packages/cannon/bodies/src/lib/cylinder/cylinder.directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// GENERATED | ||
import { | ||
CylinderProps, | ||
GetByIndex, | ||
NGT_PHYSIC_BODY_ARGS_FN, | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
NGT_PHYSIC_BODY_TYPE, | ||
} from '@angular-three/cannon'; | ||
import { Directive, NgModule } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[ngtPhysicCylinder]', | ||
exportAs: 'ngtPhysicCylinder', | ||
providers: [ | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
{ provide: NGT_PHYSIC_BODY_TYPE, useValue: 'Cylinder' }, | ||
{ | ||
provide: NGT_PHYSIC_BODY_ARGS_FN, | ||
useValue: (args: CylinderProps['args'] = []) => args, | ||
}, | ||
], | ||
}) | ||
export class NgtPhysicCylinder { | ||
static ngAcceptInputType_getPhysicProps: | ||
| GetByIndex<CylinderProps> | ||
| undefined; | ||
} | ||
|
||
@NgModule({ | ||
declarations: [NgtPhysicCylinder], | ||
exports: [NgtPhysicCylinder], | ||
}) | ||
export class NgtPhysicCylinderModule {} |
28 changes: 28 additions & 0 deletions
28
packages/cannon/bodies/src/lib/heightfield/heightfield.directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// GENERATED | ||
import { | ||
HeightfieldProps, | ||
GetByIndex, | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
NGT_PHYSIC_BODY_TYPE, | ||
} from '@angular-three/cannon'; | ||
import { Directive, NgModule } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[ngtPhysicHeightfield]', | ||
exportAs: 'ngtPhysicHeightfield', | ||
providers: [ | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
{ provide: NGT_PHYSIC_BODY_TYPE, useValue: 'Heightfield' }, | ||
], | ||
}) | ||
export class NgtPhysicHeightfield { | ||
static ngAcceptInputType_getPhysicProps: | ||
| GetByIndex<HeightfieldProps> | ||
| undefined; | ||
} | ||
|
||
@NgModule({ | ||
declarations: [NgtPhysicHeightfield], | ||
exports: [NgtPhysicHeightfield], | ||
}) | ||
export class NgtPhysicHeightfieldModule {} |
30 changes: 30 additions & 0 deletions
30
packages/cannon/bodies/src/lib/particle/particle.directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// GENERATED | ||
import { | ||
ParticleProps, | ||
GetByIndex, | ||
NGT_PHYSIC_BODY_ARGS_FN, | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
NGT_PHYSIC_BODY_TYPE, | ||
} from '@angular-three/cannon'; | ||
import { Directive, NgModule } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[ngtPhysicParticle]', | ||
exportAs: 'ngtPhysicParticle', | ||
providers: [ | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
{ provide: NGT_PHYSIC_BODY_TYPE, useValue: 'Particle' }, | ||
{ provide: NGT_PHYSIC_BODY_ARGS_FN, useValue: () => [] }, | ||
], | ||
}) | ||
export class NgtPhysicParticle { | ||
static ngAcceptInputType_getPhysicProps: | ||
| GetByIndex<ParticleProps> | ||
| undefined; | ||
} | ||
|
||
@NgModule({ | ||
declarations: [NgtPhysicParticle], | ||
exports: [NgtPhysicParticle], | ||
}) | ||
export class NgtPhysicParticleModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// GENERATED | ||
import { | ||
PlaneProps, | ||
GetByIndex, | ||
NGT_PHYSIC_BODY_ARGS_FN, | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
NGT_PHYSIC_BODY_TYPE, | ||
} from '@angular-three/cannon'; | ||
import { Directive, NgModule } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[ngtPhysicPlane]', | ||
exportAs: 'ngtPhysicPlane', | ||
providers: [ | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
{ provide: NGT_PHYSIC_BODY_TYPE, useValue: 'Plane' }, | ||
{ provide: NGT_PHYSIC_BODY_ARGS_FN, useValue: () => [] }, | ||
], | ||
}) | ||
export class NgtPhysicPlane { | ||
static ngAcceptInputType_getPhysicProps: GetByIndex<PlaneProps> | undefined; | ||
} | ||
|
||
@NgModule({ | ||
declarations: [NgtPhysicPlane], | ||
exports: [NgtPhysicPlane], | ||
}) | ||
export class NgtPhysicPlaneModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// GENERATED | ||
import { | ||
SphereProps, | ||
GetByIndex, | ||
NGT_PHYSIC_BODY_ARGS_FN, | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
NGT_PHYSIC_BODY_TYPE, | ||
} from '@angular-three/cannon'; | ||
import { Directive, NgModule } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[ngtPhysicSphere]', | ||
exportAs: 'ngtPhysicSphere', | ||
providers: [ | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
{ provide: NGT_PHYSIC_BODY_TYPE, useValue: 'Sphere' }, | ||
{ | ||
provide: NGT_PHYSIC_BODY_ARGS_FN, | ||
useValue: (args: SphereProps['args'] = [1]) => { | ||
if (!Array.isArray(args)) | ||
throw new Error('ngtPhysicSphere args must be an array'); | ||
return [args[0]]; | ||
}, | ||
}, | ||
], | ||
}) | ||
export class NgtPhysicSphere { | ||
static ngAcceptInputType_getPhysicProps: GetByIndex<SphereProps> | undefined; | ||
} | ||
|
||
@NgModule({ | ||
declarations: [NgtPhysicSphere], | ||
exports: [NgtPhysicSphere], | ||
}) | ||
export class NgtPhysicSphereModule {} |
26 changes: 26 additions & 0 deletions
26
packages/cannon/bodies/src/lib/trimesh/trimesh.directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// GENERATED | ||
import { | ||
TrimeshProps, | ||
GetByIndex, | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
NGT_PHYSIC_BODY_TYPE, | ||
} from '@angular-three/cannon'; | ||
import { Directive, NgModule } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[ngtPhysicTrimesh]', | ||
exportAs: 'ngtPhysicTrimesh', | ||
providers: [ | ||
NGT_PHYSIC_BODY_CONTROLLER_PROVIDER, | ||
{ provide: NGT_PHYSIC_BODY_TYPE, useValue: 'Trimesh' }, | ||
], | ||
}) | ||
export class NgtPhysicTrimesh { | ||
static ngAcceptInputType_getPhysicProps: GetByIndex<TrimeshProps> | undefined; | ||
} | ||
|
||
@NgModule({ | ||
declarations: [NgtPhysicTrimesh], | ||
exports: [NgtPhysicTrimesh], | ||
}) | ||
export class NgtPhysicTrimeshModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters