angular-three-rapier 3.7.0 → 4.0.0-next.1
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/fesm2022/angular-three-rapier.mjs +121 -126
- package/fesm2022/angular-three-rapier.mjs.map +1 -1
- package/lib/colliders.d.ts +16 -16
- package/lib/instanced-rigid-bodies.d.ts +10 -10
- package/lib/joints.d.ts +1 -1
- package/lib/mesh-collider.d.ts +4 -4
- package/lib/physics.d.ts +4 -4
- package/lib/rigid-body.d.ts +18 -18
- package/lib/shared.d.ts +9 -9
- package/lib/types.d.ts +19 -19
- package/lib/utils.d.ts +3 -3
- package/package.json +48 -48
- package/LICENSE +0 -21
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, viewChild, Component, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, effect, Directive, contentChild, TemplateRef, signal, computed, untracked, inject, DestroyRef, model, output, ElementRef, viewChildren } from '@angular/core';
|
|
3
|
-
import { Vector3
|
|
4
|
-
import { extend, injectBeforeRender, injectStore, pick, vector3, applyProps,
|
|
3
|
+
import { Vector3, Quaternion, EventQueue, ColliderDesc, ActiveEvents, RigidBodyDesc } from '@dimforge/rapier3d-compat';
|
|
4
|
+
import { extend, injectBeforeRender, injectStore, is, pick, vector3, applyProps, getInstanceState, getEmitter, hasListener, resolveRef } from 'angular-three';
|
|
5
5
|
import { mergeInputs } from 'ngxtension/inject-inputs';
|
|
6
|
-
import
|
|
6
|
+
import * as THREE from 'three';
|
|
7
|
+
import { Group, LineSegments, LineBasicMaterial, BufferAttribute, Object3D } from 'three';
|
|
7
8
|
import { NgTemplateOutlet } from '@angular/common';
|
|
8
9
|
import { mergeVertices } from 'three-stdlib';
|
|
9
10
|
import { assertInjector } from 'ngxtension/assert-injector';
|
|
@@ -90,14 +91,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImpor
|
|
|
90
91
|
args: [{ selector: 'ngtr-frame-stepper' }]
|
|
91
92
|
}], ctorParameters: () => [] });
|
|
92
93
|
|
|
93
|
-
const _quaternion = new Quaternion();
|
|
94
|
-
const _euler = new Euler();
|
|
95
|
-
const _vector3 = new Vector3();
|
|
96
|
-
const _object3d = new Object3D();
|
|
97
|
-
const _matrix4 = new Matrix4();
|
|
98
|
-
const _position = new Vector3();
|
|
99
|
-
const _rotation = new Quaternion();
|
|
100
|
-
const _scale = new Vector3();
|
|
94
|
+
const _quaternion = new THREE.Quaternion();
|
|
95
|
+
const _euler = new THREE.Euler();
|
|
96
|
+
const _vector3 = new THREE.Vector3();
|
|
97
|
+
const _object3d = new THREE.Object3D();
|
|
98
|
+
const _matrix4 = new THREE.Matrix4();
|
|
99
|
+
const _position = new THREE.Vector3();
|
|
100
|
+
const _rotation = new THREE.Quaternion();
|
|
101
|
+
const _scale = new THREE.Vector3();
|
|
101
102
|
|
|
102
103
|
/**
|
|
103
104
|
* Creates a proxy that will create a singleton instance of the given class
|
|
@@ -142,19 +143,18 @@ function rapierQuaternionToQuaternion({ x, y, z, w }) {
|
|
|
142
143
|
}
|
|
143
144
|
function vector3ToRapierVector(v) {
|
|
144
145
|
if (Array.isArray(v)) {
|
|
145
|
-
return new Vector3
|
|
146
|
+
return new Vector3(v[0], v[1], v[2]);
|
|
146
147
|
}
|
|
147
148
|
if (typeof v === 'number') {
|
|
148
|
-
return new Vector3
|
|
149
|
+
return new Vector3(v, v, v);
|
|
149
150
|
}
|
|
150
|
-
|
|
151
|
-
return new Vector3$1(vector.x, vector.y, vector.z);
|
|
151
|
+
return new Vector3(v.x, v.y, v.z);
|
|
152
152
|
}
|
|
153
153
|
function quaternionToRapierQuaternion(v) {
|
|
154
154
|
if (Array.isArray(v)) {
|
|
155
|
-
return new Quaternion
|
|
155
|
+
return new Quaternion(v[0], v[1], v[2], v[3]);
|
|
156
156
|
}
|
|
157
|
-
return new Quaternion
|
|
157
|
+
return new Quaternion(v.x, v.y, v.z, v.w);
|
|
158
158
|
}
|
|
159
159
|
function isChildOfMeshCollider(child) {
|
|
160
160
|
let flag = false;
|
|
@@ -175,10 +175,10 @@ function getColliderArgsFromGeometry(geometry, colliders) {
|
|
|
175
175
|
case 'cuboid': {
|
|
176
176
|
geometry.computeBoundingBox();
|
|
177
177
|
const { boundingBox } = geometry;
|
|
178
|
-
const size = boundingBox.getSize(new Vector3());
|
|
178
|
+
const size = boundingBox.getSize(new THREE.Vector3());
|
|
179
179
|
return {
|
|
180
180
|
args: [size.x / 2, size.y / 2, size.z / 2],
|
|
181
|
-
offset: boundingBox.getCenter(new Vector3()),
|
|
181
|
+
offset: boundingBox.getCenter(new THREE.Vector3()),
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
case 'ball': {
|
|
@@ -194,34 +194,33 @@ function getColliderArgsFromGeometry(geometry, colliders) {
|
|
|
194
194
|
const clonedGeometry = geometry.index ? geometry.clone() : mergeVertices(geometry);
|
|
195
195
|
return {
|
|
196
196
|
args: [clonedGeometry.attributes['position'].array, clonedGeometry.index?.array],
|
|
197
|
-
offset: new Vector3(),
|
|
197
|
+
offset: new THREE.Vector3(),
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
200
|
case 'hull': {
|
|
201
201
|
const clonedGeometry = geometry.clone();
|
|
202
202
|
return {
|
|
203
203
|
args: [clonedGeometry.attributes['position'].array],
|
|
204
|
-
offset: new Vector3(),
|
|
204
|
+
offset: new THREE.Vector3(),
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
return { args: [], offset: new Vector3() };
|
|
208
|
+
return { args: [], offset: new THREE.Vector3() };
|
|
209
209
|
}
|
|
210
210
|
function createColliderOptions(object, options, ignoreMeshColliders = true) {
|
|
211
211
|
const childColliderOptions = [];
|
|
212
212
|
object.updateWorldMatrix(true, false);
|
|
213
213
|
const invertedParentMatrixWorld = object.matrixWorld.clone().invert();
|
|
214
214
|
const colliderFromChild = (child) => {
|
|
215
|
-
if (child
|
|
215
|
+
if (is.three(child, 'isMesh')) {
|
|
216
216
|
if (ignoreMeshColliders && isChildOfMeshCollider(child))
|
|
217
217
|
return;
|
|
218
218
|
const worldScale = child.getWorldScale(_scale);
|
|
219
219
|
const shape = autoColliderMap[options.colliders || 'cuboid'];
|
|
220
220
|
child.updateWorldMatrix(true, false);
|
|
221
221
|
_matrix4.copy(child.matrixWorld).premultiply(invertedParentMatrixWorld).decompose(_position, _rotation, _scale);
|
|
222
|
-
const rotationEuler = new Euler().setFromQuaternion(_rotation, 'XYZ');
|
|
223
|
-
const {
|
|
224
|
-
const { args, offset } = getColliderArgsFromGeometry(geometry, options.colliders || 'cuboid');
|
|
222
|
+
const rotationEuler = new THREE.Euler().setFromQuaternion(_rotation, 'XYZ');
|
|
223
|
+
const { args, offset } = getColliderArgsFromGeometry(child.geometry, options.colliders || 'cuboid');
|
|
225
224
|
const { mass, linearDamping, angularDamping, canSleep, ccd, gravityScale, softCcdPrediction, ...rest } = options;
|
|
226
225
|
childColliderOptions.push({
|
|
227
226
|
colliderOptions: rest,
|
|
@@ -375,7 +374,7 @@ class NgtrPhysics {
|
|
|
375
374
|
* Fixed timeStep simulation progression.
|
|
376
375
|
* @see https://gafferongames.com/post/fix_your_timestep/
|
|
377
376
|
*/
|
|
378
|
-
const clampedDelta = MathUtils.clamp(delta, 0, 0.5);
|
|
377
|
+
const clampedDelta = THREE.MathUtils.clamp(delta, 0, 0.5);
|
|
379
378
|
const stepWorld = (innerDelta) => {
|
|
380
379
|
// Trigger beforeStep callbacks
|
|
381
380
|
this.beforeStepCallbacks.forEach((callback) => {
|
|
@@ -632,21 +631,19 @@ class NgtrAnyCollider {
|
|
|
632
631
|
rotation = input([0, 0, 0]);
|
|
633
632
|
scale = input([1, 1, 1]);
|
|
634
633
|
quaternion = input([0, 0, 0, 1]);
|
|
635
|
-
userData = input(
|
|
636
|
-
name = input();
|
|
634
|
+
userData = input(undefined);
|
|
635
|
+
name = input(undefined);
|
|
637
636
|
options = input(colliderDefaultOptions, { transform: mergeInputs(rigidBodyDefaultOptions) });
|
|
638
|
-
object3DParameters = computed(() => {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
};
|
|
647
|
-
});
|
|
637
|
+
object3DParameters = computed(() => ({
|
|
638
|
+
position: this.position(),
|
|
639
|
+
rotation: this.rotation(),
|
|
640
|
+
scale: this.scale(),
|
|
641
|
+
quaternion: this.quaternion(),
|
|
642
|
+
userData: this.userData(),
|
|
643
|
+
name: this.name(),
|
|
644
|
+
}));
|
|
648
645
|
// TODO: change this to input required when Angular allows setting hostDirective input
|
|
649
|
-
shape = model(undefined, { alias: '
|
|
646
|
+
shape = model(undefined, { alias: 'collider' });
|
|
650
647
|
args = model([]);
|
|
651
648
|
collisionEnter = output();
|
|
652
649
|
collisionExit = output();
|
|
@@ -722,7 +719,7 @@ class NgtrAnyCollider {
|
|
|
722
719
|
});
|
|
723
720
|
}
|
|
724
721
|
get worldScale() {
|
|
725
|
-
return this.objectRef.nativeElement.getWorldScale(new Vector3());
|
|
722
|
+
return this.objectRef.nativeElement.getWorldScale(new THREE.Vector3());
|
|
726
723
|
}
|
|
727
724
|
setShape(shape) {
|
|
728
725
|
this.shape.set(shape);
|
|
@@ -737,11 +734,11 @@ class NgtrAnyCollider {
|
|
|
737
734
|
const worldSingleton = this.physics.worldSingleton();
|
|
738
735
|
if (!worldSingleton)
|
|
739
736
|
return;
|
|
740
|
-
const
|
|
741
|
-
if (!
|
|
737
|
+
const instanceState = getInstanceState(this.objectRef.nativeElement);
|
|
738
|
+
if (!instanceState)
|
|
742
739
|
return;
|
|
743
|
-
const parent =
|
|
744
|
-
if (!parent || !parent
|
|
740
|
+
const parent = instanceState.parent();
|
|
741
|
+
if (!parent || !is.three(parent, 'isObject3D'))
|
|
745
742
|
return;
|
|
746
743
|
const state = this.createColliderState(collider, this.objectRef.nativeElement, this.rigidBody?.objectRef.nativeElement);
|
|
747
744
|
this.physics.colliderStates.set(collider.handle, state);
|
|
@@ -888,11 +885,11 @@ class NgtrAnyCollider {
|
|
|
888
885
|
return scaledVerts;
|
|
889
886
|
}
|
|
890
887
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrAnyCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
891
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrAnyCollider, isStandalone: true, selector: "ngt-object3D[
|
|
888
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", 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 });
|
|
892
889
|
}
|
|
893
890
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrAnyCollider, decorators: [{
|
|
894
891
|
type: Directive,
|
|
895
|
-
args: [{ selector: 'ngt-object3D[
|
|
892
|
+
args: [{ selector: 'ngt-object3D[collider]' }]
|
|
896
893
|
}], ctorParameters: () => [] });
|
|
897
894
|
const RIGID_BODY_TYPE_MAP = {
|
|
898
895
|
fixed: 1,
|
|
@@ -912,7 +909,7 @@ const rigidBodyDefaultOptions = {
|
|
|
912
909
|
};
|
|
913
910
|
class NgtrRigidBody {
|
|
914
911
|
type = input('dynamic', {
|
|
915
|
-
alias: '
|
|
912
|
+
alias: 'rigidBody',
|
|
916
913
|
transform: (value) => {
|
|
917
914
|
if (value === '' || value === undefined)
|
|
918
915
|
return 'dynamic';
|
|
@@ -923,17 +920,15 @@ class NgtrRigidBody {
|
|
|
923
920
|
rotation = input([0, 0, 0]);
|
|
924
921
|
scale = input([1, 1, 1]);
|
|
925
922
|
quaternion = input([0, 0, 0, 1]);
|
|
926
|
-
userData = input(
|
|
923
|
+
userData = input(undefined);
|
|
927
924
|
options = input(rigidBodyDefaultOptions, { transform: mergeInputs(rigidBodyDefaultOptions) });
|
|
928
|
-
object3DParameters = computed(() => {
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
};
|
|
936
|
-
});
|
|
925
|
+
object3DParameters = computed(() => ({
|
|
926
|
+
position: this.position(),
|
|
927
|
+
rotation: this.rotation(),
|
|
928
|
+
scale: this.scale(),
|
|
929
|
+
quaternion: this.quaternion(),
|
|
930
|
+
userData: this.userData(),
|
|
931
|
+
}));
|
|
937
932
|
wake = output();
|
|
938
933
|
sleep = output();
|
|
939
934
|
collisionEnter = output();
|
|
@@ -983,12 +978,12 @@ class NgtrRigidBody {
|
|
|
983
978
|
// if colliders on object is not set, use physics colliders
|
|
984
979
|
if (!options.colliders)
|
|
985
980
|
options.colliders = physicsColliders;
|
|
986
|
-
const
|
|
987
|
-
if (!
|
|
981
|
+
const objectInstanceState = getInstanceState(this.objectRef.nativeElement);
|
|
982
|
+
if (!objectInstanceState)
|
|
988
983
|
return [];
|
|
989
984
|
// track object's parent and non-object children
|
|
990
|
-
const [parent] = [
|
|
991
|
-
if (!parent || !parent
|
|
985
|
+
const [parent] = [objectInstanceState.parent(), objectInstanceState.nonObjects()];
|
|
986
|
+
if (!parent || !is.three(parent, 'isObject3D'))
|
|
992
987
|
return [];
|
|
993
988
|
return createColliderOptions(this.objectRef.nativeElement, options, true);
|
|
994
989
|
});
|
|
@@ -1018,11 +1013,11 @@ class NgtrRigidBody {
|
|
|
1018
1013
|
if (!body)
|
|
1019
1014
|
return;
|
|
1020
1015
|
const transformState = untracked(this.transformState);
|
|
1021
|
-
const
|
|
1022
|
-
if (!
|
|
1016
|
+
const instanceState = getInstanceState(this.objectRef.nativeElement);
|
|
1017
|
+
if (!instanceState)
|
|
1023
1018
|
return;
|
|
1024
|
-
const parent =
|
|
1025
|
-
if (!parent || !parent
|
|
1019
|
+
const parent = instanceState.parent();
|
|
1020
|
+
if (!parent || !is.three(parent, 'isObject3D'))
|
|
1026
1021
|
return;
|
|
1027
1022
|
const state = this.createRigidBodyState(body, this.objectRef.nativeElement);
|
|
1028
1023
|
this.physics.rigidBodyStates.set(body.handle, transformState ? transformState(state) : state);
|
|
@@ -1135,11 +1130,11 @@ class NgtrRigidBody {
|
|
|
1135
1130
|
};
|
|
1136
1131
|
}
|
|
1137
1132
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRigidBody, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1138
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: NgtrRigidBody, isStandalone: true, selector: "ngt-object3D[
|
|
1133
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: NgtrRigidBody, isStandalone: true, selector: "ngt-object3D[rigidBody]", inputs: { type: { classPropertyName: "type", publicName: "rigidBody", 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" }, exportAs: ["rigidBody"], ngImport: i0, template: `
|
|
1139
1134
|
<ng-content />
|
|
1140
1135
|
@for (childColliderOption of childColliderOptions(); track $index) {
|
|
1141
1136
|
<ngt-object3D
|
|
1142
|
-
[
|
|
1137
|
+
[collider]="childColliderOption.shape"
|
|
1143
1138
|
[args]="childColliderOption.args"
|
|
1144
1139
|
[position]="childColliderOption.position"
|
|
1145
1140
|
[rotation]="childColliderOption.rotation"
|
|
@@ -1148,18 +1143,18 @@ class NgtrRigidBody {
|
|
|
1148
1143
|
[options]="childColliderOption.colliderOptions"
|
|
1149
1144
|
/>
|
|
1150
1145
|
}
|
|
1151
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgtrAnyCollider, selector: "ngt-object3D[
|
|
1146
|
+
`, 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 });
|
|
1152
1147
|
}
|
|
1153
1148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRigidBody, decorators: [{
|
|
1154
1149
|
type: Component,
|
|
1155
1150
|
args: [{
|
|
1156
|
-
selector: 'ngt-object3D[
|
|
1151
|
+
selector: 'ngt-object3D[rigidBody]',
|
|
1157
1152
|
exportAs: 'rigidBody',
|
|
1158
1153
|
template: `
|
|
1159
1154
|
<ng-content />
|
|
1160
1155
|
@for (childColliderOption of childColliderOptions(); track $index) {
|
|
1161
1156
|
<ngt-object3D
|
|
1162
|
-
[
|
|
1157
|
+
[collider]="childColliderOption.shape"
|
|
1163
1158
|
[args]="childColliderOption.args"
|
|
1164
1159
|
[position]="childColliderOption.position"
|
|
1165
1160
|
[rotation]="childColliderOption.rotation"
|
|
@@ -1191,11 +1186,11 @@ class NgtrCuboidCollider {
|
|
|
1191
1186
|
});
|
|
1192
1187
|
}
|
|
1193
1188
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrCuboidCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1194
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrCuboidCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1189
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrCuboidCollider, isStandalone: true, selector: "ngt-object3D[cuboidCollider]", 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 });
|
|
1195
1190
|
}
|
|
1196
1191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrCuboidCollider, decorators: [{
|
|
1197
1192
|
type: Directive,
|
|
1198
|
-
args: [{ selector: 'ngt-object3D[
|
|
1193
|
+
args: [{ selector: 'ngt-object3D[cuboidCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1199
1194
|
}], ctorParameters: () => [] });
|
|
1200
1195
|
class NgtrCapsuleCollider {
|
|
1201
1196
|
args = input.required();
|
|
@@ -1207,11 +1202,11 @@ class NgtrCapsuleCollider {
|
|
|
1207
1202
|
});
|
|
1208
1203
|
}
|
|
1209
1204
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrCapsuleCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1210
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrCapsuleCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1205
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrCapsuleCollider, isStandalone: true, selector: "ngt-object3D[capsuleCollider]", 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 });
|
|
1211
1206
|
}
|
|
1212
1207
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrCapsuleCollider, decorators: [{
|
|
1213
1208
|
type: Directive,
|
|
1214
|
-
args: [{ selector: 'ngt-object3D[
|
|
1209
|
+
args: [{ selector: 'ngt-object3D[capsuleCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1215
1210
|
}], ctorParameters: () => [] });
|
|
1216
1211
|
class NgtrBallCollider {
|
|
1217
1212
|
args = input.required();
|
|
@@ -1223,11 +1218,11 @@ class NgtrBallCollider {
|
|
|
1223
1218
|
});
|
|
1224
1219
|
}
|
|
1225
1220
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrBallCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1226
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrBallCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1221
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrBallCollider, isStandalone: true, selector: "ngt-object3D[ballCollider]", 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 });
|
|
1227
1222
|
}
|
|
1228
1223
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrBallCollider, decorators: [{
|
|
1229
1224
|
type: Directive,
|
|
1230
|
-
args: [{ selector: 'ngt-object3D[
|
|
1225
|
+
args: [{ selector: 'ngt-object3D[ballCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1231
1226
|
}], ctorParameters: () => [] });
|
|
1232
1227
|
class NgtrConvexHullCollider {
|
|
1233
1228
|
args = input.required();
|
|
@@ -1239,11 +1234,11 @@ class NgtrConvexHullCollider {
|
|
|
1239
1234
|
});
|
|
1240
1235
|
}
|
|
1241
1236
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrConvexHullCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1242
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrConvexHullCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1237
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrConvexHullCollider, isStandalone: true, selector: "ngt-object3D[convexHullCollider]", 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 });
|
|
1243
1238
|
}
|
|
1244
1239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrConvexHullCollider, decorators: [{
|
|
1245
1240
|
type: Directive,
|
|
1246
|
-
args: [{ selector: 'ngt-object3D[
|
|
1241
|
+
args: [{ selector: 'ngt-object3D[convexHullCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1247
1242
|
}], ctorParameters: () => [] });
|
|
1248
1243
|
class NgtrHeightfieldCollider {
|
|
1249
1244
|
args = input.required();
|
|
@@ -1255,11 +1250,11 @@ class NgtrHeightfieldCollider {
|
|
|
1255
1250
|
});
|
|
1256
1251
|
}
|
|
1257
1252
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrHeightfieldCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1258
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrHeightfieldCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1253
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrHeightfieldCollider, isStandalone: true, selector: "ngt-object3D[heightfieldCollider]", 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
1254
|
}
|
|
1260
1255
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrHeightfieldCollider, decorators: [{
|
|
1261
1256
|
type: Directive,
|
|
1262
|
-
args: [{ selector: 'ngt-object3D[
|
|
1257
|
+
args: [{ selector: 'ngt-object3D[heightfieldCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1263
1258
|
}], ctorParameters: () => [] });
|
|
1264
1259
|
class NgtrTrimeshCollider {
|
|
1265
1260
|
args = input.required();
|
|
@@ -1271,11 +1266,11 @@ class NgtrTrimeshCollider {
|
|
|
1271
1266
|
});
|
|
1272
1267
|
}
|
|
1273
1268
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrTrimeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1274
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrTrimeshCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1269
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrTrimeshCollider, isStandalone: true, selector: "ngt-object3D[trimeshCollider]", 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 });
|
|
1275
1270
|
}
|
|
1276
1271
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrTrimeshCollider, decorators: [{
|
|
1277
1272
|
type: Directive,
|
|
1278
|
-
args: [{ selector: 'ngt-object3D[
|
|
1273
|
+
args: [{ selector: 'ngt-object3D[trimeshCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1279
1274
|
}], ctorParameters: () => [] });
|
|
1280
1275
|
class NgtrPolylineCollider {
|
|
1281
1276
|
args = input.required();
|
|
@@ -1287,11 +1282,11 @@ class NgtrPolylineCollider {
|
|
|
1287
1282
|
});
|
|
1288
1283
|
}
|
|
1289
1284
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrPolylineCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1290
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrPolylineCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1285
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrPolylineCollider, isStandalone: true, selector: "ngt-object3D[polylineCollider]", 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 });
|
|
1291
1286
|
}
|
|
1292
1287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrPolylineCollider, decorators: [{
|
|
1293
1288
|
type: Directive,
|
|
1294
|
-
args: [{ selector: 'ngt-object3D[
|
|
1289
|
+
args: [{ selector: 'ngt-object3D[polylineCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1295
1290
|
}], ctorParameters: () => [] });
|
|
1296
1291
|
class NgtrRoundCuboidCollider {
|
|
1297
1292
|
args = input.required();
|
|
@@ -1303,11 +1298,11 @@ class NgtrRoundCuboidCollider {
|
|
|
1303
1298
|
});
|
|
1304
1299
|
}
|
|
1305
1300
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundCuboidCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1306
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundCuboidCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1301
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundCuboidCollider, isStandalone: true, selector: "ngt-object3D[roundCuboidCollider]", 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 });
|
|
1307
1302
|
}
|
|
1308
1303
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundCuboidCollider, decorators: [{
|
|
1309
1304
|
type: Directive,
|
|
1310
|
-
args: [{ selector: 'ngt-object3D[
|
|
1305
|
+
args: [{ selector: 'ngt-object3D[roundCuboidCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1311
1306
|
}], ctorParameters: () => [] });
|
|
1312
1307
|
class NgtrCylinderCollider {
|
|
1313
1308
|
args = input.required();
|
|
@@ -1319,11 +1314,11 @@ class NgtrCylinderCollider {
|
|
|
1319
1314
|
});
|
|
1320
1315
|
}
|
|
1321
1316
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrCylinderCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1322
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrCylinderCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1317
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrCylinderCollider, isStandalone: true, selector: "ngt-object3D[cylinderCollider]", 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 });
|
|
1323
1318
|
}
|
|
1324
1319
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrCylinderCollider, decorators: [{
|
|
1325
1320
|
type: Directive,
|
|
1326
|
-
args: [{ selector: 'ngt-object3D[
|
|
1321
|
+
args: [{ selector: 'ngt-object3D[cylinderCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1327
1322
|
}], ctorParameters: () => [] });
|
|
1328
1323
|
class NgtrRoundCylinderCollider {
|
|
1329
1324
|
args = input.required();
|
|
@@ -1335,11 +1330,11 @@ class NgtrRoundCylinderCollider {
|
|
|
1335
1330
|
});
|
|
1336
1331
|
}
|
|
1337
1332
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundCylinderCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1338
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundCylinderCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1333
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundCylinderCollider, isStandalone: true, selector: "ngt-object3D[roundCylinderCollider]", 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 });
|
|
1339
1334
|
}
|
|
1340
1335
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundCylinderCollider, decorators: [{
|
|
1341
1336
|
type: Directive,
|
|
1342
|
-
args: [{ selector: 'ngt-object3D[
|
|
1337
|
+
args: [{ selector: 'ngt-object3D[roundCylinderCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1343
1338
|
}], ctorParameters: () => [] });
|
|
1344
1339
|
class NgtrConeCollider {
|
|
1345
1340
|
args = input.required();
|
|
@@ -1351,11 +1346,11 @@ class NgtrConeCollider {
|
|
|
1351
1346
|
});
|
|
1352
1347
|
}
|
|
1353
1348
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrConeCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1354
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrConeCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1349
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrConeCollider, isStandalone: true, selector: "ngt-object3D[coneCollider]", 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 });
|
|
1355
1350
|
}
|
|
1356
1351
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrConeCollider, decorators: [{
|
|
1357
1352
|
type: Directive,
|
|
1358
|
-
args: [{ selector: 'ngt-object3D[
|
|
1353
|
+
args: [{ selector: 'ngt-object3D[coneCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1359
1354
|
}], ctorParameters: () => [] });
|
|
1360
1355
|
class NgtrRoundConeCollider {
|
|
1361
1356
|
args = input.required();
|
|
@@ -1367,11 +1362,11 @@ class NgtrRoundConeCollider {
|
|
|
1367
1362
|
});
|
|
1368
1363
|
}
|
|
1369
1364
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundConeCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1370
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundConeCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1365
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundConeCollider, isStandalone: true, selector: "ngt-object3D[roundConeCollider]", 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 });
|
|
1371
1366
|
}
|
|
1372
1367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundConeCollider, decorators: [{
|
|
1373
1368
|
type: Directive,
|
|
1374
|
-
args: [{ selector: 'ngt-object3D[
|
|
1369
|
+
args: [{ selector: 'ngt-object3D[roundConeCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1375
1370
|
}], ctorParameters: () => [] });
|
|
1376
1371
|
class NgtrConvexMeshCollider {
|
|
1377
1372
|
args = input.required();
|
|
@@ -1383,11 +1378,11 @@ class NgtrConvexMeshCollider {
|
|
|
1383
1378
|
});
|
|
1384
1379
|
}
|
|
1385
1380
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrConvexMeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1386
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrConvexMeshCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1381
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrConvexMeshCollider, isStandalone: true, selector: "ngt-object3D[convexMeshCollider]", 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 });
|
|
1387
1382
|
}
|
|
1388
1383
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrConvexMeshCollider, decorators: [{
|
|
1389
1384
|
type: Directive,
|
|
1390
|
-
args: [{ selector: 'ngt-object3D[
|
|
1385
|
+
args: [{ selector: 'ngt-object3D[convexMeshCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1391
1386
|
}], ctorParameters: () => [] });
|
|
1392
1387
|
class NgtrRoundConvexHullCollider {
|
|
1393
1388
|
args = input.required();
|
|
@@ -1399,11 +1394,11 @@ class NgtrRoundConvexHullCollider {
|
|
|
1399
1394
|
});
|
|
1400
1395
|
}
|
|
1401
1396
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundConvexHullCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1402
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundConvexHullCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1397
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundConvexHullCollider, isStandalone: true, selector: "ngt-object3D[roundConvexHullCollider]", 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 });
|
|
1403
1398
|
}
|
|
1404
1399
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundConvexHullCollider, decorators: [{
|
|
1405
1400
|
type: Directive,
|
|
1406
|
-
args: [{ selector: 'ngt-object3D[
|
|
1401
|
+
args: [{ selector: 'ngt-object3D[roundConvexHullCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1407
1402
|
}], ctorParameters: () => [] });
|
|
1408
1403
|
class NgtrRoundConvexMeshCollider {
|
|
1409
1404
|
args = input.required();
|
|
@@ -1415,11 +1410,11 @@ class NgtrRoundConvexMeshCollider {
|
|
|
1415
1410
|
});
|
|
1416
1411
|
}
|
|
1417
1412
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundConvexMeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1418
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundConvexMeshCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1413
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: NgtrRoundConvexMeshCollider, isStandalone: true, selector: "ngt-object3D[roundConvexMeshCollider]", 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 });
|
|
1419
1414
|
}
|
|
1420
1415
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrRoundConvexMeshCollider, decorators: [{
|
|
1421
1416
|
type: Directive,
|
|
1422
|
-
args: [{ selector: 'ngt-object3D[
|
|
1417
|
+
args: [{ selector: 'ngt-object3D[roundConvexMeshCollider]', hostDirectives: [ANY_COLLIDER_HOST_DIRECTIVE] }]
|
|
1423
1418
|
}], ctorParameters: () => [] });
|
|
1424
1419
|
|
|
1425
1420
|
const defaultOptions = rigidBodyDefaultOptions;
|
|
@@ -1430,7 +1425,7 @@ class NgtrInstancedRigidBodies {
|
|
|
1430
1425
|
quaternion = input([0, 0, 0, 1]);
|
|
1431
1426
|
userData = input({});
|
|
1432
1427
|
instances = input([], {
|
|
1433
|
-
alias: '
|
|
1428
|
+
alias: 'instancedRigidBodies',
|
|
1434
1429
|
transform: (value) => {
|
|
1435
1430
|
if (value === '')
|
|
1436
1431
|
return [];
|
|
@@ -1456,11 +1451,11 @@ class NgtrInstancedRigidBodies {
|
|
|
1456
1451
|
const instanceWrapper = this.instanceWrapperRef().nativeElement;
|
|
1457
1452
|
if (!instanceWrapper)
|
|
1458
1453
|
return null;
|
|
1459
|
-
const
|
|
1460
|
-
if (!
|
|
1454
|
+
const instanceState = getInstanceState(instanceWrapper);
|
|
1455
|
+
if (!instanceState)
|
|
1461
1456
|
return null;
|
|
1462
1457
|
// track object's children
|
|
1463
|
-
|
|
1458
|
+
instanceState.objects();
|
|
1464
1459
|
const firstChild = instanceWrapper.children[0];
|
|
1465
1460
|
if (!firstChild || !firstChild.isInstancedMesh)
|
|
1466
1461
|
return null;
|
|
@@ -1506,12 +1501,12 @@ class NgtrInstancedRigidBodies {
|
|
|
1506
1501
|
// if colliders on object is not set, use physics colliders
|
|
1507
1502
|
if (!options.colliders)
|
|
1508
1503
|
options.colliders = physicsColliders;
|
|
1509
|
-
const
|
|
1510
|
-
if (!
|
|
1504
|
+
const objectInstanceState = getInstanceState(this.objectRef.nativeElement);
|
|
1505
|
+
if (!objectInstanceState)
|
|
1511
1506
|
return [];
|
|
1512
1507
|
// track object's parent and non-object children
|
|
1513
|
-
const [parent] = [
|
|
1514
|
-
if (!parent || !parent
|
|
1508
|
+
const [parent] = [objectInstanceState.parent(), objectInstanceState.nonObjects()];
|
|
1509
|
+
if (!parent || !is.three(parent, 'isObject3D'))
|
|
1515
1510
|
return [];
|
|
1516
1511
|
return createColliderOptions(this.objectRef.nativeElement, options);
|
|
1517
1512
|
});
|
|
@@ -1525,18 +1520,18 @@ class NgtrInstancedRigidBodies {
|
|
|
1525
1520
|
const instancedMesh = this.instancedMesh();
|
|
1526
1521
|
if (!instancedMesh)
|
|
1527
1522
|
return;
|
|
1528
|
-
instancedMesh.instanceMatrix.setUsage(DynamicDrawUsage);
|
|
1523
|
+
instancedMesh.instanceMatrix.setUsage(THREE.DynamicDrawUsage);
|
|
1529
1524
|
});
|
|
1530
1525
|
}
|
|
1531
1526
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrInstancedRigidBodies, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1532
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: NgtrInstancedRigidBodies, isStandalone: true, selector: "ngt-object3D[
|
|
1527
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", 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: false, 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: `
|
|
1533
1528
|
<ngt-object3D #instanceWrapper>
|
|
1534
1529
|
<ng-content />
|
|
1535
1530
|
</ngt-object3D>
|
|
1536
1531
|
|
|
1537
1532
|
@for (instance of instancesOptions(); track instance.key) {
|
|
1538
1533
|
<ngt-object3D
|
|
1539
|
-
[
|
|
1534
|
+
[rigidBody]="instance.type"
|
|
1540
1535
|
[options]="instance.options"
|
|
1541
1536
|
[position]="instance.position"
|
|
1542
1537
|
[rotation]="instance.rotation"
|
|
@@ -1549,7 +1544,7 @@ class NgtrInstancedRigidBodies {
|
|
|
1549
1544
|
|
|
1550
1545
|
@for (childColliderOption of childColliderOptions(); track $index) {
|
|
1551
1546
|
<ngt-object3D
|
|
1552
|
-
[
|
|
1547
|
+
[collider]="childColliderOption.shape"
|
|
1553
1548
|
[args]="childColliderOption.args"
|
|
1554
1549
|
[position]="childColliderOption.position"
|
|
1555
1550
|
[rotation]="childColliderOption.rotation"
|
|
@@ -1560,12 +1555,12 @@ class NgtrInstancedRigidBodies {
|
|
|
1560
1555
|
}
|
|
1561
1556
|
</ngt-object3D>
|
|
1562
1557
|
}
|
|
1563
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NgtrRigidBody, selector: "ngt-object3D[
|
|
1558
|
+
`, 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 });
|
|
1564
1559
|
}
|
|
1565
1560
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrInstancedRigidBodies, decorators: [{
|
|
1566
1561
|
type: Component,
|
|
1567
1562
|
args: [{
|
|
1568
|
-
selector: 'ngt-object3D[
|
|
1563
|
+
selector: 'ngt-object3D[instancedRigidBodies]',
|
|
1569
1564
|
exportAs: 'instancedRigidBodies',
|
|
1570
1565
|
template: `
|
|
1571
1566
|
<ngt-object3D #instanceWrapper>
|
|
@@ -1574,7 +1569,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImpor
|
|
|
1574
1569
|
|
|
1575
1570
|
@for (instance of instancesOptions(); track instance.key) {
|
|
1576
1571
|
<ngt-object3D
|
|
1577
|
-
[
|
|
1572
|
+
[rigidBody]="instance.type"
|
|
1578
1573
|
[options]="instance.options"
|
|
1579
1574
|
[position]="instance.position"
|
|
1580
1575
|
[rotation]="instance.rotation"
|
|
@@ -1587,7 +1582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImpor
|
|
|
1587
1582
|
|
|
1588
1583
|
@for (childColliderOption of childColliderOptions(); track $index) {
|
|
1589
1584
|
<ngt-object3D
|
|
1590
|
-
[
|
|
1585
|
+
[collider]="childColliderOption.shape"
|
|
1591
1586
|
[args]="childColliderOption.args"
|
|
1592
1587
|
[position]="childColliderOption.position"
|
|
1593
1588
|
[rotation]="childColliderOption.rotation"
|
|
@@ -1718,12 +1713,12 @@ class NgtrMeshCollider {
|
|
|
1718
1713
|
childColliderOptions = computed(() => {
|
|
1719
1714
|
const rigidBodyOptions = this.rigidBody.options();
|
|
1720
1715
|
rigidBodyOptions.colliders = this.colliders();
|
|
1721
|
-
const
|
|
1722
|
-
if (!
|
|
1716
|
+
const objectInstaceState = getInstanceState(this.objectRef.nativeElement);
|
|
1717
|
+
if (!objectInstaceState)
|
|
1723
1718
|
return [];
|
|
1724
1719
|
// track object's children
|
|
1725
|
-
|
|
1726
|
-
|
|
1720
|
+
objectInstaceState.nonObjects();
|
|
1721
|
+
objectInstaceState.objects();
|
|
1727
1722
|
return createColliderOptions(this.objectRef.nativeElement, rigidBodyOptions, false);
|
|
1728
1723
|
});
|
|
1729
1724
|
constructor() {
|
|
@@ -1732,11 +1727,11 @@ class NgtrMeshCollider {
|
|
|
1732
1727
|
this.objectRef.nativeElement.userData['ngtrRapierType'] = 'MeshCollider';
|
|
1733
1728
|
}
|
|
1734
1729
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrMeshCollider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1735
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: NgtrMeshCollider, isStandalone: true, selector: "ngt-object3D[
|
|
1730
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: NgtrMeshCollider, isStandalone: true, selector: "ngt-object3D[meshCollider]", inputs: { colliders: { classPropertyName: "colliders", publicName: "ngtrMeshCollider", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1736
1731
|
<ng-content />
|
|
1737
1732
|
@for (childColliderOption of childColliderOptions(); track $index) {
|
|
1738
1733
|
<ngt-object3D
|
|
1739
|
-
[
|
|
1734
|
+
[collider]="childColliderOption.shape"
|
|
1740
1735
|
[args]="childColliderOption.args"
|
|
1741
1736
|
[position]="childColliderOption.position"
|
|
1742
1737
|
[rotation]="childColliderOption.rotation"
|
|
@@ -1745,17 +1740,17 @@ class NgtrMeshCollider {
|
|
|
1745
1740
|
[options]="childColliderOption.colliderOptions"
|
|
1746
1741
|
/>
|
|
1747
1742
|
}
|
|
1748
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgtrAnyCollider, selector: "ngt-object3D[
|
|
1743
|
+
`, 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 });
|
|
1749
1744
|
}
|
|
1750
1745
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: NgtrMeshCollider, decorators: [{
|
|
1751
1746
|
type: Component,
|
|
1752
1747
|
args: [{
|
|
1753
|
-
selector: 'ngt-object3D[
|
|
1748
|
+
selector: 'ngt-object3D[meshCollider]',
|
|
1754
1749
|
template: `
|
|
1755
1750
|
<ng-content />
|
|
1756
1751
|
@for (childColliderOption of childColliderOptions(); track $index) {
|
|
1757
1752
|
<ngt-object3D
|
|
1758
|
-
[
|
|
1753
|
+
[collider]="childColliderOption.shape"
|
|
1759
1754
|
[args]="childColliderOption.args"
|
|
1760
1755
|
[position]="childColliderOption.position"
|
|
1761
1756
|
[rotation]="childColliderOption.rotation"
|