Comparing version 0.9.9 to 0.9.10
@@ -119,2 +119,58 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
convert.vertices_vertices_to_vertices_edges = function(fold) { | ||
var edge, edgeMap, i, j, len, ref, ref1, v1, v2, vertex, vertices; | ||
edgeMap = {}; | ||
ref = fold.edges_vertices; | ||
for (edge = j = 0, len = ref.length; j < len; edge = ++j) { | ||
ref1 = ref[edge], v1 = ref1[0], v2 = ref1[1]; | ||
edgeMap[v1 + "," + v2] = edge; | ||
edgeMap[v2 + "," + v1] = edge; | ||
} | ||
return fold.vertices_edges = (function() { | ||
var k, len1, ref2, results; | ||
ref2 = fold.vertices_vertices; | ||
results = []; | ||
for (vertex = k = 0, len1 = ref2.length; k < len1; vertex = ++k) { | ||
vertices = ref2[vertex]; | ||
results.push((function() { | ||
var l, ref3, results1; | ||
results1 = []; | ||
for (i = l = 0, ref3 = vertices.length; 0 <= ref3 ? l < ref3 : l > ref3; i = 0 <= ref3 ? ++l : --l) { | ||
results1.push(edgeMap[vertex + "," + vertices[i]]); | ||
} | ||
return results1; | ||
})()); | ||
} | ||
return results; | ||
})(); | ||
}; | ||
convert.edges_vertices_faces_vertices_to_faces_edges = function(fold) { | ||
var edge, edgeMap, face, i, j, len, ref, ref1, v1, v2, vertices; | ||
edgeMap = {}; | ||
ref = fold.edges_vertices; | ||
for (edge = j = 0, len = ref.length; j < len; edge = ++j) { | ||
ref1 = ref[edge], v1 = ref1[0], v2 = ref1[1]; | ||
edgeMap[v1 + "," + v2] = edge; | ||
edgeMap[v2 + "," + v1] = edge; | ||
} | ||
return fold.faces_edges = (function() { | ||
var k, len1, ref2, results; | ||
ref2 = fold.faces_vertices; | ||
results = []; | ||
for (face = k = 0, len1 = ref2.length; k < len1; face = ++k) { | ||
vertices = ref2[face]; | ||
results.push((function() { | ||
var l, ref3, results1; | ||
results1 = []; | ||
for (i = l = 0, ref3 = vertices.length; 0 <= ref3 ? l < ref3 : l > ref3; i = 0 <= ref3 ? ++l : --l) { | ||
results1.push(edgeMap[vertices[i] + "," + vertices[(i + 1) % vertices.length]]); | ||
} | ||
return results1; | ||
})()); | ||
} | ||
return results; | ||
})(); | ||
}; | ||
convert.faces_vertices_to_edges = function(mesh) { | ||
@@ -121,0 +177,0 @@ var edge, edgeMap, face, i, key, ref, v1, v2, vertices; |
{ | ||
"name": "fold", | ||
"version": "0.9.9", | ||
"version": "0.9.10", | ||
"description": "FOLD file format for origami models, crease patterns, etc.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
4249677
4533