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

atlaspack

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

atlaspack - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

8

index.js

@@ -137,3 +137,3 @@ /*

Atlas.prototype.uv = function() {
Atlas.prototype.uv = function(w, h) {
var self = this;

@@ -143,2 +143,4 @@ if (self._uvcache.length > 0) {

}
w = w || self.rect.w;
h = h || self.rect.h;
var isPad = this.tilepad;

@@ -158,6 +160,6 @@ (function loop(atlas) {

if (uv[0] !== 0) {
uv[0] = uv[0] / self.rect.w;
uv[0] = uv[0] / w;
}
if (uv[1] !== 0) {
uv[1] = uv[1] / self.rect.h;
uv[1] = uv[1] / h;
}

@@ -164,0 +166,0 @@ return uv;

{
"name": "atlaspack",
"description": "Pack rectangles (or images) into a rectangle (or canvas texture atlas).",
"version": "0.2.3",
"version": "0.2.4",
"homepage": "https://github.com/shama/atlaspack",

@@ -6,0 +6,0 @@ "author": {

@@ -127,3 +127,3 @@ # atlaspack

#### `atlas.uv()`
#### `atlas.uv([width, height])`
Returns an object with rect names as keys containing an array of UV mapping

@@ -140,2 +140,5 @@ coordinates between 0-1 with TRBL:

Specify a `width` and `height` to override the dimensions the UVs will calculate
from. Otherwise it will use the `atlas.rect` width and height.
#### `atlas.json([input])`

@@ -176,2 +179,3 @@ Exports or imports a JSON key for the ability to save the atlas state and

## release history
* 0.2.4 - Add width/height overrides to uv method.
* 0.2.3 - Add tilepad property to help with mipmapping.

@@ -178,0 +182,0 @@ * 0.2.2 - Ability to get and set JSON key.

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