Skip to content

Commit

Permalink
fix: RasterOptions now extends GraphicsOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Jul 29, 2024
1 parent b3fdd9d commit 3e1fdb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ are doing mtv adjustments during precollision.

### Fixed

- Fixed `ex.RasterOptions`, it now extends `ex.GraphicsOptions` which is the underlying truth
- Fixed issue where rayCast `filter` would not be called in hit order
- Fixed issue where rayCasts would return inconsistent orderings with the `ex.SparseHashGridCollisionProcessor` strategy
- Fixed issue where CircleCollider tangent raycast did not work correctly
Expand Down
4 changes: 2 additions & 2 deletions src/engine/Graphics/Raster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { watch } from '../Util/Watch';
import { ImageFiltering } from './Filtering';
import { omit } from '../Util/Util';

export interface RasterOptions {
export interface RasterOptions extends GraphicOptions {
/**
* Optionally specify a quality number, which is how much to scale the internal Raster. Default is 1.
*
Expand Down Expand Up @@ -75,7 +75,7 @@ export abstract class Raster extends Graphic {
protected _ctx: CanvasRenderingContext2D;
private _dirty: boolean = true;

constructor(options?: GraphicOptions & RasterOptions) {
constructor(options?: RasterOptions) {
super(omit({ ...options }, ['width', 'height'])); // rasters do some special sauce with width/height
if (options) {
this.quality = options.quality ?? this.quality;
Expand Down

0 comments on commit 3e1fdb1

Please sign in to comment.