View cryptokitty_gen.rb
# Script to generate cryptokitty images using assets from:
# https://github.com/BytesForBites/cryptokitty-designer
# NOTE: requires imagemagick built with --with-librsvg
require 'rubygems'
require 'rmagick'
require 'digest'
class KittyGen
View cat_avatar.rb
require 'rubygems'
require 'rmagick'
require 'digest'
def build_cat(seed=nil)
srand(Digest::MD5.hexdigest(seed.to_s)[0...6].to_i(16)) if !seed.nil?
# throw the dice for body parts
parts = [
['body', rand(15)+1],
View torque_net_connection
// Example connection class for Torque2D/Torque3D network code
class ExampleNetConnection : public NetConnection
{
public:
typedef NetConnection Parent;
static const U32 CurrentProtocolVersion;
static const U32 MinRequiredProtocolVersion;
/// Configuration
View test_pbms_client.rb
#-----------------------------------------------------------------------------
# Test PBMS master client
# ( use with https://github.com/jamesu/PushButton-Master-Server )
#
# Copyright (C) 2016 James S Urquhart.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
View torque3d_premake5.lua
-- premake5.lua
-- Usage: premake5 <toolchain>
-- (C)2016 James S Urquhart. Feel free to use wherever.
-- util funcs
ENGINE_SRC_FOLDER = "../Engine/source/"
ENGINE_LIB_FOLDER = "../Engine/lib/"
WORKSPACE_NAME = "Torque3DGame_WS"
View openvr.cs
// Only load these functions if an Oculus VR device is present
if(!isFunction(OpenVRIsCompiledIn))
return;
$Video::VREnabled = false;
function setupOpenVRActionMaps()
{
new ActionMap(VRCanvasMap);
View kaboom.cpp
// Don't ask
#include "core/crc.h"
struct GFXSamplerStateDesc2
{
GFXTextureAddressMode addressModeU;
GFXTextureAddressMode addressModeV;
GFXTextureAddressMode addressModeW;
View compileShape.cs
function onStart()
{
}
function onExit()
{
}
function parseArgs()
View ts_lua_convert_example.lua
// ********
TorqueScript code
// ********
$shit = 1;
$fudge = 2 + 2.3;
if ($fudge < 2) // TOFIX
{
View engineAPiTemplate.erb
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//