pixi-viewport
pixi-viewport copied to clipboard
move interaction to events
This is a branch off of the @cuire v7 branch. This is the branch that will publish to pixi-viewport v5.
I moved options.interaction to options.events and made it a required option. This is a breaking change but thought it was necessary.
Everything seems to be working properly, but I am having some issues with the yarn build command. @cuire can you help out?
Hey @davidfig. I completely forgot to test build process, cos I used vite from docs branch to test it. My bad, Ill check it now. 😐
I found that build breaks because of these lines:
import { Point, Rectangle } from '@pixi/core';
When that works fine:
import { Point, Rectangle } from '@pixi/math';
Most likely something is wrong with build config.
And I had no idea what was causing api-extractor to throw an error, config remains the same
Details
Error: src/InputManager.ts:1:1 - (ae-wrong-input-file-type) Incorrect file type; API Extractor expects to analyze compiler outputs with the .d.ts file extension. Troubleshooting tips: https://api-extractor.com/link/dts-errorIm continuing the investigation
@davidfig Do you have any thoughts on this?
@cuire That was the error I was seeing as well. I don't have a strong understanding of pixi's new build process so I have nothing much to add. I can do a bit more digging if needed, though.
FWIW I tried out this branch and got things working by disabling sourcemaps in rollup.config.js - I'm sure not the solution you're looking for but if it helps here it is:
import { main } from '@pixi-build-tools/rollup-configurator/main';
export default main({
excludeExternals: ['penner'],
production: true,
sourcemap: false,
});
I'm afraid I'm not familiar enough with rollup to help further.
I also removed @pixi/math and @pixi/ticker from peerDependencies to get rid of the build warnings.