Pixi.js: line number:4923, calculateProjection(destinationFrame?: PIXI.Rectangle, sourceFrame: PIXI.Rectangle, resolution: number, root: boolean): void;

Created on 27 Jul 2020  路  6Comments  路  Source: pixijs/pixi.js

Expected Behavior

In this method, we pass parameters, with mandatory and optional

Current Behavior

But in this method, passed optional first and then mandatory

Possible Solution

remove optional parameter for destinationFrame
calculateProjection(destinationFrame: PIXI.Rectangle, sourceFrame: PIXI.Rectangle, resolution: number, root: boolean): void;

Steps to Reproduce

Environment

  • pixi.js version: _e.g. ^5.3.1_
  • Browser & Version: _e.g. Chrome 67_
  • OS & Version: _e.g. Ubuntu 18.04_
  • Running Example: _url_

All 6 comments

It actually does not even compile to me. Can anyone suggest a fix for it?
image

Perhaps it might be my ts version. I'm using 3.9.7

@MercurialUroboros For quick fix, Goto pixi.js.d.ts:4925 line , and replace destinationFrame? with destinationFrame

calculateProjection(destinationFrame: PIXI.Rectangle, sourceFrame: PIXI.Rectangle, resolution: number, root: boolean): void;

NOTE: it's a Quick fix only to run dev project

Unfortunately, it's not a "solid" quick fix, since I will have to force my teammates to do the same.

Thanks anyway, I think I will just revert typescript version since this issue appears to be there even with 5.2.1.

@MercurialUroboros yes it's not a solid quick fix, or else you can download the total library and make sure this is to available for all your teammates, we wait until pixi.js fix this issue

Duplicate so closing. We have a fix already waiting for approval. Sorry for the inconvenience will have a patch out soon.

Was this page helpful?
0 / 5 - 0 ratings