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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>createImageBitmap</title> | |
</head> | |
<style> | |
canvas { | |
width:100%; | |
height:100%; | |
} |
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
/*global define*/ | |
define([ | |
'./Mine', | |
'./Boundary', | |
'./CameraTracking', | |
'./Coin', | |
'./postJson', | |
'./Ring', | |
'./Sound', | |
'./Drone', |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Javascript Typed Arrays</title> | |
<meta charset="UTF-8"> | |
<script type="text/javascript" src="https://fastcdn.org/FileSaver.js/1.1.20151003/FileSaver.min.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
// Here's a sample 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 aPosition; | |
uniform mat4 matrix_model; | |
uniform mat4 matrix_viewProjection; | |
uniform float uTime; | |
void main(void) | |
{ | |
vec3 pos = aPosition; |
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
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Multiplayer Experiment</title> | |
<!-- Load the Phaser game library --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/phaser/2.4.2/phaser.min.js"></script> | |
<!-- Load the Socket.io networking library --> | |
<script src="/socket.io/socket.io.js"></script> | |
<!-- Some simple styles and fonts --> |
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
io.on('connection', function(socket){ | |
/* 'connection' is a special event fired on the server when any new connection is made */ | |
}) | |
socket.on('disconnect', function(){ | |
/* When this individual socket has disconnected, this special event fires */ | |
}) | |
/* This will send the event 'foobar' with the data to | |
every connected to socket */ |
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
void RebindAction(FName ActionName, FKey NewKey) { | |
// Adapted from Rama's VictoryBPFunctionLibrary (https://wiki.unrealengine.com/Rebinding_Keys_At_Runtime_in_Packaged_Game) | |
UInputSettings* Settings = const_cast<UInputSettings*>(GetDefault<UInputSettings>()); | |
if (Settings) { | |
TArray<FInputActionKeyMapping>& Actions = Settings->ActionMappings; | |
for (FInputActionKeyMapping& Each : Actions) | |
{ | |
if (Each.ActionName == ActionName) { | |
Each.Key = NewKey; | |
UE_LOG(LogTemp, Warning, TEXT("%s is triggered by %s"), *Each.ActionName.ToString(), *Each.Key.ToString()); |
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 Text = pc.createScript('text'); | |
Text.attributes.add('text', { type: 'string', default:'Hello World!' }); | |
Text.attributes.add('fontsize', { type: 'number', default:70, title:"Font Size" }); | |
// initialize code called once per entity | |
Text.prototype.initialize = function() { | |
// Create a canvas to do the text rendering | |
this.canvas = document.createElement('canvas'); | |
this.canvas.height = 128; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>PixiJS Shaders</title> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
overflow: hidden; | |
} | |
</style> |
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
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>hello phaser!</title> | |
<script src="phaser.min.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.onload = function() { |
NewerOlder