mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-02 13:00:35 +00:00
Make ContactMaterialOptions properties all optional
This commit is contained in:
Vendored
+7
-7
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user