From d3ce3c24728023f0766714c623194c6fb8bb415e Mon Sep 17 00:00:00 2001 From: yyc <395976266@qq.com> Date: Sun, 22 Jan 2017 09:53:42 +0800 Subject: [PATCH] fix --- cannon/index.d.ts | 377 +++++++++++++++++++++++++++++++++++---------- cannon/tslint.json | 1 - 2 files changed, 292 insertions(+), 86 deletions(-) delete mode 100644 cannon/tslint.json diff --git a/cannon/index.d.ts b/cannon/index.d.ts index 6b4905c7b1..7df6671d52 100644 --- a/cannon/index.d.ts +++ b/cannon/index.d.ts @@ -19,11 +19,14 @@ declare module CANNON { constructor(options?: IAABBOptions); + clone() : AABB; setFromPoints(points: Vec3[], position?: Vec3, quaternion?: Quaternion, skinSize?: number): void; copy(aabb: AABB): void; extend(aabb: AABB): void; + getCorners( a: Vec3, b: Vec3, c: Vec3, d: Vec3, e: Vec3, f: Vec3, g: Vec3, h: Vec3 ) : void; overlaps(aabb: AABB): boolean; - + toLocalFrame( frame: Transform, target: AABB ) : AABB; + toWorldFrame( frame: Transform, target: AABB ) : AABB; } export class ArrayCollisionMatrix { @@ -37,7 +40,7 @@ declare module CANNON { } - export class BroadPhase { + export class Broadphase { world: World; useBoundingBoxes: boolean; @@ -55,7 +58,7 @@ declare module CANNON { } - export class GridBroadphase extends BroadPhase { + export class GridBroadphase extends Broadphase { nx: number; ny: number; @@ -68,7 +71,7 @@ declare module CANNON { } - export class NaiveBroadphase extends BroadPhase { + export class NaiveBroadphase extends Broadphase { } export class ObjectCollisionMatrix { @@ -82,16 +85,42 @@ declare module CANNON { } + export interface IRayIntersectWorldOptions { + + mode: number; + result: boolean; + skipBackfaces: boolean; + collisionFilterMask: number; + collisionFilterGroup: number; + from: Vec3; + to: Vec3; + callback: Function; + + } + export class Ray { + static CLOSEST: number; + static ANY: number; + static ALL: number; + from: Vec3; to: Vec3; precision: number; checkCollisionResponse: boolean; + callback: Function; + collisionFilterGroup: number; + collisionFilterMask: number; + hasHit: boolean; + mode: number; + result: RaycastResult; + skipBackfaces: boolean; constructor(from?: Vec3, to?: Vec3); getAABB(result: RaycastResult): void; + intersectBodies(bodies: Body[], result?: RaycastResult): void; + intersectWorld(world: World, options: IRayIntersectWorldOptions): boolean; } @@ -101,17 +130,19 @@ declare module CANNON { rayToWorld: Vec3; hitNormalWorld: Vec3; hitPointWorld: Vec3; + hitFaceIndex: number; hasHit: boolean; shape: Shape; body: Body; distance: number; + abort(): void; reset(): void; set(rayFromWorld: Vec3, rayToWorld: Vec3, hitNormalWorld: Vec3, hitPointWorld: Vec3, shape: Shape, body: Body, distance: number): void; } - export class SAPBroadphase extends BroadPhase { + export class SAPBroadphase extends Broadphase { static insertionSortX(a: any[]): any[]; static insertionSortY(a: any[]): any[]; @@ -147,12 +178,17 @@ declare module CANNON { constructor(bodyA: Body, bodyB: Body, options?: IConstraintOptions); update(): void; + disable(): void; + enable(): void; } export class DistanceConstraint extends Constraint { - constructor(bodyA: Body, bodyB: Body, distance: number, maxForce?: number); + distance: number; + distanceEquation: ContactEquation; + + constructor(bodyA: Body, bodyB: Body, distance?: number, maxForce?: number); } @@ -168,6 +204,10 @@ declare module CANNON { export class HingeConstraint extends Constraint { + axisA: Vec3; + axisB: Vec3; + rotationalEquation1: RotationalEquation; + rotationalEquation2: RotationalEquation; motorEnabled: boolean; motorTargetVelocity: number; motorMinForce: number; @@ -178,21 +218,41 @@ declare module CANNON { enableMotor(): void; disableMotor(): void; + setMotorMaxForce(maxForce: number): void; + setMotorSpeed(speed: number): void; } export class PointToPointConstraint extends Constraint { + equationX: ContactEquation; + equationY: ContactEquation; + equationZ: ContactEquation; + pivotA: Vec3; + pivotB: Vec3; + constructor(bodyA: Body, pivotA: Vec3, bodyB: Body, pivotB: Vec3, maxForce?: number); } + export class ConeTwistConstraint extends PointToPointConstraint { + + coneEquation: ConeEquation; + twistEquation: RotationalEquation; + + constructor(bodyA: Body, bodyB: Body, options?: IHingeConstraintOptions); - export class LockConstraint extends Constraint { - constructor(bodyA: Body, bodyB: Body, options?:any); } + export class LockConstraint extends PointToPointConstraint { + rotationalEquation1: RotationalEquation; + rotationalEquation2: RotationalEquation; + rotationalEquation3: RotationalEquation; + + constructor(bodyA: Body, bodyB: Body, maxForce?: number); + + } export class Equation { @@ -219,7 +279,7 @@ declare module CANNON { computeGiMGt(): number; addToWlamda(deltalambda: number): number; computeC(): number; - + computeInvC( eps: number ): number; } export class FrictionEquation extends Equation { @@ -228,6 +288,14 @@ declare module CANNON { } + export interface IRotationalEquationOptions { + + axisA?: Vec3; + axisB?: Vec3; + maxForce?: number; + + } + export class RotationalEquation extends Equation { ni: Vec3; @@ -239,7 +307,7 @@ declare module CANNON { relVel: Vec3; relForce: Vec3; - constructor(bodyA: Body, bodyB: Body); + constructor(bodyA: Body, bodyB: Body, options?: IRotationalEquationOptions); } @@ -255,22 +323,33 @@ declare module CANNON { } + export interface IConeEquationOptions { + + axisA?: Vec3; + axisB?: Vec3; + maxForce?: number; + + } + + export class ConeEquation extends Equation { + + angle: number; + + constructor(bodyA: Body, bodyB: Body, options?: IConeEquationOptions); + + } + export class ContactEquation extends Equation { restitution: number; ri: Vec3; rj: Vec3; - penetrationVec: Vec3; ni: Vec3; - rixn: Vec3; - rjxn: Vec3; - invIi: Mat3; - invIj: Mat3; - biInvInertiaTimesRixn: Vec3; - bjInvInertiaTimesRjxn: Vec3; constructor(bi: Body, bj: Body); + getImpactVelocityAlongNormal(): number; + } export interface IContactMaterialOptions { @@ -301,12 +380,12 @@ declare module CANNON { export class Material { - name: string; id: number; - friction:number; - restitution:number; + name: string; + friction: number; + restitution: number; - constructor(name: string); + constructor(name?: string); } @@ -322,6 +401,8 @@ declare module CANNON { export class Mat3 { + elements: number[]; + constructor(elements?: number[]); identity(): void; @@ -342,6 +423,38 @@ declare module CANNON { } + export class Trimesh extends Shape { + + aabb: AABB; + edges: number[]; + indices: number[]; + normals: number[]; + scale: Vec3; + tree: Octree; + vertices: number[]; + + static computeNormal(va: Vec3, vb: Vec3, vc: Vec3, target: Vec3): void; + static createTorus(radius?: number, tube?: number, radialSegments?: number, tubularSegments?: number, arc?: number): Trimesh; + + constructor(vertices: number[], indices: number[]); + + calculateWorldAABB(pos: Vec3, quat: Quaternion, min: Vec3, max: Vec3): void; + computeLocalAABB(aabb: AABB): void; + getEdgeVector(edgeIndex: number, vectorStore: Vec3): void; + getEdgeVertex(edgeIndex: number, firstOrSecond: number, vertexStore: Vec3): void; + getNormal(i: number, target: Vec3): Vec3; + getTrianglesAABB(aabb: AABB, result: number[]): void; + getTriangleVertices(i: number, a: Vec3, b: Vec3, c: Vec3): void; + getVertex(i: number, out: Vec3): Vec3; + getWorldVertex(i: number, pos: Vec3, quat: Quaternion, out: Vec3): Vec3; + setScale(scale: Vec3): void; + updateAABB(): void; + updateEdges(): void; + updateNormals(): void; + updateTree(): void; + + } + export class Quaternion { x: number; @@ -374,18 +487,23 @@ declare module CANNON { static pointToLocalFrame(position: Vec3, quaternion: Quaternion, worldPoint: Vec3, result?: Vec3): Vec3; static pointToWorldFrame(position: Vec3, quaternion: Quaternion, localPoint: Vec3, result?: Vec3): Vec3; + static vectorToWorldFrame(quaternion: Quaternion, localVector: Vec3, result: Vec3): Vec3; + static vectorToLocalFrame(position: Vec3, quaternion: Quaternion, worldVector: Vec3, result?: Vec3): Vec3; position: Vec3; quaternion: Quaternion; - vectorToWorldFrame(localVector: Vec3, result?: Vec3): Vec3; - vectorToLocalFrame(position: Vec3, quaternion: Quaternion, worldVector: Vec3, result?: Vec3): Vec3; + pointToLocal(point: Vec3, result: Vec3): Vec3; + pointToWorld(point: Vec3, result: Vec3): Vec3; } export class Vec3 { static ZERO: Vec3; + static UNIT_X: Vec3; + static UNIT_Y: Vec3; + static UNIT_Z: Vec3; x: number; y: number; @@ -404,6 +522,7 @@ declare module CANNON { norm(): number; norm2(): number; distanceTo(p: Vec3): number; + distanceSquared(p: Vec3): number; mult(scalar: number, target?: Vec3): Vec3; scale(scalar: number, target?: Vec3): Vec3; dot(v: Vec3): number; @@ -413,6 +532,8 @@ declare module CANNON { toString(): string; toArray(): number[]; copy(source: Vec3): Vec3; + length(): number; + lengthSquared(): number; lerp(v: Vec3, t: number, target?: Vec3): void; almostEquals(v: Vec3, precision?: number): boolean; almostZero(precision?: number): boolean; @@ -422,15 +543,24 @@ declare module CANNON { } export interface IBodyOptions { + position?: Vec3; velocity?: Vec3; angularVelocity?: Vec3; quaternion?: Quaternion; mass?: number; - material?: number; + material?: Material; type?: number; linearDamping?: number; angularDamping?: number; + allowSleep?: boolean; + sleepSpeedLimit?: number; + sleepTimeLimit?: number; + collisionFilterGroup?: number; + collisionFilterMask?: number; + fixedRotation?: boolean; + shape?: Shape; + } export class Body extends EventTarget { @@ -455,6 +585,7 @@ declare module CANNON { position: Vec3; previousPosition: Vec3; initPosition: Vec3; + boundingRadius: number; velocity: Vec3; initVelocity: Vec3; force: Vec3; @@ -495,30 +626,24 @@ declare module CANNON { wakeUp(): void; sleep(): void; sleepTick(time: number): void; - updateSolveMassProperties(): void; pointToLocalFrame(worldPoint: Vec3, result?: Vec3): Vec3; pointToWorldFrame(localPoint: Vec3, result?: Vec3): Vec3; + vectorToLocalFrame(worldPoint: Vec3, result?: Vec3): Vec3; vectorToWorldFrame(localVector: Vec3, result?: Vec3): Vec3; - addShape(shape: Shape, offset?: Vec3, orientation?: Quaternion): void; - updateBoundingRadius(): void; + addShape(shape: Shape, offset?: Vec3, orientation?: Vec3): void; computeAABB(): void; - updateInertiaWorld(force: Vec3): void; applyForce(force: Vec3, worldPoint: Vec3): void; applyImpulse(impulse: Vec3, worldPoint: Vec3): void; + applyLocalForce(force: Vec3, localPoint: Vec3): void; + applyLocalImplse(impulse: Vec3, localPoint: Vec3): void; + updateBoundingRadius(): void; updateMassProperties(): void; + updateInertiaWorld(force: Vec3): void; + updateSolveMassProperties(): void; getVelocityAtWorldPoint(worldPoint: Vec3, result: Vec3): Vec3; } - export interface IRaycastVehicleOptions { - - chassisBody?: Body; - indexRightAxis?: number; - indexLeftAxis?: number; - indexUpAxis?: number; - - } - export interface IWheelInfoOptions { chassisConnectionPointLocal?: Vec3; @@ -539,7 +664,7 @@ declare module CANNON { deltaRotation?: number; rollInfluence?: number; maxSuspensionForce?: number; - isFronmtWheel?: boolean; + isFrontWheel?: boolean; clippedInvContactDotSuspension?: number; suspensionRelativeVelocity?: number; suspensionForce?: number; @@ -558,46 +683,55 @@ declare module CANNON { export class WheelInfo { - maxSuspensionTravbel: number; - customSlidingRotationalSpeed: number; - useCustomSlidingRotationalSpeed: boolean; - sliding: boolean; - chassisConnectionPointLocal: Vec3; - chassisConnectionPointWorld: Vec3; - directionLocal: Vec3; - directionWorld: Vec3; axleLocal: Vec3; axleWorld: Vec3; - suspensionRestLength: number; - suspensionMaxLength: number; - radius: number; - suspensionStiffness: number; + brake: number; + chassisConnectionPointLocal: Vec3; + chassisConnectionPointWorld: Vec3; + clippedInvContactDotSuspension: number; + customSlidingRotationalSpeed: number; dampingCompression: number; dampingRelaxation: number; - frictionSlip: number; - steering: number; - rotation: number; deltaRotation: number; - rollInfluence: number; - maxSuspensionForce: number; + directionLocal: Vec3; + directionWorld: Vec3; engineForce: number; - brake: number; - isFrontWheel: boolean; - clippedInvContactDotSuspension: number; - suspensionRelativeVelocity: number; - suspensionForce: number; - skidInfo: number; - suspensionLength: number; - sideImpulse: number; forwardImpulse: number; - raycastResult: RaycastResult; - worldTransform: Transform; + frictionSlip: number; + isFrontWheel: boolean; isInContact: boolean; + maxSuspensionForce: number; + maxSuspensionTravel: number; + radius: number; + raycastResult: RaycastResult; + rollInfluence: number; + rotation: number; + sideImpulse: number; + skidInfo: number; + sliding: boolean; + steering: number; + suspensionForce: number; + suspensionLength: number; + suspensionMaxLength: number; + suspensionRelativeVelocity: number; + suspensionStiffness: number; + suspensionRestLength: number; + useCustomSlidingRotationalSpeed: boolean; + worldTransform: Transform; constructor(options?: IWheelInfoOptions); } + export interface IRaycastVehicleOptions { + + chassisBody?: Body; + indexRightAxis?: number; + indexLeftAxis?: number; + indexUpAxis?: number; + + } + export class RaycastVehicle { chassisBody: Body; @@ -618,6 +752,7 @@ declare module CANNON { getVehicleAxisWorld(axisIndex: number, result: Vec3): Vec3; updateVehicle(timeStep: number): void; updateSuspension(deltaTime: number): void; + updateWheelTransform(wheelIndex: number): void; removeFromWorld(world: World): void; getWheelTransformWorld(wheelIndex: number): Transform; @@ -708,20 +843,15 @@ declare module CANNON { export class Box extends Shape { - static calculateIntertia(halfExtents: Vec3, mass: number, target: Vec3): void; + static calculateInertia(halfExtents: Vec3, mass: number, target: Vec3): void; - boundingSphereRadius: number; - collisionResponse: boolean; halfExtents: Vec3; convexPolyhedronRepresentation: ConvexPolyhedron; constructor(halfExtents: Vec3); updateConvexPolyhedronRepresentation(): void; - calculateLocalInertia(mass: number, target?: Vec3): Vec3; getSideNormals(sixTargetVectors: boolean, quat?: Quaternion): Vec3[]; - updateBoundingSphereRadius(): number; - volume(): number; forEachWorldCorner(pos: Vec3, quat: Quaternion, callback: Function): void; } @@ -730,6 +860,7 @@ declare module CANNON { static computeNormal(va: Vec3, vb: Vec3, vc: Vec3, target: Vec3): void; static project(hull: ConvexPolyhedron, axis: Vec3, pos: Vec3, quat: Quaternion, result: number[]): void; + static getFaceNormal(va: Vec3, vb: Vec3, vc: Vec3, target: Vec3): void; vertices: Vec3[]; worldVertices: Vec3[]; @@ -737,6 +868,7 @@ declare module CANNON { faces: number[]; faceNormals: Vec3[]; uniqueEdges: Vec3[]; + uniqueAxes: Vec3[]; constructor(points?: Vec3[], faces?: number[]); @@ -744,7 +876,7 @@ declare module CANNON { computeNormals(): void; getFaceNormal(i: number, target: Vec3): Vec3; clipAgainstHull(posA: Vec3, quatA: Quaternion, hullB: Vec3, quatB: Quaternion, separatingNormal: Vec3, minDist: number, maxDist: number, result: any[]): void; - findSaparatingAxis(hullB: ConvexPolyhedron, posA: Vec3, quatA: Quaternion, posB: Vec3, quatB: Quaternion, target: Vec3, faceListA: any[], faceListB: any[]): boolean; + findSeparatingAxis(hullB: ConvexPolyhedron, posA: Vec3, quatA: Quaternion, posB: Vec3, quatB: Quaternion, target: Vec3, faceListA: any[], faceListB: any[]): boolean; testSepAxis(axis: Vec3, hullB: ConvexPolyhedron, posA: Vec3, quatA: Quaternion, posB: Vec3, quatB: Quaternion): number; getPlaneConstantOfFace(face_i: number): number; clipFaceAgainstHull(separatingNormal: Vec3, posA: Vec3, quatA: Quaternion, worldVertsB1: Vec3[], minDist: number, maxDist: number, result: any[]): void; @@ -759,13 +891,13 @@ declare module CANNON { } - export class Cylinder extends Shape { + export class Cylinder extends ConvexPolyhedron { constructor(radiusTop: number, radiusBottom: number, height: number, numSegments: number); } - export interface IHightfield { + export interface IHightfieldOptions { minValue?: number; maxValue?: number; @@ -784,7 +916,7 @@ declare module CANNON { pillarOffset: Vec3; type: number; - constructor(data: number[], options?: IHightfield); + constructor(data: number[], options?: IHightfieldOptions); update(): void; updateMinValue(): void; @@ -826,13 +958,14 @@ declare module CANNON { } + id: number; type: number; boundingSphereRadius: number; collisionResponse: boolean; updateBoundingSphereRadius(): number; volume(): number; - calculateLocalInertia(mass: number, target: Vec3): Vec3; + calculateLocalInertia(mass: number, target?: Vec3): Vec3; } @@ -855,7 +988,7 @@ declare module CANNON { } export class Solver { - iterations: number; + equations: Equation[]; solve(dy: number, world: World): number; @@ -915,7 +1048,7 @@ declare module CANNON { export class Vec3Pool extends Pool { - type: any; + static defaults(options: Object, defaults: Object): Object; constructObject(): Vec3; @@ -924,8 +1057,66 @@ declare module CANNON { export class NarrowPhase { contactPointPool: Pool[]; + enableFrictionReduction: boolean; v3pool: Vec3Pool; + convexHeightfield(convexShape: Shape, hfShape: Heightfield, convexPos: Vec3, hfPos: Vec3, convexQuat: Quaternion, hfQuat: Quaternion, convexBody: Body, hfBody: Body): void; + convexConvex(si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + convexParticle(result: ContactEquation[], si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + convexTrimesh( result: ContactEquation[], si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + createContactEquation(bi: Body, bj: Body, si: Shape, sj: Shape, rsi: Shape, rsj: Shape): ContactEquation; + getContacts(p1: Body[], p2: Body[], world: World, result: ContactEquation[], oldcontacts: ContactEquation[]): void; + particlePlane( result: ContactEquation[], si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + particleSphere(result: ContactEquation[], si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + planeBox(result: ContactEquation[], si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + planeConvex(si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + planeTrimesh(si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + sphereBox(si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + sphereConvex(si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + sphereHeightfield(sphereShape: Shape, hfShape: Heightfield, spherePos: Vec3, hfPos: Vec3, sphereQuat: Quaternion, hfQuat: Quaternion, sphereBody: Body, hfBody: Body): void; + spherePlane( si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + sphereSphere(si: Shape, sj: Shape, xi: Vec3, xj: Vec3, qi: Quaternion, qj: Quaternion, bi: Body, bj: Body): void; + sphereTrimesh(sphereShape: Shape, trimeshShape: Shape, spherePos: Vec3, trimeshPos: Vec3, sphereQuat: Quaternion, trimeshQuat: Quaternion, sphereBody: Body, trimeshBody: Body): void; + + } + + export interface IOctreeOptions { + + root: Octree; + aabb: AABB; + + } + + export class OctreeNode { + + aabb: AABB; + children: Octree[]; + data: number[]; + root: OctreeNode; + + } + + export class Octree extends OctreeNode { + + maxDepth: number; + + constructor(aabb: AABB, options: IOctreeOptions); + + aabbQuery(aabb: AABB, result: Object[]): Object[]; + insert(aabb: AABB, elementData: Object): boolean; + rayQuery(ray: Ray, treeTransform: Transform, result: Object[]): Object[]; + removeEmptyNodes(): void; + subdivide(): void; + + } + + export interface IWorld { + + collisisonFilterMask?: number; + collisionFilterGroup?: number; + skipBackfaces?: boolean; + checkCollisionResponse?: boolean; + } export class World extends EventTarget { @@ -949,7 +1140,7 @@ declare module CANNON { collisionMatrix: ArrayCollisionMatrix; collisionMatrixPrevious: ArrayCollisionMatrix; materials: Material[]; - contactmaterials: ContactMaterial[]; + contactMaterials: ContactMaterial[]; contactMaterialTable: TupleDictionary; defaultMaterial: Material; defaultContactMaterial: ContactMaterial; @@ -965,16 +1156,23 @@ declare module CANNON { addBodyEvent: IBodyEvent; removeBodyEvent: IBodyEvent; - getContactMaterial(m1: Material, m2: Material): ContactMaterial; - numObjects(): number; - collisionMatrixTick(): void; addBody(body: Body): void; addConstraint(c: Constraint): void; - removeConstraint(c: Constraint): void; + addContactMaterial(cmat: ContactMaterial): void; + addEventListener(type: string, listener: Function): EventTarget; + addMaterial(m: Material): void; + clearForces(): void; + collisionMatrixTick(): void; + getContactMaterial(m1: Material, m2: Material): ContactMaterial; + numObjects(): number; + raycastAll(from: Vec3, to: Vec3, options: IWorld, callback: Function): boolean; + raycastAny(from: Vec3, to: Vec3, options: IWorld, result: RaycastResult): boolean; + raycastClosest(from: Vec3, to: Vec3, options: IWorld, result: RaycastResult): boolean; rayTest(from: Vec3, to: Vec3, result: RaycastResult): void; remove(body: Body): void; - addMaterial(m: Material): void; - addContactMaterial(cmat: ContactMaterial): void; + removeBody(body: Body): void; + removeConstraint(c: Constraint): void; + removeEventListener(type: string, listener: Function): EventTarget; step(dy: number, timeSinceLastCalled?: number, maxSubSteps?: number): void; } @@ -991,6 +1189,15 @@ declare module CANNON { } + export class Demo { + + constructor( options: Object ); + + addScene( title: string, initfunc: Function ): void; + restartCurrentScene(): void; + + } + } declare module "cannon" { diff --git a/cannon/tslint.json b/cannon/tslint.json deleted file mode 100644 index 2221e40e4a..0000000000 --- a/cannon/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "../tslint.json" } \ No newline at end of file