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

artpacks

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

artpacks - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

56

index.js

@@ -139,2 +139,18 @@ // Generated by CoffeeScript 1.7.0

ArtPacks.prototype.getTextureNdarray = function(name, onload, onerror) {
var onload2;
onload2 = function(img) {
if (Array.isArray(img)) {
img = img[0];
}
return getPixels(img.src, function(err, pixels) {
if (err) {
return onerror(err, img);
}
return onload(pixels);
});
};
return this.getTextureImage(name, onload2, onerror);
};
ArtPacks.prototype.getTextureImage = function(name, onload, onerror) {

@@ -225,16 +241,16 @@ var img, load;

ArtPacks.prototype.mimeTypes = {
textures: 'image/png',
sounds: 'audio/ogg'
};
ArtPacks.prototype.getBlob = function(name, type) {
var blob, pack, _i, _len, _ref;
_ref = this.packs.slice(0).reverse();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
pack = _ref[_i];
if (!pack) {
continue;
}
blob = pack.getBlob(name, type);
if (blob != null) {
return blob;
}
var arrayBuffer;
arrayBuffer = this.getArrayBuffer(name, type, false);
if (arrayBuffer == null) {
return void 0;
}
return void 0;
return new Blob([arrayBuffer], {
type: this.mimeTypes[type]
});
};

@@ -388,7 +404,2 @@

ArtPackArchive.prototype.mimeTypes = {
textures: 'image/png',
sounds: 'audio/ogg'
};
ArtPackArchive.prototype.getArrayBuffer = function(name, type, isMeta) {

@@ -428,13 +439,2 @@ var found, namespace, pathRP, tryPath, tryPaths, zipEntry, _i, _len;

ArtPackArchive.prototype.getBlob = function(name, type) {
var arrayBuffer;
arrayBuffer = this.getArrayBuffer(name, type);
if (arrayBuffer == null) {
return void 0;
}
return new Blob([arrayBuffer], {
type: this.mimeTypes[type]
});
};
ArtPackArchive.prototype.getFixedPathArrayBuffer = function(path) {

@@ -441,0 +441,0 @@ var _ref;

{
"name": "artpacks",
"description": "cascading texture/sound artwork pack loader",
"version": "0.2.0",
"version": "0.3.0",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

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