Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bin-packing-core

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bin-packing-core - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

6

lib/search.js

@@ -43,6 +43,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

return i + v.width;
}, 1); // 防止刚好踩到临界点情况
}, this.step + 1); // 防止刚好踩到临界点情况
this.maxHeight = this.rects.reduce(function (i, v) {
return i + v.height;
}, 1); // 防止刚好踩到临界点情况
}, this.step + 1); // 防止刚好踩到临界点情况
}

@@ -86,3 +86,3 @@ Object.defineProperty(Search.prototype, "minHeight", {

while (right - left >= this.step) {
mid = (right + left) / 2;
mid = Math.ceil((right + left) / 2);
var _a = this.getInsertResult(width, mid), result = _a[0], op = _a[1];

@@ -89,0 +89,0 @@ var isSuccess = result.length === this.rects.length;

{
"name": "bin-packing-core",
"version": "0.1.6",
"version": "0.1.7",
"description": "image packer based on genetic & max-rect algorithm",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -48,6 +48,6 @@ import MaxRectBinPack, { FindPosition } from './max-rect-bin-pack';

return i + v.width;
}, 1); // 防止刚好踩到临界点情况
}, this.step + 1); // 防止刚好踩到临界点情况
this.maxHeight = this.rects.reduce((i, v) => {
return i + v.height;
}, 1); // 防止刚好踩到临界点情况
}, this.step + 1); // 防止刚好踩到临界点情况
}

@@ -77,3 +77,3 @@ public search(): IPoint {

while (right - left >= this.step) {
mid = (right + left) / 2;
mid = Math.ceil((right + left) / 2);
const [result, op] = this.getInsertResult(width, mid);

@@ -80,0 +80,0 @@ const isSuccess = result.length === this.rects.length;

@@ -68,3 +68,3 @@ //tslint:disable

// debugger;
const serach = new Search(rects, false, 1, 0, Infinity);
const serach = new Search(rects, false, 10, 0, Infinity);
const bestNode = serach.search();

@@ -71,0 +71,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc