export function createPhysicsWorld(canvas: any, options?: {}): PhysicsWorld; export class RigidBody2D extends Node { constructor(name: any, options?: {}); type: any; mass: any; friction: any; restitution: any; linearDamping: any; angularDamping: any; fixedRotation: any; pivot: any; gravityScale: any; body: any; onCollisionEnter: any; onCollisionStay: any; onCollisionExit: any; collisionCategory: any; collisionMask: any; anchorOffset: any; sprite: any; /** * Add collision box with automatic anchor matching * * @param {number} widthPixels - Box width in pixels * @param {number} heightPixels - Box height in pixels */ addCollisionBox(widthPixels: number, heightPixels: number, options?: {}): CollisionShape2D; /** * Add collision circle */ addCollisionCircle(radiusPixels: any, options?: {}): CollisionShape2D; addCollisionShape(shape: any): any; addCollisionPolygon(points?: any[], options?: {}): CollisionShape2D; addCollisionPolyline(points?: any[], options?: {}): CollisionShape2D; addCollisionPoint(options?: {}): CollisionShape2D; addCollisionFromParsed(parsed: any, options?: {}): CollisionShape2D; /** * Set sprite and auto-configure offset */ setSprite(sprite: any): void; updateSpriteOffset(): void; getPivotToTopLeftOffset(width: any, height: any): { x: number; y: number; }; createBody(): void; /** * Apply force (for dynamic bodies) * Forces are in SCREEN space (pixels/s²), converted internally */ applyForce(forceXPixels: any, forceYPixels: any, worldXPixels?: any, worldYPixels?: any): void; /** * Apply impulse (instant velocity change) * Impulses are in SCREEN space (pixels/s), converted internally */ applyImpulse(impulseXPixels: any, impulseYPixels: any, worldXPixels?: any, worldYPixels?: any): void; /** * Set velocity directly (in screen space: pixels/s) */ setVelocity(vxPixels: any, vyPixels: any): void; /** * Get velocity (in screen space: pixels/s) */ getVelocity(): any; /** * Cleanup */ destroy(): void; } export class CollisionShape2D extends Node { constructor(shapeType: any, options?: {}); shapeType: any; options: {}; anchor: any; anchorOffset: { x: number; y: any; } | { x: any; y: number; }; calculateAnchorOffset(): { x: number; y: any; } | { x: any; y: number; }; getBoxAnchorOffset(width: any, height: any): { x: number; y: number; }; getCircleAnchorOffset(radius: any): { x: number; y: any; } | { x: any; y: number; }; isConvex(points: any): boolean; toPlanckVertices(points: any, physicsWorld: any): Vec2[]; releaseVecs(vecs: any): void; createPlanckFixture(body: any, physicsWorld: any): any; } export class PhysicsFactory { static createBox(name: any, xPixels: any, yPixels: any, widthPixels: any, heightPixels: any, type?: string, anchor?: string): RigidBody2D; static createCircle(name: any, xPixels: any, yPixels: any, radiusPixels: any, type?: string, anchor?: string): RigidBody2D; static createGround(name: any, xPixels: any, yPixels: any, widthPixels: any, heightPixels: any): RigidBody2D; static createPlatformerCharacter(name: any, xPixels: any, yPixels: any, widthPixels: any, heightPixels: any): RigidBody2D; static createPolygon(name: any, baseX: any, baseY: any, points?: any[], type?: string, anchor?: string, closed?: boolean, shapeOptions?: {}): RigidBody2D; static createPolyline(name: any, baseX: any, baseY: any, points?: any[], type?: string, anchor?: string, shapeOptions?: {}): RigidBody2D; static createFromParsedShape(parsed: any, name: any, bodyType?: string, options?: {}): RigidBody2D; } declare class PhysicsWorld { constructor(options?: {}); worldWidthPixels: any; worldHeightPixels: any; ppm: any; worldWidthMeters: number; worldHeightMeters: number; world: World; fixedDelta: any; accumulator: number; maxSubSteps: any; bodies: Map; pixelsToMeters(pixels: any): number; metersToPixels(meters: any): number; screenToWorld(screenX: any, screenY: any): { x: number; y: number; }; worldToScreen(worldX: any, worldY: any): { x: number; y: number; }; screenVelToWorld(vxPixels: any, vyPixels: any): { x: number; y: number; }; worldVelToScreen(vxMeters: any, vyMeters: any): { x: number; y: number; }; step(delta: any): number; addBody(planckBody: any, rigidBodyNode: any): void; removeBody(planckBody: any): void; setupCollisionEvents(): void; queryPoint(screenX: any, screenY: any): any[]; raycastScreen(x1: any, y1: any, x2: any, y2: any): any; } import { Node } from "./core.js"; import { Vec2 } from "planck"; import { World } from "planck"; export {};