Skip to content

Commit 4184a90

Browse files
committed
docs: add reset orbit controls
1 parent 2127155 commit 4184a90

File tree

16 files changed

+92
-3
lines changed

16 files changed

+92
-3
lines changed

apps/examples/src/app/rapier/active-collision-types/active-collision-types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, signal, vie
22
import { ActiveCollisionTypes } from '@dimforge/rapier3d-compat';
33
import { injectBeforeRender, NgtArgs } from 'angular-three';
44
import { NgtrRigidBody } from 'angular-three-rapier';
5+
import { ResetOrbitControls } from '../reset-orbit-controls';
56

67
@Component({
78
selector: 'app-ball',
@@ -63,6 +64,7 @@ export class Wall {}
6364
<app-wall />
6465
</ngt-group>
6566
`,
67+
hostDirectives: [ResetOrbitControls],
6668
changeDetection: ChangeDetectionStrategy.OnPush,
6769
schemas: [CUSTOM_ELEMENTS_SCHEMA],
6870
imports: [Ball, Wall],

apps/examples/src/app/rapier/all-colliders/all-colliders.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
import { NgtsHTML } from 'angular-three-soba/misc';
1616
import * as THREE from 'three';
1717
import { RoundedBoxGeometry } from 'three-stdlib';
18+
import { ResetOrbitControls } from '../reset-orbit-controls';
1819
import { injectSuzanne } from '../suzanne';
1920

2021
@Component({
@@ -219,6 +220,7 @@ export class Suzanne {
219220
NgtsHTML,
220221
NgtArgs,
221222
],
223+
hostDirectives: [ResetOrbitControls],
222224
changeDetection: ChangeDetectionStrategy.OnPush,
223225
schemas: [CUSTOM_ELEMENTS_SCHEMA],
224226
})

apps/examples/src/app/rapier/attractors/attractors.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { NgtArgs, NgtVector3 } from 'angular-three';
33
import { NgtrInstancedRigidBodies, NgtrInteractionGroups, NgtrRigidBody } from 'angular-three-rapier';
44
import { NgtrAttractor } from 'angular-three-rapier/addons';
55
import { NgtsHTML } from 'angular-three-soba/misc';
6+
import { ResetOrbitControls } from '../reset-orbit-controls';
67

78
@Component({
89
selector: 'app-attractors-rapier',
@@ -45,7 +46,7 @@ import { NgtsHTML } from 'angular-three-soba/misc';
4546
</ngt-group>
4647
</ngt-group>
4748
`,
48-
49+
hostDirectives: [ResetOrbitControls],
4950
changeDetection: ChangeDetectionStrategy.OnPush,
5051
schemas: [CUSTOM_ELEMENTS_SCHEMA],
5152
imports: [NgtrInstancedRigidBodies, NgtArgs, NgtrRigidBody, NgtrInteractionGroups, NgtsHTML, NgtrAttractor],

apps/examples/src/app/rapier/car/car.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from '@angular/core';
1010
import { injectBeforeRender, NgtArgs, NgtVector3 } from 'angular-three';
1111
import { injectRevoluteJoint, NgtrRigidBody } from 'angular-three-rapier';
12+
import { ResetOrbitControls } from '../reset-orbit-controls';
1213

1314
@Directive({ selector: '[rigidBody][wheel]' })
1415
export class WheelJoint {
@@ -57,6 +58,7 @@ export class WheelJoint {
5758
}
5859
</ngt-group>
5960
`,
61+
hostDirectives: [ResetOrbitControls],
6062
changeDetection: ChangeDetectionStrategy.OnPush,
6163
schemas: [CUSTOM_ELEMENTS_SCHEMA],
6264
imports: [NgtrRigidBody, WheelJoint, NgtArgs],

apps/examples/src/app/rapier/cluster/cluster.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
import { checkUpdate, injectBeforeRender, NgtArgs } from 'angular-three';
1111
import { NgtrInstancedRigidBodies, NgtrPhysics } from 'angular-three-rapier';
1212
import { Color, InstancedMesh, Vector3 } from 'three';
13+
import { ResetOrbitControls } from '../reset-orbit-controls';
1314

1415
const BALLS = 1000;
1516

@@ -25,6 +26,7 @@ const BALLS = 1000;
2526
</ngt-object3D>
2627
</ngt-group>
2728
`,
29+
hostDirectives: [ResetOrbitControls],
2830
schemas: [CUSTOM_ELEMENTS_SCHEMA],
2931
changeDetection: ChangeDetectionStrategy.OnPush,
3032
host: { class: 'cluster-rapier' },

apps/examples/src/app/rapier/contact-force-events/contact-force-events.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import { NgtArgs } from 'angular-three';
1212
import { NgtrContactForcePayload, NgtrRigidBody } from 'angular-three-rapier';
1313
import * as THREE from 'three';
14+
import { ResetOrbitControls } from '../reset-orbit-controls';
1415

1516
// magic number: this is the start force for where the ball drops from
1617
// and is used to calculate the color change
@@ -87,6 +88,7 @@ export class Floor {
8788
<app-floor />
8889
</ngt-group>
8990
`,
91+
hostDirectives: [ResetOrbitControls],
9092
imports: [Ball, Floor],
9193
changeDetection: ChangeDetectionStrategy.OnPush,
9294
schemas: [CUSTOM_ELEMENTS_SCHEMA],

apps/examples/src/app/rapier/instanced-mesh/instanced-mesh.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
import { checkUpdate, injectStore, NgtArgs, NgtThreeEvent } from 'angular-three';
1111
import { NgtrInstancedRigidBodies, NgtrInstancedRigidBodyOptions } from 'angular-three-rapier';
1212
import { Color, InstancedMesh } from 'three';
13+
import { ResetOrbitControls } from '../reset-orbit-controls';
1314
import { injectSuzanne } from '../suzanne';
1415

1516
const MAX_COUNT = 2000;
@@ -37,6 +38,7 @@ const MAX_COUNT = 2000;
3738
}
3839
</ngt-group>
3940
`,
41+
hostDirectives: [ResetOrbitControls],
4042
schemas: [CUSTOM_ELEMENTS_SCHEMA],
4143
changeDetection: ChangeDetectionStrategy.OnPush,
4244
host: { class: 'instanced-mesh-rapier' },

apps/examples/src/app/rapier/joints/joints.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import { injectBeforeRender, NgtVector3 } from 'angular-three';
1212
import { injectPrismaticJoint, injectSphericalJoint, NgtrRigidBody, NgtrRigidBodyType } from 'angular-three-rapier';
1313
import { Quaternion, Vector3 } from 'three';
14+
import { ResetOrbitControls } from '../reset-orbit-controls';
1415

1516
@Component({
1617
selector: 'app-rope-segment',
@@ -137,6 +138,7 @@ export class Prismatic {
137138
<app-prismatic />
138139
</ngt-group>
139140
`,
141+
hostDirectives: [ResetOrbitControls],
140142
schemas: [CUSTOM_ELEMENTS_SCHEMA],
141143
changeDetection: ChangeDetectionStrategy.OnPush,
142144
host: { class: 'joints-rapier' },

apps/examples/src/app/rapier/kinematics/kinematics.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, viewChild }
22
import { injectBeforeRender, NgtArgs } from 'angular-three';
33
import { NgtrRigidBody } from 'angular-three-rapier';
44
import * as THREE from 'three';
5+
import { ResetOrbitControls } from '../reset-orbit-controls';
56

67
@Component({
78
selector: 'app-ball',
@@ -67,6 +68,7 @@ export class Ball {
6768
</ngt-object3D>
6869
</ngt-group>
6970
`,
71+
hostDirectives: [ResetOrbitControls],
7072
changeDetection: ChangeDetectionStrategy.OnPush,
7173
schemas: [CUSTOM_ELEMENTS_SCHEMA],
7274
imports: [Ball, NgtrRigidBody, NgtArgs],

apps/examples/src/app/rapier/performance/performance.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { NgtrRigidBody } from 'angular-three-rapier';
1313
import { injectGLTF } from 'angular-three-soba/loaders';
1414
import { Mesh, Vector3Like } from 'three';
1515
import { GLTF } from 'three-stdlib';
16+
import { ResetOrbitControls } from '../reset-orbit-controls';
1617
import { injectSuzanne } from '../suzanne';
1718

1819
@Component({
@@ -136,6 +137,7 @@ export class Bendy {
136137
<app-monkey-swarm />
137138
</ngt-group>
138139
`,
140+
hostDirectives: [ResetOrbitControls],
139141
schemas: [CUSTOM_ELEMENTS_SCHEMA],
140142
changeDetection: ChangeDetectionStrategy.OnPush,
141143
host: { class: 'performance-rapier' },

0 commit comments

Comments
 (0)