@jscad/regl-renderer
TypeScript icon, indicating that this package has built-in type declarations

2.6.8 • Public • Published

@jscad-regl-renderer

Renderer for JSCAD geometries, both 2D and 3D

NPM version NPM downloads Build Status Stability License

User Group Lerna JavaScript Style Guide

Backers Sponsors

Open Collective

What is it?

  • webgl renderer (barebones, uses regl)
  • small, compact, and fast
  • works in all browsers
  • works in Node.js projects (headless rendering to PNG images)

Installation

This package is published and available for download via NPM

npm install @jscad/regl-renderer

In addition this package is hosted at UNPKG, and can be imported directly into webpages.

<script language="javascript" src="https://unpkg.com/@jscad/regl-renderer"</script>

Usage

Node.js (headless)

Install the following packages manually.

NOTE: There are issues with continous integration testing, so 'gl' is not installed initially.

 npm install gl

Try the demo by running npm run demo-cli.

If all goes well you should end up with an image (test.png) that renders the demo design.

The demo code can be found in 'demo-cli.js'

Browsers

From a browser, try opening the file 'demo.html'. This should show the demo design.

Developers

Run the development web server using npm run dev, then open the URL shown.

If all goes well you should end up with a web page with a rotating camera (no mouse controls) that displays the demo design (a few solids).

After making changes, all tests must pass. Run npm test

License

The MIT License (MIT) (unless specified otherwise)

Package Sidebar

Install

npm i @jscad/regl-renderer

Weekly Downloads

75

Version

2.6.8

License

MIT

Unpacked Size

281 kB

Total Files

81

Last publish

Collaborators

  • platypii
  • z3dev
  • mister-jscad
  • simon_clark