Skip to content

Instantly share code, notes, and snippets.

diff --git a/Backends/HTML5/kha/SystemImpl.hx b/Backends/HTML5/kha/SystemImpl.hx
index c272432..ae79d81 100644
--- a/Backends/HTML5/kha/SystemImpl.hx
+++ b/Backends/HTML5/kha/SystemImpl.hx
@@ -61,8 +61,9 @@ class SystemImpl {
SystemImpl.options = options;
#if sys_debug_html5
Browser.window.onerror = cast errorHandler;
- untyped require('web-frame').setZoomLevelLimits(1, 1);
+ //untyped require('web-frame').setZoomLevelLimits(1, 1);^M
@augustlate
augustlate / Rect.hx
Last active June 7, 2016 11:18
Bounding Rectangle helper class for kha
//Copyright 2016 August Late. Licensed under zlib.
//Tiny utility class for working with bounding rectangles
import kha.math.Vector2;
import kha.math.FastMatrix4;
class Rect {
//Computes the smallest axis aligned rect that will contain the transformed rect.
public static function transform(rect : Rect,m : FastMatrix4) : Rect {
var r = new Rect();
// Copyright August Late 2015
// Licence: Public Domain
template<typename K,typename V,unsigned int RADIXSORT_BITS>
void RadixSort(K * _keys,K *_tempKeys,V * _values, V * _tempValues, size_t _size)
{
static_assert(std::is_unsigned<K>::value,"Key type must be of an unsigned integral type");
constexpr unsigned int RADIXSORT_HISTOGRAM_SIZE = (1<<RADIXSORT_BITS);
constexpr unsigned int RADIXSORT_BIT_MASK = (RADIXSORT_HISTOGRAM_SIZE-1);
constexpr unsigned int PASSES = sizeof(K)*8/RADIXSORT_BITS+(sizeof(K)*8%RADIXSORT_BITS != 0 ? 1 : 0);
uint32_t histogram[RADIXSORT_HISTOGRAM_SIZE];