How to use the maxrects-packer.PACKING_LOGIC function in maxrects-packer

To help you get started, we’ve selected a few maxrects-packer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github odrick / free-tex-packer-core / packers / MaxRectsPacker.js View on Github external
let MaxRectsPackerEngine = require("maxrects-packer").MaxRectsPacker;
let PACKING_LOGIC = require("maxrects-packer").PACKING_LOGIC;

let Packer = require("./Packer");

const METHOD = {
    Smart: "Smart",
    SmartArea: "SmartArea",
    Square: "Square",
    SquareArea: "SquareArea",
    SmartSquare: "SmartSquare",
    SmartSquareArea: "SmartSquareArea"
};

class MaxRectsPacker extends Packer {
    constructor(width, height, allowRotate=false) {
        super();

maxrects-packer

A max rectangle 2d bin packer for packing glyphs or images into multiple sprite-sheet/atlas

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis