Skip to content

Instantly share code, notes, and snippets.

View FyiurAmron's full-sized avatar
🐊
I'm lying right now.

FyiurAmron

🐊
I'm lying right now.
  • Philosoraptor LLC
  • Xanadu
View GitHub Profile
interface Answer<T> {}
enum Answers implements Answer<Object> {
CALLS_REAL_METHODS(new Answer<>() {}),
RETURNS_SELF(new Answer<>() {}),
CUSTOM(null),
;
private Answer<Object> implementation;
<?php
namespace AppBundle\Controller\HttpApi;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\{
Request,
Response
};
package vax.input;
import com.badlogic.gdx.input.GestureDetector.GestureListener;
import com.badlogic.gdx.math.Vector2;
/**
@author toor
@param <T>
*/
private void filterContactPoints( btCollisionObject bco, btCollisionShape bcs ) {
if ( bcs instanceof btTriangleShape ) {
HashSet<btPersistentManifold> manifolds = manifoldMap.get( bco );
for( btPersistentManifold bpm : manifolds ) {
if ( bpm.getNumContacts() == CONTACTS_TO_FILTER ) { // otherwise it's probably *not* an tri edge collision
bpm.removeContactPoint(
( bpm.getContactPoint( 0 ).getDistance() > bpm.getContactPoint( 1 ).getDistance() ) ? 0 : 1 );
}
}
}
@FyiurAmron
FyiurAmron / gist:80abc0f47237df649d6a1080b715e1d9
Created November 24, 2017 17:15
vue transition-group crash on quick router change
app.210804bf94c339fdac7b.js:2495 [Vue warn]: Error in render: "TypeError: c$1.elm.getBoundingClientRect is not a function"
found in
---> <TransitionGroup>
<AppMain>
<Root>
warn @ app.210804bf94c339fdac7b.js:2495
logError @ app.210804bf94c339fdac7b.js:3613
globalHandleError @ app.210804bf94c339fdac7b.js:3608
@FyiurAmron
FyiurAmron / sdl2_opengl.cpp
Last active April 12, 2016 21:16 — forked from sergnechaev/sdl2_opengl.cpp
Very basic SDL2 OpenGL application
#include <iostream>
#define _USE_MATH_DEFINES
#include <cmath>
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>
const int SCREEN_WIDTH = 800;
const int SCREEN_HEIGHT = 600;
package vax.libgdx;
import java.io.*;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g3d.model.data.ModelMaterial;
import com.badlogic.gdx.graphics.g3d.model.data.ModelTexture;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectMap;
/*
* *****************************************************************************
Copyright 2011 See AUTHORS file.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on