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

fold

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fold - npm Package Compare versions

Comparing version 0.11.3 to 0.11.4

2

lib/convert.js

@@ -187,2 +187,4 @@ /* FOLD FORMAT MANIPULATORS */

}
//# Move e1 to the end so that edges[0] connects vertices[0] to vertices[1]
edges.push(edges.shift());
//# Outside face is clockwise; exclude it.

@@ -189,0 +191,0 @@ if ((e2 != null) && geom.polygonOrientation((function() {

@@ -98,3 +98,5 @@ var convert, file, fs, path;

fold = JSON.parse(data);
fold.file_creator = "fold-convert";
if (options.flatFold) {
fold.file_creator += " --flat-fold";
error = convert.flatFoldedGeometry(fold);

@@ -101,0 +103,0 @@ console.log(` -- Flat folding error: ${error}`);

10

lib/geom.js

@@ -307,9 +307,9 @@ /* BASIC GEOMETRY */

2D transformation matrices are of the form (where last column is optional):
[[a, b, c],
[d, e, f]]
[[a, b, c],
[d, e, f]]
3D transformation matrices are of the form (where last column is optional):
[[a, b, c, d],
[e, f, g, h],
[i, j, k, l]]
[[a, b, c, d],
[e, f, g, h],
[i, j, k, l]]

@@ -316,0 +316,0 @@ Transformation matrices are designed to be multiplied on the left of points,

@@ -199,3 +199,15 @@ //#TODO: match spec (no frame_designer, no frame_reference, fix cw -> ccw)

}
s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n<java version=\"1.5.0_05\" class=\"java.beans.XMLDecoder\"> \n <object class=\"oripa.DataSet\"> \n <void property=\"mainVersion\"> \n <int>1</int> \n </void> \n <void property=\"subVersion\"> \n <int>1</int> \n </void> \n <void property=\"paperSize\"> \n <double>400.0</double> \n </void> \n";
s = `<?xml version="1.0" encoding="UTF-8"?>
<java version="1.5.0_05" class="java.beans.XMLDecoder">
<object class="oripa.DataSet">
<void property="mainVersion">
<int>1</int>
</void>
<void property="subVersion">
<int>1</int>
</void>
<void property="paperSize">
<double>400.0</double>
</void>
`;
ref1 = oripa.prop_xml2fold;

@@ -205,3 +217,7 @@ for (xp in ref1) {

//if fp of fold
s += `.\n <void property="${xp}"> \n <string>${fold[fp] || ''}</string> \n </void> \n`.slice(2);
s += `.
<void property="${xp}">
<string>${fold[fp] || ''}</string>
</void>
`.slice(2);
}

@@ -241,8 +257,36 @@ z = 0;

})();
s += `.\n <void property="lines"> \n <array class="oripa.OriLineProxy" length="${lines.length}"> \n`.slice(2);
s += `.
<void property="lines">
<array class="oripa.OriLineProxy" length="${lines.length}">
`.slice(2);
for (i = j = 0, len = lines.length; j < len; i = ++j) {
line = lines[i];
s += `.\n <void index="${i}"> \n <object class="oripa.OriLineProxy"> \n <void property="type"> \n <int>${line.type}</int> \n </void> \n <void property="x0"> \n <double>${line.x0}</double> \n </void> \n <void property="x1"> \n <double>${line.x1}</double> \n </void> \n <void property="y0"> \n <double>${line.y0}</double> \n </void> \n <void property="y1"> \n <double>${line.y1}</double> \n </void> \n </object> \n </void> \n`.slice(2);
s += `.
<void index="${i}">
<object class="oripa.OriLineProxy">
<void property="type">
<int>${line.type}</int>
</void>
<void property="x0">
<double>${line.x0}</double>
</void>
<void property="x1">
<double>${line.x1}</double>
</void>
<void property="y0">
<double>${line.y0}</double>
</void>
<void property="y1">
<double>${line.y1}</double>
</void>
</object>
</void>
`.slice(2);
}
s += ".\n </array> \n </void> \n </object> \n</java> \n".slice(2);
s += `.
</array>
</void>
</object>
</java>
`.slice(2);
return s;

@@ -249,0 +293,0 @@ };

@@ -57,3 +57,3 @@ var DEFAULTS, STYLES, SVGNS, geom, viewer;

c = coords[i];
results.push(`${(i === 0 ? 'M' : 'L')} ${c[0]} ${c[1]} `);
results.push(`${i === 0 ? 'M' : 'L'} ${c[0]} ${c[1]} `);
}

@@ -60,0 +60,0 @@ return results;

{
"name": "fold",
"version": "0.11.3",
"version": "0.11.4",
"description": "FOLD file format for origami models, crease patterns, etc.",

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

@@ -35,7 +35,7 @@ # FOLD [[spec](doc/spec.md), [viewer](https://edemaine.github.io/fold/examples/foldviewer.html), [API](doc/api.md)]

## [FOLD Format Documentation](https://github.com/edemaine/fold/tree/master/doc/spec.md)
## [FOLD Format Documentation](https://github.com/edemaine/fold/tree/main/doc/spec.md)
* [FOLD specification](https://github.com/edemaine/fold/tree/master/doc/spec.md)
* [FOLD specification](https://github.com/edemaine/fold/tree/main/doc/spec.md)
* [2-page paper describing FOLD](http://erikdemaine.org/papers/FOLD_CGW2016/)
* [Examples of .fold files](https://github.com/edemaine/fold/tree/master/examples/)
* [Examples of .fold files](https://github.com/edemaine/fold/tree/main/examples/)

@@ -65,3 +65,3 @@ ## FOLD Software Tools

## [FOLD JavaScript Library](https://github.com/edemaine/fold/tree/master/doc/api.md)
## [FOLD JavaScript Library](https://github.com/edemaine/fold/tree/main/doc/api.md)

@@ -71,3 +71,3 @@ For simple web apps, add this tag to your HTML:

(or save a local copy of
[`dist/fold.js`](https://github.com/edemaine/fold/blob/master/dist/fold.js)
[`dist/fold.js`](https://github.com/edemaine/fold/blob/main/dist/fold.js)
and use that).

@@ -83,3 +83,3 @@ Then, if you add `FOLD = require('fold')` to your JavaScript/CoffeeScript code,

The [FOLD library API](https://github.com/edemaine/fold/tree/master/doc/api.md)
The [FOLD library API](https://github.com/edemaine/fold/tree/main/doc/api.md)
documents the available modules and functions for manipulating FOLD objects.

@@ -86,0 +86,0 @@ If you have a `.fold` file, first parse it with `JSON.parse(fileContents)`

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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