An implementation of David Eberly's mesh clipping algorithm with demo program in odin. See comment at top of file for controls.
This file contains hidden or 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
let totalSize = 0; | |
for (let key in localStorage) { | |
if (localStorage.hasOwnProperty(key)) { | |
let keySize = new Blob([key]).size; // Size of the key | |
let valueSize = new Blob([localStorage[key]]).size; // Size of the value | |
totalSize += keySize + valueSize; | |
} | |
} |
This file contains hidden or 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
// Port of some collision functions to Odin by Jakub Tomšů. | |
// | |
// from Real-Time Collision Detection by Christer Ericson, published by Morgan Kaufmann Publishers, © 2005 Elsevier Inc | |
// | |
// This should serve as an reference implementation for common collision queries for games. | |
// The goal is good numerical robustness, handling edge cases and optimized math equations. | |
// The code isn't necessarily very optimized. | |
// | |
// There are a few cases you don't want to use the procedures below directly, but instead manually inline the math and adapt it to your needs. | |
// In my experience this method is clearer when writing complex level queries where I need to handle edge cases differently etc. |
This file contains hidden or 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
package audio | |
import "core:fmt" | |
// https://miniaud.io/docs/ | |
import ma "vendor:miniaudio" | |
// 0 - Use native channel count of the device | |
AUDIO_CHANNELS :: 0 | |
AUDIO_SAMPLE_RATE :: 0 |
This file contains hidden or 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
[ { | |
"Date" : "2016-07-30", | |
"Data" : { | |
"Moves" : [ | |
{ "ID" : 13, "Key" : "Power", "Old Value" : 15, "New Value" : 25 }, | |
{ "ID" : 14, "Key" : "Power", "Old Value" : 70, "New Value" : 120 }, | |
{ "ID" : 18, "Key" : "Power", "Old Value" : 25, "New Value" : 30 }, | |
{ "ID" : 20, "Key" : "Power", "Old Value" : 15, "New Value" : 25 }, | |
{ "ID" : 21, "Key" : "Power", "Old Value" : 35, "New Value" : 40 }, | |
{ "ID" : 22, "Key" : "Power", "Old Value" : 55, "New Value" : 80 }, |
Pokemon | Attack | Defense | Stamina | Total |
---|---|---|---|---|
MEWTWO | 284 | 202 | 212 | 698 |
SNORLAX | 180 | 180 | 320 | 680 |
DRAGONITE | 250 | 212 | 182 | 644 |
MEW | 220 | 220 | 200 | 640 |
LAPRAS | 186 | 190 | 260 | 636 |
ARTICUNO | 198 | 242 | 180 | 620 |
MOLTRES | 242 | 194 | 180 | 616 |
VAPOREON | 186 | 168 | 260 | 614 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 27 columns, instead of 12 in line 2.
This file contains hidden or 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
PkMn BaseStamina BaseAttack BaseDefense Type1 Type2 BaseCaptureRate BaseFleeRate CollisionRadiusM CollisionHeightM CollisionHeadRadiusM MovementType MovementTimerS JumpTimeS AttackTimerS QuickMoves CinematicMoves AnimTime Evolution EvolutionPips PokemonClass PokedexHeightM PokedexWeightKg HeightStdDev WeightStdDev FamilyId CandyToEvolve | |
1 90 126 126 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.1599999964237213 0.10000000149011612 0.3815000057220459 0.6539999842643738 0.27250000834465027 HoloPokemonMovementType.POKEMON_ENC_MOVEMENT_JUMP 10.0 1.149999976158142 29.0 d601dd01 5a3b76 6d56d53fdaac2a3f6d56d53f93a9ea3f0000000036ab0a403333b33fbfbbbb3f 02 HoloPokemonClass.POKEMON_CLASS_NORMAL 1 0.699999988079071 6.900000095367432 0.08749999850988388 0.862500011920929 HoloPokemonFamilyId.V0001_FAMILY_BULBASAUR 25 | |
2 120 156 158 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.07999999821186066 0.07000000029802322 0.3187499940395355 0.637499988079071 0.2549999952316284 H |
This file contains hidden or 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
Result: 1 | |
Items { | |
TemplateId: "BADGE_BATTLE_ATTACK_WON" | |
Badge { | |
BadgeType: BADGE_BATTLE_ATTACK_WON | |
BadgeRanks: 4 | |
Targets: "\nd\350\007" | |
} | |
} | |
Items { |
This file contains hidden or 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
/** | |
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex") | |
* | |
* More language ports, as well as legacy 2014 OpenSimplex, can be found here: | |
* https://github.com/KdotJPG/OpenSimplex2 | |
*/ | |
public class OpenSimplex2S { | |
private static final long PRIME_X = 0x5205402B9270C86FL; |
NewerOlder