DAGDA SEARCH | Back to results | Support the Project

polygonjs (Polygonjs) · GitHub

Source: https://github.com/polygonjs

@polygonjs polygonjs Follow More @polygonjs polygonjs Follow View polygonjs's full-sized avatar

Polygonjs polygonjs

Follow node-based WebGL design tool 109 followers · 0 following

Achievements

Achievement: Pull SharkAchievement: Starstruckx3Achievement: Public Sponsor

Achievements

Achievement: Pull SharkAchievement: Starstruckx3Achievement: Public Sponsor

Block or report polygonjs

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse More polygonjs/README.md

Polygonjs

NPM package Twitter Discord Forum

⚠️ This repository is in maintenance mode

Polygonjs v1 is no longer actively developed. It has been superseded by Polygon v2, available on the same website: https://polygonjs.com.

What this means:

Existing v1 projects keep working. The npm packages stay published, and the documentation below stays available for reference.

If you have purchased a license for Polygonjs v1, you can find in your account page a link to purchase Polygon v2 for the same price you paid for v1.


About Polygonjs v1 (this repository)

Polygonjs is a node-based 3D WebGL design tool.

--- Home Page --- Documentation --- Try Demo ---

Polygonjs helps creating 3D interactives experiences for the web, without having to code.

A 3D scene is built by creating and connecting nodes. This gives you a non-destructive worflow, where you can try different ideas quickly, without fearing of breaking anything.

Polygonjs is also designed to be extended. This means that if it does not have a feature you need, you can add it, either by using its API, or by reading in this repository how the existing nodes are implemented and using that as a starting point.

The editor can be used both from the web or locally. The web version is convenient to discover the editor, but the local version is recommended for production, since it has the following advantages:

Inside Polygonjs node-based Editor

Start a project:

The easiest way to start a project is by using the cli tool:

npm create polygonjs@latest

or

yarn create polygonjs

You'll then be able to choose one of the templates for vanilla js, threejs, vuejs, react or react-three-fiber.

Add to an existing project:

If you already have an npm project, you can easily add it with:

npm add polygonjs-editor

or

yarn add polygonjs-editor

And you can then start the editor with:

npm run polygonjs-editor

or

yarn polygonjs-editor

Node-based

The nodes are grouped in contexts, each for a specific type of task:

Plugins

Polygonjs is designed to be extensible. You can create your own plugins to add custom nodes. There are currently 4 official plugins:

Based on Threejs

Polygonjs is based on the powerful webgl library Threejs. While Polygonjs offers many nodes for many different types of 3D scenes, there are times where you may want to dig deeper and update the scenes in specific ways.

For this, you can directly access the threejs objects. There are 2 ways to do so:

const scene = new PolyScene(); // this is the polygonjs scene
const threejsScene = scene.threejsScene(); // and it contains the threejs scene
const scene = new PolyScene();
const rootNode = scene.root();
const geo = rootNode.createNode('geo');
const plane = geo.createNode('plane');

// now let's get the content of the plane node
const container = await plane.compute();
// the container is an envelope that contains a coreGroup
const coreGroup = container.coreContent();
// and we can now get an array of THREE.Object3D:
const objects = coreGroup.threejsObjects();
// and we can use threejs API:
const object = objects[0];
object.position.set(0, 1, 0);
object.updateMatrix();

Pinned Loading

  1. polygonjs polygonjs Public

    node-based WebGL design tool

    TypeScript 832 71

  2. plugin-mapbox plugin-mapbox Public

    Mapbox plugin for Polygonjs

    JavaScript 8 1

  3. plugin-occlusion plugin-occlusion Public

    TypeScript 1

  4. plugin-physics plugin-physics Public archive

    Physics plugin to animate rigid bodies for the webgl engine Polygonjs

    TypeScript 2

  5. plugin-palette plugin-palette Public

    Palette plugins to add geometry colors for the webgl engine Polygonjs

    TypeScript 1

Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.

Uh oh!

There was an error while loading. Please reload this page.