angular-three-rapier 4.2.0 → 4.2.2
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.
|
@@ -74,11 +74,11 @@ const COLLISION_GROUPS_HANDLER = new InjectionToken('COLLISION_GROUPS_HANDLER');
|
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
76
|
class NgtrInteractionGroups {
|
|
77
|
-
inputs = input.required({ ...(ngDevMode ? { debugName: "inputs" } : {}), alias: 'interactionGroups' });
|
|
77
|
+
inputs = input.required({ ...(ngDevMode ? { debugName: "inputs" } : /* istanbul ignore next */ {}), alias: 'interactionGroups' });
|
|
78
78
|
interactionGroups = computed(() => {
|
|
79
79
|
const [memberships, filters] = this.inputs();
|
|
80
80
|
return interactionGroups(memberships, filters);
|
|
81
|
-
}, ...(ngDevMode ? [{ debugName: "interactionGroups" }] : []));
|
|
81
|
+
}, ...(ngDevMode ? [{ debugName: "interactionGroups" }] : /* istanbul ignore next */ []));
|
|
82
82
|
constructor() {
|
|
83
83
|
const collisionGroupsHandlerFn = inject(COLLISION_GROUPS_HANDLER, { host: true, optional: true });
|
|
84
84
|
effect(() => {
|
|
@@ -90,10 +90,10 @@ class NgtrInteractionGroups {
|
|
|
90
90
|
handler(this.interactionGroups());
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
94
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrInteractionGroups, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
94
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrInteractionGroups, isStandalone: true, selector: "ngt-object3D[interactionGroups]", inputs: { inputs: { classPropertyName: "inputs", publicName: "interactionGroups", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
95
95
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrInteractionGroups, decorators: [{
|
|
97
97
|
type: Directive,
|
|
98
98
|
args: [{ selector: 'ngt-object3D[interactionGroups]' }]
|
|
99
99
|
}], ctorParameters: () => [], propDecorators: { inputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactionGroups", required: true }] }] } });
|
|
@@ -134,8 +134,8 @@ class NgtrDebug {
|
|
|
134
134
|
lineSegments.geometry = geometry;
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
138
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrDebug, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: NgtrDebug, isStandalone: true, selector: "ngtr-debug", viewQueries: [{ propertyName: "lineSegmentsRef", first: true, predicate: ["lineSegments"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
139
139
|
<ngt-group>
|
|
140
140
|
<ngt-line-segments #lineSegments [frustumCulled]="false">
|
|
141
141
|
<ngt-line-basic-material color="white" vertexColors />
|
|
@@ -144,7 +144,7 @@ class NgtrDebug {
|
|
|
144
144
|
</ngt-group>
|
|
145
145
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
146
146
|
}
|
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrDebug, decorators: [{
|
|
148
148
|
type: Component,
|
|
149
149
|
args: [{
|
|
150
150
|
selector: 'ngtr-debug',
|
|
@@ -168,10 +168,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
168
168
|
* This directive is used internally by NgtrPhysics and should not be used directly.
|
|
169
169
|
*/
|
|
170
170
|
class NgtrFrameStepper {
|
|
171
|
-
ready = input(false, ...(ngDevMode ? [{ debugName: "ready" }] : []));
|
|
172
|
-
updatePriority = input(0, ...(ngDevMode ? [{ debugName: "updatePriority" }] : []));
|
|
173
|
-
stepFn = input.required(...(ngDevMode ? [{ debugName: "stepFn" }] : []));
|
|
174
|
-
type = input.required(...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
171
|
+
ready = input(false, ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
|
|
172
|
+
updatePriority = input(0, ...(ngDevMode ? [{ debugName: "updatePriority" }] : /* istanbul ignore next */ []));
|
|
173
|
+
stepFn = input.required(...(ngDevMode ? [{ debugName: "stepFn" }] : /* istanbul ignore next */ []));
|
|
174
|
+
type = input.required(...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
175
175
|
constructor() {
|
|
176
176
|
const store = injectStore();
|
|
177
177
|
effect((onCleanup) => {
|
|
@@ -200,10 +200,10 @@ class NgtrFrameStepper {
|
|
|
200
200
|
onCleanup(() => cancelAnimationFrame(raf));
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
204
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
203
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrFrameStepper, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
204
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrFrameStepper, isStandalone: true, selector: "ngtr-frame-stepper", inputs: { ready: { classPropertyName: "ready", publicName: "ready", isSignal: true, isRequired: false, transformFunction: null }, updatePriority: { classPropertyName: "updatePriority", publicName: "updatePriority", isSignal: true, isRequired: false, transformFunction: null }, stepFn: { classPropertyName: "stepFn", publicName: "stepFn", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
205
205
|
}
|
|
206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrFrameStepper, decorators: [{
|
|
207
207
|
type: Directive,
|
|
208
208
|
args: [{ selector: 'ngtr-frame-stepper' }]
|
|
209
209
|
}], ctorParameters: () => [], propDecorators: { ready: [{ type: i0.Input, args: [{ isSignal: true, alias: "ready", required: false }] }], updatePriority: [{ type: i0.Input, args: [{ isSignal: true, alias: "updatePriority", required: false }] }], stepFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepFn", required: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }] } });
|
|
@@ -481,10 +481,10 @@ class NgtrPhysicsFallback {
|
|
|
481
481
|
static ngTemplateContextGuard(_, ctx) {
|
|
482
482
|
return true;
|
|
483
483
|
}
|
|
484
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
485
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
484
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrPhysicsFallback, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
485
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: NgtrPhysicsFallback, isStandalone: true, selector: "ng-template[rapierFallback]", ngImport: i0 });
|
|
486
486
|
}
|
|
487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
487
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrPhysicsFallback, decorators: [{
|
|
488
488
|
type: Directive,
|
|
489
489
|
args: [{ selector: 'ng-template[rapierFallback]' }]
|
|
490
490
|
}] });
|
|
@@ -511,9 +511,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
511
511
|
*/
|
|
512
512
|
class NgtrPhysics {
|
|
513
513
|
/** Physics configuration options */
|
|
514
|
-
options = input(defaultOptions$1, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultOptions$1) });
|
|
514
|
+
options = input(defaultOptions$1, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), transform: mergeInputs(defaultOptions$1) });
|
|
515
515
|
content = contentChild.required(TemplateRef);
|
|
516
|
-
fallbackContent = contentChild(NgtrPhysicsFallback, { ...(ngDevMode ? { debugName: "fallbackContent" } : {}), read: TemplateRef });
|
|
516
|
+
fallbackContent = contentChild(NgtrPhysicsFallback, { ...(ngDevMode ? { debugName: "fallbackContent" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
517
517
|
updatePriority = pick(this.options, 'updatePriority');
|
|
518
518
|
updateLoop = pick(this.options, 'updateLoop');
|
|
519
519
|
numSolverIterations = pick(this.options, 'numSolverIterations');
|
|
@@ -533,18 +533,18 @@ class NgtrPhysics {
|
|
|
533
533
|
colliders = pick(this.options, 'colliders');
|
|
534
534
|
vGravity = vector3(this.options, 'gravity');
|
|
535
535
|
store = injectStore();
|
|
536
|
-
rapierConstruct = signal(null, ...(ngDevMode ? [{ debugName: "rapierConstruct" }] : []));
|
|
537
|
-
rapierError = signal(null, ...(ngDevMode ? [{ debugName: "rapierError" }] : []));
|
|
536
|
+
rapierConstruct = signal(null, ...(ngDevMode ? [{ debugName: "rapierConstruct" }] : /* istanbul ignore next */ []));
|
|
537
|
+
rapierError = signal(null, ...(ngDevMode ? [{ debugName: "rapierError" }] : /* istanbul ignore next */ []));
|
|
538
538
|
/** The loaded Rapier module, null if not yet loaded */
|
|
539
539
|
rapier = this.rapierConstruct.asReadonly();
|
|
540
|
-
ready = computed(() => !!this.rapier(), ...(ngDevMode ? [{ debugName: "ready" }] : []));
|
|
540
|
+
ready = computed(() => !!this.rapier(), ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
|
|
541
541
|
/** Singleton proxy to the Rapier physics world */
|
|
542
542
|
worldSingleton = computed(() => {
|
|
543
543
|
const rapier = this.rapier();
|
|
544
544
|
if (!rapier)
|
|
545
545
|
return null;
|
|
546
546
|
return createSingletonProxy(() => new rapier.World(untracked(this.vGravity)));
|
|
547
|
-
}, ...(ngDevMode ? [{ debugName: "worldSingleton" }] : []));
|
|
547
|
+
}, ...(ngDevMode ? [{ debugName: "worldSingleton" }] : /* istanbul ignore next */ []));
|
|
548
548
|
/** Map of rigid body states indexed by handle */
|
|
549
549
|
rigidBodyStates = new Map();
|
|
550
550
|
/** Map of collider states indexed by handle */
|
|
@@ -584,7 +584,7 @@ class NgtrPhysics {
|
|
|
584
584
|
if (!rapier)
|
|
585
585
|
return null;
|
|
586
586
|
return new EventQueue(false);
|
|
587
|
-
}, ...(ngDevMode ? [{ debugName: "eventQueue" }] : []));
|
|
587
|
+
}, ...(ngDevMode ? [{ debugName: "eventQueue" }] : /* istanbul ignore next */ []));
|
|
588
588
|
steppingState = { accumulator: 0, previousState: {} };
|
|
589
589
|
constructor() {
|
|
590
590
|
import('@dimforge/rapier3d-compat')
|
|
@@ -844,8 +844,8 @@ class NgtrPhysics {
|
|
|
844
844
|
},
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
848
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
847
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrPhysics, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
848
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NgtrPhysics, isStandalone: true, selector: "ngtr-physics", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, isSignal: true }, { propertyName: "fallbackContent", first: true, predicate: NgtrPhysicsFallback, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: `
|
|
849
849
|
@let _rapierError = rapierError();
|
|
850
850
|
@let _fallbackContent = fallbackContent();
|
|
851
851
|
|
|
@@ -867,7 +867,7 @@ class NgtrPhysics {
|
|
|
867
867
|
}
|
|
868
868
|
`, isInline: true, dependencies: [{ kind: "component", type: NgtrDebug, selector: "ngtr-debug" }, { kind: "directive", type: NgtrFrameStepper, selector: "ngtr-frame-stepper", inputs: ["ready", "updatePriority", "stepFn", "type"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
869
869
|
}
|
|
870
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrPhysics, decorators: [{
|
|
871
871
|
type: Component,
|
|
872
872
|
args: [{
|
|
873
873
|
selector: 'ngtr-physics',
|
|
@@ -913,13 +913,13 @@ const colliderDefaultOptions = {
|
|
|
913
913
|
* ```
|
|
914
914
|
*/
|
|
915
915
|
class NgtrAnyCollider {
|
|
916
|
-
position = input([0, 0, 0], ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
917
|
-
rotation = input(...(ngDevMode ? [undefined, { debugName: "rotation" }] : []));
|
|
918
|
-
scale = input([1, 1, 1], ...(ngDevMode ? [{ debugName: "scale" }] : []));
|
|
919
|
-
quaternion = input(...(ngDevMode ? [undefined, { debugName: "quaternion" }] : []));
|
|
920
|
-
userData = input(...(ngDevMode ? [undefined, { debugName: "userData" }] : []));
|
|
921
|
-
name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : []));
|
|
922
|
-
options = input(colliderDefaultOptions, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(rigidBodyDefaultOptions) });
|
|
916
|
+
position = input([0, 0, 0], ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
917
|
+
rotation = input(...(ngDevMode ? [undefined, { debugName: "rotation" }] : /* istanbul ignore next */ []));
|
|
918
|
+
scale = input([1, 1, 1], ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
|
|
919
|
+
quaternion = input(...(ngDevMode ? [undefined, { debugName: "quaternion" }] : /* istanbul ignore next */ []));
|
|
920
|
+
userData = input(...(ngDevMode ? [undefined, { debugName: "userData" }] : /* istanbul ignore next */ []));
|
|
921
|
+
name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
|
|
922
|
+
options = input(colliderDefaultOptions, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), transform: mergeInputs(rigidBodyDefaultOptions) });
|
|
923
923
|
object3DParameters = computed(() => {
|
|
924
924
|
const [position, rotation, scale, quaternion, userData, name] = [
|
|
925
925
|
this.position(),
|
|
@@ -940,11 +940,11 @@ class NgtrAnyCollider {
|
|
|
940
940
|
Object.assign(parameters, { rotation: [0, 0, 0] });
|
|
941
941
|
}
|
|
942
942
|
return parameters;
|
|
943
|
-
}, ...(ngDevMode ? [{ debugName: "object3DParameters" }] : []));
|
|
943
|
+
}, ...(ngDevMode ? [{ debugName: "object3DParameters" }] : /* istanbul ignore next */ []));
|
|
944
944
|
// TODO: change this to input required when Angular allows setting hostDirective input
|
|
945
|
-
shape = model(undefined, { ...(ngDevMode ? { debugName: "shape" } : {}), alias: 'collider' });
|
|
945
|
+
shape = model(undefined, { ...(ngDevMode ? { debugName: "shape" } : /* istanbul ignore next */ {}), alias: 'collider' });
|
|
946
946
|
// NOTE: this will be typed by individual collider
|
|
947
|
-
args = model([], ...(ngDevMode ? [{ debugName: "args" }] : []));
|
|
947
|
+
args = model([], ...(ngDevMode ? [{ debugName: "args" }] : /* istanbul ignore next */ []));
|
|
948
948
|
collisionEnter = output();
|
|
949
949
|
collisionExit = output();
|
|
950
950
|
intersectionEnter = output();
|
|
@@ -995,7 +995,7 @@ class NgtrAnyCollider {
|
|
|
995
995
|
this.worldScale.x,
|
|
996
996
|
];
|
|
997
997
|
return cloned.map((arg, index) => scaleArray[index] * arg);
|
|
998
|
-
}, ...(ngDevMode ? [{ debugName: "scaledArgs" }] : []));
|
|
998
|
+
}, ...(ngDevMode ? [{ debugName: "scaledArgs" }] : /* istanbul ignore next */ []));
|
|
999
999
|
collider = computed(() => {
|
|
1000
1000
|
const worldSingleton = this.physics.worldSingleton();
|
|
1001
1001
|
if (!worldSingleton)
|
|
@@ -1009,7 +1009,7 @@ class NgtrAnyCollider {
|
|
|
1009
1009
|
if (!desc)
|
|
1010
1010
|
return null;
|
|
1011
1011
|
return worldSingleton.proxy.createCollider(desc, rigidBody ?? undefined);
|
|
1012
|
-
}, ...(ngDevMode ? [{ debugName: "collider" }] : []));
|
|
1012
|
+
}, ...(ngDevMode ? [{ debugName: "collider" }] : /* istanbul ignore next */ []));
|
|
1013
1013
|
constructor() {
|
|
1014
1014
|
extend({ Object3D });
|
|
1015
1015
|
effect(() => {
|
|
@@ -1195,10 +1195,10 @@ class NgtrAnyCollider {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
return scaledVerts;
|
|
1197
1197
|
}
|
|
1198
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1199
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrAnyCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1199
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrAnyCollider, isStandalone: true, selector: "ngt-object3D[collider]", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, rotation: { classPropertyName: "rotation", publicName: "rotation", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null }, quaternion: { classPropertyName: "quaternion", publicName: "quaternion", isSignal: true, isRequired: false, transformFunction: null }, userData: { classPropertyName: "userData", publicName: "userData", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "collider", isSignal: true, isRequired: false, transformFunction: null }, args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { shape: "colliderChange", args: "argsChange", collisionEnter: "collisionEnter", collisionExit: "collisionExit", intersectionEnter: "intersectionEnter", intersectionExit: "intersectionExit", contactForce: "contactForce" }, ngImport: i0 });
|
|
1200
1200
|
}
|
|
1201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrAnyCollider, decorators: [{
|
|
1202
1202
|
type: Directive,
|
|
1203
1203
|
args: [{ selector: 'ngt-object3D[collider]' }]
|
|
1204
1204
|
}], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], rotation: [{ type: i0.Input, args: [{ isSignal: true, alias: "rotation", required: false }] }], scale: [{ type: i0.Input, args: [{ isSignal: true, alias: "scale", required: false }] }], quaternion: [{ type: i0.Input, args: [{ isSignal: true, alias: "quaternion", required: false }] }], userData: [{ type: i0.Input, args: [{ isSignal: true, alias: "userData", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "collider", required: false }] }, { type: i0.Output, args: ["colliderChange"] }], args: [{ type: i0.Input, args: [{ isSignal: true, alias: "args", required: false }] }, { type: i0.Output, args: ["argsChange"] }], collisionEnter: [{ type: i0.Output, args: ["collisionEnter"] }], collisionExit: [{ type: i0.Output, args: ["collisionExit"] }], intersectionEnter: [{ type: i0.Output, args: ["intersectionEnter"] }], intersectionExit: [{ type: i0.Output, args: ["intersectionExit"] }], contactForce: [{ type: i0.Output, args: ["contactForce"] }] } });
|
|
@@ -1256,19 +1256,19 @@ const rigidBodyDefaultOptions = {
|
|
|
1256
1256
|
* ```
|
|
1257
1257
|
*/
|
|
1258
1258
|
class NgtrRigidBody {
|
|
1259
|
-
type = input.required({ ...(ngDevMode ? { debugName: "type" } : {}), alias: 'rigidBody',
|
|
1259
|
+
type = input.required({ ...(ngDevMode ? { debugName: "type" } : /* istanbul ignore next */ {}), alias: 'rigidBody',
|
|
1260
1260
|
transform: (value) => {
|
|
1261
1261
|
if (value === '' || value === undefined)
|
|
1262
1262
|
return 'dynamic';
|
|
1263
1263
|
return value;
|
|
1264
1264
|
} });
|
|
1265
|
-
position = input([0, 0, 0], ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
1266
|
-
rotation = input(...(ngDevMode ? [undefined, { debugName: "rotation" }] : []));
|
|
1267
|
-
scale = input([1, 1, 1], ...(ngDevMode ? [{ debugName: "scale" }] : []));
|
|
1268
|
-
quaternion = input(...(ngDevMode ? [undefined, { debugName: "quaternion" }] : []));
|
|
1269
|
-
userData = input(...(ngDevMode ? [undefined, { debugName: "userData" }] : []));
|
|
1270
|
-
options = input(rigidBodyDefaultOptions, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(rigidBodyDefaultOptions) });
|
|
1271
|
-
anyColliders = viewChildren(NgtrAnyCollider, ...(ngDevMode ? [{ debugName: "anyColliders" }] : []));
|
|
1265
|
+
position = input([0, 0, 0], ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
1266
|
+
rotation = input(...(ngDevMode ? [undefined, { debugName: "rotation" }] : /* istanbul ignore next */ []));
|
|
1267
|
+
scale = input([1, 1, 1], ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
|
|
1268
|
+
quaternion = input(...(ngDevMode ? [undefined, { debugName: "quaternion" }] : /* istanbul ignore next */ []));
|
|
1269
|
+
userData = input(...(ngDevMode ? [undefined, { debugName: "userData" }] : /* istanbul ignore next */ []));
|
|
1270
|
+
options = input(rigidBodyDefaultOptions, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), transform: mergeInputs(rigidBodyDefaultOptions) });
|
|
1271
|
+
anyColliders = viewChildren(NgtrAnyCollider, ...(ngDevMode ? [{ debugName: "anyColliders" }] : /* istanbul ignore next */ []));
|
|
1272
1272
|
object3DParameters = computed(() => {
|
|
1273
1273
|
const [position, rotation, scale, quaternion, userData] = [
|
|
1274
1274
|
this.position(),
|
|
@@ -1288,7 +1288,7 @@ class NgtrRigidBody {
|
|
|
1288
1288
|
Object.assign(parameters, { rotation: [0, 0, 0] });
|
|
1289
1289
|
}
|
|
1290
1290
|
return parameters;
|
|
1291
|
-
}, ...(ngDevMode ? [{ debugName: "object3DParameters" }] : []));
|
|
1291
|
+
}, ...(ngDevMode ? [{ debugName: "object3DParameters" }] : /* istanbul ignore next */ []));
|
|
1292
1292
|
wake = output();
|
|
1293
1293
|
sleep = output();
|
|
1294
1294
|
collisionEnter = output();
|
|
@@ -1314,17 +1314,17 @@ class NgtrRigidBody {
|
|
|
1314
1314
|
linearVelocity = pick(this.options, 'linearVelocity');
|
|
1315
1315
|
objectRef = inject(ElementRef);
|
|
1316
1316
|
physics = inject(NgtrPhysics);
|
|
1317
|
-
bodyType = computed(() => RIGID_BODY_TYPE_MAP[this.type()], ...(ngDevMode ? [{ debugName: "bodyType" }] : []));
|
|
1317
|
+
bodyType = computed(() => RIGID_BODY_TYPE_MAP[this.type()], ...(ngDevMode ? [{ debugName: "bodyType" }] : /* istanbul ignore next */ []));
|
|
1318
1318
|
bodyDesc = computed(() => {
|
|
1319
1319
|
const [canSleep, bodyType] = [this.canSleep(), untracked(this.bodyType), this.colliders()];
|
|
1320
1320
|
return new RigidBodyDesc(bodyType).setCanSleep(canSleep);
|
|
1321
|
-
}, ...(ngDevMode ? [{ debugName: "bodyDesc" }] : []));
|
|
1321
|
+
}, ...(ngDevMode ? [{ debugName: "bodyDesc" }] : /* istanbul ignore next */ []));
|
|
1322
1322
|
rigidBody = computed(() => {
|
|
1323
1323
|
const worldSingleton = this.physics.worldSingleton();
|
|
1324
1324
|
if (!worldSingleton)
|
|
1325
1325
|
return null;
|
|
1326
1326
|
return worldSingleton.proxy.createRigidBody(this.bodyDesc());
|
|
1327
|
-
}, ...(ngDevMode ? [{ debugName: "rigidBody" }] : []));
|
|
1327
|
+
}, ...(ngDevMode ? [{ debugName: "rigidBody" }] : /* istanbul ignore next */ []));
|
|
1328
1328
|
childColliderOptions = computed(() => {
|
|
1329
1329
|
const colliders = this.colliders();
|
|
1330
1330
|
// if self colliders is false explicitly, disable auto colliders for this object entirely.
|
|
@@ -1350,7 +1350,7 @@ class NgtrRigidBody {
|
|
|
1350
1350
|
if (!parent || !is.three(parent, 'isObject3D'))
|
|
1351
1351
|
return [];
|
|
1352
1352
|
return createColliderOptions(this.objectRef.nativeElement, options, true);
|
|
1353
|
-
}, ...(ngDevMode ? [{ debugName: "childColliderOptions" }] : []));
|
|
1353
|
+
}, ...(ngDevMode ? [{ debugName: "childColliderOptions" }] : /* istanbul ignore next */ []));
|
|
1354
1354
|
constructor() {
|
|
1355
1355
|
extend({ Object3D });
|
|
1356
1356
|
effect(() => {
|
|
@@ -1493,8 +1493,8 @@ class NgtrRigidBody {
|
|
|
1493
1493
|
meshType,
|
|
1494
1494
|
};
|
|
1495
1495
|
}
|
|
1496
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1497
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
1496
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRigidBody, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1497
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NgtrRigidBody, isStandalone: true, selector: "ngt-object3D[rigidBody]", inputs: { type: { classPropertyName: "type", publicName: "rigidBody", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, rotation: { classPropertyName: "rotation", publicName: "rotation", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null }, quaternion: { classPropertyName: "quaternion", publicName: "quaternion", isSignal: true, isRequired: false, transformFunction: null }, userData: { classPropertyName: "userData", publicName: "userData", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { wake: "wake", sleep: "sleep", collisionEnter: "collisionEnter", collisionExit: "collisionExit", intersectionEnter: "intersectionEnter", intersectionExit: "intersectionExit", contactForce: "contactForce" }, providers: [
|
|
1498
1498
|
{
|
|
1499
1499
|
provide: COLLISION_GROUPS_HANDLER,
|
|
1500
1500
|
useFactory: (rigidBody) => {
|
|
@@ -1530,7 +1530,7 @@ class NgtrRigidBody {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtrAnyCollider, selector: "ngt-object3D[collider]", inputs: ["position", "rotation", "scale", "quaternion", "userData", "name", "options", "collider", "args"], outputs: ["colliderChange", "argsChange", "collisionEnter", "collisionExit", "intersectionEnter", "intersectionExit", "contactForce"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1532
1532
|
}
|
|
1533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRigidBody, decorators: [{
|
|
1534
1534
|
type: Component,
|
|
1535
1535
|
args: [{
|
|
1536
1536
|
selector: 'ngt-object3D[rigidBody]',
|
|
@@ -1592,7 +1592,7 @@ const ANY_COLLIDER_HOST_DIRECTIVE = {
|
|
|
1592
1592
|
* ```
|
|
1593
1593
|
*/
|
|
1594
1594
|
class NgtrCuboidCollider {
|
|
1595
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'cuboidCollider' });
|
|
1595
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'cuboidCollider' });
|
|
1596
1596
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1597
1597
|
collider = this.anyCollider.collider;
|
|
1598
1598
|
constructor() {
|
|
@@ -1601,10 +1601,10 @@ class NgtrCuboidCollider {
|
|
|
1601
1601
|
this.anyCollider.setArgs(this.args());
|
|
1602
1602
|
});
|
|
1603
1603
|
}
|
|
1604
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1605
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1604
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrCuboidCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1605
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrCuboidCollider, isStandalone: true, selector: "ngt-object3D[cuboidCollider]", inputs: { args: { classPropertyName: "args", publicName: "cuboidCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["cuboidCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1606
1606
|
}
|
|
1607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrCuboidCollider, decorators: [{
|
|
1608
1608
|
type: Directive,
|
|
1609
1609
|
args: [{
|
|
1610
1610
|
selector: 'ngt-object3D[cuboidCollider]',
|
|
@@ -1621,7 +1621,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1621
1621
|
* ```
|
|
1622
1622
|
*/
|
|
1623
1623
|
class NgtrCapsuleCollider {
|
|
1624
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'capsuleCollider' });
|
|
1624
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'capsuleCollider' });
|
|
1625
1625
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1626
1626
|
collider = this.anyCollider.collider;
|
|
1627
1627
|
constructor() {
|
|
@@ -1630,10 +1630,10 @@ class NgtrCapsuleCollider {
|
|
|
1630
1630
|
this.anyCollider.setArgs(this.args());
|
|
1631
1631
|
});
|
|
1632
1632
|
}
|
|
1633
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1634
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1633
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrCapsuleCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1634
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrCapsuleCollider, isStandalone: true, selector: "ngt-object3D[capsuleCollider]", inputs: { args: { classPropertyName: "args", publicName: "capsuleCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["capsuleCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1635
1635
|
}
|
|
1636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrCapsuleCollider, decorators: [{
|
|
1637
1637
|
type: Directive,
|
|
1638
1638
|
args: [{
|
|
1639
1639
|
selector: 'ngt-object3D[capsuleCollider]',
|
|
@@ -1650,7 +1650,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1650
1650
|
* ```
|
|
1651
1651
|
*/
|
|
1652
1652
|
class NgtrBallCollider {
|
|
1653
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'ballCollider' });
|
|
1653
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'ballCollider' });
|
|
1654
1654
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1655
1655
|
collider = this.anyCollider.collider;
|
|
1656
1656
|
constructor() {
|
|
@@ -1659,10 +1659,10 @@ class NgtrBallCollider {
|
|
|
1659
1659
|
this.anyCollider.setArgs(this.args());
|
|
1660
1660
|
});
|
|
1661
1661
|
}
|
|
1662
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1663
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1662
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrBallCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1663
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrBallCollider, isStandalone: true, selector: "ngt-object3D[ballCollider]", inputs: { args: { classPropertyName: "args", publicName: "ballCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["ballCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1664
1664
|
}
|
|
1665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrBallCollider, decorators: [{
|
|
1666
1666
|
type: Directive,
|
|
1667
1667
|
args: [{
|
|
1668
1668
|
selector: 'ngt-object3D[ballCollider]',
|
|
@@ -1680,7 +1680,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1680
1680
|
* ```
|
|
1681
1681
|
*/
|
|
1682
1682
|
class NgtrConvexHullCollider {
|
|
1683
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'convexHullCollider' });
|
|
1683
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'convexHullCollider' });
|
|
1684
1684
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1685
1685
|
collider = this.anyCollider.collider;
|
|
1686
1686
|
constructor() {
|
|
@@ -1689,10 +1689,10 @@ class NgtrConvexHullCollider {
|
|
|
1689
1689
|
this.anyCollider.setArgs(this.args());
|
|
1690
1690
|
});
|
|
1691
1691
|
}
|
|
1692
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1693
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1692
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrConvexHullCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1693
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrConvexHullCollider, isStandalone: true, selector: "ngt-object3D[convexHullCollider]", inputs: { args: { classPropertyName: "args", publicName: "convexHullCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["convexHullCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1694
1694
|
}
|
|
1695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrConvexHullCollider, decorators: [{
|
|
1696
1696
|
type: Directive,
|
|
1697
1697
|
args: [{
|
|
1698
1698
|
selector: 'ngt-object3D[convexHullCollider]',
|
|
@@ -1710,7 +1710,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1710
1710
|
* ```
|
|
1711
1711
|
*/
|
|
1712
1712
|
class NgtrHeightfieldCollider {
|
|
1713
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'heightfieldCollider' });
|
|
1713
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'heightfieldCollider' });
|
|
1714
1714
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1715
1715
|
collider = this.anyCollider.collider;
|
|
1716
1716
|
constructor() {
|
|
@@ -1719,10 +1719,10 @@ class NgtrHeightfieldCollider {
|
|
|
1719
1719
|
this.anyCollider.setArgs(this.args());
|
|
1720
1720
|
});
|
|
1721
1721
|
}
|
|
1722
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1723
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1722
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrHeightfieldCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1723
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrHeightfieldCollider, isStandalone: true, selector: "ngt-object3D[heightfieldCollider]", inputs: { args: { classPropertyName: "args", publicName: "heightfieldCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["heightfieldCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1724
1724
|
}
|
|
1725
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1725
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrHeightfieldCollider, decorators: [{
|
|
1726
1726
|
type: Directive,
|
|
1727
1727
|
args: [{
|
|
1728
1728
|
selector: 'ngt-object3D[heightfieldCollider]',
|
|
@@ -1740,7 +1740,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1740
1740
|
* ```
|
|
1741
1741
|
*/
|
|
1742
1742
|
class NgtrTrimeshCollider {
|
|
1743
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'trimeshCollider' });
|
|
1743
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'trimeshCollider' });
|
|
1744
1744
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1745
1745
|
collider = this.anyCollider.collider;
|
|
1746
1746
|
constructor() {
|
|
@@ -1749,10 +1749,10 @@ class NgtrTrimeshCollider {
|
|
|
1749
1749
|
this.anyCollider.setArgs(this.args());
|
|
1750
1750
|
});
|
|
1751
1751
|
}
|
|
1752
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1753
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1752
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrTrimeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1753
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrTrimeshCollider, isStandalone: true, selector: "ngt-object3D[trimeshCollider]", inputs: { args: { classPropertyName: "args", publicName: "trimeshCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["trimeshCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1754
1754
|
}
|
|
1755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrTrimeshCollider, decorators: [{
|
|
1756
1756
|
type: Directive,
|
|
1757
1757
|
args: [{
|
|
1758
1758
|
selector: 'ngt-object3D[trimeshCollider]',
|
|
@@ -1769,7 +1769,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1769
1769
|
* ```
|
|
1770
1770
|
*/
|
|
1771
1771
|
class NgtrPolylineCollider {
|
|
1772
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'polylineCollider' });
|
|
1772
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'polylineCollider' });
|
|
1773
1773
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1774
1774
|
collider = this.anyCollider.collider;
|
|
1775
1775
|
constructor() {
|
|
@@ -1778,10 +1778,10 @@ class NgtrPolylineCollider {
|
|
|
1778
1778
|
this.anyCollider.setArgs(this.args());
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
1781
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1782
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1781
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrPolylineCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1782
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrPolylineCollider, isStandalone: true, selector: "ngt-object3D[polylineCollider]", inputs: { args: { classPropertyName: "args", publicName: "polylineCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["polylineCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1783
1783
|
}
|
|
1784
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrPolylineCollider, decorators: [{
|
|
1785
1785
|
type: Directive,
|
|
1786
1786
|
args: [{
|
|
1787
1787
|
selector: 'ngt-object3D[polylineCollider]',
|
|
@@ -1798,7 +1798,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1798
1798
|
* ```
|
|
1799
1799
|
*/
|
|
1800
1800
|
class NgtrRoundCuboidCollider {
|
|
1801
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'roundCuboidCollider' });
|
|
1801
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'roundCuboidCollider' });
|
|
1802
1802
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1803
1803
|
collider = this.anyCollider.collider;
|
|
1804
1804
|
constructor() {
|
|
@@ -1807,10 +1807,10 @@ class NgtrRoundCuboidCollider {
|
|
|
1807
1807
|
this.anyCollider.setArgs(this.args());
|
|
1808
1808
|
});
|
|
1809
1809
|
}
|
|
1810
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1811
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1810
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundCuboidCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1811
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrRoundCuboidCollider, isStandalone: true, selector: "ngt-object3D[roundCuboidCollider]", inputs: { args: { classPropertyName: "args", publicName: "roundCuboidCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["roundCuboidCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1812
1812
|
}
|
|
1813
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1813
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundCuboidCollider, decorators: [{
|
|
1814
1814
|
type: Directive,
|
|
1815
1815
|
args: [{
|
|
1816
1816
|
selector: 'ngt-object3D[roundCuboidCollider]',
|
|
@@ -1827,7 +1827,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1827
1827
|
* ```
|
|
1828
1828
|
*/
|
|
1829
1829
|
class NgtrCylinderCollider {
|
|
1830
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'cylinderCollider' });
|
|
1830
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'cylinderCollider' });
|
|
1831
1831
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1832
1832
|
collider = this.anyCollider.collider;
|
|
1833
1833
|
constructor() {
|
|
@@ -1836,10 +1836,10 @@ class NgtrCylinderCollider {
|
|
|
1836
1836
|
this.anyCollider.setArgs(this.args());
|
|
1837
1837
|
});
|
|
1838
1838
|
}
|
|
1839
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1840
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1839
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrCylinderCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1840
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrCylinderCollider, isStandalone: true, selector: "ngt-object3D[cylinderCollider]", inputs: { args: { classPropertyName: "args", publicName: "cylinderCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["cylinderCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1841
1841
|
}
|
|
1842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrCylinderCollider, decorators: [{
|
|
1843
1843
|
type: Directive,
|
|
1844
1844
|
args: [{
|
|
1845
1845
|
selector: 'ngt-object3D[cylinderCollider]',
|
|
@@ -1856,7 +1856,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1856
1856
|
* ```
|
|
1857
1857
|
*/
|
|
1858
1858
|
class NgtrRoundCylinderCollider {
|
|
1859
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'roundCylinderCollider' });
|
|
1859
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'roundCylinderCollider' });
|
|
1860
1860
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1861
1861
|
collider = this.anyCollider.collider;
|
|
1862
1862
|
constructor() {
|
|
@@ -1865,10 +1865,10 @@ class NgtrRoundCylinderCollider {
|
|
|
1865
1865
|
this.anyCollider.setArgs(this.args());
|
|
1866
1866
|
});
|
|
1867
1867
|
}
|
|
1868
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1869
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1868
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundCylinderCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1869
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrRoundCylinderCollider, isStandalone: true, selector: "ngt-object3D[roundCylinderCollider]", inputs: { args: { classPropertyName: "args", publicName: "roundCylinderCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["roundCylinderCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1870
1870
|
}
|
|
1871
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundCylinderCollider, decorators: [{
|
|
1872
1872
|
type: Directive,
|
|
1873
1873
|
args: [{
|
|
1874
1874
|
selector: 'ngt-object3D[roundCylinderCollider]',
|
|
@@ -1885,7 +1885,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1885
1885
|
* ```
|
|
1886
1886
|
*/
|
|
1887
1887
|
class NgtrConeCollider {
|
|
1888
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'coneCollider' });
|
|
1888
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'coneCollider' });
|
|
1889
1889
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1890
1890
|
collider = this.anyCollider.collider;
|
|
1891
1891
|
constructor() {
|
|
@@ -1894,10 +1894,10 @@ class NgtrConeCollider {
|
|
|
1894
1894
|
this.anyCollider.setArgs(this.args());
|
|
1895
1895
|
});
|
|
1896
1896
|
}
|
|
1897
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1898
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1897
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrConeCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1898
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrConeCollider, isStandalone: true, selector: "ngt-object3D[coneCollider]", inputs: { args: { classPropertyName: "args", publicName: "coneCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["coneCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1899
1899
|
}
|
|
1900
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrConeCollider, decorators: [{
|
|
1901
1901
|
type: Directive,
|
|
1902
1902
|
args: [{
|
|
1903
1903
|
selector: 'ngt-object3D[coneCollider]',
|
|
@@ -1914,7 +1914,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1914
1914
|
* ```
|
|
1915
1915
|
*/
|
|
1916
1916
|
class NgtrRoundConeCollider {
|
|
1917
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'roundConeCollider' });
|
|
1917
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'roundConeCollider' });
|
|
1918
1918
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1919
1919
|
collider = this.anyCollider.collider;
|
|
1920
1920
|
constructor() {
|
|
@@ -1923,10 +1923,10 @@ class NgtrRoundConeCollider {
|
|
|
1923
1923
|
this.anyCollider.setArgs(this.args());
|
|
1924
1924
|
});
|
|
1925
1925
|
}
|
|
1926
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1927
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1926
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundConeCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1927
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrRoundConeCollider, isStandalone: true, selector: "ngt-object3D[roundConeCollider]", inputs: { args: { classPropertyName: "args", publicName: "roundConeCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["roundConeCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1928
1928
|
}
|
|
1929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundConeCollider, decorators: [{
|
|
1930
1930
|
type: Directive,
|
|
1931
1931
|
args: [{
|
|
1932
1932
|
selector: 'ngt-object3D[roundConeCollider]',
|
|
@@ -1943,7 +1943,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1943
1943
|
* ```
|
|
1944
1944
|
*/
|
|
1945
1945
|
class NgtrConvexMeshCollider {
|
|
1946
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'convexMeshCollider' });
|
|
1946
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'convexMeshCollider' });
|
|
1947
1947
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1948
1948
|
collider = this.anyCollider.collider;
|
|
1949
1949
|
constructor() {
|
|
@@ -1952,10 +1952,10 @@ class NgtrConvexMeshCollider {
|
|
|
1952
1952
|
this.anyCollider.setArgs(this.args());
|
|
1953
1953
|
});
|
|
1954
1954
|
}
|
|
1955
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1956
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1955
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrConvexMeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1956
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrConvexMeshCollider, isStandalone: true, selector: "ngt-object3D[convexMeshCollider]", inputs: { args: { classPropertyName: "args", publicName: "convexMeshCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["convexMeshCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1957
1957
|
}
|
|
1958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1958
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrConvexMeshCollider, decorators: [{
|
|
1959
1959
|
type: Directive,
|
|
1960
1960
|
args: [{
|
|
1961
1961
|
selector: 'ngt-object3D[convexMeshCollider]',
|
|
@@ -1972,7 +1972,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1972
1972
|
* ```
|
|
1973
1973
|
*/
|
|
1974
1974
|
class NgtrRoundConvexHullCollider {
|
|
1975
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'roundConvexHullCollider' });
|
|
1975
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'roundConvexHullCollider' });
|
|
1976
1976
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
1977
1977
|
collider = this.anyCollider.collider;
|
|
1978
1978
|
constructor() {
|
|
@@ -1981,10 +1981,10 @@ class NgtrRoundConvexHullCollider {
|
|
|
1981
1981
|
this.anyCollider.setArgs(this.args());
|
|
1982
1982
|
});
|
|
1983
1983
|
}
|
|
1984
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1985
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1984
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundConvexHullCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1985
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrRoundConvexHullCollider, isStandalone: true, selector: "ngt-object3D[roundConvexHullCollider]", inputs: { args: { classPropertyName: "args", publicName: "roundConvexHullCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["roundConvexHullCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
1986
1986
|
}
|
|
1987
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundConvexHullCollider, decorators: [{
|
|
1988
1988
|
type: Directive,
|
|
1989
1989
|
args: [{
|
|
1990
1990
|
selector: 'ngt-object3D[roundConvexHullCollider]',
|
|
@@ -2001,7 +2001,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
2001
2001
|
* ```
|
|
2002
2002
|
*/
|
|
2003
2003
|
class NgtrRoundConvexMeshCollider {
|
|
2004
|
-
args = input.required({ ...(ngDevMode ? { debugName: "args" } : {}), alias: 'roundConvexMeshCollider' });
|
|
2004
|
+
args = input.required({ ...(ngDevMode ? { debugName: "args" } : /* istanbul ignore next */ {}), alias: 'roundConvexMeshCollider' });
|
|
2005
2005
|
anyCollider = inject(NgtrAnyCollider, { host: true });
|
|
2006
2006
|
collider = this.anyCollider.collider;
|
|
2007
2007
|
constructor() {
|
|
@@ -2010,10 +2010,10 @@ class NgtrRoundConvexMeshCollider {
|
|
|
2010
2010
|
this.anyCollider.setArgs(this.args());
|
|
2011
2011
|
});
|
|
2012
2012
|
}
|
|
2013
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2014
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
2013
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundConvexMeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2014
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NgtrRoundConvexMeshCollider, isStandalone: true, selector: "ngt-object3D[roundConvexMeshCollider]", inputs: { args: { classPropertyName: "args", publicName: "roundConvexMeshCollider", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["roundConvexMeshCollider"], hostDirectives: [{ directive: NgtrAnyCollider, inputs: ["options", "options", "name", "name", "scale", "scale", "position", "position", "quaternion", "quaternion", "rotation", "rotation", "userData", "userData"], outputs: ["collisionEnter", "collisionEnter", "collisionExit", "collisionExit", "intersectionEnter", "intersectionEnter", "intersectionExit", "intersectionExit", "contactForce", "contactForce"] }], ngImport: i0 });
|
|
2015
2015
|
}
|
|
2016
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2016
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrRoundConvexMeshCollider, decorators: [{
|
|
2017
2017
|
type: Directive,
|
|
2018
2018
|
args: [{
|
|
2019
2019
|
selector: 'ngt-object3D[roundConvexMeshCollider]',
|
|
@@ -2048,18 +2048,18 @@ const defaultOptions = rigidBodyDefaultOptions;
|
|
|
2048
2048
|
* ```
|
|
2049
2049
|
*/
|
|
2050
2050
|
class NgtrInstancedRigidBodies {
|
|
2051
|
-
position = input([0, 0, 0], ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
2052
|
-
rotation = input(...(ngDevMode ? [undefined, { debugName: "rotation" }] : []));
|
|
2053
|
-
scale = input([1, 1, 1], ...(ngDevMode ? [{ debugName: "scale" }] : []));
|
|
2054
|
-
quaternion = input(...(ngDevMode ? [undefined, { debugName: "quaternion" }] : []));
|
|
2055
|
-
userData = input(...(ngDevMode ? [undefined, { debugName: "userData" }] : []));
|
|
2056
|
-
instances = input.required({ ...(ngDevMode ? { debugName: "instances" } : {}), alias: 'instancedRigidBodies',
|
|
2051
|
+
position = input([0, 0, 0], ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
2052
|
+
rotation = input(...(ngDevMode ? [undefined, { debugName: "rotation" }] : /* istanbul ignore next */ []));
|
|
2053
|
+
scale = input([1, 1, 1], ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
|
|
2054
|
+
quaternion = input(...(ngDevMode ? [undefined, { debugName: "quaternion" }] : /* istanbul ignore next */ []));
|
|
2055
|
+
userData = input(...(ngDevMode ? [undefined, { debugName: "userData" }] : /* istanbul ignore next */ []));
|
|
2056
|
+
instances = input.required({ ...(ngDevMode ? { debugName: "instances" } : /* istanbul ignore next */ {}), alias: 'instancedRigidBodies',
|
|
2057
2057
|
transform: (value) => {
|
|
2058
2058
|
if (value === '')
|
|
2059
2059
|
return [];
|
|
2060
2060
|
return value;
|
|
2061
2061
|
} });
|
|
2062
|
-
options = input(defaultOptions, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultOptions) });
|
|
2062
|
+
options = input(defaultOptions, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), transform: mergeInputs(defaultOptions) });
|
|
2063
2063
|
object3DParameters = computed(() => {
|
|
2064
2064
|
const [position, rotation, scale, quaternion, userData] = [
|
|
2065
2065
|
this.position(),
|
|
@@ -2079,9 +2079,9 @@ class NgtrInstancedRigidBodies {
|
|
|
2079
2079
|
Object.assign(parameters, { rotation: [0, 0, 0] });
|
|
2080
2080
|
}
|
|
2081
2081
|
return parameters;
|
|
2082
|
-
}, ...(ngDevMode ? [{ debugName: "object3DParameters" }] : []));
|
|
2082
|
+
}, ...(ngDevMode ? [{ debugName: "object3DParameters" }] : /* istanbul ignore next */ []));
|
|
2083
2083
|
instanceWrapperRef = viewChild.required('instanceWrapper');
|
|
2084
|
-
rigidBodyRefs = viewChildren(NgtrRigidBody, ...(ngDevMode ? [{ debugName: "rigidBodyRefs" }] : []));
|
|
2084
|
+
rigidBodyRefs = viewChildren(NgtrRigidBody, ...(ngDevMode ? [{ debugName: "rigidBodyRefs" }] : /* istanbul ignore next */ []));
|
|
2085
2085
|
physics = inject(NgtrPhysics);
|
|
2086
2086
|
objectRef = inject(ElementRef);
|
|
2087
2087
|
colliders = pick(this.options, 'colliders');
|
|
@@ -2098,7 +2098,7 @@ class NgtrInstancedRigidBodies {
|
|
|
2098
2098
|
if (!firstChild || !firstChild.isInstancedMesh)
|
|
2099
2099
|
return null;
|
|
2100
2100
|
return firstChild;
|
|
2101
|
-
}, ...(ngDevMode ? [{ debugName: "instancedMesh" }] : []));
|
|
2101
|
+
}, ...(ngDevMode ? [{ debugName: "instancedMesh" }] : /* istanbul ignore next */ []));
|
|
2102
2102
|
instancesOptions = computed(() => {
|
|
2103
2103
|
const [instances, options, instancedMesh] = [this.instances(), untracked(this.options), this.instancedMesh()];
|
|
2104
2104
|
if (!instancedMesh)
|
|
@@ -2125,7 +2125,7 @@ class NgtrInstancedRigidBodies {
|
|
|
2125
2125
|
},
|
|
2126
2126
|
key: `${instance.key}-${index}` + `${instancedMesh?.uuid || ''}`,
|
|
2127
2127
|
}));
|
|
2128
|
-
}, ...(ngDevMode ? [{ debugName: "instancesOptions" }] : []));
|
|
2128
|
+
}, ...(ngDevMode ? [{ debugName: "instancesOptions" }] : /* istanbul ignore next */ []));
|
|
2129
2129
|
childColliderOptions = computed(() => {
|
|
2130
2130
|
const colliders = this.colliders();
|
|
2131
2131
|
// if self colliders is false explicitly, disable auto colliders for this object entirely.
|
|
@@ -2147,7 +2147,7 @@ class NgtrInstancedRigidBodies {
|
|
|
2147
2147
|
if (!parent || !is.three(parent, 'isObject3D'))
|
|
2148
2148
|
return [];
|
|
2149
2149
|
return createColliderOptions(this.objectRef.nativeElement, options);
|
|
2150
|
-
}, ...(ngDevMode ? [{ debugName: "childColliderOptions" }] : []));
|
|
2150
|
+
}, ...(ngDevMode ? [{ debugName: "childColliderOptions" }] : /* istanbul ignore next */ []));
|
|
2151
2151
|
constructor() {
|
|
2152
2152
|
extend({ Object3D });
|
|
2153
2153
|
effect(() => {
|
|
@@ -2161,8 +2161,8 @@ class NgtrInstancedRigidBodies {
|
|
|
2161
2161
|
instancedMesh.instanceMatrix.setUsage(THREE.DynamicDrawUsage);
|
|
2162
2162
|
});
|
|
2163
2163
|
}
|
|
2164
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2165
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
2164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrInstancedRigidBodies, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2165
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NgtrInstancedRigidBodies, isStandalone: true, selector: "ngt-object3D[instancedRigidBodies]", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, rotation: { classPropertyName: "rotation", publicName: "rotation", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null }, quaternion: { classPropertyName: "quaternion", publicName: "quaternion", isSignal: true, isRequired: false, transformFunction: null }, userData: { classPropertyName: "userData", publicName: "userData", isSignal: true, isRequired: false, transformFunction: null }, instances: { classPropertyName: "instances", publicName: "instancedRigidBodies", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "instanceWrapperRef", first: true, predicate: ["instanceWrapper"], descendants: true, isSignal: true }, { propertyName: "rigidBodyRefs", predicate: NgtrRigidBody, descendants: true, isSignal: true }], exportAs: ["instancedRigidBodies"], ngImport: i0, template: `
|
|
2166
2166
|
<ngt-object3D #instanceWrapper>
|
|
2167
2167
|
<ng-content />
|
|
2168
2168
|
</ngt-object3D>
|
|
@@ -2195,7 +2195,7 @@ class NgtrInstancedRigidBodies {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
`, isInline: true, dependencies: [{ kind: "component", type: NgtrRigidBody, selector: "ngt-object3D[rigidBody]", inputs: ["rigidBody", "position", "rotation", "scale", "quaternion", "userData", "options"], outputs: ["wake", "sleep", "collisionEnter", "collisionExit", "intersectionEnter", "intersectionExit", "contactForce"], exportAs: ["rigidBody"] }, { kind: "directive", type: NgtrAnyCollider, selector: "ngt-object3D[collider]", inputs: ["position", "rotation", "scale", "quaternion", "userData", "name", "options", "collider", "args"], outputs: ["colliderChange", "argsChange", "collisionEnter", "collisionExit", "intersectionEnter", "intersectionExit", "contactForce"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2197
2197
|
}
|
|
2198
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrInstancedRigidBodies, decorators: [{
|
|
2199
2199
|
type: Component,
|
|
2200
2200
|
args: [{
|
|
2201
2201
|
selector: 'ngt-object3D[instancedRigidBodies]',
|
|
@@ -2253,7 +2253,7 @@ function impulseJoint(bodyA, bodyB, { injector, data }) {
|
|
|
2253
2253
|
if (!jointData)
|
|
2254
2254
|
return null;
|
|
2255
2255
|
return worldSingleton.proxy.createImpulseJoint(jointData, a, b, true);
|
|
2256
|
-
}, ...(ngDevMode ? [{ debugName: "newJoint" }] : []));
|
|
2256
|
+
}, ...(ngDevMode ? [{ debugName: "newJoint" }] : /* istanbul ignore next */ []));
|
|
2257
2257
|
effect((onCleanup) => {
|
|
2258
2258
|
const worldSingleton = physics.worldSingleton();
|
|
2259
2259
|
if (!worldSingleton)
|
|
@@ -2283,7 +2283,7 @@ function createJoint(jointDataFn) {
|
|
|
2283
2283
|
if (!rapier)
|
|
2284
2284
|
return null;
|
|
2285
2285
|
return jointDataFn(rapier, untracked(dataFn));
|
|
2286
|
-
}, ...(ngDevMode ? [{ debugName: "jointData" }] : []));
|
|
2286
|
+
}, ...(ngDevMode ? [{ debugName: "jointData" }] : /* istanbul ignore next */ []));
|
|
2287
2287
|
return impulseJoint(bodyA, bodyB, { injector, data: jointData });
|
|
2288
2288
|
});
|
|
2289
2289
|
};
|
|
@@ -2498,7 +2498,7 @@ const injectSpringJoint = springJoint;
|
|
|
2498
2498
|
* ```
|
|
2499
2499
|
*/
|
|
2500
2500
|
class NgtrMeshCollider {
|
|
2501
|
-
colliders = input.required({ ...(ngDevMode ? { debugName: "colliders" } : {}), alias: 'meshCollider' });
|
|
2501
|
+
colliders = input.required({ ...(ngDevMode ? { debugName: "colliders" } : /* istanbul ignore next */ {}), alias: 'meshCollider' });
|
|
2502
2502
|
objectRef = inject(ElementRef);
|
|
2503
2503
|
rigidBody = inject(NgtrRigidBody);
|
|
2504
2504
|
childColliderOptions = computed(() => {
|
|
@@ -2511,14 +2511,14 @@ class NgtrMeshCollider {
|
|
|
2511
2511
|
objectInstaceState.nonObjects();
|
|
2512
2512
|
objectInstaceState.objects();
|
|
2513
2513
|
return createColliderOptions(this.objectRef.nativeElement, rigidBodyOptions, false);
|
|
2514
|
-
}, ...(ngDevMode ? [{ debugName: "childColliderOptions" }] : []));
|
|
2514
|
+
}, ...(ngDevMode ? [{ debugName: "childColliderOptions" }] : /* istanbul ignore next */ []));
|
|
2515
2515
|
constructor() {
|
|
2516
2516
|
extend({ Object3D });
|
|
2517
2517
|
this.objectRef.nativeElement.userData ??= {};
|
|
2518
2518
|
this.objectRef.nativeElement.userData['ngtrRapierType'] = 'MeshCollider';
|
|
2519
2519
|
}
|
|
2520
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2521
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
2520
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrMeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2521
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NgtrMeshCollider, isStandalone: true, selector: "ngt-object3D[meshCollider]", inputs: { colliders: { classPropertyName: "colliders", publicName: "meshCollider", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
2522
2522
|
<ng-content />
|
|
2523
2523
|
@for (childColliderOption of childColliderOptions(); track $index) {
|
|
2524
2524
|
<ngt-object3D
|
|
@@ -2533,7 +2533,7 @@ class NgtrMeshCollider {
|
|
|
2533
2533
|
}
|
|
2534
2534
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtrAnyCollider, selector: "ngt-object3D[collider]", inputs: ["position", "rotation", "scale", "quaternion", "userData", "name", "options", "collider", "args"], outputs: ["colliderChange", "argsChange", "collisionEnter", "collisionExit", "intersectionEnter", "intersectionExit", "contactForce"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2535
2535
|
}
|
|
2536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgtrMeshCollider, decorators: [{
|
|
2537
2537
|
type: Component,
|
|
2538
2538
|
args: [{
|
|
2539
2539
|
selector: 'ngt-object3D[meshCollider]',
|