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
if mouse.events[events.LEFTMOUSE] == 1: | |
hit = P.mOver.hitObject | |
if hit is not None: | |
mesh = hit.meshes[0] | |
for v in range(mesh.getVertexArrayLength()): | |
vert = mesh.getVertex(0, v) | |
uv = vert.getUV() | |
uv[0] += 0.5 | |
vert.setUV(uv) |
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
#include <string> | |
#include <fstream> | |
#include <sstream> | |
#include "core/tgEngine.h" | |
#include "core/tgLog.h" | |
#include "core/tgInput.h" | |
#include "graphics/tgSpriteBatch.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
#ifndef TYPES_H | |
#define TYPES_H | |
#include <stdint.h> | |
typedef uint32_t uint; | |
typedef uint8_t bool; | |
#define true 1 | |
#define false 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
#[macro_export] | |
macro_rules! GL { | |
($fun:ident ( $($arg:expr),*)) => {{ | |
unsafe { | |
let result = ::gl::$fun( $($arg),* ); | |
let err = ::gl::GetError(); | |
if err != ::gl::NO_ERROR { | |
let err_str = match err { | |
::gl::INVALID_OPERATION => "Invalid Operation", | |
::gl::INVALID_ENUM => "Invalid Enum", |
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
#include "Logger.h" | |
#include <fstream> | |
#include <assert.h> | |
#include "termcolor.hpp" | |
namespace tfx { | |
#ifdef TFX_DEBUG | |
Logger Logger::logger = Logger(); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
typedef struct Node_t { | |
int value; | |
struct Node_t* next; | |
struct Node_t* prev; | |
} Node; |
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
v 1.000000 -1.000000 -1.000000 | |
v 1.000000 -1.000000 1.000000 | |
v -1.000000 -1.000000 1.000000 | |
v -1.000000 -1.000000 -1.000000 | |
v 1.000000 1.000000 -0.999999 | |
v 0.999999 1.000000 1.000001 | |
v -1.000000 1.000000 1.000000 | |
v -1.000000 1.000000 -1.000000 | |
vt 1.000000 0.000000 | |
vt 0.000000 1.000000 |
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
#include "mesher.h" | |
#include "../core/logging/log.h" | |
NS_BEGIN | |
void VertexFormat::put(const String& name, AttributeType type, bool normalized, i32 location) { | |
VertexAttribute attr; | |
attr.size = type; | |
attr.normalized = normalized; |
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
public boolean beginClipping(int x, int y, int w, int h) { | |
IDevice dev = Age.Device; | |
if (!dev.isEnabled(Feature.Scissor)) { | |
dev.setFeatures(true, Feature.Scissor); | |
} | |
if (!clipRectStack.isEmpty()) { | |
Rectangle parent = clipRectStack.lastElement(); | |
int minX = Math.max(parent.x, x); | |
int maxX = Math.min(parent.x + parent.width, x + w); | |
if (maxX - minX < 1) return false; |
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
import random | |
from datetime import datetime | |
random.seed(datetime.now()) | |
CONSONANTS = list("bcdfghjklmnpqrstvwyxz") | |
VOWELS = list("aeiou") | |
ALPHABET = CONSONANTS + VOWELS | |
THIRD_LETTER_PROB = 0.15 |