Coder Social home page Coder Social logo

openrndr / orx Goto Github PK

View Code? Open in Web Editor NEW
120.0 7.0 35.0 54.71 MB

A growing library of assorted data structures, algorithms and utilities for OPENRNDR

Home Page: https://openrndr.org

License: BSD 2-Clause "Simplified" License

Kotlin 90.11% GLSL 7.56% Shell 0.01% ANTLR 2.14% JavaScript 0.09% HTML 0.08%
creative-coding graphics generative-art kotlin

orx's Introduction

ORX (OPENRNDR EXTRA)

Download

A growing library of assorted data structures, algorithms and utilities to complement OPENRNDR.

Multiplatform

name                                     description
orx-camera 2D and 3D cameras controllable via mouse and keyboard.
orx-color Color spaces, palettes, histograms, named colors.
orx-composition Shape composition library
orx-compositor Toolkit to make composite (layered) images using blend modes and filters.
orx-compute-graph A graph for computation.
orx-compute-graph-nodes A collection of nodes that can be used with orx-compute-graph.
orx-delegate-magic Collection of magical property delegators. For tracking variable change or interpolate towards the value of a variable.
orx-easing Easing functions for smooth animation or non-linear interpolation.
orx-envelopes ADSR (Attack, Decay, Sustain, Release) envelopes and tools.
orx-expression-evaluator Tools to evaluate strings containing mathematical expressions.
orx-expression-evaluator-typed Tools to evaluate strings containing typed mathematical expressions.
orx-fcurve FCurves are 1 dimensional function curves constructed from 2D bezier functions. They are often used to control a property over time. x values don't have any units, but they often represent a duration in seconds.
orx-fft Simple forward and inverse FFT routine
orx-fx Ready-to-use GPU-based visual effects or filters. Most include orx-parameters annotations so they can be easily controlled via orx-gui.
orx-gradient-descent Finds equation inputs that output a minimum value: easy to use gradient descent based minimizer.
orx-hash-grid 2D space partitioning for fast point queries.
orx-image-fit Draws an image ensuring it fits or covers the specified Rectangle.
orx-integral-image CPU and GPU-based implementation for integral images (summed area tables)
orx-interval-tree For querying a data set containing time segments (start time and end time) when we need all entries containing a specific time value. Useful when creating a timeline.
orx-jumpflood Calculates distance or direction fields from an image. GPU accelerated, 2D. Results are provided as an image.
orx-kdtree Fast search of points closest to the queried point in a data set. 2D, 3D and 4D.
orx-marching-squares Tools for extracting contours from functions
orx-mesh-generators 3D-mesh generating functions and DSL.
orx-no-clear Provides the classical "draw-without-clearing-the-screen" functionality.
orx-noise Randomness for every type of person: Perlin, uniform, value, simplex, fractal and many other types of noise.
orx-obj-loader Simple loader and saver for Wavefront .obj 3D mesh files.
orx-palette Provides hundreds of color palettes.
orx-parameters Provides annotations and tools for turning Kotlin properties into introspectable parameters. Used by orx-gui to automatically generate user interfaces.
orx-property-watchers Tools for setting up property watcher based pipelines
orx-quadtree A Quadtree is a spatial partioning tree structure meant to provide fast spatial queries such as nearest points within a range.
orx-shade-styles Shader based fills and strokes, including various types of gradient fills.
orx-shader-phrases A library that provides a #pragma import statement for shaders.
orx-shapes Collection of 2D shape generators and modifiers.
orx-svg SVG reader and writer library.
orx-temporal-blur Post-processing temporal-blur video effect. CPU intense, therefore not intended for use with the ScreenRecorder extension or other real-time uses.
orx-text-writer Writing texts with layouts
orx-time-operators A collection of time-sensitive functions aimed at controlling raw data over-time, such as Envelope and LFO.
orx-timer Simple timer functionality providing repeat, to run code with a given interval and timeOut, to run code once after a given delay.
orx-triangulation Delaunay triangulation and Voronoi diagrams.
orx-turtle Bezier (ShapeContour) backed turtle graphics.
orx-view-box To create independent views inside one program window.

JVM only

name                                     description
orx-boofcv Helper functions to ease working with the BoofCV computer vision library and its data types.
orx-chataigne Expose variables to Chataigne and any other applications that can interface with it. The current implementation makes use of the OSC protocol and supports Double and ColorRGBa.
orx-depth-camera-calibrator Class to help callibrate depth and transformation matrices when using one or more depth cameras.
orx-dnk3 A scene graph based 3d renderer with support for Gltf based assets
orx-file-watcher Monitor files on disk and auto-reload them if they change.
orx-git-archiver An extension that hooks into Program.requestAssets to commit changed code to Git and provide filenames based on the commit hash.
orx-git-archiver-gradle A Gradle plugin that turns a git history and screenshots directory into a markdown file.
orx-gui Automatic UI (sliders, buttons, etc.) generated from annotated classes and properties. Uses orx-panel and orx-parameters.
orx-keyframer Create animated timelines by specifying properties and times in keyframes, then play it back at any speed (even backwards) automatically interpolating properties. Save, load, use mathematical expressions and callbacks. Powerful and highly reusable.
orx-kinect-v1 Support for the Kinect V1 RGB and depth cameras.
orx-midi MIDI support for keyboards and controllers. Send and receive note and control change events. Bind inputs to variables.
orx-minim Simplifies working with the Minim sound library. Provides sound synthesis and analysis.
orx-olive Provides live coding functionality: updates a running OPENRNDR program when you save your changes.
orx-osc Open Sound Control makes it possible to send and receive messages from other OSC enabled programs in the same or a different computer. Used to create multi-application or multi-device software.
orx-panel The OPENRNDR UI toolkit. Provides buttons, sliders, text, a color picker and much more. HTML/CSS-like.
orx-poisson-fill Post processing effect that fills transparent parts of the image interpolating the edge pixel colors. GPU-based.
orx-rabbit-control Creates a web-based remote UI to control your OPENRNDR program from a mobile device or a different computer. Alternative to orx-gui.
orx-runway Interfaces with the RunwayML machine learning library that provides features like motion capture, image synthesis, object recognition, style transfer and more. More info at runwayml.com.
orx-syphon Send frames to- and from OPENRNDR to other applications in real time using Syphon for Mac.
orx-video-profiles GIF, H265, PNG, Prores, TIFF and Webp VideoWriterProfiles for ScreenRecorder and VideoWriter.

Developer notes

Publish and use local builds of the library in your applications

First, build and publish OPENRNDR to the local maven repository:

Run (or import in IntelliJ IDEA and edit the run configuration).

# In openrndr repository
./gradlew publishToMavenLocal snapshot

This command will build and publish a snapshot of the next version of the library to your local maven repository. The exact version will be shown in the console output during the build process.

Now you can run the same command again but for this repository.

# In orx repository
./gradlew publishToMavenLocal snapshot

It will automatically use the locally published snapshot of OPENRNDR for building ORX and will publish ORX to your local maven repository with the same logic as before.

Once that's done, you can use the local builds of OPENRNDR and ORX in your openrndr-template by specifying the version that was published.

Take a look at the wiki for a more detailed walk-through.

orx's People

Contributors

arthurvimond avatar boydrotgans avatar brotgans avatar capital-g avatar codecox avatar edwinrndr avatar ernstnaezer avatar goudreinette avatar hamoid avatar i-n-g-o avatar iiliilil avatar javl avatar morisil avatar nfletton avatar ricardomatias avatar vechro avatar ylegall avatar yvee1 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

orx's Issues

[orx-gui] App crashes when minimized on Windows

Describe the bug
When using orx-gui, the app will crash on Windows 10 when the window is minimized.

To Reproduce
Build and run orx-gui/src/demo/kotlin/DemoSimple01.kt, then click the minimize button of the app window.

Expected behavior
The app crashes with console output similar to the following:

Exception in thread "main" java.lang.IllegalArgumentException: unsupported resolution (0×0)
	at org.openrndr.draw.RenderTargetKt.renderTarget(RenderTarget.kt:411)
	at org.openrndr.draw.RenderTargetKt.renderTarget$default(RenderTarget.kt:408)
	at org.openrndr.panel.ControlManager.resize(ControlManager.kt:376)
	at org.openrndr.panel.ControlManager.access$resize(ControlManager.kt:72)
	at org.openrndr.panel.ControlManager$setup$11.invoke(ControlManager.kt:346)
	at org.openrndr.panel.ControlManager$setup$11.invoke(ControlManager.kt:72)
	at org.openrndr.events.Event.deliver(Event.kt:110)
	at org.openrndr.internal.gl3.ApplicationGLFWGL3.deliverEvents(ApplicationGLFWGL3.kt:859)
	at org.openrndr.internal.gl3.ApplicationGLFWGL3.drawFrame(ApplicationGLFWGL3.kt:883)
	at org.openrndr.internal.gl3.ApplicationGLFWGL3.loop(ApplicationGLFWGL3.kt:810)
	at org.openrndr.Application$Companion.run(Application.kt:46)
	at org.openrndr.ApplicationKt.application(Application.kt:100)
	at org.openrndr.ApplicationBuilderKt.application(ApplicationBuilder.kt:109)
	at DemoSimple01Kt.main(DemoSimple01.kt:12)
	at DemoSimple01Kt.main(DemoSimple01.kt)

Context:
OS and version: Windows 10 Pro 19041.867
OpenRNDR version: 0.3.45
Java Version: openjdk-15.0.2

Additional context
If extend(gui) is commented out, the app won't crash when minimized.
The app doesn't crash when minimized on macOS.

[orx-camera] In OrbitalControls, make userInteraction toggleable

provide enable / disable userInteraction

Currently userInteraction is set up inside OrbitalControls::setup() and it stays the same during its lifetime. It contains 6 calls to .listen():

            program.mouse.moved.listen { mouseMoved(it) }
            program.mouse.buttonDown.listen { mouseButtonDown(it) }
            program.mouse.buttonUp.listen { state = STATE.NONE }
            program.mouse.scrolled.listen { mouseScrolled(it) }
            program.keyboard.keyDown.listen { keyPressed(it) }
            program.keyboard.keyRepeat.listen { keyPressed(it) }

A method in this direction would be needed:

public fun setUserInteraction(enabled: Boolean) {
  // here we either .listen() or .cancel() the listening
}

This method would replace the .listen() calls inside setup(), but also can be called by the user to enable / disable interaction.

For that to be doable Event.kt needs a method for canceling listeners.

Discussion at https://openrndr.slack.com/archives/CEASC1PB7/p1584368959475400

ColorSequence forces results to be in SRGB color space

Currently, all colors will be converted to SRGB before being returned. However, the default linearity of an RGBa color is UNKNOWN:

https://github.com/openrndr/openrndr/blob/563c1cd36ad4b65399ccfaee7928013ef99289ab/openrndr-color/src/main/kotlin/org/openrndr/color/ColorRGBa.kt#L30

So if the user defines two RGBa colors without specifying linearity, and then blend them, the resulting sequence will have unequal distances, because ColorRGBa.toSRGB() will treat UNKNOWN inputs as if they are LINEAR:

https://github.com/openrndr/openrndr/blob/563c1cd36ad4b65399ccfaee7928013ef99289ab/openrndr-color/src/main/kotlin/org/openrndr/color/ColorRGBa.kt#L228

This is unintuitive. Maybe either make the default linearity of ColorRGBa SRGB (like the predefined colors), or don't force the ColorSequence outputs in SRGB to avoid confusion?

orx-gui features bucket

Short Term

  • Vector representation - Vector2 is straightforward / Vector3 could be a resizable cube and Vector4 is in need of ideas

  • Variable Histogram - Useful for debugging to see how a variable changes overtime.

  • Palette selector - Be able to preview the colors and change it (orx-palette)

  • Collapsible/Hide-able panel bar

  • Customisable labels per group

  • Randomize button

  • Load/Export parameters to JSON

Long term:

  • Presets - able to add/change them in runtime/compile (serializable)
    • Exporting parameters with a screenshot and then git commit for archiving
  • Bi-directional update - f.ex sliders updated within the runtime have their state reflected in the UI

[orx-jumpflood] DistanceField crashes with orx-olive

org.openrndr.internal.gl3.GL3Exception: GL ERROR: GL_INVALID_OPERATION no current program object (0), or uniform type mismatch (no program
	at org.openrndr.internal.gl3.ErrorGL3Kt.checkGLErrors(ErrorGL3.kt:20)
	at org.openrndr.internal.gl3.ShaderGL3.postUniformCheck(ShaderGL3.kt:737)
	at org.openrndr.internal.gl3.ShaderGL3.uniform(ShaderGL3.kt:595)
	at org.openrndr.draw.Filter.apply(Filter.kt:106)
	at org.openrndr.draw.Filter.apply(Filter.kt:69)
	at org.openrndr.draw.Filter.apply(Filter.kt:171)
	at org.openrndr.extra.jumpfill.JumpFlooder.jumpFlood(JumpFlood.kt:84)
	at org.openrndr.extra.jumpfill.DistanceField.apply(DistanceField.kt:40)
	at org.openrndr.draw.Filter.apply(Filter.kt:171)
	at org.openrndr.extra.compositor.Layer.drawLayer(Compositor.kt:106)
	at org.openrndr.extra.compositor.Layer$drawLayer$$inlined$let$lambda$2.invoke(Compositor.kt:79)
	at org.openrndr.extra.compositor.Layer$drawLayer$$inlined$let$lambda$2.invoke(Compositor.kt:29)
	at org.openrndr.draw.DrawerKt.isolated(Drawer.kt:787)
	at org.openrndr.draw.DrawerKt.isolatedWithTarget(Drawer.kt:798)
	at org.openrndr.extra.compositor.Layer.drawLayer(Compositor.kt:73)
	at org.openrndr.extra.compositor.Composite.draw(Compositor.kt:164)
	at ScriptingHost5bb14946_Line_2$1$1$1.invoke(ScriptingHost5bb14946_Line_2.kts:42)
	at ScriptingHost5bb14946_Line_2$1$1$1.invoke(ScriptingHost5bb14946_Line_2.kts:13)
	at org.openrndr.Program$extend$functionExtension$2.beforeDraw(Program.kt:120)
	at org.openrndr.Program.drawImpl(Program.kt:241)
	at org.openrndr.internal.gl3.ApplicationGLFWGL3.drawFrame(ApplicationGLFWGL3.kt:659)
	at org.openrndr.internal.gl3.ApplicationGLFWGL3.loop(ApplicationGLFWGL3.kt:590)
	at org.openrndr.Application$Companion.run(Application.kt:33)
	at org.openrndr.ApplicationKt.application(Application.kt:75)
	at org.openrndr.ApplicationBuilderKt.application(ApplicationBuilder.kt:108)
	at Sketch02Kt.main(Sketch02.kt:20)
	at Sketch02Kt.main(Sketch02.kt)

[orx-midi] Program hangs when closing main window when using MIDI

Describe the bug

When using MIDI event controllers the program does not close properly when closing the main Window

To Reproduce

  1. create a simple program
  2. initialize a MidiTransceiver (see "MIDI" tutorial)
  3. register some listeners, e.g. controlChanged, noteOn, etc.
  4. run the program
  5. close the main window

Expected behavior

When closing the main window the program should exit normally, instead it hangs.

Context:

  • OS and version: Windows
  • OpenRNDR version: 0.3.15 0.3.46
  • Java Version: tested with OpenJDK 11 and 14

[orx-noise] Double.gaussian causes StackOverflowError because of unintended recursion

Describe the bug
Calling Double.gaussian(...) causes a StackOverflowError.

To Reproduce
Call Double.gaussian(...)

Expected behavior
Identical behavior to calling gaussian()

Additional context
The issue is that Double.gaussian calls gaussian internally. The intention was to call the general gaussian function but actually gaussian refers to Double.gaussian itself in that context, causing unintended recursion and hence never-ending function calls.

Idea: SVG based UI

From https://openrndr.slack.com/archives/CEASC1PB7/p1585641079004200

I was looking at https://twitter.com/matttytel/status/1244728487308455936 and wondering... how could I make such a UI? Then it came to my mind that in Inkscape I can add metadata to shapes. So I could design the whole UI, and then use metadata to say "this is a slider draggable button. And this line constrains its movement." The button can have json in the description, like {follow:path4757,type:slider,var:speed} path4757 is a line that defines two points, start and end. That button keeps the relative distance to the line, so you are free to draw a line from initial button center to final button center, or from corner1 to corner1, it doesn't matter.

There could be a few other tags to define text boxes, buttons, checkboxes etc. Then when OPENRNDR loads the svg, it parses the metadata and it turns it into a live UI.

image

A nice effect I would like is that people become creative with their UIs, so they don't all look the same. And also designers could do what they do best, design a beautiful UI.

[orx-kotlin-parser] NPE

  • Stack trace is very verbose going through ParseTreeWalker

stack trace:

java.lang.NullPointerException
	at org.openrndr.extra.kotlinparser.LambdaExtractor.enterAnnotatedLambda(ExtractProgram.kt:47)
	at org.openrndr.extra.kotlin.antlr.KotlinParser$AnnotatedLambdaContext.enterRule(KotlinParser.java:11926)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.enterRule(ParseTreeWalker.java:42)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:25)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
	at org.openrndr.extra.kotlinparser.ExtractProgramKt.extractProgram(ExtractProgram.kt:72)
	at org.openrndr.extra.olive.Olive$setup$2$1.invoke(Olive.kt:128)
	at org.openrndr.extra.olive.Olive$setup$2$1.invoke(Olive.kt:43)
	at org.operndr.extras.filewatcher.FileWatcherKt.watchFile(FileWatcher.kt:51)
	at org.operndr.extras.filewatcher.FileWatcherKt.programWatchFile(FileWatcher.kt:104)
	at org.openrndr.extra.olive.Olive$setup$2.invoke(Olive.kt:120)
	at org.openrndr.extra.olive.Olive.setup(Olive.kt:169)
	at org.openrndr.Program.extend(Program.kt:104)
	at org.openrndr.extra.olive.OliveProgram.<init>(OliveProgram.kt:11)
	at org.openrndr.extra.olive.OliveProgramKt$oliveProgram$1.<init>(OliveProgram.kt:36)
	at org.openrndr.extra.olive.OliveProgramKt.oliveProgram(OliveProgram.kt:36)
	at EnvelopeExampleKt$main$1.invoke(EnvelopeExample.kt:25)
	at EnvelopeExampleKt$main$1.invoke(EnvelopeExample.kt)
	at org.openrndr.ApplicationBuilderKt.application(ApplicationBuilder.kt:108)
	at EnvelopeExampleKt.main(EnvelopeExample.kt:18)
	at EnvelopeExampleKt.main(EnvelopeExample.kt)

[orx-gui] Make it possible to customize Quick UIs

Is your feature request related to a problem?
Currently the automatically generated UI for filters has a fixed style using gray scale colors.

Describe the solution you'd like
I would like to customize the style of those UIs: background color, text color, font face, font size.

Additional context
Here a video showing the current look: https://guide.openrndr.org/media/quick-ui-005.mp4

What would be a good solution? Overriding certain style properties? Or providing a whole set of styles to be used by Gui?

[orx-gui] Make possible saving gui with custom data as json

issue
orx-gui allows to easily save the current state as a json file. Using gson it's also easy to save custom data to a json file. But if the complete state of the program is to be saved (gui and other custom data), one needs to save two json files, and also later load them in pairs.

Describe the solution you'd like
orx-gui can be modified to expose the data to be serialized. This data can then be referenced from the users custom data object. This change would lead to the custom data object containing also the gui state data, avoid to save and load json files in pairs.

For loading: add loading from deserialized data instead of json which should be a matter of splitting up the orx-gui code that loads from json

Discussion: https://openrndr.slack.com/archives/CBJGUKVSQ/p1591872772025400

kinect support broken after migration to orx-jvm

Issue
Resource not found error: kinect-raw-to-depth.frag while using orx-kinect in the project.

The Cause

Refactoring in IntelliJ sometimes is creating this issue, that if default kotlin package is used, and some extra classes are put into nested fully qualified package folder, some redundant package names might be created, so it turns into:

package org.openrndr.extra.kinect.org.openrndr.extra.kinect.impl

instead of

package org.openrndr.extra.kinect.impl

It would still work despite long package name if not for the kinect-raw-to-depth.frag which was still in the original package.

Related to:

openrndr/openrndr#264

NoClear() extension: NPE when program window is minimised

OS:Windows 10
Program: NoClear.kt

Here's the exception log. The first two lines are from my debug println's. It shows the change in the default window co-ordinates when it is minimised:

...
width=640 , height480, win-pos=Vector2(x=320.0, y=120.0)
width=0 , height0, win-pos=Vector2(x=-21333.333333333332, y=-21333.333333333332)
java.lang.IllegalArgumentException: unsupported resolution (0×0)
	at org.openrndr.draw.RenderTargetKt.renderTarget(RenderTarget.kt:92)
	at org.openrndr.draw.RenderTargetKt.renderTarget$default(RenderTarget.kt:90)
	at org.openrndr.extra.noclear.NoClear.beforeDraw(NoClear.kt:27)
	at org.openrndr.Program.drawImpl(Program.kt:233)
	at org.openrndr.internal.gl3.ApplicationGLFWGL3.drawFrame(ApplicationGLFWGL3.kt:534)
	at org.openrndr.internal.gl3.ApplicationGLFWGL3.loop(ApplicationGLFWGL3.kt:475)
	at org.openrndr.Application$Companion.run(Application.kt:29)
	at org.openrndr.ApplicationKt.application(Application.kt:69)
	at org.openrndr.ApplicationBuilderKt.application(ApplicationBuilder.kt:26)
	at SketchKt.main(Sketch.kt:6)
	at SketchKt.main(Sketch.kt)
Exception in thread "main" java.lang.IllegalArgumentException: unsupported resolution (0×0)
	at org.openrndr.draw.RenderTargetKt.renderTarget(RenderTarget.kt:92)
	at org.openrndr.draw.RenderTargetKt.renderTarget$default(RenderTarget.kt:90)
	at org.openrndr.extra.noclear.NoClear.beforeDraw(NoClear.kt:27)
	at org.openrndr.Program.drawImpl(Program.kt:233)
	at org.openrndr.internal.gl3.ApplicationGLFWGL3.drawFrame(ApplicationGLFWGL3.kt:534)
	at org.openrndr.internal.gl3.ApplicationGLFWGL3.loop(ApplicationGLFWGL3.kt:475)
	at org.openrndr.Application$Companion.run(Application.kt:29)
	at org.openrndr.ApplicationKt.application(Application.kt:69)
	at org.openrndr.ApplicationBuilderKt.application(ApplicationBuilder.kt:26)
	at SketchKt.main(Sketch.kt:6)
	at SketchKt.main(Sketch.kt)

Process finished with exit code 1

It fails on this line because width/height is 0

 renderTarget = renderTarget(program.width, program.height) {
                    colorBuffer()
                    depthBuffer()
                }

I'll submit a PR to fix this NPE. (However, width & height contraints still needs to be considered for the whole application!)

Cannot compare panel UI element colours

Describe the bug
Cannot compare panel UI element colours - see below

To Reproduce

println(ColorRGBa.WHITE == ColorRGBa.WHITE) //true as expected
println(Color.RGBa(ColorRGBa.WHITE) == Color.RGBa(ColorRGBa.WHITE)) //false!

Expected behavior
The second line above to output true

orx-noise: implement Vector2, 3 and 4 versions of functions taking 2, 3 or 4 values

Is your feature request related to a problem? Please describe.

I often want to get a random value based on a position. The position might be a Vector3.
Then I need to call Random.value(position.x, position.y, position.z) instead of Random.value(position)

Describe the solution you'd like

Should we implement a few extra methods in Random that take VectorN as input?

Describe alternatives you've considered

Continue using the current approach?

Additional context

.

[Compositor] Add layer masking if a color buffer is provided

Would be cool to have something like:

compose {
    draw {
        drawer.background(ColorRGBa.BLACK)
    }

    layer {
        val image = loadImage("data/images/cheeta.jpg")
        val gapX = (w - image.effectiveWidth) / 2.0
        val gapY = (w - image.effectiveHeight) / 2.0

        blend(Normal()) {
            clip = true
        }
        mask(image, gapX, gapY) // allow positioning
        post(gui.add(LumaSobel()))
    }
}

versus:

compose {
    draw {
        drawer.background(ColorRGBa.BLACK)
    }

    layer {
        // -- load the image inside the layer
        val image = loadImage("data/images/cheeta.jpg")
        val gapX = (w - image.effectiveWidth) / 2.0
        val gapY = (w - image.effectiveHeight) / 2.0

        layer {
            draw {
                drawer.fill = ColorRGBa.WHITE
                drawer.rectangle(gapX, gapY, image.effectiveWidth.toDouble(), image.effectiveHeight.toDouble())
            }
        }

        layer {
            blend(Normal()) {
                clip = true
            }

            draw {
                drawer.image(image, gapX,  gapY)
            }

            post(gui.add(LumaSobel()))
        }
    }
}

[orx-midi] MidiTransceiver throws NoSuchMethodError in JVM shutdown hook

Describe the bug

When a MidiTransceiver object is created, orx-midi registers a shutdown hook in the JVM, but it is not called, see #180
To actually make it call the shutdown hook you need to explicitly call exitProcess(status), but the hook throws a NoSuchMethodError.

Example stacktrace:

Exception in thread "Thread-1" java.lang.NoSuchMethodError: 'void org.openrndr.extra.midi.MidiTransceiver$2.destroy()'
	at org.openrndr.extra.midi.MidiTransceiver$2.run(MidiTransceiver.kt:114)

To Reproduce

  1. create a simple program
  2. initialize a MidiTransceiver (see "MIDI" tutorial)
  3. register some listeners, e.g. controlChanged, noteOn, etc.
  4. add a "program ended listener", e.g. ended.listen { exitProcess(0) }
  5. run the program
  6. close the main window

Expected behavior

When closing the main window the program should exit normally.

Context:

  • OS and version: Windows 10
  • OpenRNDR version: 0.3.15 0.3.46
  • Java Version: tested with OpenJDK 11 and 14

[orx-shade-styles] Implement multi-color linear and radial gradients

For linear, maybe pass startPoint, endPoint, colorArray, positionsArray. This last variable should contain an array of normalized values to indicate where between startPoint and endPoint the color is located.

For radial, replace positionsArray with radiiArray? Specify center and colorArray.

Use a simple linear interpolation of colors?

[orx-gui] Blocks mouse events while invisible

GUI receives mouse events and allows changing sliders etc even while hidden.

As a fix, F11 could hide the panel by setting display : None on the root element of the sidebar instead of disabling the extension.

[README] Missing entries

It's missing a few of the newer extensions.. Also could use a facelift, maybe adding the openrndr logo and a few example images. Thoughts?

[orx-fx] add noiseSeed and noiseGain to GaussianBloom

Is your feature request related to a problem?
Currently the effect has a noise pattern visible sometimes.

video: https://twitter.com/hamoid/status/1356252933554393088
code: https://github.com/hamoid/openrndr-template/blob/master/src/main/kotlin/latest/glowingIntersectionOfCircles.kt

Describe the solution you'd like
If the seed could be animated the pattern would be less noticeable.
Solution: add noiseSeed and noiseGain parameters to the effect.

@XYParameter does not show label

Describe the bug
Not sure if bug or feature request, but the @XYParameter in gui does not show the label

To Reproduce
Use @XYParameter

Expected behavior
Shows the label

Screenshots

(the label is from the previous control)

Context:

  • Tested on Linux and Mac
  • Latest OpenRNDR version

Original control by @reinvdwoerd

Kinect pointclouds

Hi, this project looks great.
Wondering if kinect pointclouds are supported?
Are any pointcloud, or 3D libaries?

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.