Skip to content

Instantly share code, notes, and snippets.


Ahmad Rosid ar-android

Block or report user

Report or block ar-android

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rounded-corner.glsl
float square(float val) {
return val * val;
float distanceSquared(vec2 p1, vec2 p2) {
vec2 vector = p2 - p1;
return vector.x * vector.x + vector.y * vector.y;
float calcRoundedCorners() {
ar-android / ribbon.html
Created Jul 30, 2019
Simple css ribbon
View ribbon.html
<meta charset="UTF-8">
<title>CSS Ribbon</title>
.container {
margin: 0 auto;
width: 800px;
ar-android / randomString.js
Created Jul 29, 2019
Create random string in javascript.
View randomString.js
function randomString(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for ( var i = 0; i < length; i++ ) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
return result;
ar-android / build.gradle
Created Jun 25, 2019
Minimal gradle dependency for LWJGL 3
View build.gradle
project.ext.lwjglVersion = "3.2.2"
project.ext.jomlVersion = "1.9.15"
project.ext.lwjglNatives = "natives-macos"
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
implementation "org.lwjgl:lwjgl:$lwjglVersion"
implementation "org.lwjgl:lwjgl-assimp:$lwjglVersion"
implementation "org.lwjgl:lwjgl-glfw:$lwjglVersion"
View Instal SFML

Install SFML

gunzip -c SFML-2.5.1-macOS-clang.tar.gz| tar xopf -
sudo cp -R  SFML-2.5.1-macos-clang/Frameworks /Library
sudo cp -R SFML-2.5.1-macos-clang/lib /usr/local/
sudo cp -R SFML-2.5.1-macos-clang/include /usr/local/
sudo cp -R SFML-2.5.1-macos-clang/extlibs /Library/Frameworks
package engine.graphic;
import static org.lwjgl.opengl.GL20.*;
public class ShaderProgram {
private int programId;
private int vertexId;
private int fragmentId;
package engine;
public class GameEngine implements Runnable{
public static final int TARGET_FPS = 75;
public static final int TARGET_UPS = 30;
private final Window window;
private final Thread gameLoopThread;
private final Timer timer;
You can’t perform that action at this time.