
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Takes a grid array and renders a visualization using three.js
Mostly created for visualization of grid-based city structures, threegrid can take an array of arrays of objects, read the information within the objects, and render using three.js a grid of those objects. Currently the module has built-in camera controls, but they can be easily overridden with any three.js knowledge. I will probably remove and modularize them, or at least isolate them, as I work on the main project that this contributes to.
Basically it can make neat looking town-like things.
A grid is defined by two arrays: the outer X array and the inner Y array, like so:
var grid = [
[
{
"type" : "school",
"color": 0xFFCC00,
"id" : "7",
"parentid" : "6"
}
]
]
In our grid, the tile with ID 7 will be located at 0,0.
There are three reserved properties of a tile on the grid, which occupies a coordinate. Those properties are as follows:
The fancy part of the module is that any tiles that share the same parent ID, which can be any number you want so long as it matches between tiles you want to be related, will be assigned a shape that would make the most sense. For instance, a tile that has one sibling to the left and one sibling above will be assigned a shape that indicates this relationship:
| - | - | - | | X | O | X | | - | | - | | A | O O | | - | - | - |
While a set of default shapes for the 13 unique shapes this can create is provided, with coordinates mapping out their shapes in a 2D drawing, the module will eventually have the ability to let you create your own JSON objects of 3D shapes (easily exported from Blender or other 3D modelling software) and pull them in place of the blocky default ones.
Thus far, threegrid uses three configuration settings, with two reserved for future use.
A normal configuration object will look like this:
var config = {
"size" : "0", //height/size multiplier if greater than 0
"type" : "type", //what property we're calling the "grouper", not used yet
"asset_location" : "./examples/shapes", //not used yet
"render_width" : "1200", //view grid width in pixels
"render_height" : "800" //view grid height in pixels
}
To start popping out your own 3D grids, install the module, npm install for
dependencies, then do the following things:
var ThreeGrid = require('./index.js');var map = new ThreeGrid(grid);map.renderGrid(config);The provided test is set up to use Beefy with Browserify, the best browser-based testing modules for Node, in my opinion.
FAQs
Takes a grid array and renders a visualization using three.js
The npm package threegrid receives a total of 2 weekly downloads. As such, threegrid popularity was classified as not popular.
We found that threegrid 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.