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 { | |
Container, | |
Graphics, | |
} from 'pixi.js' | |
import { useExtend } from '@pixi/react' | |
export default function Enemy() { | |
useExtend({ | |
Container, | |
Graphics, |
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
// 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; |
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
export function Player() { | |
const { | |
positionX, | |
positionY, | |
velocityX, | |
velocityY, | |
} = useStore(store) | |
const [isFlipped, setIsFlipped] = useState(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
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 |
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
// Module imports | |
import { | |
ExtensionType, | |
type LoaderParser, | |
LoaderParserPriority, | |
} from 'pixi.js' | |
import { | |
BaseDirectory, | |
exists, | |
readFile, |
OlderNewer