Skip to content

Instantly share code, notes, and snippets.

❤️

Sidharth Juyal chunkyguy

❤️
Block or report user

Report or block chunkyguy

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 cornell_box_scenekit.swift
import Foundation
import SceneKit
import GLKit
class World {
let scene = SCNScene()
func setUp() {
let worldNode = scene.rootNode
addLights(to: worldNode)
View KeyboardHackViewController.swift
//
// ViewController.swift
// KeyboardTransitionBug
//
// Created by Sid on 07/12/2017.
// Copyright © 2017 Picnic. All rights reserved.
//
import UIKit
View Sid.dvtcolortheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0 0 0 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0 0 0 1</string>
@chunkyguy
chunkyguy / AudioManagerController.h
Last active Sep 30, 2016
How to cross fade between AVAudioPlayers
View AudioManagerController.h
/*
* Hedgewars-iOS, a Hedgewars port for iOS devices
* Copyright (c) 2009-2011 Vittorio Giovara <vittorio.giovara@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
View mvvm_tableView.swift
import UIKit
struct Album {
let title: String
}
class SwiftAlbumsTableViewController: UITableViewController {
@IBOutlet weak private var activityIndicator: UIActivityIndicatorView!
View QuadTree.h
//
// QuadTree.h
//
// Created by Sid on 24/01/14.
// Copyright (c) 2014 whackylabs. All rights reserved.
//
#ifndef QuadTree_h
#define QuadTree_h
View generic
import UIKit
func clamp<T:Comparable>(value:T, lowerBound:T, upperBound:T) -> T {
return min(max(lowerBound, value), upperBound)
}
func clamp(value:Vector2, lowerBound:Vector2, upperBound:Vector2) -> Vector2 {
return min(max(lowerBound, value), upperBound)
}
View generic
#include <iostream>
struct Vector2 {
float x;
float y;
Vector2(float x = 0, float y = 0) {
this->x = x;
View AsyncLoading.cpp
//
// AsyncLoading.cpp
//
// Created by Sid on 11/10/14.
// Copyright (c) 2014 whackylabs. All rights reserved.
//
// Context: http://www.reddit.com/r/gamedev/comments/2ivsp6/async_loading_and_syncing_threads_with_your/
/** Output:
@chunkyguy
chunkyguy / wl_texture_atlas_format
Created Aug 25, 2014
Texture Atlas format for use in an upcoming game engine. This format works with Zwoptex.app
View wl_texture_atlas_format
<?xml version="1.0" encoding="UTF-8"?>
<TextureAtlas>
<meta>
<textureName>{{ metadata.target.textureFileName }}</textureName>
<textureExtension>{{ metadata.target.textureFileExtension }}</textureExtension>
<textureSize>{{ metadata.size }}</textureSize>
</meta>
<SubTextures>
{% for sprite in spritesAndAliases %}
<SubTexture>
You can’t perform that action at this time.