Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove throw in physics-lite #1052

Merged
merged 1 commit into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/physics-lite/src/LitePhysicsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class LitePhysicsManager implements IPhysicsManager {
* {@inheritDoc IPhysicsManager.setGravity }
*/
setGravity(value: Vector3): void {
throw "Physics-lite don't support gravity. Use Physics-PhysX instead!";
console.log("Physics-lite don't support gravity. Use Physics-PhysX instead!");
}

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/physics-lite/src/shape/LiteColliderShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ export abstract class LiteColliderShape implements IColliderShape {
* {@inheritDoc IColliderShape.setContactOffset }
*/
setContactOffset(offset: number): void {
throw "Physics-lite don't support setContactOffset. Use Physics-PhysX instead!";
console.log("Physics-lite don't support setContactOffset. Use Physics-PhysX instead!");
}

/**
* {@inheritDoc IColliderShape.setMaterial }
*/
setMaterial(material: IPhysicsMaterial): void {
throw "Physics-lite don't support setMaterial. Use Physics-PhysX instead!";
console.log("Physics-lite don't support setMaterial. Use Physics-PhysX instead!");
}

/**
Expand All @@ -65,14 +65,14 @@ export abstract class LiteColliderShape implements IColliderShape {
* {@inheritDoc IColliderShape.setIsTrigger }
*/
setIsTrigger(value: boolean): void {
throw "Physics-lite don't support setIsTrigger. Use Physics-PhysX instead!";
console.log("Physics-lite don't support setIsTrigger. Use Physics-PhysX instead!");
}

/**
* {@inheritDoc IColliderShape.setIsSceneQuery }
*/
setIsSceneQuery(value: boolean): void {
throw "Physics-lite don't support setIsSceneQuery. Use Physics-PhysX instead!";
console.log("Physics-lite don't support setIsSceneQuery. Use Physics-PhysX instead!");
}

/**
Expand Down