Skip to content

Instantly share code, notes, and snippets.

View acisternino's full-sized avatar

Andrea Cisternino acisternino

View GitHub Profile
@acisternino
acisternino / DockBuilderExample.cpp
Created February 5, 2022 14:36 — forked from AidanSun05/DockBuilderExample.cpp
A commented example for Dear ImGui's DockBuilder API.
// The DockBuilder API is still marked as experimental, include Dear ImGui's internal header to pull the functions in:
#include "imgui_internal.h"
// [...]
// Beginning of main loop
// 1. DockBuilder functions only need to run once to take effect.
// This state variable will let us check for the first frame of the app.
static bool firstLoop = true;
@acisternino
acisternino / hexgame.java
Created January 24, 2022 10:10 — forked from salamander2/hexgame.java
Hexagonal Grid in Java
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
/**********************************
This is the main class of a Java program to play a game based on hexagonal tiles.
The mechanism of handling hexes is in the file hexmech.java.
Written by: M.H.
Date: December 2012
@acisternino
acisternino / color-conversion-algorithms.js
Created January 12, 2022 08:52 — forked from mjackson/color-conversion-algorithms.js
RGB, HSV, and HSL color conversion algorithms in JavaScript
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation
@acisternino
acisternino / HelloWorldFx.groovy
Last active August 29, 2015 14:05
Groovy JavaFX HelloWorld
package helloworld
import javafx.application.Application
import javafx.scene.Scene
import javafx.scene.control.Button
import javafx.scene.layout.StackPane
import javafx.stage.Stage
import groovy.transform.CompileStatic