GithubHelp home page GithubHelp logo

isabella232 / three-simplicial-complex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from experience-monks/three-simplicial-complex

0.0 0.0 0.0 193 KB

render simplicial complexes with ThreeJS

License: MIT License

JavaScript 100.00%

three-simplicial-complex's Introduction

three-simplicial-complex

stable

img

Creates a THREE.Geometry from a 3D simplicial complex. See demo for an example.

var Complex = require('three-simplicial-complex')(THREE)

var mesh = {
    positions: [ [25,25,25], [15,15,25], [50,50,25], [15,15,15], ... ],
    cells: [ [0,1,2], [1,3,2], ...]
}

var complex = Complex(mesh)
complex.position.x = 2
scene.add(complex)

This is useful for inter-op with modules like icosphere, bunny, stanford-dragon, mesh-combine, extrude-polyline, teapot, triangulate-contours, etc.

Usage

NPM

geo = Complex([mesh])

Creates a new THREE.Geometry with the given complex (optional), where mesh contains { positions, cells }.

geo.update(mesh)

Updates the THREE.Geometry with the new simplicial complex.

Versioning

This uses an unusual versioning system to better support ThreeJS's (lack of) versioning. The major version of this repo will line up with ThreeJS releases (69.0.0 => r69). The minor will be reserved for any new features, and patch for bug fixes and documentation/readme updates. In some rare cases, a minor feature may introduce a breaking change; so it's generally safest to use tilde or save-exact for this module.

License

MIT, see LICENSE.md for details.

three-simplicial-complex's People

Contributors

mattdesl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.