Thank you for your interest in contributing to OPENRNDR :-)
This repository contains the core engine that renders graphics to a display. The ORX extras, the guide and the template are other repositories you can contribute to.
There are various ways one can contribute:
If you are not sure whether something is an issue, you can ask in Discussions or in the forum. If it is indeed an issue, please take a quick look through the existing issues to make sure it isn't a known problem. If you can't find anything relevant to your situation, just file a new issue and fill out the issue form.
A detailed walk-through for contributing code to the OPENRNDR and ORX repositories can be found in the wiki.
Feel free to ask for advice on our forums or Slack.
The style guide is fairly minimal, but it helps to spell it out regardless:
- Code: There currently isn't a strict style guide on the code, just try to follow the IntelliJ default formatting for Kotlin.
- Commit messages: It's preferable to make your commit messages relevant to the changes you make. Although it's not unusual for the commits to be squashed when merging a pull request.
While writing tests is not mandatory, it is highly encouraged.
These following libraries are currently in use for testing:
- Spek
- Kotest
- Kluent (recommended)
- kotlin.test (recommended)
We're in the process of removing Spek and Kotest as they add very little in value to testing. When writing new tests, you should prefer using kotlin.test and Kluent if needed. You may need to make some changes in the build.gradle file to accommodate this. Take a look at openrndr-svg's build.gradle.kts for an example.
There are various places where you can contribute without writing code. It will be greatly appreciated by others trying to learn about OPENRNDR.
The guide is the first contact with OPENRNDR for most users. Learn how to work on the guide.
The API page needs some love too. The content is automatically extracted from comments written in OPENRNDR's source code. It goes like this:
- Fork the OPENRNDR repo, then clone your fork (so you have a copy on your computer) and get familiar with OPENRNDR.
- Find an undocumented section at https://api.openrndr.org you want to explain.
- Find the corresponding Kotlin file in your cloned repo and add missing comments. Read about the suggested style.
- Generate the API website locally to verify your changes look correct by running the following
command:
./gradlew dokkaHtmlMultiModule -Dorg.gradle.jvmargs=-Xmx1536M
. This will create the html documentation underbuild/dokka/htmlMultiModule/
. - Open the
build/dokka/htmlMultiModule/index.html
in your web browser. If something looks off tweak your comments. - To continue improving the API go back to step 3, otherwise send a Pull Requests from your fork.
Small programs can help others understand how features works. There are various locations where one can find such demos:
- Core OPENRNDR demos ( new location)
- Core OPENRNDR demos ( old location)
- ORX demos. They are found in various subfolders corresponding each orx, for example this one for orx-jumpflood.
Ideally demos are small, limited in scope and present a new aspect or usage of a core feature or orx. Feel free to send pull requests with your demos.