angular-three-cannon 2.0.0-beta.260 → 2.0.0-beta.261

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.
@@ -6,12 +6,12 @@ export interface NgtcBodyOptions<TShape extends BodyShapeType> {
6
6
  transformArgs?: NgtcArgFn<NgtcBodyPropsMap[TShape]>;
7
7
  injector?: Injector;
8
8
  }
9
- export declare const injectBox: <TObject extends Object3D<import("three").Object3DEventMap>>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").BoxProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Box"> | undefined) => Signal<NgtcBodyPublicApi | null>;
10
- export declare const injectConvexPolyhedron: <TObject extends Object3D<import("three").Object3DEventMap>>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").ConvexPolyhedronProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"ConvexPolyhedron"> | undefined) => Signal<NgtcBodyPublicApi | null>;
11
- export declare const injectCylinder: <TObject extends Object3D<import("three").Object3DEventMap>>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").CylinderProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Cylinder"> | undefined) => Signal<NgtcBodyPublicApi | null>;
12
- export declare const injectHeightfield: <TObject extends Object3D<import("three").Object3DEventMap>>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").HeightfieldProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Heightfield"> | undefined) => Signal<NgtcBodyPublicApi | null>;
13
- export declare const injectParticle: <TObject extends Object3D<import("three").Object3DEventMap>>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").ParticleProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Particle"> | undefined) => Signal<NgtcBodyPublicApi | null>;
14
- export declare const injectPlane: <TObject extends Object3D<import("three").Object3DEventMap>>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").PlaneProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Plane"> | undefined) => Signal<NgtcBodyPublicApi | null>;
15
- export declare const injectSphere: <TObject extends Object3D<import("three").Object3DEventMap>>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").SphereProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Sphere"> | undefined) => Signal<NgtcBodyPublicApi | null>;
16
- export declare const injectTrimesh: <TObject extends Object3D<import("three").Object3DEventMap>>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").TrimeshProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Trimesh"> | undefined) => Signal<NgtcBodyPublicApi | null>;
17
- export declare const injectCompound: <TObject extends Object3D<import("three").Object3DEventMap>>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").CompoundBodyProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Compound"> | undefined) => Signal<NgtcBodyPublicApi | null>;
9
+ export declare const injectBox: <TObject extends Object3D>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").BoxProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Box"> | undefined) => Signal<NgtcBodyPublicApi | null>;
10
+ export declare const injectConvexPolyhedron: <TObject extends Object3D>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").ConvexPolyhedronProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"ConvexPolyhedron"> | undefined) => Signal<NgtcBodyPublicApi | null>;
11
+ export declare const injectCylinder: <TObject extends Object3D>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").CylinderProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Cylinder"> | undefined) => Signal<NgtcBodyPublicApi | null>;
12
+ export declare const injectHeightfield: <TObject extends Object3D>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").HeightfieldProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Heightfield"> | undefined) => Signal<NgtcBodyPublicApi | null>;
13
+ export declare const injectParticle: <TObject extends Object3D>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").ParticleProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Particle"> | undefined) => Signal<NgtcBodyPublicApi | null>;
14
+ export declare const injectPlane: <TObject extends Object3D>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").PlaneProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Plane"> | undefined) => Signal<NgtcBodyPublicApi | null>;
15
+ export declare const injectSphere: <TObject extends Object3D>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").SphereProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Sphere"> | undefined) => Signal<NgtcBodyPublicApi | null>;
16
+ export declare const injectTrimesh: <TObject extends Object3D>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").TrimeshProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Trimesh"> | undefined) => Signal<NgtcBodyPublicApi | null>;
17
+ export declare const injectCompound: <TObject extends Object3D>(getPropFn: NgtcGetByIndex<import("@pmndrs/cannon-worker-api").CompoundBodyProps>, ref: TObject | ElementRef<TObject> | Signal<TObject | ElementRef<TObject> | undefined>, options?: NgtcBodyOptions<"Compound"> | undefined) => Signal<NgtcBodyPublicApi | null>;
@@ -38,13 +38,13 @@ export declare function makeBodyApi(body: Object3D, worker: CannonWorkerAPI, { s
38
38
  remove: () => void;
39
39
  };
40
40
  export declare const defaultTransformArgs: {
41
- Plane: (args: PlaneProps['args']) => never[];
42
- Box: (args?: BoxProps['args']) => Triplet;
41
+ Plane: (args: PlaneProps["args"]) => never[];
42
+ Box: (args?: BoxProps["args"]) => Triplet;
43
43
  Trimesh: (args: TrimeshArgs) => TrimeshArgs;
44
44
  Cylinder: (args?: CylinderArgs) => never[];
45
45
  Heightfield: (args: HeightfieldArgs) => HeightfieldArgs;
46
46
  ConvexPolyhedron: ([vertices, faces, normals, axes, boundingSphereRadius]?: ConvexPolyhedronArgs) => (number | number[][] | undefined)[];
47
- Particle: (args: ParticleProps['args']) => never[];
47
+ Particle: (args: ParticleProps["args"]) => never[];
48
48
  Sphere: (args?: SphereArgs) => number[];
49
- Compound: (args: CompoundBodyProps['args']) => unknown[] | undefined;
49
+ Compound: (args: CompoundBodyProps["args"]) => unknown[] | undefined;
50
50
  };
@@ -25,8 +25,8 @@ export type NgtcConstraintOptions<TConstraintType extends 'Hinge' | ConstraintTy
25
25
  disableOnStart?: boolean;
26
26
  options?: NgtcConstraintOptionsMap[TConstraintType];
27
27
  };
28
- export declare const injectPointToPoint: <A extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>, B extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"PointToPoint"> | undefined) => Signal<NgtcConstraintApi | null>;
29
- export declare const injectConeTwist: <A extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>, B extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"ConeTwist"> | undefined) => Signal<NgtcConstraintApi | null>;
30
- export declare const injectDistance: <A extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>, B extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"Distance"> | undefined) => Signal<NgtcConstraintApi | null>;
31
- export declare const injectLock: <A extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>, B extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"Lock"> | undefined) => Signal<NgtcConstraintApi | null>;
32
- export declare const injectHinge: <A extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>, B extends Object3D<import("three").Object3DEventMap> = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"Hinge"> | undefined) => Signal<NgtcConstraintApi | null>;
28
+ export declare const injectPointToPoint: <A extends Object3D = Object3D<import("three").Object3DEventMap>, B extends Object3D = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"PointToPoint"> | undefined) => Signal<NgtcConstraintApi | null>;
29
+ export declare const injectConeTwist: <A extends Object3D = Object3D<import("three").Object3DEventMap>, B extends Object3D = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"ConeTwist"> | undefined) => Signal<NgtcConstraintApi | null>;
30
+ export declare const injectDistance: <A extends Object3D = Object3D<import("three").Object3DEventMap>, B extends Object3D = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"Distance"> | undefined) => Signal<NgtcConstraintApi | null>;
31
+ export declare const injectLock: <A extends Object3D = Object3D<import("three").Object3DEventMap>, B extends Object3D = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"Lock"> | undefined) => Signal<NgtcConstraintApi | null>;
32
+ export declare const injectHinge: <A extends Object3D = Object3D<import("three").Object3DEventMap>, B extends Object3D = Object3D<import("three").Object3DEventMap>>(bodyA: A | ElementRef<A> | Signal<A | ElementRef<A> | undefined>, bodyB: B | ElementRef<B> | Signal<B | ElementRef<B> | undefined>, options?: NgtcConstraintOptions<"Hinge"> | undefined) => Signal<NgtcConstraintApi | null>;
@@ -72,10 +72,10 @@ export class NgtcDebug {
72
72
  this.bodies.splice(debugBodyIndex, 1);
73
73
  delete this.bodyMap[uuid];
74
74
  }
75
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: NgtcDebug, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
76
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.0.6", type: NgtcDebug, isStandalone: true, selector: "ngtc-physics[debug]", inputs: { debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
75
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtcDebug, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
76
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.0", type: NgtcDebug, isStandalone: true, selector: "ngtc-physics[debug]", inputs: { debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
77
77
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: NgtcDebug, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtcDebug, decorators: [{
79
79
  type: Directive,
80
80
  args: [{ selector: 'ngtc-physics[debug]', standalone: true }]
81
81
  }], ctorParameters: () => [] });
@@ -179,12 +179,12 @@ export class NgtcPhysics {
179
179
  if (cb)
180
180
  cb({ body: body ? refs[body] : null, ray: { uuid, ...rayRest }, ...rest });
181
181
  }
182
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: NgtcPhysics, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
183
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.6", type: NgtcPhysics, isStandalone: true, selector: "ngtc-physics", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
182
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtcPhysics, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
183
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.0", type: NgtcPhysics, isStandalone: true, selector: "ngtc-physics", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
184
184
  <ng-content />
185
185
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
186
186
  }
187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: NgtcPhysics, decorators: [{
187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtcPhysics, decorators: [{
188
188
  type: Component,
189
189
  args: [{
190
190
  selector: 'ngtc-physics',
@@ -73,10 +73,10 @@ class NgtcDebug {
73
73
  this.bodies.splice(debugBodyIndex, 1);
74
74
  delete this.bodyMap[uuid];
75
75
  }
76
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: NgtcDebug, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
77
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.0.6", type: NgtcDebug, isStandalone: true, selector: "ngtc-physics[debug]", inputs: { debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtcDebug, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
77
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.0", type: NgtcDebug, isStandalone: true, selector: "ngtc-physics[debug]", inputs: { debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
78
78
  }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: NgtcDebug, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtcDebug, decorators: [{
80
80
  type: Directive,
81
81
  args: [{ selector: 'ngtc-physics[debug]', standalone: true }]
82
82
  }], ctorParameters: () => [] });
@@ -180,12 +180,12 @@ class NgtcPhysics {
180
180
  if (cb)
181
181
  cb({ body: body ? refs[body] : null, ray: { uuid, ...rayRest }, ...rest });
182
182
  }
183
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: NgtcPhysics, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
184
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.6", type: NgtcPhysics, isStandalone: true, selector: "ngtc-physics", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
183
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtcPhysics, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
184
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.0", type: NgtcPhysics, isStandalone: true, selector: "ngtc-physics", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
185
185
  <ng-content />
186
186
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
187
187
  }
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: NgtcPhysics, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtcPhysics, decorators: [{
189
189
  type: Component,
190
190
  args: [{
191
191
  selector: 'ngtc-physics',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-three-cannon",
3
- "version": "2.0.0-beta.260",
3
+ "version": "2.0.0-beta.261",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,14 +23,18 @@
23
23
  ],
24
24
  "license": "MIT",
25
25
  "peerDependencies": {
26
- "@angular/common": "^18.0.0",
27
- "@angular/core": "^18.0.0",
26
+ "@angular/common": ">=18.0.0",
27
+ "@angular/core": ">=18.0.0",
28
28
  "@pmndrs/cannon-worker-api": "^2.0.0",
29
29
  "cannon-es": "^0.20.0",
30
30
  "cannon-es-debugger": "^1.0.0",
31
- "ngxtension": "^3.0.0",
32
31
  "three": ">=0.148.0"
33
32
  },
33
+ "peerDependenciesMeta": {
34
+ "cannon-es-debugger": {
35
+ "optional": true
36
+ }
37
+ },
34
38
  "dependencies": {
35
39
  "tslib": "^2.3.0"
36
40
  },