Giter VIP home page Giter VIP logo

ifrit-distribution's Introduction

ifrit-distribution

Java packages to help render and animate stuffs on consoles. This repository only contains distributed JAR files.
Deals AOE Arts Damage in a long line

To Get Started

For Java 9+ Users

requires com.aeroraven.ifrit;

For Non-WinOS Users

  • Re-compile IfritNative

Initialize the application

This completes localization and operating system adaptation.

IfritApplication app = IfritApplication.createApplication();

Create a scene

Scene is an special instance containing components. There's only one scene can be rendered every moment.

IfritScene  scene = new IfritScene();

Create a component

A component is a collection of primitives to be rendered. Use IfritShapeFactory to create primitives and add them to components via addPrimitive method.

IfritSprite sprite = new IfritSprite();
IfritShapeFactory shapeFactory = new IfritShapeFactory();

shapeFactory.textBuilder()
    .setBackColor(255, 0, 0)
    .setForeColor(255,255, 255)
    .createTextWithRectBorder("Button A", 0, 0, 12, 5, 0)
    .store();
sprite.addPrimitive(shapeFactory.getFinalShape(),0);	

Set Active Scene

app.setRenderScene(scene);

Design Patterns Used

  • Singleton
  • Bridge
  • Command
  • Mediator
  • Factory Method
  • Template Method
  • Composite
  • Observer

Shapes Available

  • Text Builder / createTextWithRectBorder

  • Text Builder / createTextContainer

  • Image Builder / createImageContainer

  • Primitive Builder / createLine

  • Primitive Builder / createCircleArc

  • Primitive Builder / createRound

  • Primitive Builder / createTriangle

  • Primitive Builder / createHollowPolygon

  • Primitive Builder / createSolidPolygon

  • Primitive Builder / createHollowRectangle

  • Primitive Builder / createSolidRectangle

Commands Available

  • Threading Mediator / IfritCPSwitchRenderScene(IfritScene scene)

    • Set the active scene to be rendered
  • Threading Mediator / IfritCPAddIOEventHandler(String hash, IfritEventHandler handler)

    • Once IO Thread receives keyboard input signal, the event handler will be called
  • Threading Mediator / IfritCPRemoveIOEventHandler(String hash)

    • Remove event handler from IO Thread's hash map
  • Threading Mediator / IfritCPAddRenderEventHandler(String hash, IfritEventHandler handler)

    • Once rendering thread updates the frame, the event handler will be called
  • Threading Mediator / IfritCPRemoveRenderEventHandler(String hash, IfritEventHandler handler)

    • Remove event handler from Rendering Thread's hash map

ifrit-distribution's People

Contributors

aeroraven avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.