angular-three-rapier 2.3.0 → 2.4.0
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.
- package/LICENSE +21 -0
- package/esm2022/lib/colliders.mjs +45 -45
- package/esm2022/lib/debug.mjs +3 -3
- package/esm2022/lib/frame-stepper.mjs +3 -3
- package/esm2022/lib/instanced-rigid-bodies.mjs +15 -14
- package/esm2022/lib/mesh-collider.mjs +9 -9
- package/esm2022/lib/physics.mjs +7 -7
- package/esm2022/lib/rigid-body.mjs +9 -10
- package/fesm2022/angular-three-rapier.mjs +87 -87
- package/fesm2022/angular-three-rapier.mjs.map +1 -1
- package/lib/instanced-rigid-bodies.d.ts +0 -1
- package/lib/physics.d.ts +4 -5
- package/package.json +3 -3
|
@@ -22,8 +22,8 @@ class NgtrDebug {
|
|
|
22
22
|
lineSegments.geometry.setAttribute('color', new BufferAttribute(buffers.colors, 4));
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
26
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrDebug, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.6", type: NgtrDebug, isStandalone: true, selector: "ngtr-debug", inputs: { world: { classPropertyName: "world", publicName: "world", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "lineSegmentsRef", first: true, predicate: ["lineSegments"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
27
27
|
<ngt-group>
|
|
28
28
|
<ngt-line-segments #lineSegments [frustumCulled]="false">
|
|
29
29
|
<ngt-line-basic-material color="white" [vertexColors]="true" />
|
|
@@ -32,7 +32,7 @@ class NgtrDebug {
|
|
|
32
32
|
</ngt-group>
|
|
33
33
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
34
34
|
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrDebug, decorators: [{
|
|
36
36
|
type: Component,
|
|
37
37
|
args: [{
|
|
38
38
|
selector: 'ngtr-debug',
|
|
@@ -82,10 +82,10 @@ class NgtrFrameStepper {
|
|
|
82
82
|
onCleanup(() => cancelAnimationFrame(raf));
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
86
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
85
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrFrameStepper, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
86
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", 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 });
|
|
87
87
|
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrFrameStepper, decorators: [{
|
|
89
89
|
type: Directive,
|
|
90
90
|
args: [{ standalone: true, selector: 'ngtr-frame-stepper' }]
|
|
91
91
|
}], ctorParameters: () => [] });
|
|
@@ -268,10 +268,10 @@ class NgtrPhysicsFallback {
|
|
|
268
268
|
static ngTemplateContextGuard(_, ctx) {
|
|
269
269
|
return true;
|
|
270
270
|
}
|
|
271
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
272
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
271
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrPhysicsFallback, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
272
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.6", type: NgtrPhysicsFallback, isStandalone: true, selector: "ng-template[rapierFallback]", ngImport: i0 });
|
|
273
273
|
}
|
|
274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrPhysicsFallback, decorators: [{
|
|
275
275
|
type: Directive,
|
|
276
276
|
args: [{ selector: 'ng-template[rapierFallback]', standalone: true }]
|
|
277
277
|
}] });
|
|
@@ -576,8 +576,8 @@ class NgtrPhysics {
|
|
|
576
576
|
},
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
580
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
579
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrPhysics, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
580
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", 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, isSignal: true }], ngImport: i0, template: `
|
|
581
581
|
@if (rapierConstruct()) {
|
|
582
582
|
@if (debug()) {
|
|
583
583
|
<ngtr-debug [world]="worldSingleton()?.proxy" />
|
|
@@ -596,7 +596,7 @@ class NgtrPhysics {
|
|
|
596
596
|
}
|
|
597
597
|
`, isInline: true, dependencies: [{ kind: "component", type: NgtrDebug, selector: "ngtr-debug", inputs: ["world"] }, { 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 });
|
|
598
598
|
}
|
|
599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrPhysics, decorators: [{
|
|
600
600
|
type: Component,
|
|
601
601
|
args: [{
|
|
602
602
|
selector: 'ngtr-physics',
|
|
@@ -873,10 +873,10 @@ class NgtrAnyCollider {
|
|
|
873
873
|
}
|
|
874
874
|
return scaledVerts;
|
|
875
875
|
}
|
|
876
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
877
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
876
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrAnyCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
877
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrAnyCollider, isStandalone: true, selector: "ngt-object3D[ngtrCollider]", 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: "ngtrCollider", isSignal: true, isRequired: false, transformFunction: null }, args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { shape: "ngtrColliderChange", args: "argsChange", collisionEnter: "collisionEnter", collisionExit: "collisionExit", intersectionEnter: "intersectionEnter", intersectionExit: "intersectionExit", contactForce: "contactForce" }, host: { properties: { "position": "position()", "rotation": "rotation()", "scale": "scale()", "quaternion": "quaternion()", "userData": "userData()", "name": "name()" } }, ngImport: i0 });
|
|
878
878
|
}
|
|
879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrAnyCollider, decorators: [{
|
|
880
880
|
type: Directive,
|
|
881
881
|
args: [{
|
|
882
882
|
selector: 'ngt-object3D[ngtrCollider]',
|
|
@@ -974,11 +974,10 @@ class NgtrRigidBody {
|
|
|
974
974
|
const objectLocalState = getLocalState(this.objectRef.nativeElement);
|
|
975
975
|
if (!objectLocalState)
|
|
976
976
|
return [];
|
|
977
|
-
|
|
977
|
+
// track object's parent and non-object children
|
|
978
|
+
const [parent] = [objectLocalState.parent(), objectLocalState.nonObjects()];
|
|
978
979
|
if (!parent || !parent.isObject3D)
|
|
979
980
|
return [];
|
|
980
|
-
// track object's children
|
|
981
|
-
objectLocalState?.nonObjects();
|
|
982
981
|
return createColliderOptions(this.objectRef.nativeElement, options, true);
|
|
983
982
|
});
|
|
984
983
|
constructor() {
|
|
@@ -1119,8 +1118,8 @@ class NgtrRigidBody {
|
|
|
1119
1118
|
meshType,
|
|
1120
1119
|
};
|
|
1121
1120
|
}
|
|
1122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1123
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
1121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRigidBody, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1122
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: NgtrRigidBody, isStandalone: true, selector: "ngt-object3D[ngtrRigidBody]", inputs: { type: { classPropertyName: "type", publicName: "ngtrRigidBody", isSignal: true, isRequired: false, 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" }, host: { properties: { "position": "position()", "rotation": "rotation()", "scale": "scale()", "quaternion": "quaternion()", "userData": "userData()" } }, exportAs: ["rigidBody"], ngImport: i0, template: `
|
|
1124
1123
|
<ng-content />
|
|
1125
1124
|
@for (childColliderOption of childColliderOptions(); track $index) {
|
|
1126
1125
|
<ngt-object3D
|
|
@@ -1135,7 +1134,7 @@ class NgtrRigidBody {
|
|
|
1135
1134
|
}
|
|
1136
1135
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtrAnyCollider, selector: "ngt-object3D[ngtrCollider]", inputs: ["position", "rotation", "scale", "quaternion", "userData", "name", "options", "ngtrCollider", "args"], outputs: ["ngtrColliderChange", "argsChange", "collisionEnter", "collisionExit", "intersectionEnter", "intersectionExit", "contactForce"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1137
1136
|
}
|
|
1138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRigidBody, decorators: [{
|
|
1139
1138
|
type: Component,
|
|
1140
1139
|
args: [{
|
|
1141
1140
|
selector: 'ngt-object3D[ngtrRigidBody]',
|
|
@@ -1185,10 +1184,10 @@ class NgtrCuboidCollider {
|
|
|
1185
1184
|
});
|
|
1186
1185
|
});
|
|
1187
1186
|
}
|
|
1188
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1189
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrCuboidCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1188
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrCuboidCollider, isStandalone: true, selector: "ngt-object3D[ngtrCuboidCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1190
1189
|
}
|
|
1191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrCuboidCollider, decorators: [{
|
|
1192
1191
|
type: Directive,
|
|
1193
1192
|
args: [{
|
|
1194
1193
|
selector: 'ngt-object3D[ngtrCuboidCollider]',
|
|
@@ -1208,10 +1207,10 @@ class NgtrCapsuleCollider {
|
|
|
1208
1207
|
});
|
|
1209
1208
|
});
|
|
1210
1209
|
}
|
|
1211
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1212
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1210
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrCapsuleCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1211
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrCapsuleCollider, isStandalone: true, selector: "ngt-object3D[ngtrCapsuleCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1213
1212
|
}
|
|
1214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrCapsuleCollider, decorators: [{
|
|
1215
1214
|
type: Directive,
|
|
1216
1215
|
args: [{
|
|
1217
1216
|
selector: 'ngt-object3D[ngtrCapsuleCollider]',
|
|
@@ -1231,10 +1230,10 @@ class NgtrBallCollider {
|
|
|
1231
1230
|
});
|
|
1232
1231
|
});
|
|
1233
1232
|
}
|
|
1234
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1235
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1233
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrBallCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1234
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrBallCollider, isStandalone: true, selector: "ngt-object3D[ngtrBallCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1236
1235
|
}
|
|
1237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrBallCollider, decorators: [{
|
|
1238
1237
|
type: Directive,
|
|
1239
1238
|
args: [{
|
|
1240
1239
|
selector: 'ngt-object3D[ngtrBallCollider]',
|
|
@@ -1254,10 +1253,10 @@ class NgtrConvexHullCollider {
|
|
|
1254
1253
|
});
|
|
1255
1254
|
});
|
|
1256
1255
|
}
|
|
1257
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1258
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1256
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrConvexHullCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1257
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrConvexHullCollider, isStandalone: true, selector: "ngt-object3D[ngtrConvexHullCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1259
1258
|
}
|
|
1260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrConvexHullCollider, decorators: [{
|
|
1261
1260
|
type: Directive,
|
|
1262
1261
|
args: [{
|
|
1263
1262
|
selector: 'ngt-object3D[ngtrConvexHullCollider]',
|
|
@@ -1277,10 +1276,10 @@ class NgtrHeightfieldCollider {
|
|
|
1277
1276
|
});
|
|
1278
1277
|
});
|
|
1279
1278
|
}
|
|
1280
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1281
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrHeightfieldCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1280
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrHeightfieldCollider, isStandalone: true, selector: "ngt-object3D[ngtrHeightfieldCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1282
1281
|
}
|
|
1283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrHeightfieldCollider, decorators: [{
|
|
1284
1283
|
type: Directive,
|
|
1285
1284
|
args: [{
|
|
1286
1285
|
selector: 'ngt-object3D[ngtrHeightfieldCollider]',
|
|
@@ -1300,10 +1299,10 @@ class NgtrTrimeshCollider {
|
|
|
1300
1299
|
});
|
|
1301
1300
|
});
|
|
1302
1301
|
}
|
|
1303
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1304
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1302
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrTrimeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1303
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrTrimeshCollider, isStandalone: true, selector: "ngt-object3D[ngtrTrimeshCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1305
1304
|
}
|
|
1306
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrTrimeshCollider, decorators: [{
|
|
1307
1306
|
type: Directive,
|
|
1308
1307
|
args: [{
|
|
1309
1308
|
selector: 'ngt-object3D[ngtrTrimeshCollider]',
|
|
@@ -1323,10 +1322,10 @@ class NgtrPolylineCollider {
|
|
|
1323
1322
|
});
|
|
1324
1323
|
});
|
|
1325
1324
|
}
|
|
1326
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1327
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1325
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrPolylineCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1326
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrPolylineCollider, isStandalone: true, selector: "ngt-object3D[ngtrPolylineCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1328
1327
|
}
|
|
1329
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrPolylineCollider, decorators: [{
|
|
1330
1329
|
type: Directive,
|
|
1331
1330
|
args: [{
|
|
1332
1331
|
selector: 'ngt-object3D[ngtrPolylineCollider]',
|
|
@@ -1346,10 +1345,10 @@ class NgtrRoundCuboidCollider {
|
|
|
1346
1345
|
});
|
|
1347
1346
|
});
|
|
1348
1347
|
}
|
|
1349
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1350
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1348
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundCuboidCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1349
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrRoundCuboidCollider, isStandalone: true, selector: "ngt-object3D[ngtrRoundCuboidCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1351
1350
|
}
|
|
1352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundCuboidCollider, decorators: [{
|
|
1353
1352
|
type: Directive,
|
|
1354
1353
|
args: [{
|
|
1355
1354
|
selector: 'ngt-object3D[ngtrRoundCuboidCollider]',
|
|
@@ -1369,10 +1368,10 @@ class NgtrCylinderCollider {
|
|
|
1369
1368
|
});
|
|
1370
1369
|
});
|
|
1371
1370
|
}
|
|
1372
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1373
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrCylinderCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1372
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrCylinderCollider, isStandalone: true, selector: "ngt-object3D[ngtrCylinderCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1374
1373
|
}
|
|
1375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrCylinderCollider, decorators: [{
|
|
1376
1375
|
type: Directive,
|
|
1377
1376
|
args: [{
|
|
1378
1377
|
selector: 'ngt-object3D[ngtrCylinderCollider]',
|
|
@@ -1392,10 +1391,10 @@ class NgtrRoundCylinderCollider {
|
|
|
1392
1391
|
});
|
|
1393
1392
|
});
|
|
1394
1393
|
}
|
|
1395
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1396
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1394
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundCylinderCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1395
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrRoundCylinderCollider, isStandalone: true, selector: "ngt-object3D[ngtrRoundCylinderCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1397
1396
|
}
|
|
1398
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundCylinderCollider, decorators: [{
|
|
1399
1398
|
type: Directive,
|
|
1400
1399
|
args: [{
|
|
1401
1400
|
selector: 'ngt-object3D[ngtrRoundCylinderCollider]',
|
|
@@ -1415,10 +1414,10 @@ class NgtrConeCollider {
|
|
|
1415
1414
|
});
|
|
1416
1415
|
});
|
|
1417
1416
|
}
|
|
1418
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1419
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1417
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrConeCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1418
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrConeCollider, isStandalone: true, selector: "ngt-object3D[ngtrConeCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1420
1419
|
}
|
|
1421
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrConeCollider, decorators: [{
|
|
1422
1421
|
type: Directive,
|
|
1423
1422
|
args: [{
|
|
1424
1423
|
selector: 'ngt-object3D[ngtrConeCollider]',
|
|
@@ -1438,10 +1437,10 @@ class NgtrRoundConeCollider {
|
|
|
1438
1437
|
});
|
|
1439
1438
|
});
|
|
1440
1439
|
}
|
|
1441
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1442
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1440
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundConeCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1441
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrRoundConeCollider, isStandalone: true, selector: "ngt-object3D[ngtrRoundConeCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1443
1442
|
}
|
|
1444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundConeCollider, decorators: [{
|
|
1445
1444
|
type: Directive,
|
|
1446
1445
|
args: [{
|
|
1447
1446
|
selector: 'ngt-object3D[ngtrRoundConeCollider]',
|
|
@@ -1461,10 +1460,10 @@ class NgtrConvexMeshCollider {
|
|
|
1461
1460
|
});
|
|
1462
1461
|
});
|
|
1463
1462
|
}
|
|
1464
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1465
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrConvexMeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1464
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrConvexMeshCollider, isStandalone: true, selector: "ngt-object3D[ngtrConvexMeshCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1466
1465
|
}
|
|
1467
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrConvexMeshCollider, decorators: [{
|
|
1468
1467
|
type: Directive,
|
|
1469
1468
|
args: [{
|
|
1470
1469
|
selector: 'ngt-object3D[ngtrConvexMeshCollider]',
|
|
@@ -1484,10 +1483,10 @@ class NgtrRoundConvexHullCollider {
|
|
|
1484
1483
|
});
|
|
1485
1484
|
});
|
|
1486
1485
|
}
|
|
1487
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1488
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1486
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundConvexHullCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1487
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrRoundConvexHullCollider, isStandalone: true, selector: "ngt-object3D[ngtrRoundConvexHullCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1489
1488
|
}
|
|
1490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1489
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundConvexHullCollider, decorators: [{
|
|
1491
1490
|
type: Directive,
|
|
1492
1491
|
args: [{
|
|
1493
1492
|
selector: 'ngt-object3D[ngtrRoundConvexHullCollider]',
|
|
@@ -1507,10 +1506,10 @@ class NgtrRoundConvexMeshCollider {
|
|
|
1507
1506
|
});
|
|
1508
1507
|
});
|
|
1509
1508
|
}
|
|
1510
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1511
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.
|
|
1509
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundConvexMeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1510
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.6", type: NgtrRoundConvexMeshCollider, isStandalone: true, selector: "ngt-object3D[ngtrRoundConvexMeshCollider]", inputs: { args: { classPropertyName: "args", publicName: "args", isSignal: true, isRequired: true, transformFunction: null } }, 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 });
|
|
1512
1511
|
}
|
|
1513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1512
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrRoundConvexMeshCollider, decorators: [{
|
|
1514
1513
|
type: Directive,
|
|
1515
1514
|
args: [{
|
|
1516
1515
|
selector: 'ngt-object3D[ngtrRoundConvexMeshCollider]',
|
|
@@ -1595,24 +1594,25 @@ class NgtrInstancedRigidBodies {
|
|
|
1595
1594
|
if (!options.colliders)
|
|
1596
1595
|
options.colliders = physicsColliders;
|
|
1597
1596
|
const objectLocalState = getLocalState(this.objectRef.nativeElement);
|
|
1598
|
-
|
|
1599
|
-
|
|
1597
|
+
if (!objectLocalState)
|
|
1598
|
+
return [];
|
|
1599
|
+
// track object's parent and non-object children
|
|
1600
|
+
const [parent] = [objectLocalState.parent(), objectLocalState.nonObjects()];
|
|
1601
|
+
if (!parent || !parent.isObject3D)
|
|
1602
|
+
return [];
|
|
1600
1603
|
return createColliderOptions(this.objectRef.nativeElement, options);
|
|
1601
1604
|
});
|
|
1602
1605
|
constructor() {
|
|
1603
1606
|
extend({ Object3D });
|
|
1604
1607
|
effect(() => {
|
|
1605
|
-
this.
|
|
1608
|
+
const instancedMesh = this.instancedMesh();
|
|
1609
|
+
if (!instancedMesh)
|
|
1610
|
+
return;
|
|
1611
|
+
instancedMesh.instanceMatrix.setUsage(DynamicDrawUsage);
|
|
1606
1612
|
});
|
|
1607
1613
|
}
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
if (!instancedMesh)
|
|
1611
|
-
return;
|
|
1612
|
-
instancedMesh.instanceMatrix.setUsage(DynamicDrawUsage);
|
|
1613
|
-
}
|
|
1614
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NgtrInstancedRigidBodies, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1615
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.4", type: NgtrInstancedRigidBodies, isStandalone: true, selector: "ngt-object3D[ngtrInstancedRigidBodies]", 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: "ngtrInstancedRigidBodies", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "position": "position()", "rotation": "rotation()", "scale": "scale()", "quaternion": "quaternion()", "userData": "userData()" } }, viewQueries: [{ propertyName: "instanceWrapperRef", first: true, predicate: ["instanceWrapper"], descendants: true, isSignal: true }, { propertyName: "rigidBodyRefs", predicate: NgtrRigidBody, descendants: true, isSignal: true }], exportAs: ["instancedRigidBodies"], ngImport: i0, template: `
|
|
1614
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrInstancedRigidBodies, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1615
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: NgtrInstancedRigidBodies, isStandalone: true, selector: "ngt-object3D[ngtrInstancedRigidBodies]", 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: "ngtrInstancedRigidBodies", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "position": "position()", "rotation": "rotation()", "scale": "scale()", "quaternion": "quaternion()", "userData": "userData()" } }, viewQueries: [{ propertyName: "instanceWrapperRef", first: true, predicate: ["instanceWrapper"], descendants: true, isSignal: true }, { propertyName: "rigidBodyRefs", predicate: NgtrRigidBody, descendants: true, isSignal: true }], exportAs: ["instancedRigidBodies"], ngImport: i0, template: `
|
|
1616
1616
|
<ngt-object3D #instanceWrapper>
|
|
1617
1617
|
<ng-content />
|
|
1618
1618
|
</ngt-object3D>
|
|
@@ -1645,7 +1645,7 @@ class NgtrInstancedRigidBodies {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
`, isInline: true, dependencies: [{ kind: "component", type: NgtrRigidBody, selector: "ngt-object3D[ngtrRigidBody]", inputs: ["ngtrRigidBody", "position", "rotation", "scale", "quaternion", "userData", "options"], outputs: ["wake", "sleep", "collisionEnter", "collisionExit", "intersectionEnter", "intersectionExit", "contactForce"], exportAs: ["rigidBody"] }, { kind: "directive", type: NgtrAnyCollider, selector: "ngt-object3D[ngtrCollider]", inputs: ["position", "rotation", "scale", "quaternion", "userData", "name", "options", "ngtrCollider", "args"], outputs: ["ngtrColliderChange", "argsChange", "collisionEnter", "collisionExit", "intersectionEnter", "intersectionExit", "contactForce"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1647
1647
|
}
|
|
1648
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrInstancedRigidBodies, decorators: [{
|
|
1649
1649
|
type: Component,
|
|
1650
1650
|
args: [{
|
|
1651
1651
|
selector: 'ngt-object3D[ngtrInstancedRigidBodies]',
|
|
@@ -1692,7 +1692,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
1692
1692
|
'[quaternion]': 'quaternion()',
|
|
1693
1693
|
'[userData]': 'userData()',
|
|
1694
1694
|
},
|
|
1695
|
-
imports: [NgtrRigidBody,
|
|
1695
|
+
imports: [NgtrRigidBody, NgtrAnyCollider],
|
|
1696
1696
|
}]
|
|
1697
1697
|
}], ctorParameters: () => [] });
|
|
1698
1698
|
|
|
@@ -1811,20 +1811,20 @@ class NgtrMeshCollider {
|
|
|
1811
1811
|
const rigidBodyOptions = this.rigidBody.options();
|
|
1812
1812
|
rigidBodyOptions.colliders = this.colliders();
|
|
1813
1813
|
const objectLocalState = getLocalState(this.objectRef.nativeElement);
|
|
1814
|
+
if (!objectLocalState)
|
|
1815
|
+
return [];
|
|
1814
1816
|
// track object's children
|
|
1815
|
-
objectLocalState
|
|
1816
|
-
objectLocalState
|
|
1817
|
+
objectLocalState.nonObjects();
|
|
1818
|
+
objectLocalState.objects();
|
|
1817
1819
|
return createColliderOptions(this.objectRef.nativeElement, rigidBodyOptions, false);
|
|
1818
1820
|
});
|
|
1819
1821
|
constructor() {
|
|
1820
1822
|
extend({ Object3D });
|
|
1821
|
-
|
|
1822
|
-
this.objectRef.nativeElement.userData = {};
|
|
1823
|
-
}
|
|
1823
|
+
this.objectRef.nativeElement.userData ??= {};
|
|
1824
1824
|
this.objectRef.nativeElement.userData['ngtrRapierType'] = 'MeshCollider';
|
|
1825
1825
|
}
|
|
1826
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1827
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
1826
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrMeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1827
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: NgtrMeshCollider, isStandalone: true, selector: "ngt-object3D[ngtrMeshCollider]", inputs: { colliders: { classPropertyName: "colliders", publicName: "ngtrMeshCollider", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1828
1828
|
<ng-content />
|
|
1829
1829
|
@for (childColliderOption of childColliderOptions(); track $index) {
|
|
1830
1830
|
<ngt-object3D
|
|
@@ -1839,7 +1839,7 @@ class NgtrMeshCollider {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtrAnyCollider, selector: "ngt-object3D[ngtrCollider]", inputs: ["position", "rotation", "scale", "quaternion", "userData", "name", "options", "ngtrCollider", "args"], outputs: ["ngtrColliderChange", "argsChange", "collisionEnter", "collisionExit", "intersectionEnter", "intersectionExit", "contactForce"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1841
1841
|
}
|
|
1842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: NgtrMeshCollider, decorators: [{
|
|
1843
1843
|
type: Component,
|
|
1844
1844
|
args: [{
|
|
1845
1845
|
selector: 'ngt-object3D[ngtrMeshCollider]',
|