Latest 0.2.4
Homepage https://github.com/natmark/HUDMakerKit
License MIT
Platforms ios 10.0
Dependencies ProcessingKit/Core
Authors

Header


Build Status


Swift


Pods Version


Platforms


Carthage Compatible


GitHub license

HUDMakerKit is customized Head-Up Display Maker written in Swift🐧.
HUDMakerKit has ProcessingKit engine. You can develop custom HUD with Processing draw functions.

Examples

HUD Code
SimpleHUD SimpleHUD_Code
AnimateHUD AnimateHUD Code
PeriodicallyHUD PeriodicallyHUD Code

Requirements

  • Swift 4.0 or later
  • iOS 10.0 or later

Usage

  1. Create custom class that inherits from HUDMaker

    class SampleHUD: HUDMaker {
    func draw(frameCount: Int) {
     // the draw() function continuously executes the lines of code contained inside its block until the program is stopped or noLoop() is called.
    }
    }
  2. Implement HUD animation in draw() func

    class SampleHUD: HUDMaker {
    func draw(frameCount: Int) {
        // MARK: Examples
        fill(255, 0, 0) // Sets the color used to fill shapes
        ellipse(50, 50, 100, 100) // Draws an ellipse (oval) to the screen
    }
    }
  3. Create a CustomHUD instance & set CustomHUD to HUDRunner
    
    let customHUD = SampleHUD(frame: CGRect(x: 0, y: 0, width: 150, height: 150)) // Create a new instance
    customHUD.backgroundColor = UIColor(red: 0.1, green: 0.1, blue: 0.1, alpha: 0.3)
    customHUD.layer.cornerRadius = 10

HUDRunner.shared.customHUD = customHUD // Set a customHUD
HUDRunner.shared.show() // Show HUD


## What's [Processing](https://processing.org/)
- Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts.
- It provides drawing functions with simple syntax
- [References](https://processing.org/reference/)

### Draw Oval in Processing
<img src="https://github.com/natmark/HUDMakerKit/blob/master/Resources/oval.png" alt="oval" width="100px">

```Processing
// Draws an ellipse (oval) to the screen
// ellipse(center.x, center.y, width, height) 
ellipse(100, 100, 100, 100);

Fill an oval

oval_fill

// Sets the color used to fill shapes
// fill(R, G, B)

fill(255, 0, 0);
ellipse(100, 100, 100, 100);

Set the stroke color

oval_stroke

// Sets the color used to draw lines and borders around shapes
// stroke(R, G, B)

// Sets the width of the stroke used for lines, points, and the border around shapes.
// strokeWeight(weight)

stroke(255, 0, 0);
strokeWeight(5);
ellipse(100, 100, 100, 100);

Installation

CocoaPods

Add the following to your Podfile:

  pod "HUDMakerKit"

Carthage

Add the following to your Cartfile:

  github "natmark/HUDMakerKit"
  • Link your app with HUDMakerKit.framework and ProcessingKit.framework in Carthage/Build

Dependency

License

HUDMakerKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "HUDMakerKit",
    "version": "0.2.4",
    "summary": "Customized Head-Up Display Maker",
    "description": "HUDMakerKit is customized Head-Up Display Maker written in Swiftud83dudc27.nHUDMakerKit has ProcessingKit engine. You can develop custom HUD with Processing draw functions.",
    "homepage": "https://github.com/natmark/HUDMakerKit",
    "screenshots": "https://github.com/natmark/HUDMakerKit/raw/master/Resources/header.png?raw=true",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Atsuya Sato": "[email protected]"
    },
    "source": {
        "git": "https://github.com/natmark/HUDMakerKit.git",
        "tag": "0.2.4"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "HUDMakerKit/**/*.swift",
    "dependencies": {
        "ProcessingKit/Core": []
    }
}

Pin It on Pinterest

Share This