Skip to content

Commit

Permalink
fix: improve api
Browse files Browse the repository at this point in the history
  • Loading branch information
Gugustinette committed Aug 28, 2024
1 parent b35a591 commit 5b662f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
17 changes: 0 additions & 17 deletions packages/3d/src/character/FCharacter3dKinematic.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import type RAPIER from '@dimforge/rapier3d'
import type { FScene3d } from '../FScene3d'
import { F3dShapes } from '../types/F3dShapes'
import type { FRigidBody3dOptions } from '../FRigidBody3d'
import type { FCollider3dOptions } from '../FCollider3d'
import type { FCharacter3dOptions } from './FCharacter3d'
import { FCharacter3d } from './FCharacter3d'

Expand All @@ -26,18 +23,4 @@ export abstract class FCharacter3dKinematic extends FCharacter3d {
// Configure autostep
this.characterController.enableAutostep(0.5, 0.1, true)
}

initRigidBody(options?: FRigidBody3dOptions): void {
super.initRigidBody({
...options,
shape: F3dShapes.CAPSULE,
})
}

initCollider(options?: FCollider3dOptions): void {
super.initCollider({
shape: F3dShapes.CAPSULE,
...options,
})
}
}
4 changes: 2 additions & 2 deletions packages/3d/src/polyhedrons/FCapsule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export class FCapsule extends FPolyhedron {

initRigidBody(options?: FRigidBody3dOptions): void {
super.initRigidBody({
...options,
shape: F3dShapes.CAPSULE,
...options,
})
}

initCollider(options?: FCollider3dOptions): void {
super.initCollider({
...options,
shape: F3dShapes.CAPSULE,
...options,
})
}
}
4 changes: 2 additions & 2 deletions packages/3d/src/polyhedrons/FSphere.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export class FSphere extends FPolyhedron {

initRigidBody(options?: FRigidBody3dOptions): void {
super.initRigidBody({
...options,
shape: F3dShapes.SPHERE,
...options,
})
}

initCollider(options?: FCollider3dOptions): void {
super.initCollider({
...options,
shape: F3dShapes.SPHERE,
...options,
})
}
}

0 comments on commit 5b662f4

Please sign in to comment.