Files
Clément Pasteau 90d8afb5a0 Calculate Sprite collision masks automatically (#5447)
* Sprites now have an option to calculate their collision mask automatically, based on the first image of their first animation
* The generated collision mask consists of the biggest rectangle possible, encapsulating the image and avoiding transparent pixels
* This option is enabled by default for all new sprites, and can be disabled to create a custom collision mask like before
* When enabled, the mask will adapt automatically when the first image is updated
2023-06-30 15:33:50 +02:00

21 lines
734 B
JavaScript

// Automatically generated by GDevelop.js/scripts/generate-types.js
declare class gdSprite {
constructor(): void;
setImageName(name: string): void;
getImageName(): string;
getOrigin(): gdPoint;
getCenter(): gdPoint;
isDefaultCenterPoint(): boolean;
setDefaultCenterPoint(defaultPoint: boolean): void;
getAllNonDefaultPoints(): gdVectorPoint;
addPoint(point: gdPoint): void;
delPoint(name: string): void;
getPoint(name: string): gdPoint;
hasPoint(name: string): boolean;
isFullImageCollisionMask(): boolean;
setFullImageCollisionMask(enabled: boolean): void;
getCustomCollisionMask(): gdVectorPolygon2d;
setCustomCollisionMask(collisionMask: gdVectorPolygon2d): void;
delete(): void;
ptr: number;
};