Socket
Socket
Sign inDemoInstall

geojson2obj

Package Overview
Dependencies
9
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

17

index.js

@@ -41,7 +41,8 @@ var extend = require('extend'),

var flatPolyCoords = [].concat.apply([], vs),
holeIndices = coordinates.slice(2).reduce(function(holeIndices, ring, i, arr) {
holeIndices.push(arr[i - 1].length);
holeIndices = coordinates.slice(2).reduce(function(holeIndices, ring, i) {
var prevHoleIndex = holeIndices[holeIndices.length - 1];
holeIndices.push(prevHoleIndex + coordinates[i + 1].length * 2);
return holeIndices;
}, [coordinates[0].length]),
triIndices = earcut(flatPolyCoords, holeIndices);
}, [coordinates[0].length * 2]);
var triIndices = earcut(flatPolyCoords, holeIndices);
[].concat.apply(faces, triIndices);

@@ -60,3 +61,2 @@ }

geom = transform ? transform(f, options).geometry : f.geometry;
if (transform) console.log(geom);

@@ -67,5 +67,8 @@ var baseZ = options.featureBase(f),

vertices = verticesFunc[geom.type](geom.coordinates).map(options.coordToPoint),
surfaces = surfacesFunc[geom.type](geom.coordinates, vertices, nIndices);
surfaces = surfacesFunc[geom.type](geom.coordinates, vertices, nIndices),
name = options.featureName(f);
stream.write('g ' + options.featureName(f) + '\n');
if (name) {
stream.write('g ' + name + '\n');
}

@@ -72,0 +75,0 @@ if (materialName) {

{
"name": "geojson2obj",
"version": "1.0.0",
"version": "1.1.0",
"description": "Convert GeoJSON into Wavefront OBJ format",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc