Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Voxel origami generator. Works in node.js and browserify.
//First create a voxel set
// 0 = empty
var voxels = require('ndarray-pack')([
[[0, 1],
[2, 3]],
[[0, 0],
[0, 4]]
])
//Require the module (works with browserify)
var orthogami = require('orthogami')
//Set up options (can skip this if you like)
var options = {
units: 'mm', //Units
bounds: [210, 297], //Page size
scale: 10, //Size of voxel
lineWidth: 0.1 //Size of dashed line
}
//Then run orthogami
var svgs = orthogami(voxels, options)
//Print out the result
var fs = require('fs')
svgs.forEach(function(svg, idx) {
fs.writeFileSync('page' + idx + '.svg', svg)
})
npm install orthogami
require('orthogami')(voxels[, options])
Generates an origami template for folding a model from the given voxel object.
voxels
is a 3D ndarray of integer values. 0
values indicate empty voxels.
options
is an optional object containing any of the following extra parameters:
colorMap
a function mapping color values in the voxels to SVG color names, or alternatively an array of SVG color names.bounds
a 2D array representing the size of each page (default [Infinity, Infinity]
)scale
a number giving the size of each voxel (default 64
)convexColor
the color of the convex creases (default 'black'
)concaveColor
the color of the concave creases (default 'white'
)tabColor
the color of the tab lines (default 'black'
)lineWidth
the width of the crease lines (default 1
)units
the units for the coordinate system (default 'px'
)Returns An array of SVG files encoding the pages of the origami printout
(c) 2014 Mikola Lysenko. MIT License
FAQs
Turn voxel models into papercraft
The npm package orthogami receives a total of 3 weekly downloads. As such, orthogami popularity was classified as not popular.
We found that orthogami demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.