Skip to content

Instantly share code, notes, and snippets.

// Module imports
import {
ExtensionType,
type LoaderParser,
LoaderParserPriority,
} from 'pixi.js'
import {
BaseDirectory,
exists,
readFile,
type UnknownArgs = Array<unknown>
type UnknownCallback = (...args: Array<unknown>) => unknown
export class ExecutionCache {
/** The string used to separate keys in a cache combined key. */
#cacheKeySeparator = '::'
/** Stores all cache items. */
#cache: Map<string, unknown> = new Map
@trezy
trezy / Player.jsx
Last active December 8, 2024 06:31
export function Player() {
const {
positionX,
positionY,
velocityX,
velocityY,
} = useStore(store)
const [isFlipped, setIsFlipped] = useState(false)
// Fragment shader
// Uniforms
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;
uniform vec4 u_colors[2];
uniform float u_intensity;
uniform float u_rays;
uniform float u_reach;
import {
Container,
Graphics,
} from 'pixi.js'
import { useExtend } from '@pixi/react'
export default function Enemy() {
useExtend({
Container,
Graphics,
title: greeting
position: -4,-239
---
Alastair Reid: Well hello there! I've brought your daily supplies!
You: Thank you, Alastair.
Alastair Reid: Have you heard the news going through town?
-> No, please do tell!
<<jump no>>
# Intro Cinematic
EXT. DARK FOREST - DUSK
The scene is black.
INNKEEPER (V.O.)
My grandfather was a carpenter. He built the inn as a refuge for our family, but it quickly became so much more.
CUT TO:
{
"parents": {
"primary": "Cindy Huel",
"secondary": "Edmond Jacobi-Jerde"
},
"children": [
{
"parents": {
"primary": "Georgia Hegmann III",
"secondary": "Penny Rodriguez Sr."
class MapManager {
findPath(fromX, fromY, toX, toY) {
/**
* With ngraph we don't have to create grid cells if they're unoccupied, so we
* have to verify we're not running the pathfinder against non-existent nodes.
*/
if (this.#graph.hasNode(`${toX}|${toY}`)) {
/**
* It's probably not necessary to generate a new pathfinder every time right
* now, but it'll be valuable in the future when the user gains the ability
// Local imports
import { useAnimatedFavicon } from './useAnimatedFavicon.js'
export function AnimatedFavicon() {
useAnimatedFavicon({
imageURL: '/favicon-spritesheet.png',