You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like any name is accepted, though, I'm not 100% sure: {width: 2000, height: 2000, name: "oversized background", some_invalid_name: {frameWidth: 500, frameHeight: 500}},
Fixed by the README rewrite — closing as obsolete. The current example is valid JavaScript:
{width: 2000,height: 2000,name: "oversized background"},// gets a bin of its own
For the record, the bug was the bare {frameWidth: 500, frameHeight: 500} sitting in the object literal without a key, which is a syntax error. The follow-up reading of it — some_invalid_name: {frameWidth: 500, frameHeight: 500} — is a perfectly valid nested object; an extra property has never been a problem, the missing key was. That is also why "any name is accepted": the packer only reads width and height off the input, and carries everything else through untouched.
Activity
SchrodingersCpp commentedon Apr 10, 2025
Looks like any name is accepted, though, I'm not 100% sure:
{width: 2000, height: 2000, name: "oversized background", some_invalid_name: {frameWidth: 500, frameHeight: 500}},soimy commentedon Oct 12, 2026
Fixed by the README rewrite — closing as obsolete. The current example is valid JavaScript:
For the record, the bug was the bare
{frameWidth: 500, frameHeight: 500}sitting in the object literal without a key, which is a syntax error. The follow-up reading of it —some_invalid_name: {frameWidth: 500, frameHeight: 500}— is a perfectly valid nested object; an extra property has never been a problem, the missing key was. That is also why "any name is accepted": the packer only readswidthandheightoff the input, and carries everything else through untouched.Oversized rects now have their own section in the guide: https://soimy.github.io/maxrects-packer/user/packing