-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6b19a29
Showing
51 changed files
with
3,130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.vscode | ||
.mvn | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Persistent { | ||
DrawLine((10, 10), (10, 590), 1) | ||
|
||
a1 = (200, 200) | ||
a2 = (200, 400) | ||
a3 = (400, 400) | ||
a4 = (400, 200) | ||
Syncronous { | ||
DrawLine(a1, a2, 1) | ||
DrawLine(a2, a3, 1) | ||
DrawLine(a3, a4, 1) | ||
DrawLine(a4, a1, 1) | ||
} | ||
|
||
b1 = (100, 100) | ||
b2 = (100, 300) | ||
b3 = (300, 300) | ||
b4 = (300, 100) | ||
Syncronous { | ||
DrawLine(b1, b2, 1) | ||
DrawLine(b2, b3, 1) | ||
DrawLine(b3, b4, 1) | ||
DrawLine(b4, b1, 1) | ||
} | ||
|
||
c1 = (300, 300) | ||
c2 = (300, 500) | ||
c3 = (500, 500) | ||
c4 = (500, 300) | ||
Syncronous { | ||
DrawLine(c1, c2, 1) | ||
DrawLine(c2, c3, 1) | ||
DrawLine(c3, c4, 1) | ||
DrawLine(c4, c1, 1) | ||
} | ||
|
||
Syncronous { | ||
a1 = (100, 300) | ||
a2 = (100, 500) | ||
a3 = (300, 500) | ||
a4 = (300, 300) | ||
Syncronous { | ||
DrawLine(a1, a2, 1) | ||
DrawLine(a2, a3, 1) | ||
DrawLine(a3, a4, 1) | ||
DrawLine(a4, a1, 1) | ||
} | ||
|
||
a1 = (300, 100) | ||
a2 = (300, 300) | ||
a3 = (500, 300) | ||
a4 = (500, 100) | ||
Syncronous { | ||
DrawLine(a1, a2, 1) | ||
DrawLine(a2, a3, 1) | ||
DrawLine(a3, a4, 1) | ||
DrawLine(a4, a1, 1) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.lniculae</groupId> | ||
<artifactId>animation-renderer-lib</artifactId> | ||
<name>animation-renderer-lib</name> | ||
<version>2.0.0</version> | ||
<url>http://www.example.com</url> | ||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.4.2</version> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
<mainClass>com.lniculae.App</mainClass> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<version>3.4.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.3.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.13.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>3.3.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-install-plugin</artifactId> | ||
<version>3.1.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>3.1.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<version>3.12.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-project-info-reports-plugin</artifactId> | ||
<version>3.6.1</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>3.6.0</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration /> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<version>5.11.0</version> | ||
<scope>test</scope> | ||
<exclusions> | ||
<exclusion> | ||
<artifactId>opentest4j</artifactId> | ||
<groupId>org.opentest4j</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>junit-platform-commons</artifactId> | ||
<groupId>org.junit.platform</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>apiguardian-api</artifactId> | ||
<groupId>org.apiguardian</groupId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-params</artifactId> | ||
<version>5.11.0</version> | ||
<scope>test</scope> | ||
<exclusions> | ||
<exclusion> | ||
<artifactId>apiguardian-api</artifactId> | ||
<groupId>org.apiguardian</groupId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
</dependencies> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit</groupId> | ||
<artifactId>junit-bom</artifactId> | ||
<version>5.11.0</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
<properties> | ||
<maven.compiler.release>23</maven.compiler.release> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.lniculae</groupId> | ||
<artifactId>animation-renderer-lib</artifactId> | ||
<version>2.0.0</version> | ||
|
||
<name>animation-renderer-lib</name> | ||
<!-- FIXME change it to the project's website --> | ||
<url>http://www.example.com</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.release>23</maven.compiler.release> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit</groupId> | ||
<artifactId>junit-bom</artifactId> | ||
<version>5.11.0</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.raylib</groupId> | ||
<artifactId>raylib</artifactId> | ||
<version>0.5.2</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.processing</groupId> | ||
<artifactId>core</artifactId> | ||
<version>4.0.0</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<!-- Optionally: parameterized tests support --> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-params</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> <!-- This has to be outside of pluginManagement to work I have no clue why. --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>3.6.0</version> | ||
<configuration> | ||
<!-- put your configurations here --> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
|
||
<pluginManagement> <!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> | ||
<plugins> | ||
|
||
<plugin> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.4.2</version> | ||
<configuration> We need to configure the main class | ||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
<mainClass>com.lniculae.App</mainClass> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
|
||
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle --> | ||
<plugin> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<version>3.4.0</version> | ||
</plugin> | ||
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging --> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.3.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.13.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>3.3.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-install-plugin</artifactId> | ||
<version>3.1.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>3.1.2</version> | ||
</plugin> | ||
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle --> | ||
<plugin> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<version>3.12.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-project-info-reports-plugin</artifactId> | ||
<version>3.6.1</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.lniculae.Animation; | ||
|
||
public class Color { | ||
public int r; | ||
public int g; | ||
public int b; | ||
public int a; | ||
|
||
public Color(int r, int g, int b, int a) { | ||
this.r = r; | ||
this.g = g; | ||
this.b = b; | ||
this.a = a; | ||
} | ||
|
||
public static Color LIGHTGRAY = new Color(200, 200, 200, 255); | ||
public static Color GRAY = new Color(130, 130, 130, 255); | ||
public static Color DARKGRAY = new Color(80, 80, 80, 255); | ||
public static Color YELLOW = new Color(253, 249, 0, 255); | ||
public static Color GOLD = new Color(255, 203, 0, 255); | ||
public static Color ORANGE = new Color(255, 161, 0, 255); | ||
public static Color PINK = new Color(255, 109, 194, 255); | ||
public static Color RED = new Color(230, 41, 55, 255); | ||
public static Color MAROON = new Color(190, 33, 55, 255); | ||
public static Color GREEN = new Color(0, 228, 48, 255); | ||
public static Color LIME = new Color(0, 158, 47, 255); | ||
public static Color DARKGREEN = new Color(0, 117, 44, 255); | ||
public static Color SKYBLUE = new Color(102, 191, 255, 255); | ||
public static Color BLUE = new Color(0, 121, 241, 255); | ||
public static Color DARKBLUE = new Color(0, 82, 172, 255); | ||
public static Color PURPLE = new Color(200, 122, 255, 255); | ||
public static Color VIOLET = new Color(135, 60, 190, 255); | ||
public static Color DARKPURPLE = new Color(112, 31, 126, 255); | ||
public static Color BEIGE = new Color(211, 176, 131, 255); | ||
public static Color BROWN = new Color(127, 106, 79, 255); | ||
public static Color DARKBROWN = new Color(76, 63, 47, 255); | ||
public static Color WHITE = new Color(255, 255, 255, 255); | ||
public static Color BLACK = new Color(0, 0, 0, 255); | ||
public static Color BLANK = new Color(0, 0, 0, 0); | ||
public static Color MAGENTA = new Color(255, 0, 255, 255); | ||
public static Color RAYWHITE = new Color(245, 245, 245, 255); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/lniculae/Animation/Context/AnimationContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.lniculae.Animation.Context; | ||
|
||
import com.lniculae.Animation.Color; | ||
import com.lniculae.Animation.Vec2; | ||
|
||
public interface AnimationContext { | ||
public void drawLine(Vec2 startPos, Vec2 endPos, float thick, Color color); | ||
public void drawCircle(Vec2 center, float radius, Color color); | ||
public void clearBackground(Color color); | ||
public void setBackgroundColor(Color color); | ||
public Color getBackgroundColor(); | ||
public int getWidth(); | ||
public int getHeight(); | ||
public int getFPS(); | ||
} |
Oops, something went wrong.