APEL

Quick rating

APEL

No reviews yet

Apel stands for Animative Particle Engine Library and is used for complex particle animations, all without the need to major in linear algebra. It provides a straightforward interface and rich in documentation for developers.

Magic
API/Library
Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Server Required, Client Optional

Required on the server. Installing it on the client adds functionality.

About

Project Details

Type
Mod
License
Mozilla Public License 2.0

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

About

Description

# Brief Overview

Apel stands for Animative Particle Engine Library. Its goal is to give the developer a huge productivity boost by incorporating a powerful animation engine that allows for the management of complex particle animations. Thus the library aims to provide:

# Why Use APEL? To put it simply. APEL allows you to fully make these animations with very few lines of code:



The key strengths of APEL are specifically:

  • Ease Of Use: The library cuts down the components into its simplest roots. This provides a straightforward and easy to use developer interface, so any developer can use.
  • Flexiblity: Another goal is to make the library as flexible as it can be without ruining the other goal factors. The library allows for composing complex scenes without additional syntactic sugar involved.
  • Rich Documentation: Our team aims for detailed documentation that clearly explains how each feature works. We actively work on improving it, and documentation can be read from java docs or from the markdown documents in github.
  • High Performance: Since the library is meant to be used for creating intricate particle scenes, the library is very optimised and performance friendly.

## Installation

Developers

This section is for developers using APEL as a library.

  1. In your gradle.properties file, add this line:
    apel_version=0.1.5+1.21.8
    
  2. In build.gradle, find the top-level repositories block, and add these lines if you haven't installed any other dependency mods from modrinth:
    repositories {
     // ...
       maven {
           url = "https://api.modrinth.com/maven"
       }
     }
    
  3. Also in build.gradle, add the dependency under the dependencies block:
    dependencies {
       // ...
       modImplementation "maven.modrinth:apel:${project.apel_version}"
       // ...
    }
    
  4. Refresh gradle (in IntelliJ IDEA, press the gradle icon with a rotate sub-icon)
  5. Try to either type Apel and let your IDE autocomplete it, or import net.mcbrincie.apel.Apel. If all steps are done, everything should work as expected.

Players

Download the mod via your usual means and place it in your mods folder.

## Example Of Using APEL For a regular particle polygon that moves in a line from one point to another, rotates around the Y axis, and loops by animating between 3 sides to 30 sides, the code looks like this (not a straightforward first example, but showcases the possibilities):

AtomicBoolean reverse = new AtomicBoolean(false);

ParticlePolygon polygon = ParticlePolygon.builder()
  .particleEffect(ParticleTypes.END_ROD)
  .sides(3)
  .scale(3.0f)
  .amount(100)
  .beforeDraw((data, obj) -> {
    if (data.getCurrentStep() <= 15) {
      return;
    }
    boolean isStepZero = data.getCurrentStep() % 15 == 0;
    int sides = ApelUtils.getValueFromEasingCurve(obj.getSides());
    if (isStepZero && !reverse.get()) {
      obj.setSides(sides + 1);
      if (sides >= 30) {
        reverse.set(true);
      }
    } else if (isStepZero && reverse.get()) {
        obj.setSides(sides - 1);
        if (sides == 4) {
          reverse.set(false);
        }
    }
    Vector3f newRot = ApelUtils.getValueFromEasingCurve(obj.getRotation()).add(0, 0.002f, 0);
    obj.setRotation(newRot);
})
  .build();
        
LinearAnimator linearAnimator = LinearAnimator.builder()
  .endpoint(new Vector3f())
  .endpoint(new Vector3f(10, 0, 0))
  .particleObject(polygon)
  .delay(1)
  .stepsForAllSegments(1000)
  .build();

ApelServerRenderer renderer = ApelServerRenderer.client((ServerWorld) world);
linearAnimator.beginAnimation(renderer);

We define the particle object (ParticlePolygon) with the particle effect to use, the sides of the polygon, the size of the polygon, and the number of particles to use on the polygon.

After that we use the library's ability to modify the object before each frame is rendered. This is via a lambda function that receives some context and the object to be rendered. This example modifies the number of sides on the polygon by checking what step the animation is on, and using that to determine the number of sides the polygon should have. It also shows how to increment the rotation (expressed in Euler angles per axis), in this case a slight rotation around the y-axis on each tick.

Note: We extract the value using ApelUtils.getValueFromEasingCurve for rotation and the number of sides, in our case we know this is not a null value so it works perfectly fine

We then create a linear path animator and supply it with the delay in ticks between frames, the starting position of the line, the ending position of the line, the particle object to use, and the number of rendering steps for the animation.

Finally, we play the linear path animator and supply it with a renderer instance for server-side rendering.

Note

The mod may be required to be installed client-side depending on if the developer chooses to use Apel's client-side renderer, which optimises the particles way more than the server-side renderer although it requires that people need the client mod to be installed. If they don't choose client-side renderer then no need for the client mod

## Links / Social Media

Screenshots

Gallery

  • APEL Particle Model
    APEL Particle Model Showcases the ability to import 3D model and display it in particles
  • APEL Regular Polygon Particle Object
    APEL Regular Polygon Particle Object This is in action the regular polygon particle object
  • APEL ParticleMedia
    APEL ParticleMedia Showcases the ability to display images and videos in particles. In this example its a 80x80 due to how new of a feature it is, prominent optimizations will be carried out for this soon
  • APEL Cone Particle Object
    APEL Cone Particle Object This is in action the particle cone object with 5000 particles
  • APEL Complex Animation
    APEL Complex Animation This is a complicated example of the capabilities of the library
  • APEL Quad Particle Object
    APEL Quad Particle Object Here is a cute example of the quad particle object making quite a cool frame for a build
  • APEL Particle Triangle Object
    APEL Particle Triangle Object A simple example that features the particle triangle object which allows for modifying the vertices
  • APEL Particle Tetrahedron Object
    APEL Particle Tetrahedron Object This is the particle tetrahedron object which allows for modifying the individual vertices that compose it (it basically is a 3D triangle)
  • APEL Particle Sphere Object
    APEL Particle Sphere Object This is a simple example of the particle sphere which rotates around itself
  • APEL Circular Path Animator
    APEL Circular Path Animator Here is in action the circular path animator which has particle points that follow its trajectory

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works