phaser3-rex-notes icon indicating copy to clipboard operation
phaser3-rex-notes copied to clipboard

minimizer (Terser, UglifyJs) has parse error on roundRentagle.js

Open iKest opened this issue 7 years ago • 1 comments

ERROR in public/js/bundle.js from Terser Unexpected token: punc ()) [public/js/bundle.js:180944,8]

the error is solved if I rewrite the function from

get radius() {
        var radius = this.cornerRadius;
        return Math.max(
            radius.tl.x, radius.tl.y,
            radius.tr.x, radius.tr.y,
            radius.bl.x, radius.bl.y,
            radius.br.x, radius.br.y,
        )
    }

to

get radius() {
        var radius = this.cornerRadius;
        var max = Math.max(
            radius.tl.x,
            radius.tl.y,
            radius.tr.x,
            radius.tr.y,
            radius.bl.x,
            radius.bl.y,
            radius.br.x,
            radius.br.y
        );
        return max;
    }

in ./plugins/gameobjects/shape/roundrectangle/geom/RoundRectangle.js

I don't understand why this happens...

iKest avatar Dec 07 '18 22:12 iKest

I had changed that code for this issue.

rexrainbow avatar Dec 08 '18 14:12 rexrainbow