Created
March 7, 2022 06:27
-
-
Save McbeEringi/7638eb5cc6c378c206f934b32c73e2ec to your computer and use it in GitHub Desktop.
matter-js pixelRatio bug fix patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FloatPR={ | |
name:'float-pixelRatio',version:'0.1.0',for:'matter-js@*', | |
install(base){base.after('Mouse.create',function(){this.pixelRatio=+this.element.getAttribute('data-pixel-ratio')||1;});} | |
};Matter.Plugin.register(FloatPR); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment