This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CommandHandlerUrlPolicy : IUrlPolicy | |
{ | |
public bool Matches(ActionCall call, IConfigurationObserver log) | |
{ | |
return call.Method.Name == "Handle"; | |
} | |
public IRouteDefinition Build(ActionCall call) | |
{ | |
call = WrapActionCall(call); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function runApplication(){ | |
while(isRunning) { | |
doLogic(); | |
renderScene(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function runApplication(){ | |
setInterval(doGameLoop}, 1000 / 30); | |
} | |
function doGameLoop(){ | |
doLogic(); | |
renderScene(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var timeAtLastFrame = new Date().getTime(); | |
var idealTimePerFrame = 1000 / 30; | |
var leftover = 0.0; | |
var frames = 0; | |
function runApplication(){ | |
setInterval(tick, 1000/30); | |
} | |
function tick() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey, | |
you seem to be an expert in WebGl.Could you send me a code for super mario game in webgl,written in js?..This has been bugging me for a while,please see if you can help. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instruction[] dynamicMethodCalls = ExtractDynamicMethodCallInstructions(); | |
if (dynamicMethodCalls.Length == 0) { return; } | |
Instruction[] cachedReflectedFields = ExtractInitialReflectedCachedFieldReferenceInstructions(); | |
if (cachedReflectedFields.Length == 0) { return; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var actualCall = dynamicMethodCalls.Last(); | |
var current = actualCall.Previous; | |
if(current.OpCode.Code == Code.Ldstr) | |
{ | |
columnType = typeof (string); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attribute vec3 aVertexPosition; | |
attribute vec3 aNormal; | |
attribute vec2 aTextureCoord; | |
uniform mat4 uProjection; | |
uniform mat4 uView; | |
uniform mat4 uWorld; | |
uniform mat3 uNormal; | |
uniform vec3 vLight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
fs.readFile('hello.txt', function(err, data) { | |
response.write(data); | |
response.end(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost] | |
public ActionResult DoSomethingCool() | |
{ | |
if (Session["water"] == "boiling") | |
{ | |
Server.TransferRequest("~/408.aspx"); | |
} | |
return View(); | |
} |