Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rle-voxeljs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rle-voxeljs

Narrowband level set to voxeljs conversion tool

  • 0.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

rle-voxeljs

Convert rle volumes to voxel.js

Usage/Installation

First, install using npm:

npm install rle-voxel

Then, you can just convert a volume using module.exports:

var bunny_rle = require("rle-rasterize")(require(bunny));
require("rle-voxeljs")(voxels, bunny_rle, [[-20, -20, -20], [20, 20, 20]]);

If you just want to initialize your game with a narrowband level set, then it may be more direct to just wrap the classifyPoint function as a generator:

var testPoint = require("rle-classify").point.bind(null, bunny_rle);
var generator = function(x,y,z) { return testPoint([x,y,z]); };

The main method is the following:

require("rle-voxeljs")(voxels, rle, bounds)

The arguments to the function are as follows:

  • voxels: The voxeljs game object
  • rle: A narrowband level set
  • bounds: The bounds of the object to convert

Credits

(c) 2013 Mikola Lysenko. BSD

Keywords

FAQs

Package last updated on 16 Feb 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc