mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Make ContactMaterialOptions properties all optional
This commit is contained in:
parent
14d6d73e6d
commit
e7aeda3f24
14
types/p2/index.d.ts
vendored
14
types/p2/index.d.ts
vendored
@ -361,13 +361,13 @@ declare namespace p2 {
|
||||
|
||||
export class ContactMaterialOptions {
|
||||
|
||||
friction: number;
|
||||
restitution: number;
|
||||
stiffness: number;
|
||||
relaxation: number;
|
||||
frictionStiffness: number;
|
||||
frictionRelaxation: number;
|
||||
surfaceVelocity: number;
|
||||
friction?: number;
|
||||
restitution?: number;
|
||||
stiffness?: number;
|
||||
relaxation?: number;
|
||||
frictionStiffness?: number;
|
||||
frictionRelaxation?: number;
|
||||
surfaceVelocity?: number;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,12 @@ var world = new p2.World({
|
||||
gravity:[0, -9.82]
|
||||
});
|
||||
|
||||
// Set default contact material
|
||||
world.defaultContactMaterial = new p2.ContactMaterial(
|
||||
new p2.Material(1), new p2.Material(2),
|
||||
{ friction: 1, restitution: 0 }
|
||||
)
|
||||
|
||||
// Create an empty dynamic body
|
||||
var circleBody = new p2.Body({
|
||||
mass: 5,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user