Coder Social home page Coder Social logo

ofxmeshwarp's Introduction

ofxMeshWarp

Warping mesh points with mouse and keyboard.
You can do it by code, of course.

How to use

code

See example

selecting points

You can select/deselect point(s) by clicking on the point or making rectangle including the points.
With shift key pressed, additive.
With command key pressed, alternative.

moving points

You can move points' position by dragging on a selected point.
With option key pressed, texcoord will be moved instead.
With shift key pressed, points move according axis.
You can also move by arrow keys.

editing alpha

You can edit points' alpha by scrolling Y-axis.

switching nodal or not

Each point has a property of nodal or not.
By clicking on a point with option key pressed, you can switch it.
If a point is nodal, you can control its position or texcoord directly.
If a point is not nodal, you cannot but it will be controled by mood.

dividing or reducing mesh points

Click on a line to divide mesh.
With option key pressed, reduce.

warning
Dividing mesh allocates memory for new points but reducing doesn't free them.
So if you call divide/reduce many times, you may need to call ofxMeshWarp::gc() on reasonable time.

Other Features

Save/Load

See example

Tested on

  • Mac OSX 10.12.2
  • oF 0.9.8
  • Xcode 8.3.3

License

MIT license.

ofxmeshwarp's People

Contributors

nariakiiwatani avatar

Watchers

James Cloos avatar Jordi Puig 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.