{"_id":"@cyanonoob/3d-bin-packing","name":"@cyanonoob/3d-bin-packing","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.4":{"name":"@cyanonoob/3d-bin-packing","sideEffects":false,"version":"0.0.4","author":{"name":"cyanonoob"},"type":"commonjs","scripts":{"clean":"","build":"","build:esm":"","build:cjs":"","prepack":"","test":"NODE_OPTIONS=--experimental-vm-modules npx jest","test:watch":"NODE_OPTIONS=--experimental-vm-modules npx jest --watch","lint":"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"},"devDependencies":{"@types/chance":"^1.1.3","@types/jest":"^29.4.0","@typescript-eslint/eslint-plugin":"^5.50.0","eslint":"^8.32.0","jest":"^29.4.1","ts-jest":"^29.0.5","ts-node":"^10.9.1","typescript":"^4.9.4"},"exports":{".":{"import":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.mjs"},"require":{"types":"./dist/cjs/types/index.d.ts","default":"./dist/cjs/index.js"}}},"types":"./dist/cjs/types/index.d.ts","main":"./dist/cjs/index.js","gitHead":"5d7adadb8a186546d04efb69898adb47fb66fee4","description":"Quick dirty fork of @owens3364's fork to change package type to commonjs to fix build issues.","_id":"@cyanonoob/3d-bin-packing@0.0.4","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-XOgdzef10LVQlUgCea5gxazAYTCjU0fnL5TkMhaNZeq7ocuVKtkktQ48TySXNrMGDZ+sU3y/lolXtnL95biVdQ==","shasum":"e15d3aa0dccce293e8607b24218653dfbc90d5f0","tarball":"https://registry.npmjs.org/@cyanonoob/3d-bin-packing/-/3d-bin-packing-0.0.4.tgz","fileCount":51,"unpackedSize":53379,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA7k2xZHTWy4mb6+lWwWwCZAiS/IsgEpx2MyU8FE1IxsAiAV6l8DDzDttHJ23LvIbWvGBBrtP3tQaYT1ch3SHnIvnQ=="}]},"_npmUser":{"name":"cyanonoob","email":"geert@webgeert.nu"},"directories":{},"maintainers":[{"name":"cyanonoob","email":"geert@webgeert.nu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/3d-bin-packing_0.0.4_1685619496327_0.10142980963226433"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-01T11:38:16.262Z","0.0.4":"2023-06-01T11:38:16.513Z","modified":"2023-06-01T11:38:16.772Z"},"maintainers":[{"name":"cyanonoob","email":"geert@webgeert.nu"}],"description":"Quick dirty fork of @owens3364's fork to change package type to commonjs to fix build issues.","author":{"name":"cyanonoob"},"readme":"# 3D Bin Packing\nQuick dirty fork of @owens3364's fork to change package type to commonjs to fix build issues.\n\n[![npm version](http://img.shields.io/npm/v/@owens3364/3d-bin-packing.svg?style=flat)](https://npmjs.org/package/@owens3364/3d-bin-packing \"View this project on npm\")\n[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n\n3D Bin Packing is a fork of [this bin packing implementation](https://github.com/macder/binpackingjs).\n\n3D Bin Packing only includes the algorithm for 3D bin packing and removes the weight considerations.\nIt is also written more cleanly and in TypeScript so that it is easier to understand and use.\n\n## Usage\n\n```typescript\nimport { Bin, Item, Packer } from '@owens3364/3d-bin-packing';\n\nconst bin1 = new Bin('Le petite box', 296, 296, 8);\nconst item1 = new Item('Item 1', 250, 250, 2);\nconst item2 = new Item('Item 2', 250, 250, 2);\nconst item3 = new Item('Item 3', 250, 250, 2);\nconst packer = new Packer();\n\npacker.addBin(bin1);\npacker.addItem(item1);\npacker.addItem(item2);\npacker.addItem(item3);\n\n// pack items into bin1\npacker.pack();\n\n// item1, item2, item3\nconsole.log(bin1.items);\n\n// items will be empty, all items was packed\nconsole.log(packer.items);\n\n// unfitItems will be empty, all items fit into bin1\nconsole.log(packer.unfitItems)\n```\n\n## Contributing\n\nPull requests are welcome. For major changes,\nplease open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)","readmeFilename":"README.md"}