Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Cubes is an isometric graphics management library. It uses Isomer, but it's meant to offer higher level scene management.
An example configuration, taken from the defaults:
var canvas = document.getElementById('myCanvas');
var cubes = new Cubes(canvas, {
// This defines how much area is given to cube rendering and editing
x: 32,
y: 32,
z: 32,
// Slow mode provides a visual example of how models are rendered. The value provided indicates milliseconds between each successive render.
slow: 10,
// This determines how large the cubes and grid area are.
scale: 10.0,
// This determines the center from which all graphics are drawn. This should be set to a sensible value, but if it isn't, it can be overridden. It is measured in pixels.
originX: null,
// Also available is originY. It should also be set to a sensible default, but in case it isn't...
originY: null,
// Toggles click detection for this instance of Cubes.
clickDetection: false,
// Determines how different the sides of each cube of the same color are in lightness.
colorDifference: 0.10,
// This is the position of the light source for lighting the scene. It's a directional light, so a larger number indicates the light is further away, but it is not a point light.
lightX: 3, lightY: -5, lightZ: 1,
// Do you want a base plan upon which to build upon? No? Set it to false, then.
planeXY: true
});
Current methods:
This will return a special scene ID that's used internally by Cubes to keep track of cubes in a quickly accessible format. This will change if a different size cube area is specified. Please use x, y, & z format for storing and retrieving cube information.
Planned methods:
A simple insert method in addition to color data.
cubes.insert({
x: x,
y: y,
z: z,
color: '#ff00ff'
});
Click detection must be enabled, using the clickDetection
configuration property, as shown above.
cubes.click(x, y);
$('#myCanvas').on('click', function (evt) {
cubes.click(evt.offsetX, evt.offsetY);
});
Some additional useful utility methods are available.
cubes.randomColor().toHex()
Be sure to see what's being done in the cubes-tests.js
file. Tests can be run with Meteor installed and running the meteor test-packages ./
command.
FAQs
A full-featured JavaScript canvas isometric graphics library
We found that cubes 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.