Skip to content

Instantly share code, notes, and snippets.

@McbeEringi
Created March 7, 2022 06:27
Show Gist options
  • Save McbeEringi/7638eb5cc6c378c206f934b32c73e2ec to your computer and use it in GitHub Desktop.
Save McbeEringi/7638eb5cc6c378c206f934b32c73e2ec to your computer and use it in GitHub Desktop.
matter-js pixelRatio bug fix patch
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