Git Product home page Git Product logo

nodebox-opengl's Introduction

NodeBox 3

NodeBox is a new software application for creating generative art using procedural graphics and a new way to approach graphic design.

Highlights:

  • Node based -- the software uses a non-destructive workflow where every operation is represented by a visual block of code.
  • Open to extend -- look and change the source of every code block.
  • Python or Clojure -- Nodes can be written in popular dynamic programming languages.

For downloads, documentation and the forum, visit the website:

https://nodebox.net/

Build Status

Building on Mac

NodeBox requires the Java JDK, and Homebrew (for Ant and Maven)

NodeBox uses Ant and Maven to build a running version. Install these first:

brew install ant maven

Then from the Terminal, run:

git clone https://github.com/nodebox/nodebox.git
cd nodebox
ant run

# To create a full app (the build will be in dist/mac):
ant dist-mac

Building on Windows

From the command prompt, run:

# Setup the correct environment variables
# (Modify these paths to your installation directories.)
set JAVA_HOME=c:\java\jdk
set ANT_HOME=c:\java\ant
set WIX_HOME=c:\java\wix
set PATH=%PATH%;%ANT_HOME%\bin;%WIX_HOME%\bin

git clone https://github.com/nodebox/nodebox.git

cd nodebox
ant run

# To create a full app (the MSI will be in dist/windows):
# Set the correct version in src/main/resources/version.properties
ant dist-win

Building on Linux

Ubuntu Linux

Or other distributions based on APT package system:

sudo apt install git openjdk-11-jdk ant
git clone https://github.com/nodebox/nodebox.git
cd nodebox
ant run

Fedora Linux

Or other distributions based on YUM package system:

sudo yum install git java-11-openjdk ant
git clone https://github.com/nodebox/nodebox.git
cd nodebox
ant run

Arch Linux

Nodebox has an aur package for distributions based on Arch linux : nodebox-git

yaourt -S nodebox-git

or

git clone https://aur.archlinux.org/nodebox-git.git
cd nodebox-git
makepkg
sudo pacman -U nodebox-git-[version-number]-any.pkg.tar.xz

You can then launch nodebox as any desktop application, or by running the nodebox command on terminal.

Building on FreeBSD/PC-BSD

Just use pkg:

sudo pkg install git openjdk-11 apache-ant
git clone https://github.com/nodebox/nodebox.git
cd nodebox
ant run

nodebox-opengl's People

Contributors

fdb avatar galland avatar jsundram avatar ont avatar qulogic avatar steve2072 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodebox-opengl's Issues

background coordinates wrong

For some reason background() is one covering part of the window

canvas.size = 1024, 768
canvas.run()

-- then in draw()

background(0, 0, 0, 1)

Just covers a small rectangle - when I add some debug

        xywh = (GLint*4)(); glGetIntegerv(GL_VIEWPORT, xywh); x,y,w,h = xywh
        print x, y, w, h

I get:

0 0 640 480

Which seems odd, am on Ubuntu 64 bit 15.10, Nvidia optimus, have ran under proprietary and nouveau with same results.

puredata path missing forwardslash ...

On Ubuntu the sound examples don't work ..

$ python 01-fft.py 
Exception AttributeError: "'FreeTypeMemoryFace' object has no attribute 'ft_face'" in <bound method FreeTypeMemoryFace.__del__ of <pyglet.font.freetype.FreeTypeMemoryFace object at 0x7f6bd43fde10>> ignored
Exception AttributeError: "'FreeTypeMemoryFace' object has no attribute 'ft_face'" in <bound method FreeTypeMemoryFace.__del__ of <pyglet.font.freetype.FreeTypeMemoryFace object at 0x7f6bd43fde10>> ignored
Traceback (most recent call last):
  File "01-fft.py", line 23, in <module>
    pd = PD("01-fft.pd", buffer=16, start=True)
  File "../../nodebox/sound/process.py", line 214, in __init__
    self.start()
  File "../../nodebox/sound/process.py", line 232, in start
    raise PDError, "no PD application found"
nodebox.sound.process.PDError: no PD application found

But it's easily fixable by changing /nodebox/sound/process.py around line 199 and making sure all the paths have a / at the start.

Wrong key code in on_key_press()

Default on_key_press doesn't react on ESC. If I change code to this variant:

def on_key_press(self, keys):
    """ The default behavior of the canvas:
        - ESC exits the application,
        - CTRL-P pauses the animation,
        - CTRL-S saves a screenshot.
    """
    print '--->', keys.code, type( keys.code )
    if keys.code == ESCAPE:
        self.stop()
    if keys.code == "p" and CTRL in keys.modifiers:
        self.paused = not self.paused
    if keys.code == "s" and CTRL in keys.modifiers:
        self.save("nodebox-%s.png" % str(datetime.now()).split(".")[0].replace(" ","-").replace(":","-"))

... then I get this output:

---> 65307 <type 'long'>

So why ESCAPE was defined as ESCAPE = "escape" ?

My pyglet.version == '1.1.4'

Cannot interact with gui examples

On Ubuntu 15.10 64 bit, I can't interact with the gui examples - though the pointer does seem correct (e.g. carat over text input).

Doesn't work in pypy

It tries to use getrefcount, but pypy doesn't use refcounts

  File "test.py", line 4, in <module>
    from nodebox.graphics import *
  File "/mnt/data/home/stu/.virtualenvs/pypy/site-packages/NodeBox_for_OpenGL-1.7-py2.7.egg/nodebox/graphics/**init**.py", line 1, in <module>
    import bezier
  File "/mnt/data/home/stu/.virtualenvs/pypy/site-packages/NodeBox_for_OpenGL-1.7-py2.7.egg/nodebox/graphics/bezier.py", line 10, in <module>
    from context import BezierPath, PathElement, PathError, Point, MOVETO, LINETO, CURVETO, CLOSE
  File "/mnt/data/home/stu/.virtualenvs/pypy/site-packages/NodeBox_for_OpenGL-1.7-py2.7.egg/nodebox/graphics/context.py", line 23, in <module>
    from sys          import getrefcount
ImportError: cannot import name 'getrefcount'

oval not working

This is really odd, I was using nodebox-opengl just a couple of days ago, but now if I try and use oval it dies

<ipython-input-3-576dd2e08d01> in <module>()
----> 1 oval(245.0, 784.0, 8, 8)

/mnt/data/home/stu/.virtualenvs/3d/local/lib/python2.7/site-packages/NodeBox_for_OpenGL-1.7-py2.7.egg/nodebox/graphics/context.pyc in ellipse(x, y, width, height, segments, **kwargs)
    631         commands = []
    632         f = 2 * pi / segments
--> 633         v = [(cos(t)/2, sin(t)/2) for t in [i*f for i in range(segments)+[0]]]
    634         for mode in (GL_TRIANGLE_FAN, GL_LINE_LOOP):
    635             commands.append(precompile(lambda:(

TypeError: unsupported operand type(s) for +: 'newrange' and 'list'

OSX: ImportError: cannot import name pointer

"ImportError: cannot import name pointer" can be fixed with:

  • edit nodebox/graphics/geometry.py:
    delete "pointer" import and change "pointer(data)" to "POINTER(data)"

error: "NameError: global name 'c_uint' is not defined" can be fixed with:

  • edit nodebox/graphics/shaders.py:
    add "from ctypes import c_uint"

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.