├── .gitattributes ├── .github └── workflows │ ├── build.yml │ ├── links.yml │ ├── publishExamples.yml │ └── publishGuide.yml ├── .gitignore ├── README.md ├── build.gradle.kts ├── buildSrc ├── build.gradle.kts ├── settings.gradle.kts └── src │ └── main │ └── kotlin │ └── org │ └── openrndr │ └── guide │ └── convention │ ├── LwjglRule.kt │ ├── Utils.kt │ ├── component-metadata-rule.gradle.kts │ └── kotlin-jvm.gradle.kts ├── contributing.md ├── data ├── compute-shaders │ └── fill.cs ├── fonts │ ├── default.otf │ └── license.txt ├── images │ └── cheeta.jpg └── jekyll-assets │ ├── .gitignore │ ├── 404.html │ ├── CNAME │ ├── Gemfile │ ├── Gemfile.lock │ ├── _config.yml │ ├── _includes │ ├── head_custom.html │ └── vimeoPlayer.html │ ├── _sass │ ├── color_schemes │ │ └── openrndr.scss │ └── custom │ │ └── custom.scss │ ├── favicon.ico │ ├── favicon.png │ ├── googleb55be37f23d36eb4.html │ ├── webServerStart.sh │ └── webServerStop.sh ├── dokgen ├── README.md ├── build.gradle.kts ├── settings.gradle.kts └── src │ └── main │ ├── kotlin │ ├── kastree │ │ └── ast │ │ │ ├── ExtrasMap.kt │ │ │ ├── MutableVisitor.kt │ │ │ ├── Node.kt │ │ │ ├── Visitor.kt │ │ │ ├── Writer.kt │ │ │ └── psi │ │ │ ├── Converter.kt │ │ │ └── Parser.kt │ └── org │ │ └── openrndr │ │ ├── Preload.kt │ │ └── dokgen │ │ ├── DokGen.kt │ │ ├── GradlePlugin.kt │ │ ├── MediaRunnerWorkAction.kt │ │ ├── MediaRunnerWorkParameters.kt │ │ ├── annotations │ │ └── Annotations.kt │ │ └── sourceprocessor │ │ ├── Fold.kt │ │ ├── Render.kt │ │ └── SourceProcessor.kt │ └── resources │ └── jekyll │ ├── .gitignore │ └── README.md ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── scripts ├── buildGuidePDF.bash └── webServerStart.sh ├── settings.gradle.kts ├── src └── main │ ├── kotlin │ └── docs │ │ ├── 10_Kotlin_language_and_tools │ │ ├── C100_Kotlin.kt │ │ ├── C110_Gradle.kt │ │ └── index.kt │ │ ├── 20_Program_basics │ │ ├── C100_Application.kt │ │ ├── C110_Configure.kt │ │ ├── C120_Program.kt │ │ ├── C130_Extend.kt │ │ └── index.kt │ │ ├── 30_Drawing │ │ ├── C100_CirclesRectanglesLines.kt │ │ ├── C110_Images.kt │ │ ├── C130_Color.kt │ │ ├── C140_ManagingDrawStyle.kt │ │ ├── C150_CurvesAndShapes.kt │ │ ├── C155_Text.kt │ │ ├── C160_Drawing_SVG.kt │ │ ├── C165_Video.kt │ │ ├── C170_TridimensionalGraphics.kt │ │ ├── C180_DrawingPrimitivesBatched.kt │ │ ├── C200_Transformations.kt │ │ ├── C210_Vectors.kt │ │ ├── C220_Quaternions.kt │ │ ├── C300_Colorbuffers.kt │ │ ├── C305_Render_targets.kt │ │ ├── C310_Filters_and_post_processing.kt │ │ ├── C320_Clipping.kt │ │ ├── C330_Asynchronous_image_loading.kt │ │ ├── C340_Shade_styles.kt │ │ ├── C350_Custom_rendering.kt │ │ ├── C360_Concurrency_and_multithreading.kt │ │ ├── C370_Array_textures.kt │ │ └── index.kt │ │ ├── 40_Interaction │ │ ├── C100_MouseAndKeyboardEvents.kt │ │ ├── C110_ProgramWindows.kt │ │ ├── C120_FileDrops.kt │ │ ├── C130_Clipboard.kt │ │ ├── C140_UserInterfaces.kt │ │ ├── C90_Events.kt │ │ └── index.kt │ │ ├── 45_Extensions │ │ ├── C100_Extensions.kt │ │ ├── C110_Screenshots.kt │ │ ├── C120_ScreenRecorder.kt │ │ ├── C130_Camera2D.kt │ │ ├── C130_NoClear.kt │ │ ├── C150_Writing_extensions.kt │ │ └── index.kt │ │ ├── 50_Animation │ │ ├── C100_InteractiveAnimations.kt │ │ ├── C50_BasicAnimations.kt │ │ └── index.kt │ │ ├── 70_FileIO │ │ └── index.kt │ │ ├── 80_ORX │ │ ├── C110_Noise.kt │ │ ├── C120_Kinect.kt │ │ ├── C140_Midi_controllers.kt │ │ ├── C150_OSC.kt │ │ ├── C160_Image_filters.kt │ │ ├── C170_Compositor.kt │ │ ├── C180_Quick_UIs.kt │ │ ├── C190_Shade_style_presets.kt │ │ ├── C200_Image_fit.kt │ │ ├── C210_Poisson_fills.kt │ │ ├── C220_Distance_fields.kt │ │ └── index.kt │ │ ├── 85_Debugging │ │ └── index.kt │ │ ├── 90_Advanced_Topics │ │ ├── C110_Application_Flow.kt │ │ ├── C120_Presentation_Control.kt │ │ ├── C140_Headless_applications.kt │ │ ├── C150_Low-level_drawing.kt │ │ ├── C155_Integer_ColorBuffers.kt │ │ ├── C160_Compute_shaders.kt │ │ └── index.kt │ │ ├── 95_Use_cases │ │ ├── C130_Live_coding.kt │ │ ├── C530_Pen_plotter_art.kt │ │ └── index.kt │ │ ├── 98_Best_practices │ │ └── index.kt │ │ ├── C10_Requirements.kt │ │ ├── C20_SetUpYourFirstProgram.kt │ │ └── index.kt │ └── resources │ └── examples-repo-template │ ├── .github │ └── workflows │ │ ├── build-on-commit.yaml │ │ └── publish-binaries.yaml │ ├── README.md │ ├── _gitattributes │ ├── _gitignore │ ├── build.gradle.kts │ ├── gradle.properties │ ├── gradle │ ├── libs.versions.toml │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle.kts └── static-media ├── favicon.ico └── favicon.png /.gitattributes: -------------------------------------------------------------------------------- 1 | *.bat eol=crlf 2 | 3 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # Builds the guide without producing screenshots or video files 2 | name: Quick build 3 | on: 4 | # Trigger the workflow on any pull request 5 | pull_request: 6 | 7 | push: 8 | branches: 9 | - main 10 | 11 | # Allow manual trigger 12 | workflow_dispatch: 13 | 14 | concurrency: 15 | group: ${{ github.ref }} 16 | cancel-in-progress: true 17 | 18 | defaults: 19 | run: 20 | shell: bash 21 | 22 | jobs: 23 | build: 24 | runs-on: ubuntu-latest 25 | steps: 26 | - name: Checkout current repository 27 | uses: actions/checkout@v4 28 | 29 | - name: Validate Gradle wrapper 30 | uses: gradle/actions/wrapper-validation@v3 31 | 32 | - name: Test glxinfo 33 | run: | 34 | sudo apt-get update 35 | sudo apt-get install -y mesa-utils xvfb 36 | xvfb-run glxinfo 37 | 38 | - uses: actions/setup-java@v4 39 | with: 40 | distribution: temurin 41 | java-version: 17 42 | cache: gradle 43 | 44 | - name: Build openrndr-guide 45 | run: skipMediaGeneration=true xvfb-run ./gradlew dokgen 46 | 47 | -------------------------------------------------------------------------------- /.github/workflows/links.yml: -------------------------------------------------------------------------------- 1 | name: Links 2 | 3 | on: 4 | repository_dispatch: 5 | workflow_dispatch: 6 | push: 7 | branches: 8 | - generated 9 | 10 | jobs: 11 | linkChecker: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | with: 16 | ref: generated 17 | - name: Link Checker 18 | id: lychee 19 | uses: lycheeverse/lychee-action@v1 20 | with: 21 | args: "'./**/*.md' './**/*.markdown'" 22 | -------------------------------------------------------------------------------- /.github/workflows/publishExamples.yml: -------------------------------------------------------------------------------- 1 | name: Publish examples to https://github.com/openrndr/openrndr-examples 2 | on: 3 | push: 4 | tags: 5 | - v[0-9].[0-9]+.[0-9]+-[0-9]+ 6 | 7 | # Allow manual trigger 8 | workflow_dispatch: 9 | 10 | 11 | concurrency: 12 | group: ${{ github.ref }} 13 | cancel-in-progress: true 14 | 15 | defaults: 16 | run: 17 | shell: bash 18 | 19 | jobs: 20 | build: 21 | runs-on: ubuntu-latest 22 | steps: 23 | - name: Checkout current repository 24 | uses: actions/checkout@v4 25 | 26 | - name: Validate Gradle wrapper 27 | uses: gradle/actions/wrapper-validation@v3 28 | 29 | - name: Test glxinfo 30 | run: | 31 | sudo apt-get update 32 | sudo apt-get install -y mesa-utils xvfb 33 | xvfb-run glxinfo 34 | 35 | - uses: actions/setup-java@v4 36 | with: 37 | distribution: temurin 38 | java-version: 17 39 | cache: gradle 40 | 41 | - name: Build openrndr-guide 42 | run: skipMediaGeneration=true xvfb-run ./gradlew dokgen 43 | 44 | - name: Setup ssh for git command 45 | run: | 46 | mkdir -p ~/.ssh 47 | echo "${{ secrets.PRIVATE_KEY }}" > ~/.ssh/id_ed25519 48 | chmod 600 ~/.ssh/id_ed25519 49 | export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" 50 | 51 | - name: Update examples 52 | run: | 53 | git clone git@github.com:openrndr/openrndr-examples.git 54 | cd openrndr-examples 55 | git rm -rf . 56 | 57 | # copy repo template 58 | rsync -av ../src/main/resources/examples-repo-template/ ./ 59 | mv _gitignore .gitignore 60 | mv _gitattributes .gitattributes 61 | 62 | # copy data folder 63 | rsync -av --exclude='jekyll-assets' ../data/ ./data/ 64 | 65 | # copy generated .kt examples 66 | mkdir -p ./src/main/kotlin/examples/ 67 | rsync -av ../build/dokgen/generated/examples-export/ ./src/main/kotlin/examples/ 68 | 69 | - name: Commit and push examples 70 | run: | 71 | cd openrndr-examples 72 | git status 73 | git config --global user.email "actions@openrndr.org" 74 | git config --global user.name "OPENRNDR Actions" 75 | git add . 76 | git commit -m "Update examples" 77 | git push 78 | rm ~/.ssh/id_ed25519 79 | -------------------------------------------------------------------------------- /.github/workflows/publishGuide.yml: -------------------------------------------------------------------------------- 1 | name: Publish guide online 2 | on: 3 | push: 4 | tags: 5 | - v[0-9].[0-9]+.[0-9]+-[0-9]+ 6 | 7 | # Allow manual trigger 8 | workflow_dispatch: 9 | 10 | concurrency: 11 | group: ${{ github.ref }} 12 | cancel-in-progress: true 13 | 14 | defaults: 15 | run: 16 | shell: bash 17 | 18 | jobs: 19 | build: 20 | runs-on: ubuntu-latest 21 | steps: 22 | - name: Checkout current repository 23 | uses: actions/checkout@v4 24 | 25 | - name: Validate Gradle wrapper 26 | uses: gradle/actions/wrapper-validation@v3 27 | 28 | - name: Test glxinfo 29 | run: | 30 | sudo apt-get update 31 | sudo apt-get install -y mesa-utils xvfb 32 | xvfb-run glxinfo 33 | 34 | - uses: actions/setup-java@v4 35 | with: 36 | distribution: temurin 37 | java-version: 17 38 | cache: gradle 39 | 40 | - name: Install ffmpeg 41 | run: sudo apt-get install -y ffmpeg 42 | 43 | - name: Build openrndr-guide 44 | run: skipMediaGeneration=false xvfb-run ./gradlew dokgen 45 | 46 | - name: Publish guide 47 | run: | 48 | git worktree add --detach docs-temp 49 | cd docs-temp 50 | git checkout --orphan generated 51 | git reset HEAD -- . 52 | git clean -df 53 | rm -rf ../build/dokgen/jekyll/docs/_site 54 | rm -rf ../build/dokgen/jekyll/docs/webServer* 55 | rm -rf ../build/dokgen/jekyll/docs/.jekyll-cache 56 | mv ../build/dokgen/jekyll/* . 57 | git status 58 | git config --global user.email "actions@openrndr.org" 59 | git config --global user.name "OPENRNDR Actions" 60 | git add . 61 | git commit -m "Add automatically generated guide" 62 | git push origin generated --force 63 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | out 3 | .idea 4 | .lwjgl 5 | .gradle 6 | src/main/kotlin/examples 7 | ffmpegOutput.txt 8 | media/ 9 | src/generated 10 | gui-parameters/ 11 | /_site/ 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Source files for the [OPENRNDR guide](https://guide.openrndr.org/#/). 2 | 3 | This repository contains the source files to generate the OPENRNDR guide. 4 | 5 | To contribute please take a look at 6 | [contributing.md](https://github.com/openrndr/openrndr-guide/blob/main/contributing.md). 7 | 8 | Find a [readable version at guide.openrndr.org](https://guide.openrndr.org) 9 | 10 | A separate repository with the OPENRNDR example programs 11 | automatically extracted from this guide can be found at 12 | [`openrndr-examples`](https://github.com/openrndr/openrndr-examples). 13 | -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | repositories { 6 | mavenCentral() 7 | } 8 | 9 | dependencies { 10 | implementation(libs.kotlin.gradle.plugin) 11 | // https://github.com/gradle/gradle/issues/15383#issuecomment-779893192 12 | implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location)) 13 | } -------------------------------------------------------------------------------- /buildSrc/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | versionCatalogs { 3 | create("libs") { 4 | from(files("../gradle/libs.versions.toml")) 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/org/openrndr/guide/convention/LwjglRule.kt: -------------------------------------------------------------------------------- 1 | package org.openrndr.guide.convention 2 | 3 | import org.gradle.api.artifacts.CacheableRule 4 | import org.gradle.api.artifacts.ComponentMetadataContext 5 | import org.gradle.api.artifacts.ComponentMetadataRule 6 | import org.gradle.api.model.ObjectFactory 7 | import org.gradle.kotlin.dsl.named 8 | import org.gradle.nativeplatform.MachineArchitecture 9 | import org.gradle.nativeplatform.OperatingSystemFamily 10 | import javax.inject.Inject 11 | 12 | @CacheableRule 13 | abstract class LwjglRule : ComponentMetadataRule { 14 | val jvmNativeVariants: List = listOf( 15 | JvmNativeVariant("natives-linux-arm64", OperatingSystemFamily.LINUX, "aarch64"), 16 | JvmNativeVariant("natives-linux-arm64", OperatingSystemFamily.LINUX, "arm64-v8"), 17 | JvmNativeVariant("natives-linux", OperatingSystemFamily.LINUX, "x86-64"), 18 | JvmNativeVariant("natives-macos-arm64", OperatingSystemFamily.MACOS, "aarch64"), 19 | JvmNativeVariant("natives-macos-arm64", OperatingSystemFamily.MACOS, "arm64-v8"), 20 | JvmNativeVariant("natives-macos", OperatingSystemFamily.MACOS, "x86-64"), 21 | JvmNativeVariant("natives-windows", OperatingSystemFamily.WINDOWS, "x86-64") 22 | ) 23 | 24 | @get:Inject 25 | abstract val objects: ObjectFactory 26 | 27 | override fun execute(context: ComponentMetadataContext) = context.details.run { 28 | if (id.group != "org.lwjgl") return 29 | if (id.name == "lwjgl-egl") return 30 | withVariant("runtime") { 31 | attributes { 32 | attributes.attribute(OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, objects.named("none")) 33 | attributes.attribute(MachineArchitecture.ARCHITECTURE_ATTRIBUTE, objects.named("none")) 34 | } 35 | } 36 | for ((targetName, os, arch) in jvmNativeVariants) { 37 | addVariant("$targetName-$arch-runtime", "runtime") { 38 | attributes { 39 | attributes.attribute(OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, objects.named(os)) 40 | attributes.attribute(MachineArchitecture.ARCHITECTURE_ATTRIBUTE, objects.named(arch)) 41 | } 42 | withFiles { 43 | addFile("${id.name}-${id.version}-$targetName.jar") 44 | } 45 | } 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/org/openrndr/guide/convention/Utils.kt: -------------------------------------------------------------------------------- 1 | package org.openrndr.guide.convention 2 | 3 | import org.gradle.api.Project 4 | import org.gradle.kotlin.dsl.named 5 | import org.gradle.nativeplatform.MachineArchitecture 6 | import org.gradle.nativeplatform.OperatingSystemFamily 7 | import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform 8 | 9 | data class JvmNativeVariant(val targetName: String, val os: String, val arch: String) 10 | 11 | val currentOperatingSystemName: String = DefaultNativePlatform.getCurrentOperatingSystem().toFamilyName() 12 | val currentArchitectureName: String = DefaultNativePlatform.getCurrentArchitecture().name 13 | 14 | fun Project.addHostMachineAttributesToRuntimeConfigurations() { 15 | configurations.matching { 16 | it.name.endsWith("runtimeClasspath", ignoreCase = true) 17 | }.configureEach { 18 | attributes { 19 | attribute(OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, objects.named(currentOperatingSystemName)) 20 | attribute(MachineArchitecture.ARCHITECTURE_ATTRIBUTE, objects.named(currentArchitectureName)) 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/org/openrndr/guide/convention/component-metadata-rule.gradle.kts: -------------------------------------------------------------------------------- 1 | package org.openrndr.guide.convention 2 | 3 | addHostMachineAttributesToRuntimeConfigurations() 4 | 5 | dependencies { 6 | components { 7 | all() 8 | } 9 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/org/openrndr/guide/convention/kotlin-jvm.gradle.kts: -------------------------------------------------------------------------------- 1 | package org.openrndr.guide.convention 2 | 3 | import org.gradle.accessors.dm.LibrariesForLibs 4 | import org.gradle.api.tasks.testing.logging.TestExceptionFormat 5 | import java.net.URI 6 | 7 | val libs = the() 8 | 9 | plugins { 10 | java 11 | kotlin("jvm") 12 | id("org.openrndr.guide.convention.component-metadata-rule") 13 | } 14 | 15 | repositories { 16 | mavenCentral() 17 | maven { 18 | // This is needed to resolve `com.github.ricardomatias:delaunator` 19 | url = URI("https://maven.openrndr.org") 20 | } 21 | mavenLocal() 22 | } 23 | 24 | group = "org.openrndr" 25 | 26 | dependencies { 27 | implementation(libs.kotlin.stdlib) 28 | testImplementation(libs.kotlin.test) 29 | } 30 | 31 | kotlin { 32 | jvmToolchain(libs.versions.jvmTarget.get().toInt()) 33 | } 34 | 35 | @Suppress("UNUSED_VARIABLE") 36 | val test by tasks.getting(Test::class) { 37 | useJUnitPlatform() 38 | testLogging.exceptionFormat = TestExceptionFormat.FULL 39 | } -------------------------------------------------------------------------------- /data/compute-shaders/fill.cs: -------------------------------------------------------------------------------- 1 | #version 430 2 | layout(local_size_x = 1, local_size_y = 1) in; 3 | 4 | uniform vec4 fillColor; 5 | uniform float seconds; 6 | layout(rgba8) uniform readonly image2D inputImg; 7 | uniform writeonly image2D outputImg; 8 | 9 | void main() { 10 | ivec2 coords = ivec2(gl_GlobalInvocationID.xy); 11 | float v = cos(coords.x * 0.01 + coords.y * 0.01 + seconds) * 0.5 + 0.5; 12 | vec4 wave = vec4(v, 0.0, 0.0, 1.0); 13 | vec4 inputImagePixel = imageLoad(inputImg, coords); 14 | 15 | imageStore(outputImg, coords, wave + inputImagePixel + fillColor); 16 | } 17 | -------------------------------------------------------------------------------- /data/fonts/default.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrndr/openrndr-guide/95bb7e7e43b5437c38c0f93302859047e46df419/data/fonts/default.otf -------------------------------------------------------------------------------- /data/fonts/license.txt: -------------------------------------------------------------------------------- 1 | Copyright © 2017 IBM Corp. with Reserved Font Name "Plex" 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | ----------------------------------------------------------- 8 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 9 | ----------------------------------------------------------- 10 | 11 | PREAMBLE 12 | The goals of the Open Font License (OFL) are to stimulate worldwide 13 | development of collaborative font projects, to support the font creation 14 | efforts of academic and linguistic communities, and to provide a free and 15 | open framework in which fonts may be shared and improved in partnership 16 | with others. 17 | 18 | The OFL allows the licensed fonts to be used, studied, modified and 19 | redistributed freely as long as they are not sold by themselves. The 20 | fonts, including any derivative works, can be bundled, embedded, 21 | redistributed and/or sold with any software provided that any reserved 22 | names are not used by derivative works. The fonts and derivatives, 23 | however, cannot be released under any other type of license. The 24 | requirement for fonts to remain under this license does not apply 25 | to any document created using the fonts or their derivatives. 26 | 27 | DEFINITIONS 28 | "Font Software" refers to the set of files released by the Copyright 29 | Holder(s) under this license and clearly marked as such. This may 30 | include source files, build scripts and documentation. 31 | 32 | "Reserved Font Name" refers to any names specified as such after the 33 | copyright statement(s). 34 | 35 | "Original Version" refers to the collection of Font Software components as 36 | distributed by the Copyright Holder(s). 37 | 38 | "Modified Version" refers to any derivative made by adding to, deleting, 39 | or substituting -- in part or in whole -- any of the components of the 40 | Original Version, by changing formats or by porting the Font Software to a 41 | new environment. 42 | 43 | "Author" refers to any designer, engineer, programmer, technical 44 | writer or other person who contributed to the Font Software. 45 | 46 | PERMISSION & CONDITIONS 47 | Permission is hereby granted, free of charge, to any person obtaining 48 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 49 | redistribute, and sell modified and unmodified copies of the Font 50 | Software, subject to the following conditions: 51 | 52 | 1) Neither the Font Software nor any of its individual components, 53 | in Original or Modified Versions, may be sold by itself. 54 | 55 | 2) Original or Modified Versions of the Font Software may be bundled, 56 | redistributed and/or sold with any software, provided that each copy 57 | contains the above copyright notice and this license. These can be 58 | included either as stand-alone text files, human-readable headers or 59 | in the appropriate machine-readable metadata fields within text or 60 | binary files as long as those fields can be easily viewed by the user. 61 | 62 | 3) No Modified Version of the Font Software may use the Reserved Font 63 | Name(s) unless explicit written permission is granted by the corresponding 64 | Copyright Holder. This restriction only applies to the primary font name as 65 | presented to the users. 66 | 67 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 68 | Software shall not be used to promote, endorse or advertise any 69 | Modified Version, except to acknowledge the contribution(s) of the 70 | Copyright Holder(s) and the Author(s) or with their explicit written 71 | permission. 72 | 73 | 5) The Font Software, modified or unmodified, in part or in whole, 74 | must be distributed entirely under this license, and must not be 75 | distributed under any other license. The requirement for fonts to 76 | remain under this license does not apply to any document created 77 | using the Font Software. 78 | 79 | TERMINATION 80 | This license becomes null and void if any of the above conditions are 81 | not met. 82 | 83 | DISCLAIMER 84 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 85 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 86 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 87 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 88 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 89 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 90 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 91 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 92 | OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /data/images/cheeta.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrndr/openrndr-guide/95bb7e7e43b5437c38c0f93302859047e46df419/data/images/cheeta.jpg -------------------------------------------------------------------------------- /data/jekyll-assets/.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache 3 | .jekyll-cache 4 | .jekyll-metadata 5 | vendor 6 | -------------------------------------------------------------------------------- /data/jekyll-assets/404.html: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /404.html 3 | layout: default 4 | --- 5 | 6 | 19 | 20 |
21 |

404

22 | 23 |

Page not found :(

24 |

The requested page could not be found.

25 |
26 | -------------------------------------------------------------------------------- /data/jekyll-assets/CNAME: -------------------------------------------------------------------------------- 1 | GUIDE.OPENRNDR.ORG -------------------------------------------------------------------------------- /data/jekyll-assets/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | # Hello! This is where you manage which Jekyll version is used to run. 4 | # When you want to use a different version, change it below, save the 5 | # file and run `bundle install`. Run Jekyll with `bundle exec`, like so: 6 | # 7 | # bundle exec jekyll serve 8 | # 9 | # This will help ensure the proper Jekyll version is running. 10 | 11 | gem "jekyll", "~> 4.3.4" 12 | gem "json" 13 | gem "just-the-docs" 14 | 15 | # If you want to use GitHub Pages, remove the "gem "jekyll"" above and 16 | # uncomment the line below. To upgrade, run `bundle update github-pages`. 17 | # gem "github-pages", group: :jekyll_plugins 18 | # If you have any plugins, put them here! 19 | group :jekyll_plugins do 20 | gem "jekyll-feed", "~> 0.17.0" 21 | gem 'jekyll-sitemap' 22 | end 23 | 24 | # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem 25 | # and associated library. 26 | platforms :mingw, :x64_mingw, :mswin, :jruby do 27 | gem "tzinfo", "~> 2.0.6" 28 | gem "tzinfo-data" 29 | end 30 | 31 | # Performance-booster for watching directories on Windows 32 | gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin] 33 | 34 | gem "jekyll-remote-theme" 35 | 36 | gem "jekyll-include-cache" 37 | -------------------------------------------------------------------------------- /data/jekyll-assets/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.8.6) 5 | public_suffix (>= 2.0.2, < 6.0) 6 | colorator (1.1.0) 7 | concurrent-ruby (1.3.4) 8 | em-websocket (0.5.3) 9 | eventmachine (>= 0.12.9) 10 | http_parser.rb (~> 0) 11 | eventmachine (1.2.7) 12 | ffi (1.17.0-x86_64-linux-gnu) 13 | forwardable-extended (2.6.0) 14 | google-protobuf (3.25.3-x86_64-linux) 15 | http_parser.rb (0.8.0) 16 | i18n (1.14.5) 17 | concurrent-ruby (~> 1.0) 18 | jekyll (4.3.4) 19 | addressable (~> 2.4) 20 | colorator (~> 1.0) 21 | em-websocket (~> 0.5) 22 | i18n (~> 1.0) 23 | jekyll-sass-converter (>= 2.0, < 4.0) 24 | jekyll-watch (~> 2.0) 25 | kramdown (~> 2.3, >= 2.3.1) 26 | kramdown-parser-gfm (~> 1.0) 27 | liquid (~> 4.0) 28 | mercenary (>= 0.3.6, < 0.5) 29 | pathutil (~> 0.9) 30 | rouge (>= 3.0, < 5.0) 31 | safe_yaml (~> 1.0) 32 | terminal-table (>= 1.8, < 4.0) 33 | webrick (~> 1.7) 34 | jekyll-feed (0.17.0) 35 | jekyll (>= 3.7, < 5.0) 36 | jekyll-include-cache (0.2.1) 37 | jekyll (>= 3.7, < 5.0) 38 | jekyll-remote-theme (0.4.3) 39 | addressable (~> 2.0) 40 | jekyll (>= 3.5, < 5.0) 41 | jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) 42 | rubyzip (>= 1.3.0, < 3.0) 43 | jekyll-sass-converter (3.0.0) 44 | sass-embedded (~> 1.54) 45 | jekyll-seo-tag (2.8.0) 46 | jekyll (>= 3.8, < 5.0) 47 | jekyll-sitemap (1.4.0) 48 | jekyll (>= 3.7, < 5.0) 49 | jekyll-watch (2.2.1) 50 | listen (~> 3.0) 51 | json (2.7.1) 52 | just-the-docs (0.8.0) 53 | jekyll (>= 3.8.5) 54 | jekyll-include-cache 55 | jekyll-seo-tag (>= 2.0) 56 | rake (>= 12.3.1) 57 | kramdown (2.4.0) 58 | rexml 59 | kramdown-parser-gfm (1.1.0) 60 | kramdown (~> 2.0) 61 | liquid (4.0.4) 62 | listen (3.9.0) 63 | rb-fsevent (~> 0.10, >= 0.10.3) 64 | rb-inotify (~> 0.9, >= 0.9.10) 65 | mercenary (0.4.0) 66 | pathutil (0.16.2) 67 | forwardable-extended (~> 2.6) 68 | public_suffix (5.0.4) 69 | rake (13.1.0) 70 | rb-fsevent (0.11.2) 71 | rb-inotify (0.11.1) 72 | ffi (~> 1.0) 73 | rexml (3.3.6) 74 | strscan 75 | rouge (4.2.1) 76 | rubyzip (2.3.2) 77 | safe_yaml (1.0.5) 78 | sass-embedded (1.69.5-x86_64-linux-gnu) 79 | google-protobuf (~> 3.23) 80 | strscan (3.1.0) 81 | terminal-table (3.0.2) 82 | unicode-display_width (>= 1.1.1, < 3) 83 | unicode-display_width (2.5.0) 84 | webrick (1.8.1) 85 | 86 | PLATFORMS 87 | x86_64-linux 88 | 89 | DEPENDENCIES 90 | jekyll (~> 4.3.4) 91 | jekyll-feed (~> 0.17.0) 92 | jekyll-include-cache 93 | jekyll-remote-theme 94 | jekyll-sitemap 95 | json 96 | just-the-docs 97 | tzinfo (~> 2.0.6) 98 | tzinfo-data 99 | wdm (~> 0.2.0) 100 | 101 | BUNDLED WITH 102 | 2.4.13 103 | -------------------------------------------------------------------------------- /data/jekyll-assets/_config.yml: -------------------------------------------------------------------------------- 1 | # See: https://jekyllrb.com/docs/configuration/default/ 2 | # 3 | # Welcome to Jekyll! 4 | # 5 | # This config file is meant for settings that affect your whole blog, values 6 | # which you are expected to set up once and rarely edit after that. If you find 7 | # yourself editing this file very often, consider using Jekyll's data files 8 | # feature for the data you need to update frequently. 9 | # 10 | # For technical reasons, this file is *NOT* reloaded automatically when you use 11 | # 'bundle exec jekyll serve'. If you change this file, please restart the server process. 12 | # 13 | # If you need help with YAML syntax, here are some quick references for you: 14 | # https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml 15 | # https://learnxinyminutes.com/docs/yaml/ 16 | # 17 | # Site settings 18 | # These are used to personalize your new site. If you look in the HTML files, 19 | # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. 20 | # You can create any custom variable you would like, and they will be accessible 21 | # in the templates via {{ site.myvariable }}. 22 | 23 | title: OPENRNDR GUIDE 24 | email: info@openrndr.org 25 | description: >- # this means to ignore newlines until "baseurl:" 26 | Guide for OPENRNDR 27 | #baseurl: "/orml" # the subpath of your site, e.g. /blog 28 | url: "https://guide.openrndr.org" # the base hostname & protocol for your site, e.g. http://example.com 29 | twitter_username: openrndr 30 | github_username: openrndr 31 | 32 | ga_tracking: UA-109731993-1 33 | ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true by default) 34 | 35 | # Build settings 36 | #theme: just-the-docs 37 | remote_theme: just-the-docs/just-the-docs # @v0.5.1 38 | color_scheme: openrndr 39 | plugins: 40 | - jekyll-feed 41 | - jekyll-remote-theme 42 | - jekyll-sitemap 43 | 44 | # Exclude from processing. 45 | # The following items will not be processed, by default. 46 | # Any item listed under the `exclude:` key here will be automatically added to 47 | # the internal "default list". 48 | # 49 | # Excluded items can be processed by explicitly listing the directories or 50 | # their entries' file path in the `include:` list. 51 | # 52 | # exclude: 53 | # - .sass-cache/ 54 | # - .jekyll-cache/ 55 | # - gemfiles/ 56 | # - Gemfile 57 | # - Gemfile.lock 58 | # - node_modules/ 59 | # - vendor/bundle/ 60 | # - vendor/cache/ 61 | # - vendor/gems/ 62 | # - vendor/ruby/ 63 | -------------------------------------------------------------------------------- /data/jekyll-assets/_includes/head_custom.html: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /data/jekyll-assets/_includes/vimeoPlayer.html: -------------------------------------------------------------------------------- 1 |
2 | 11 |
-------------------------------------------------------------------------------- /data/jekyll-assets/_sass/color_schemes/openrndr.scss: -------------------------------------------------------------------------------- 1 | $sidebar-color: #f5f5f5; 2 | 3 | $or-grey-lt-000: #f5f5f5; 4 | $or-grey-lt-100: #eeebee; 5 | $or-grey-lt-200: #ececec; 6 | $or-grey-lt-300: #e6e6e6; 7 | 8 | $or-grey-dk-000: #959595; 9 | $or-grey-dk-100: #5c5c5c; 10 | $or-grey-dk-200: #444444; 11 | $or-grey-dk-250: #303030; 12 | $or-grey-dk-300: #272727; 13 | 14 | $or-purple-000: #555; 15 | $or-purple-100: #444; 16 | $or-purple-200: #333; 17 | $or-purple-300: #222; 18 | 19 | $search-background-color: $white; 20 | $table-background-color: $white; 21 | $code-background-color: $or-grey-lt-000; 22 | $feedback-color: darken($sidebar-color, 3%); 23 | $body-text-color: $or-grey-dk-100; 24 | $body-heading-color: $or-grey-dk-300; 25 | $search-result-preview-color: $or-grey-dk-000; 26 | $nav-child-link-color: $or-grey-dk-100; 27 | $link-color: $or-purple-000; 28 | $btn-primary-color: $or-purple-100; 29 | $base-button-color: #f7f7f7; 30 | -------------------------------------------------------------------------------- /data/jekyll-assets/_sass/custom/custom.scss: -------------------------------------------------------------------------------- 1 | /* Find themes at https://stylishthemes.github.io/Syntax-Themes/pygments/ */ 2 | .highlight .hll { background-color: #ffffcc } 3 | .highlight .c { color: #8f5902; font-style: italic } /* Comment */ 4 | /*.highlight .err { color: #a40000; border: 1px solid #ef2929 }*/ /* Error */ 5 | .highlight .g { color: #000000 } /* Generic */ 6 | .highlight .k { color: #204a87; font-weight: bold } /* Keyword */ 7 | .highlight .l { color: #000000 } /* Literal */ 8 | .highlight .n { color: #000000 } /* Name */ 9 | .highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ 10 | .highlight .x { color: #000000 } /* Other */ 11 | .highlight .p { color: #000000; font-weight: bold } /* Punctuation */ 12 | .highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ 13 | .highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ 14 | .highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ 15 | .highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ 16 | .highlight .gd { color: #a40000 } /* Generic.Deleted */ 17 | .highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ 18 | .highlight .gr { color: #ef2929 } /* Generic.Error */ 19 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 20 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 21 | .highlight .go { color: #000000; font-style: italic } /* Generic.Output */ 22 | .highlight .gp { color: #8f5902 } /* Generic.Prompt */ 23 | .highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ 24 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 25 | .highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ 26 | .highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ 27 | .highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ 28 | .highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ 29 | .highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ 30 | .highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ 31 | .highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ 32 | .highlight .ld { color: #000000 } /* Literal.Date */ 33 | .highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ 34 | .highlight .s { color: #4e9a06 } /* Literal.String */ 35 | .highlight .na { color: #c4a000 } /* Name.Attribute */ 36 | .highlight .nb { color: #204a87 } /* Name.Builtin */ 37 | .highlight .nc { color: #000000 } /* Name.Class */ 38 | .highlight .no { color: #000000 } /* Name.Constant */ 39 | .highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ 40 | .highlight .ni { color: #ce5c00 } /* Name.Entity */ 41 | .highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ 42 | .highlight .nf { color: #000000 } /* Name.Function */ 43 | .highlight .nl { color: #f57900 } /* Name.Label */ 44 | .highlight .nn { color: #000000 } /* Name.Namespace */ 45 | .highlight .nx { color: #000000 } /* Name.Other */ 46 | .highlight .py { color: #000000 } /* Name.Property */ 47 | .highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ 48 | .highlight .nv { color: #000000 } /* Name.Variable */ 49 | .highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ 50 | .highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ 51 | .highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ 52 | .highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ 53 | .highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ 54 | .highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ 55 | .highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ 56 | .highlight .sc { color: #4e9a06 } /* Literal.String.Char */ 57 | .highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ 58 | .highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ 59 | .highlight .se { color: #4e9a06 } /* Literal.String.Escape */ 60 | .highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ 61 | .highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ 62 | .highlight .sx { color: #4e9a06 } /* Literal.String.Other */ 63 | .highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ 64 | .highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ 65 | .highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ 66 | .highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ 67 | .highlight .vc { color: #000000 } /* Name.Variable.Class */ 68 | .highlight .vg { color: #000000 } /* Name.Variable.Global */ 69 | .highlight .vi { color: #000000 } /* Name.Variable.Instance */ 70 | .highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ 71 | 72 | div.highlighter-rouge { 73 | border: 1px solid #EEE; 74 | } 75 | 76 | div.highlighter-rouge, 77 | div.highlighter-rouge code { 78 | background-color: #F4F4F4; 79 | } 80 | 81 | /* Valid code highlighted as error. Disable */ 82 | div.highlighter-rouge span.err { 83 | color: black; 84 | background-color: transparent; 85 | } 86 | 87 | a:not([class]) { 88 | text-decoration-color: rgb(255, 192, 203); 89 | text-decoration-thickness: 0.14em; 90 | text-decoration-style: solid; 91 | text-decoration-skip-ink: auto; 92 | text-decoration-line: underline; 93 | background-image: none; 94 | } 95 | .nav-list .nav-list-item .nav-list-link:hover, .nav-list .nav-list-item .nav-list-link.active { 96 | background: rgba(255, 192, 203, 0.7); 97 | } 98 | .site-title { 99 | flex-grow: unset; 100 | margin: auto; 101 | padding-left: 0; 102 | padding-right: 0; 103 | } 104 | .site-title:hover { 105 | background-image: none; 106 | } 107 | video { 108 | max-width: 100%; 109 | } 110 | .btn.btn-github { 111 | position: absolute; 112 | right: 10px; 113 | font-size: 75%; 114 | color: gray; 115 | z-index: 1000; 116 | } 117 | @media(max-width: 50rem) { 118 | .btn.btn-github { 119 | bottom: 16px; 120 | } 121 | } 122 | @media(min-width: 50rem) { 123 | .btn.btn-github { 124 | top: 16px; 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /data/jekyll-assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrndr/openrndr-guide/95bb7e7e43b5437c38c0f93302859047e46df419/data/jekyll-assets/favicon.ico -------------------------------------------------------------------------------- /data/jekyll-assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrndr/openrndr-guide/95bb7e7e43b5437c38c0f93302859047e46df419/data/jekyll-assets/favicon.png -------------------------------------------------------------------------------- /data/jekyll-assets/googleb55be37f23d36eb4.html: -------------------------------------------------------------------------------- 1 | google-site-verification: googleb55be37f23d36eb4.html -------------------------------------------------------------------------------- /data/jekyll-assets/webServerStart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # docker / jekyll was not working in my laptop because ruby/bundle was using 4 | # ipv6 and failing to download dependencies. I disabled ipv6 by creating 5 | # a /etc/sysctl.d/40-ipv6.conf file to disable ipv6 per interface. 6 | 7 | sudo systemctl start docker 8 | 9 | ./webServerStop.sh 10 | 11 | name=www-openrndr-guide 12 | 13 | docker start -ai $name || \ 14 | docker run --name=$name -v $(pwd):/srv/jekyll -p 4000:4000 -i jekyll/jekyll:4.2.0 jekyll serve 15 | 16 | -------------------------------------------------------------------------------- /data/jekyll-assets/webServerStop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | name=www-openrndr-guide 4 | 5 | docker container stop $name 6 | 7 | -------------------------------------------------------------------------------- /dokgen/build.gradle.kts: -------------------------------------------------------------------------------- 1 | @Suppress("DSL_SCOPE_VIOLATION") 2 | plugins { 3 | java 4 | alias(libs.plugins.kotlin.jvm) 5 | `java-gradle-plugin` 6 | `maven-publish` 7 | } 8 | 9 | group = "org.openrndr" 10 | version = "2.0-SNAPSHOT" 11 | 12 | repositories { 13 | mavenCentral() 14 | mavenLocal() 15 | } 16 | 17 | kotlin { 18 | jvmToolchain(libs.versions.jvmTarget.get().toInt()) 19 | } 20 | 21 | dependencies { 22 | implementation(libs.kotlin.compiler.embeddable) 23 | compileOnly(libs.bundles.openrndr.core) 24 | } 25 | 26 | gradlePlugin { 27 | plugins { 28 | register("simplePlugin") { 29 | id = "org.openrndr.dokgen-gradle" 30 | implementationClass = "org.openrndr.dokgen.GradlePlugin" 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /dokgen/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | dependencyResolutionManagement { 9 | versionCatalogs { 10 | create("libs") { 11 | from(files("../gradle/libs.versions.toml")) 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /dokgen/src/main/kotlin/kastree/ast/ExtrasMap.kt: -------------------------------------------------------------------------------- 1 | package kastree.ast 2 | 3 | interface ExtrasMap { 4 | fun extrasBefore(v: Node): List 5 | fun extrasWithin(v: Node): List 6 | fun extrasAfter(v: Node): List 7 | 8 | fun docComment(v: Node): Node.Extra.Comment? { 9 | for (extra in extrasBefore(v)) if (extra is Node.Extra.Comment && extra.text.startsWith("/**")) return extra 10 | return null 11 | } 12 | } -------------------------------------------------------------------------------- /dokgen/src/main/kotlin/kastree/ast/psi/Parser.kt: -------------------------------------------------------------------------------- 1 | package kastree.ast.psi 2 | 3 | import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys 4 | import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity 5 | import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSourceLocation 6 | import org.jetbrains.kotlin.cli.common.messages.MessageCollector 7 | import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles 8 | import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment 9 | import org.jetbrains.kotlin.com.intellij.openapi.util.Disposer 10 | import org.jetbrains.kotlin.com.intellij.psi.PsiErrorElement 11 | import org.jetbrains.kotlin.com.intellij.psi.PsiManager 12 | import org.jetbrains.kotlin.com.intellij.testFramework.LightVirtualFile 13 | import org.jetbrains.kotlin.config.CompilerConfiguration 14 | import org.jetbrains.kotlin.idea.KotlinFileType 15 | import org.jetbrains.kotlin.psi.* 16 | import org.jetbrains.kotlin.psi.psiUtil.collectDescendantsOfType 17 | 18 | class DummyCollector: MessageCollector { 19 | override fun clear() { 20 | } 21 | override fun hasErrors(): Boolean { 22 | return false 23 | } 24 | override fun report(severity: CompilerMessageSeverity, message: String, location: CompilerMessageSourceLocation?) { 25 | } 26 | } 27 | 28 | open class Parser(val converter: Converter = Converter) { 29 | protected val proj by lazy { 30 | val disposer = Disposer.newDisposable() 31 | val compilerConfiguration = CompilerConfiguration() 32 | val messageCollector = DummyCollector() 33 | 34 | compilerConfiguration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, messageCollector) 35 | val kce = 36 | try { 37 | KotlinCoreEnvironment.createForProduction( 38 | disposer, 39 | compilerConfiguration, 40 | EnvironmentConfigFiles.JVM_CONFIG_FILES 41 | ) 42 | } catch(e:Throwable) { 43 | e.printStackTrace() 44 | error("kce init failed") 45 | } 46 | kce.project 47 | } 48 | 49 | fun parseFile(code: String, throwOnError: Boolean = true) = converter.convertFile(parsePsiFile(code.let { 50 | it.replace("\\r\\n", "\\n" ).replace("\\r", "\\n").replace("\\t"," ") 51 | }).also { file -> 52 | if (throwOnError) file.collectDescendantsOfType().let { 53 | if (it.isNotEmpty()) { 54 | throw ParseError(file, it) 55 | } 56 | } 57 | }) 58 | 59 | fun parsePsiFile(code: String) = 60 | PsiManager.getInstance(proj).findFile(LightVirtualFile("temp.kt", KotlinFileType.INSTANCE, code)) as KtFile 61 | 62 | data class ParseError( 63 | val file: KtFile, 64 | val errors: List 65 | ) : IllegalArgumentException("Failed with ${errors.size} errors, first: ${errors.first().errorDescription}") 66 | 67 | companion object : Parser() { 68 | init { 69 | // To hide annoying warning on Windows 70 | System.setProperty("idea.use.native.fs.for.win", "false") 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /dokgen/src/main/kotlin/org/openrndr/Preload.kt: -------------------------------------------------------------------------------- 1 | package org.openrndr 2 | 3 | import org.openrndr.draw.BufferMultisample 4 | import org.openrndr.extensions.SingleScreenshot 5 | import org.openrndr.ffmpeg.ScreenRecorder 6 | import org.openrndr.ffmpeg.h264 7 | 8 | class Preload : ApplicationPreload() { 9 | private fun screenshots( 10 | path: String, 11 | skipFrames: Int, 12 | quitWhenDone: Boolean 13 | ) = SingleScreenshot().apply { 14 | val pMultiSample = System.getProperty("screenshot_multiSample", "0") 15 | multisample = if (pMultiSample != "0") { 16 | BufferMultisample.SampleCount(pMultiSample.toInt()) 17 | } else { 18 | BufferMultisample.Disabled 19 | } 20 | outputFile = path 21 | quitAfterScreenshot = quitWhenDone 22 | delayFrames = skipFrames 23 | } 24 | 25 | override fun onProgramSetup(program: Program) { 26 | System.getProperty("video_location")?.let { path -> 27 | val pDuration = System.getProperty("video_duration", "10.0") 28 | val pFrameRate = System.getProperty("video_frameRate", "30") 29 | val pMultiSample = System.getProperty("video_multiSample", "0") 30 | val screenRecorder = ScreenRecorder().apply { 31 | quitAfterMaximum = true 32 | outputFile = path 33 | maximumDuration = pDuration.toDouble() 34 | multisample = if (pMultiSample != "0") { 35 | BufferMultisample.SampleCount(pMultiSample.toInt()) 36 | } else { 37 | BufferMultisample.Disabled 38 | } 39 | frameRate = pFrameRate.toInt() 40 | h264 { 41 | // Lower quality for smaller files. Default is 23. 42 | constantRateFactor = 30 43 | } 44 | } 45 | program.extend(screenRecorder) 46 | 47 | val normScreenshotTime = 1 / 3.0 48 | val skipFrames = (screenRecorder.frameRate * 49 | screenRecorder.maximumDuration * normScreenshotTime).toInt() 50 | val thumbPath = path.replace(".mp4", "-thumb.jpg") 51 | program.extend(screenshots(thumbPath, skipFrames, false)) 52 | } 53 | 54 | System.getProperty("screenshot_location")?.let { path -> 55 | program.extend(screenshots(path, 0, true)) 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /dokgen/src/main/kotlin/org/openrndr/dokgen/MediaRunnerWorkAction.kt: -------------------------------------------------------------------------------- 1 | package org.openrndr.dokgen 2 | 3 | import org.gradle.process.ExecOperations 4 | import org.gradle.workers.WorkAction 5 | import javax.inject.Inject 6 | 7 | abstract class MediaRunnerWorkAction : WorkAction { 8 | @get:Inject 9 | abstract val execOperations: ExecOperations 10 | 11 | override fun execute() { 12 | try { 13 | execOperations.javaexec { 14 | it.classpath(parameters.classPath.get()) 15 | it.jvmArgs = parameters.jvmArgs.get() 16 | it.mainClass.set(parameters.mainClass) 17 | } 18 | } catch (e: Exception) { 19 | throw RuntimeException(e) 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /dokgen/src/main/kotlin/org/openrndr/dokgen/MediaRunnerWorkParameters.kt: -------------------------------------------------------------------------------- 1 | package org.openrndr.dokgen 2 | 3 | import org.gradle.api.provider.ListProperty 4 | import org.gradle.api.provider.Property 5 | import org.gradle.workers.WorkParameters 6 | 7 | interface MediaRunnerWorkParameters : WorkParameters { 8 | val classPath: Property 9 | val mainClass: Property 10 | val jvmArgs: ListProperty 11 | } -------------------------------------------------------------------------------- /dokgen/src/main/kotlin/org/openrndr/dokgen/annotations/Annotations.kt: -------------------------------------------------------------------------------- 1 | package org.openrndr.dokgen.annotations 2 | 3 | @Target(AnnotationTarget.FILE) 4 | @Retention(AnnotationRetention.SOURCE) 5 | annotation class Title(val title: String) 6 | 7 | @Target(AnnotationTarget.FILE) 8 | @Retention(AnnotationRetention.SOURCE) 9 | annotation class ParentTitle(val title: String) 10 | 11 | @Target(AnnotationTarget.FILE) 12 | @Retention(AnnotationRetention.SOURCE) 13 | annotation class Order(val order: String) 14 | 15 | @Target(AnnotationTarget.FILE) 16 | @Retention(AnnotationRetention.SOURCE) 17 | annotation class URL(val url: String) 18 | 19 | 20 | @Target( 21 | AnnotationTarget.EXPRESSION, 22 | AnnotationTarget.FUNCTION 23 | ) 24 | @Retention(AnnotationRetention.SOURCE) 25 | annotation class Application 26 | 27 | 28 | @Target( 29 | AnnotationTarget.EXPRESSION, 30 | AnnotationTarget.FUNCTION 31 | ) 32 | @Retention(AnnotationRetention.SOURCE) 33 | annotation class ProduceScreenshot( 34 | val path: String, 35 | val multiSample: Int = 0 36 | ) 37 | 38 | 39 | @Target( 40 | AnnotationTarget.EXPRESSION, 41 | AnnotationTarget.FUNCTION 42 | ) 43 | @Retention(AnnotationRetention.SOURCE) 44 | annotation class ProduceVideo( 45 | val path: String, 46 | val duration: Double = 10.0, 47 | val frameRate: Int = 30, 48 | val multiSample: Int = 0 49 | ) 50 | 51 | 52 | @Target( 53 | AnnotationTarget.CLASS, 54 | AnnotationTarget.ANNOTATION_CLASS, 55 | AnnotationTarget.TYPE_PARAMETER, 56 | AnnotationTarget.PROPERTY, 57 | AnnotationTarget.FIELD, 58 | AnnotationTarget.LOCAL_VARIABLE, 59 | AnnotationTarget.VALUE_PARAMETER, 60 | AnnotationTarget.CONSTRUCTOR, 61 | AnnotationTarget.FUNCTION, 62 | AnnotationTarget.PROPERTY_GETTER, 63 | AnnotationTarget.PROPERTY_SETTER, 64 | AnnotationTarget.TYPE, 65 | AnnotationTarget.EXPRESSION, 66 | AnnotationTarget.FILE, 67 | AnnotationTarget.TYPEALIAS 68 | ) 69 | @Retention(AnnotationRetention.SOURCE) 70 | annotation class Code { 71 | @Target(AnnotationTarget.EXPRESSION) 72 | @Retention(AnnotationRetention.SOURCE) 73 | annotation class Block 74 | } 75 | 76 | 77 | @Target( 78 | AnnotationTarget.EXPRESSION, 79 | AnnotationTarget.FUNCTION, 80 | AnnotationTarget.PROPERTY, 81 | AnnotationTarget.FIELD, 82 | AnnotationTarget.LOCAL_VARIABLE 83 | ) 84 | @Retention(AnnotationRetention.SOURCE) 85 | annotation class Text 86 | 87 | 88 | class Media { 89 | @Target( 90 | AnnotationTarget.EXPRESSION, 91 | AnnotationTarget.FUNCTION, 92 | AnnotationTarget.PROPERTY, 93 | AnnotationTarget.FIELD, 94 | AnnotationTarget.LOCAL_VARIABLE 95 | ) 96 | @Retention(AnnotationRetention.SOURCE) 97 | annotation class Video 98 | 99 | @Target( 100 | AnnotationTarget.EXPRESSION, 101 | AnnotationTarget.FUNCTION, 102 | AnnotationTarget.PROPERTY, 103 | AnnotationTarget.FIELD, 104 | AnnotationTarget.LOCAL_VARIABLE 105 | ) 106 | @Retention(AnnotationRetention.SOURCE) 107 | annotation class Image 108 | } 109 | 110 | 111 | @Target( 112 | AnnotationTarget.EXPRESSION, 113 | AnnotationTarget.FUNCTION, 114 | AnnotationTarget.PROPERTY, 115 | AnnotationTarget.FIELD, 116 | AnnotationTarget.LOCAL_VARIABLE, 117 | AnnotationTarget.CLASS 118 | ) 119 | @Retention(AnnotationRetention.SOURCE) 120 | annotation class Exclude 121 | 122 | -------------------------------------------------------------------------------- /dokgen/src/main/kotlin/org/openrndr/dokgen/sourceprocessor/Render.kt: -------------------------------------------------------------------------------- 1 | package org.openrndr.dokgen.sourceprocessor 2 | 3 | /** 4 | * Puts together a package directive, the imports and the code of a Kotlin program. 5 | * 6 | * @param pkg Package directive 7 | * @param imports A list of imports 8 | * @param body The source code of the program 9 | * @return The source code of a complete Kotlin program as a String 10 | */ 11 | fun appTemplate(pkg: String, imports: List, body: String): String { 12 | return """ 13 | package $pkg 14 | 15 | ${imports.joinToString("\n")} 16 | 17 | fun main() { 18 | ${body.prependIndent(" ".repeat(4))} 19 | } 20 | """ 21 | } 22 | 23 | /** 24 | * Produces markdown page of the guide page 25 | * 26 | * @param doc A document composed on multiple blocks of text, code and 27 | * links to video and image files. 28 | * @param title A header to inject at the top of the document 29 | * @return A markdown document 30 | */ 31 | fun renderDoc(doc: Doc, title: String? = null): String { 32 | val strDoc = doc.elements.fold("") { acc, el -> 33 | val str = when (el) { 34 | is Doc.Element.Code -> { 35 | val code = if(el.value.startsWith("application")) 36 | "fun main() = ${el.value}" else el.value 37 | """ 38 | |```kotlin 39 | |$code 40 | |``` 41 | """.trimMargin() 42 | } 43 | is Doc.Element.Markdown -> { 44 | el.text.trimIndent() 45 | } 46 | is Doc.Element.Media.Image -> { 47 | """${el.src.trim()}""" 48 | } 49 | is Doc.Element.Media.Video -> { 50 | val video = el.src.trim() 51 | val still = video.replace(".mp4", "-thumb.jpg") 52 | """ 53 | | 56 | |""".trimMargin() 57 | } 58 | } 59 | "$acc \n$str \n" 60 | } 61 | return title?.let { 62 | "# $title\n$strDoc" 63 | } ?: strDoc 64 | } 65 | -------------------------------------------------------------------------------- /dokgen/src/main/resources/jekyll/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | -------------------------------------------------------------------------------- /dokgen/src/main/resources/jekyll/README.md: -------------------------------------------------------------------------------- 1 | # OPENRNDR guide 2 | 3 | This branch contains markdown files, images and videos 4 | **generated** by running the main branch of this repository. 5 | 6 | The result can be viewed at [guide.openrndr.org](https://guide.openrndr.org). 7 | 8 | To contribute please take a look at 9 | [contributing.md](https://github.com/openrndr/openrndr-guide/blob/main/contributing.md). 10 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # suppress inspection "UnusedProperty" for whole file 2 | 3 | kotlin.code.style=official 4 | # For optimal compilation performance 5 | org.gradle.jvmargs=-Xmx2G -XX:+UseParallelGC 6 | 7 | # https://kotlinlang.org/docs/gradle.html#check-for-jvm-target-compatibility-of-related-compile-tasks 8 | kotlin.jvm.target.validation.mode=error 9 | org.gradle.parallel=true 10 | org.gradle.caching=true 11 | #org.gradle.configuration-cache=true 12 | #org.gradle.configuration-cache.problems=warn 13 | # Whether to automatically bundle the Kotlin standard library (true by default) 14 | # https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library 15 | kotlin.stdlib.default.dependency=false 16 | -------------------------------------------------------------------------------- /gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [versions] 2 | kotlin = "2.0.20" 3 | jvmTarget = "17" 4 | openrndr = "0.4.4" 5 | orx = "0.4.4" 6 | orml = "0.4.1" 7 | coroutines = "1.9.0" 8 | slf4j = "2.0.16" 9 | gitPublish = "5.1.0" 10 | jsoup = "1.18.3" 11 | gson = "2.12.1" 12 | csv = "1.10.0" 13 | versions = "0.52.0" 14 | 15 | [libraries] 16 | kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" } 17 | kotlin-compiler-embeddable = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-embeddable", version.ref = "kotlin" } 18 | kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin" } 19 | kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } 20 | kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" } 21 | slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" } 22 | jsoup = { group = "org.jsoup", name = "jsoup", version.ref = "jsoup" } 23 | gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } 24 | csv = { group = "com.github.doyaaaaaken", name = "kotlin-csv-jvm", version.ref = "csv" } 25 | 26 | dokgen = { group = "org.openrndr", name = "dokgen" } 27 | 28 | # OPENRNDR 29 | openrndr-animatable = { group = "org.openrndr", name = "openrndr-animatable", version.ref = "openrndr" } 30 | openrndr-core = { group = "org.openrndr", name = "openrndr-core", version.ref = "openrndr" } 31 | openrndr-extensions = { group = "org.openrndr", name = "openrndr-extensions", version.ref = "openrndr" } 32 | openrndr-ffmpeg = { group = "org.openrndr", name = "openrndr-ffmpeg", version.ref = "openrndr" } 33 | openrndr-filter = { group = "org.openrndr", name = "openrndr-filter", version.ref = "openrndr" } 34 | openrndr-gl3 = { group = "org.openrndr", name = "openrndr-gl3", version.ref = "openrndr" } 35 | openrndr-svg = { group = "org.openrndr", name = "openrndr-svg", version.ref = "openrndr" } 36 | openrndr-dialogs = { group = "org.openrndr", name = "openrndr-dialogs", version.ref = "openrndr" } 37 | 38 | # ORX 39 | orx-camera = { group = "org.openrndr.extra", name = "orx-camera", version.ref = "orx" } 40 | orx-compositor = { group = "org.openrndr.extra", name = "orx-compositor", version.ref = "orx" } 41 | orx-fx = { group = "org.openrndr.extra", name = "orx-fx", version.ref = "orx" } 42 | orx-gui = { group = "org.openrndr.extra", name = "orx-gui", version.ref = "orx" } 43 | orx-image-fit = { group = "org.openrndr.extra", name = "orx-image-fit", version.ref = "orx" } 44 | orx-jumpflood = { group = "org.openrndr.extra", name = "orx-jumpflood", version.ref = "orx" } 45 | orx-kinect-v1 = { group = "org.openrndr.extra", name = "orx-kinect-v1", version.ref = "orx" } 46 | orx-mesh-generators = { group = "org.openrndr.extra", name = "orx-mesh-generators", version.ref = "orx" } 47 | orx-midi = { group = "org.openrndr.extra", name = "orx-midi", version.ref = "orx" } 48 | orx-no-clear = { group = "org.openrndr.extra", name = "orx-no-clear", version.ref = "orx" } 49 | orx-noise = { group = "org.openrndr.extra", name = "orx-noise", version.ref = "orx" } 50 | orx-olive = { group = "org.openrndr.extra", name = "orx-olive", version.ref = "orx" } 51 | orx-osc = { group = "org.openrndr.extra", name = "orx-osc", version.ref = "orx" } 52 | orx-panel = { group = "org.openrndr.extra", name = "orx-panel", version.ref = "orx" } 53 | orx-poisson-fill = { group = "org.openrndr.extra", name = "orx-poisson-fill", version.ref = "orx" } 54 | orx-shade-styles = { group = "org.openrndr.extra", name = "orx-shade-styles", version.ref = "orx" } 55 | orx-shapes = { group = "org.openrndr.extra", name = "orx-shapes", version.ref = "orx" } 56 | 57 | [plugins] 58 | kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } 59 | dokgen = { id = "org.openrndr.dokgen-gradle", version = { require = "latest.release" } } 60 | git-publish = { id = "org.ajoberstar.git-publish", version.ref = "gitPublish" } 61 | versions = { id = "com.github.ben-manes.versions", version.ref = "versions" } 62 | 63 | [bundles] 64 | openrndr-core = [ 65 | "openrndr-core", 66 | "openrndr-extensions", 67 | "openrndr-ffmpeg" 68 | ] 69 | openrndr-rest = [ 70 | "openrndr-animatable", 71 | "openrndr-filter", 72 | "openrndr-gl3", 73 | "openrndr-svg", 74 | "openrndr-dialogs" 75 | ] 76 | orx = [ 77 | "orx-camera", 78 | "orx-compositor", 79 | "orx-fx", 80 | "orx-gui", 81 | "orx-image-fit", 82 | "orx-jumpflood", 83 | "orx-kinect-v1", 84 | "orx-mesh-generators", 85 | "orx-midi", 86 | "orx-noise", 87 | "orx-no-clear", 88 | "orx-olive", 89 | "orx-osc", 90 | "orx-panel", 91 | "orx-poisson-fill", 92 | "orx-shade-styles", 93 | "orx-shapes" 94 | ] 95 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrndr/openrndr-guide/95bb7e7e43b5437c38c0f93302859047e46df419/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /scripts/buildGuidePDF.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | filename="openrndr-guide" 4 | domain="guide.openrndr.org" 5 | path="" # /some/folder/ if the guide is not located at / 6 | 7 | mkdir -p /tmp/manual 8 | cd /tmp/manual || exit 9 | 10 | # curl downloads the index page of the website 11 | # grep extracts the section 12 | # sed(1) injects a line break in front of every URL and adds the full domain 13 | # sed(2) deletes from each line the " character and everything that follows, leaving the clean URL 14 | # tail deletes the first line, which contains a lonely