repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/theme/base/tooltip.spec.ts
packages/quill/test/unit/theme/base/tooltip.spec.ts
import { describe, expect, test } from 'vitest'; import Quill from '../../../../src/core.js'; import Video from '../../../../src/formats/video.js'; import { BaseTooltip } from '../../../../src/themes/base.js'; import { createRegistry } from '../../__helpers__/factory.js'; class Tooltip extends BaseTooltip { static T...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/core/emitter.spec.ts
packages/quill/test/unit/core/emitter.spec.ts
import { describe, expect, test } from 'vitest'; import Emitter from '../../../src/core/emitter.js'; import Quill from '../../../src/core.js'; describe('emitter', () => { test('emit and on', () => { const emitter = new Emitter(); let received: unknown; emitter.on('abc', (data) => { received = data...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/core/selection.spec.ts
packages/quill/test/unit/core/selection.spec.ts
import Selection, { Range } from '../../../src/core/selection.js'; import Cursor from '../../../src/blots/cursor.js'; import Emitter from '../../../src/core/emitter.js'; import { expect, describe, test } from 'vitest'; import { createRegistry, createScroll } from '../__helpers__/factory.js'; import Bold from '../../../...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/core/quill.spec.ts
packages/quill/test/unit/core/quill.spec.ts
import '../../../src/quill.js'; import Delta from 'quill-delta'; import { LeafBlot, Registry } from 'parchment'; import { afterEach, beforeEach, describe, expect, test, vitest, vi, } from 'vitest'; import type { MockedFunction } from 'vitest'; import Emitter from '../../../src/core/emitter.js'; import The...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
true
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/core/composition.spec.ts
packages/quill/test/unit/core/composition.spec.ts
import Emitter from '../../../src/core/emitter.js'; import Composition from '../../../src/core/composition.js'; import Scroll from '../../../src/blots/scroll.js'; import { describe, expect, test, vitest } from 'vitest'; import { createRegistry } from '../__helpers__/factory.js'; import Quill from '../../../src/core.js'...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/core/editor.spec.ts
packages/quill/test/unit/core/editor.spec.ts
import Delta from 'quill-delta'; import Editor from '../../../src/core/editor.js'; import Block from '../../../src/blots/block.js'; import { Range } from '../../../src/core/selection.js'; import Scroll from '../../../src/blots/scroll.js'; import { Registry } from 'parchment'; import Text from '../../../src/blots/text.j...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
true
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/core/utils/createRegistryWithFormats.spec.ts
packages/quill/test/unit/core/utils/createRegistryWithFormats.spec.ts
import '../../../../src/quill.js'; import { describe, expect, test, vitest } from 'vitest'; import createRegistryWithFormats from '../../../../src/core/utils/createRegistryWithFormats.js'; import { globalRegistry } from '../../../../src/core/quill.js'; import logger from '../../../../src/core/logger.js'; import { Regis...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/__helpers__/expect.ts
packages/quill/test/unit/__helpers__/expect.ts
import { expect } from 'vitest'; import { normalizeHTML } from './utils.js'; const sortAttributes = (element: HTMLElement) => { const attributes = Array.from(element.attributes); const sortedAttributes = attributes.sort((a, b) => a.name.localeCompare(b.name), ); while (element.attributes.length > 0) { ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/__helpers__/utils.ts
packages/quill/test/unit/__helpers__/utils.ts
export const sleep = (ms: number) => new Promise<void>((r) => { setTimeout(() => { r(); }, ms); }); export const normalizeHTML = (html: string | { html: string }) => typeof html === 'object' ? html.html : html.replace(/\n\s*/g, '');
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/__helpers__/vitest.d.ts
packages/quill/test/unit/__helpers__/vitest.d.ts
import type { Assertion, AsymmetricMatchersContaining } from 'vitest'; interface CustomMatchers<R = unknown> { toEqualHTML(html: string, options?: { ignoreAttrs?: string[] }): R; } declare module 'vitest' { interface Assertion<T = any> extends CustomMatchers<T> {} interface AsymmetricMatchersContaining extends ...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/__helpers__/cleanup.ts
packages/quill/test/unit/__helpers__/cleanup.ts
import { beforeEach } from 'vitest'; beforeEach(() => { document.body.innerHTML = ''; });
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/__helpers__/factory.ts
packages/quill/test/unit/__helpers__/factory.ts
import { Registry } from 'parchment'; import type { Attributor } from 'parchment'; import Block from '../../../src/blots/block.js'; import Break from '../../../src/blots/break.js'; import Cursor from '../../../src/blots/cursor.js'; import Scroll from '../../../src/blots/scroll.js'; import TextBlot from '../../../src/b...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/quill/test/unit/ui/picker.spec.ts
packages/quill/test/unit/ui/picker.spec.ts
import { describe, expect, test } from 'vitest'; import Picker from '../../../src/ui/picker.js'; describe('Picker', () => { const setup = () => { const container = document.body.appendChild(document.createElement('div')); container.innerHTML = '<select><option selected>0</option><option value="1">1</op...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/website/src/data/api.tsx
packages/website/src/data/api.tsx
const items = [ { title: 'Content', hashes: [ 'deleteText', 'getContents', 'getLength', 'getText', 'getSemanticHTML', 'insertEmbed', 'insertText', 'setContents', 'setText', 'updateContents', ], }, { title: 'Formatting', hashes: ['form...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/website/src/data/playground.tsx
packages/website/src/data/playground.tsx
const playground = [ { title: 'Basic setup with snow theme', url: '/playground/snow', }, { title: 'Using Quill inside a form', url: '/playground/form', }, { title: 'Custom font and formats', url: '/playground/custom-formats', }, { title: 'Using Quill with React', url: '/pla...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
slab/quill
https://github.com/slab/quill/blob/539cbffd0a13b18e9c65eb84dd35e6596e403158/packages/website/src/data/docs.tsx
packages/website/src/data/docs.tsx
const items = [ { title: 'Quickstart', url: '/docs/quickstart', }, { title: 'Why Quill', url: '/docs/why-quill', }, { title: 'Installation', url: '/docs/installation', }, { title: 'Upgrading to 2.0', url: '/docs/upgrading-to-2-0', }, { title: 'Configuration', ur...
typescript
BSD-3-Clause
539cbffd0a13b18e9c65eb84dd35e6596e403158
2026-01-04T15:40:53.576039Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/scripts/release.ts
scripts/release.ts
import { readJSON } from 'fs-extra'; import path from 'path'; import { bump } from './utils/bump'; import { spawn } from './utils/spawn'; /** * Bump the version of all packages in the monorepo * and their dependencies. Replacement for lerna version --exact --force-publish */ async function main(): Promise<void> { ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/scripts/jest/jest-global-setup.ts
scripts/jest/jest-global-setup.ts
import { spawn } from 'child_process'; import { join } from 'path'; // eslint-disable-next-line func-names module.exports = async function () { if (!process.env.GITHUB_ACTIONS) { const httpServerProcess = spawn( 'http-server', ['-c-1', `${join(process.cwd(), './')}`], ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/scripts/jest/jest-global-teardown.ts
scripts/jest/jest-global-teardown.ts
import kill from 'tree-kill'; import type { ChildProcess } from 'child_process'; // eslint-disable-next-line func-names module.exports = async function () { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const httpServerProcess = (globalThis.__SERVER__ as ChildProcess | undefi...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/scripts/index/index.ts
scripts/index/index.ts
import fs from 'fs'; import glob from 'glob'; import path from 'path'; const directoryPath = path.join(process.cwd(), './src'); // find all directories in src const directories = glob.sync('*/', { cwd: directoryPath, absolute: true }); // Use glob to find all TypeScript files recursively in the directory directories...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/scripts/utils/exports.ts
scripts/utils/exports.ts
// need to be able to generate multiple index entry files // e.g. main, webworker, node, etc. import { readJSONSync, writeJSONSync } from 'fs-extra'; // sub imports can be generated by finding `init` files? or should it just be a manual list? const subImports = [ ['./accessibility', './lib/accessibility'], ['...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/scripts/utils/spawn.ts
scripts/utils/spawn.ts
import childProcess from 'child_process'; /** * Utility to do spawn but as a Promise * @param command * @param args * @param options */ export const spawn = (command: string, args: string[], options: childProcess.SpawnOptions = {}) => new Promise<void>((resolve, reject) => { const child = childPro...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/scripts/utils/bump.ts
scripts/utils/bump.ts
import inquirer from 'inquirer'; import semver from 'semver'; interface BumpAnswers { bump: 'major' | 'minor' | 'patch' | 'custom'; custom: string; confirmed: boolean; } /** * Ask the user to do a version bump. * @param currentVersion - Current version to change from. * @returns The next version. */ e...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/scripts/utils/autoGenerateUnsafeEvalFunctions.ts
scripts/utils/autoGenerateUnsafeEvalFunctions.ts
import { writeFileSync } from 'fs-extra'; import { UNIFORM_TO_ARRAY_SETTERS, UNIFORM_TO_SINGLE_SETTERS } from '../../src/rendering/renderers/gl/shader/utils/generateUniformsSyncTypes'; import { uboSyncFunctionsSTD40, uboSyncFunctionsWGSL } from '../../src/rendering/renderers/shared/shader/utils/uboSyncF...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/scripts/types/fixTypes.ts
scripts/types/fixTypes.ts
/** * ----------------------------------------------------------------- * The file is used to fix various issues with the types * - Add reference paths to the mixins * - Copy over the Shaders.d.ts file to the lib folder for * proper frag,vert,wgsl support * ------------------------------------------------------...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/index.docs.ts
src/index.docs.ts
/** * @packageDocumentation * @document accessibility/__docs__/accessibility-overview.md * @document app/__docs__/app-overview.md * @document assets/__docs__/assets-overview.md * @document color/__docs__/color-overview.md * @document environment/__docs__/environment-overview.md * @document events/__docs__/events...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/bundle.gif.ts
src/bundle.gif.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck - we dynamically create the other index files, so these will throw errors if we don't ignore them import './gif/init'; export * from './gif';
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/bundle.advanced-blend-modes.ts
src/bundle.advanced-blend-modes.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck - we dynamically create the other index files, so these will throw errors if we don't ignore them import './advanced-blend-modes/init'; export * from './advanced-blend-modes';
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/bundle.webworker.ts
src/bundle.webworker.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck - we dynamically create the other index files, so these will throw errors if we don't ignore them import { DOMAdapter } from './environment/adapter'; import { WebWorkerAdapter } from './environment-webworker/WebWorkerAdapter'; import './envir...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/bundle.unsafe-eval.ts
src/bundle.unsafe-eval.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck - we dynamically create the other index files, so these will throw errors if we don't ignore them import './unsafe-eval/init'; export * from './unsafe-eval';
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/bundle.math-extras.ts
src/bundle.math-extras.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck - we dynamically create the other index files, so these will throw errors if we don't ignore them import './math-extras/init'; export * from './math-extras';
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/bundle.browser.ts
src/bundle.browser.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck - we dynamically create the other index files, so these will throw errors if we don't ignore them import './environment-browser/browserAll'; export * from './accessibility'; export * from './app'; export * from './assets'; export * from './c...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/index.ts
src/index.ts
import { browserExt } from './environment-browser/browserExt'; import { webworkerExt } from './environment-webworker/webworkerExt'; import { extensions } from './extensions/Extensions'; import './rendering/init'; import './spritesheet/init'; export * from './accessibility'; export * from './advanced-blend-modes'; expo...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/MathExtraMixins.d.ts
src/math-extras/MathExtraMixins.d.ts
declare global { namespace PixiMixins { // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface Point extends Vector2Math { } // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface ObservablePoint extends Vector2Math ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/init.ts
src/math-extras/init.ts
import { ObservablePoint } from '../maths/point/ObservablePoint'; import { Point } from '../maths/point/Point'; import { Rectangle } from '../maths/shapes/Rectangle'; import { pointExtraMixins } from './pointExtras'; import { rectangleExtraMixins } from './rectangleExtras'; Object.assign(Point.prototype, pointExtraMix...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/util.ts
src/math-extras/util.ts
import { Point } from '../maths/point/Point'; import './pointExtras'; import './rectangleExtras'; import type { PointData } from '../maths/point/PointData'; /** * The idea of a relative epsilon comparison is to find the difference between the two numbers, * and see if it is less than a given epsilon. * A good epsi...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/rectangleExtras.ts
src/math-extras/rectangleExtras.ts
import { Rectangle } from '../maths/shapes/Rectangle'; /** @internal */ export const rectangleExtraMixins: Partial<Rectangle> = { containsRect(other: Rectangle): boolean { if (other.width <= 0 || other.height <= 0) { return other.x > this.x && other.y > this.y && other.right < this....
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/index.ts
src/math-extras/index.ts
// Auto-generated code, do not edit manually export * from './pointExtras'; export * from './rectangleExtras'; export * from './util';
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/pointExtras.ts
src/math-extras/pointExtras.ts
import { Point } from '../maths/point/Point'; import type { PointData } from '../maths/point/PointData'; /** @internal */ export const pointExtraMixins: any = { add<T extends PointData>(other: PointData, outPoint?: T): T { if (!outPoint) { outPoint = new Point() as PointData as T; ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/__tests__/floatEqual.test.ts
src/math-extras/__tests__/floatEqual.test.ts
import { floatEqual } from '../util'; describe('floatEqual', () => { it('should return true if the difference between values is less than epsilon', () => { // 0.1 + 0.2 = 0.3 is the common floating point pitfall. expect(floatEqual(0.1 + 0.2, 0.3)).toEqual(true); ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/__tests__/lineIntersection.test.ts
src/math-extras/__tests__/lineIntersection.test.ts
import { lineIntersection } from '../util'; import { Point } from '~/maths'; describe('lineIntersection', () => { it('should return the point where the lines intersect', () => { const aStart = new Point(1, 2); const aEnd = new Point(3, 4); const bStart = new Poin...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/__tests__/Point.test.ts
src/math-extras/__tests__/Point.test.ts
import '../init'; import { ObservablePoint, Point } from '~/maths'; describe('Point', () => { const observer = { _onUpdate: () => { /* empty */ } }; describe('add', () => { it('should add component-wise', () => { // Point const a = new Point(1, 2); const...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/__tests__/segmentIntersection.test.ts
src/math-extras/__tests__/segmentIntersection.test.ts
import { segmentIntersection } from '../util'; import { Point } from '~/maths'; describe('segmentIntersection', () => { it('should return the point where the segments intersect', () => { const aStart = new Point(1, 2); const aEnd = new Point(11, 12); const bStart...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/math-extras/__tests__/Rectangle.test.ts
src/math-extras/__tests__/Rectangle.test.ts
import '../init'; import { Rectangle } from '~/maths'; describe('Rectangle', () => { describe('containsRect', () => { it('should return true if all four corners are inside or on the edge of the rectangle', () => { /* +-----------------+-----------------+ ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/accessibility/init.ts
src/accessibility/init.ts
import { extensions } from '../extensions/Extensions'; import { Container } from '../scene/container/Container'; import { AccessibilitySystem } from './AccessibilitySystem'; import { accessibilityTarget } from './accessibilityTarget'; extensions.add(AccessibilitySystem); extensions.mixin(Container, accessibilityTarget...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/accessibility/accessibilityTarget.ts
src/accessibility/accessibilityTarget.ts
import type { Container } from '../scene/container/Container'; /** * The type of the pointer event to listen for. * @category accessibility * @standard * @see https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events */ export type PointerEvents = 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibl...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/accessibility/AccessibilityMixins.d.ts
src/accessibility/AccessibilityMixins.d.ts
declare global { namespace PixiMixins { // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface Container extends Partial<import('./accessibilityTarget').AccessibleTarget> {} // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface Con...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/accessibility/AccessibilitySystem.ts
src/accessibility/AccessibilitySystem.ts
/* eslint-disable no-restricted-globals */ import { CanvasObserver } from '../dom/CanvasObserver'; import { FederatedEvent } from '../events/FederatedEvent'; import { ExtensionType } from '../extensions/Extensions'; import { isMobile } from '../utils/browser/isMobile'; import { removeItems } from '../utils/data/removeI...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/accessibility/index.ts
src/accessibility/index.ts
// Auto-generated code, do not edit manually export * from './AccessibilitySystem'; export * from './accessibilityTarget';
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/accessibility/__tests__/AccessibilitySystem.test.ts
src/accessibility/__tests__/AccessibilitySystem.test.ts
import { AccessibilitySystem } from '../AccessibilitySystem'; import '../init'; import { getWebGLRenderer } from '@test-utils'; import { Container } from '~/scene'; describe('AccessibilitySystem', () => { it('should be plugin for renderer', async () => { const renderer = await getWebGLRenderer(); ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/accessibility/__tests__/accessibleTarget.test.ts
src/accessibility/__tests__/accessibleTarget.test.ts
import { AccessibilitySystem } from '../AccessibilitySystem'; import '../init'; import { getWebGLRenderer } from '@test-utils'; import { Container } from '~/scene'; describe('accessibleTarget', () => { it('should have target public properties', async () => { const renderer = await getWebGLRenderer(); ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/init.ts
src/rendering/init.ts
import { extensions } from '../extensions/Extensions'; import { AlphaMask } from './mask/alpha/AlphaMask'; import { ColorMask } from './mask/color/ColorMask'; import { StencilMask } from './mask/stencil/StencilMask'; import { BufferImageSource } from './renderers/shared/texture/sources/BufferImageSource'; import { Canv...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/RenderingMixins.d.ts
src/rendering/RenderingMixins.d.ts
declare global { namespace PixiMixins { // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface ICanvas { } interface RendererOptions { resolution?: number; failIfMajorPerformanceCaveat?: boolean; roundP...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/index.ts
src/rendering/index.ts
// Auto-generated code, do not edit manually export * from './batcher/gl/GlBatchAdaptor'; export * from './batcher/gl/utils/checkMaxIfStatementsInShader'; export * from './batcher/gl/utils/maxRecommendedTextures'; export * from './batcher/gpu/generateGPULayout'; export * from './batcher/gpu/generateLayout'; export * fr...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/defaultProgramTemplate.ts
src/rendering/high-shader/defaultProgramTemplate.ts
/** @ignore */ const vertexGPUTemplate = /* wgsl */` @in aPosition: vec2<f32>; @in aUV: vec2<f32>; @out @builtin(position) vPosition: vec4<f32>; @out vUV : vec2<f32>; @out vColor : vec4<f32>; {{header}} struct VSOutput { {{struct}} }; @vertex fn main( {{in}} ) -> VSOu...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/compileHighShaderToProgram.ts
src/rendering/high-shader/compileHighShaderToProgram.ts
import { GlProgram } from '../renderers/gl/shader/GlProgram'; import { GpuProgram } from '../renderers/gpu/shader/GpuProgram'; import { compileHighShader, compileHighShaderGl } from './compiler/compileHighShader'; import { fragmentGlTemplate, fragmentGPUTemplate, vertexGlTemplate, vertexGPUTemplate } from './defaultPro...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/shader-bits/localUniformBit.ts
src/rendering/high-shader/shader-bits/localUniformBit.ts
/** @internal */ export const localUniformBit = { name: 'local-uniform-bit', vertex: { header: /* wgsl */` struct LocalUniforms { uTransformMatrix:mat3x3<f32>, uColor:vec4<f32>, uRound:f32, } @group(1) @binding(0) var<...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/shader-bits/colorBit.ts
src/rendering/high-shader/shader-bits/colorBit.ts
/** @internal */ export const colorBit = { name: 'color-bit', vertex: { header: /* wgsl */` @in aColor: vec4<f32>; `, main: /* wgsl */` vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a); ` } }; /** @internal */ export const colorBitGl = { name:...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/shader-bits/generateTextureBatchBit.ts
src/rendering/high-shader/shader-bits/generateTextureBatchBit.ts
import type { HighShaderBit } from '../compiler/types'; const textureBatchBitGpuCache: Record<number, HighShaderBit> = {}; /** * * @param maxTextures - the max textures the shader can use. * @returns a shader bit that will allow the shader to sample multiple textures AND round pixels. */ function generateBindingS...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/shader-bits/textureBit.ts
src/rendering/high-shader/shader-bits/textureBit.ts
/** @internal */ export const textureBit = { name: 'texture-bit', vertex: { header: /* wgsl */` struct TextureUniforms { uTextureMatrix:mat3x3<f32>, } @group(2) @binding(2) var<uniform> textureUniforms : TextureUniforms; `, main: /* wgsl */` ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/shader-bits/roundPixelsBit.ts
src/rendering/high-shader/shader-bits/roundPixelsBit.ts
/** @internal */ export const roundPixelsBit = { name: 'round-pixels-bit', vertex: { header: /* wgsl */` fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32> { return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/shader-bits/globalUniformsBit.ts
src/rendering/high-shader/shader-bits/globalUniformsBit.ts
/** @internal */ export const globalUniformsBit = { name: 'global-uniforms-bit', vertex: { header: /* wgsl */` struct GlobalUniforms { uProjectionMatrix:mat3x3<f32>, uWorldTransformMatrix:mat3x3<f32>, uWorldColorAlpha: vec4<f32>, uResolution: vec2<...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/compiler/compileHighShader.ts
src/rendering/high-shader/compiler/compileHighShader.ts
import { addBits } from './utils/addBits'; import { compileHooks } from './utils/compileHooks'; import { compileInputs } from './utils/compileInputs'; import { compileOutputs } from './utils/compileOutputs'; import { injectBits } from './utils/injectBits'; import type { HighShaderBit, HighShaderSource } from './types'...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/compiler/types.ts
src/rendering/high-shader/compiler/types.ts
/** * the vertex source code, an obj * @internal */ export type Vertex = { /** stick uniforms and functions in here all headers will be compiled at the top of the shader */ header?: string; /** code will be added at the start of the shader */ start?: string; /** code will be run here before light...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/compiler/utils/compileInputs.ts
src/rendering/high-shader/compiler/utils/compileInputs.ts
function extractInputs(fragmentSource: string, out: string[]) { let match; const regex = /@in\s+([^;]+);/g; while ((match = regex.exec(fragmentSource)) !== null) { out.push(match[1]); } } /** * @param fragments * @param template * @param sort * @internal */ export function compileInpu...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/compiler/utils/compileHooks.ts
src/rendering/high-shader/compiler/utils/compileHooks.ts
const findHooksRx = /\{\{(.*?)\}\}/g; /** * takes a program string and returns an hash mapping the hooks to empty arrays * @param programSrc - the program containing hooks * @internal */ export function compileHooks(programSrc: string): Record<string, string[]> { const parts: Record<string, string[]> = {}; ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/compiler/utils/formatShader.ts
src/rendering/high-shader/compiler/utils/formatShader.ts
/** * formats a shader so its more pleasant to read * @param shader - a glsl shader program source * @category utils * @advanced */ export function formatShader(shader: string): string { const spl = shader.split(/([\n{}])/g) .map((a) => a.trim()) .filter((a) => a.length); let indent = ''; ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/compiler/utils/compileOutputs.ts
src/rendering/high-shader/compiler/utils/compileOutputs.ts
function extractOutputs(fragmentSource: string, out: string[]) { let match; const regex = /@out\s+([^;]+);/g; while ((match = regex.exec(fragmentSource)) !== null) { out.push(match[1]); } } function extractVariableName(value: string) { const regex = /\b(\w+)\s*:/g; const match = r...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/compiler/utils/injectBits.ts
src/rendering/high-shader/compiler/utils/injectBits.ts
/** * takes a shader src and replaces any hooks with the HighFragment code. * @param templateSrc - the program src template * @param fragmentParts - the fragments to inject * @internal */ export function injectBits(templateSrc: string, fragmentParts: Record<string, string[]>): string { let out = templateSrc; ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/high-shader/compiler/utils/addBits.ts
src/rendering/high-shader/compiler/utils/addBits.ts
import { warn } from '../../../../utils/logging/warn'; /** * takes the HighFragment source parts and adds them to the hook hash * @param srcParts - the hash of hook arrays * @param parts - the code to inject into the hooks * @param name - optional the name of the part to add * @internal */ export function addBit...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/types.ts
src/rendering/renderers/types.ts
import { type GPUData } from '../../scene/view/ViewContainer'; import type { ICanvas } from '../../environment/canvas/ICanvas'; import type { WebGLOptions, WebGLPipes, WebGLRenderer } from './gl/WebGLRenderer'; import type { WebGPUOptions, WebGPUPipes, WebGPURenderer } from './gpu/WebGPURenderer'; /** * A generic re...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/autoDetectRenderer.ts
src/rendering/renderers/autoDetectRenderer.ts
import { isWebGLSupported } from '../../utils/browser/isWebGLSupported'; import { isWebGPUSupported } from '../../utils/browser/isWebGPUSupported'; import { AbstractRenderer } from './shared/system/AbstractRenderer'; import type { WebGLOptions } from './gl/WebGLRenderer'; import type { WebGPUOptions } from './gpu/WebG...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/GpuLimitsSystem.ts
src/rendering/renderers/gpu/GpuLimitsSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { type System } from '../shared/system/System'; import { type WebGPURenderer } from './WebGPURenderer'; /** * The GpuLimitsSystem provides information about the capabilities and limitations of the underlying GPU. * These limits, such as the maxim...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/GpuStencilSystem.ts
src/rendering/renderers/gpu/GpuStencilSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { STENCIL_MODES } from '../shared/state/const'; import type { RenderTarget } from '../shared/renderTarget/RenderTarget'; import type { System } from '../shared/system/System'; import type { WebGPURenderer } from './WebGPURenderer'; /** * This man...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/GpuDeviceSystem.ts
src/rendering/renderers/gpu/GpuDeviceSystem.ts
import { DOMAdapter } from '../../../environment/adapter'; import { ExtensionType } from '../../../extensions/Extensions'; import type { System } from '../shared/system/System'; import type { GpuPowerPreference } from '../types'; import type { WebGPURenderer } from './WebGPURenderer'; /** * The GPU object. * Contai...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/GpuColorMaskSystem.ts
src/rendering/renderers/gpu/GpuColorMaskSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import type { System } from '../shared/system/System'; import type { WebGPURenderer } from './WebGPURenderer'; /** * The system that handles color masking for the GPU. * @category rendering * @advanced */ export class GpuColorMaskSystem implements Sy...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/BindGroupSystem.ts
src/rendering/renderers/gpu/BindGroupSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import type { Buffer } from '../shared/buffer/Buffer'; import type { BufferResource } from '../shared/buffer/BufferResource'; import type { UniformGroup } from '../shared/shader/UniformGroup'; import type { System } from '../shared/system/System'; import ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/GpuEncoderSystem.ts
src/rendering/renderers/gpu/GpuEncoderSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import type { Rectangle } from '../../../maths/shapes/Rectangle'; import type { Buffer } from '../shared/buffer/Buffer'; import type { Topology } from '../shared/geometry/const'; import type { Geometry } from '../shared/geometry/Geometry'; import type { S...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/GpuUniformBatchPipe.ts
src/rendering/renderers/gpu/GpuUniformBatchPipe.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { Buffer } from '../shared/buffer/Buffer'; import { BufferResource } from '../shared/buffer/BufferResource'; import { BufferUsage } from '../shared/buffer/const'; import { UboBatch } from './buffer/UboBatch'; import { BindGroup } from './shader/Bind...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/WebGPURenderer.ts
src/rendering/renderers/gpu/WebGPURenderer.ts
import { extensions, ExtensionType } from '../../../extensions/Extensions'; import { GpuGraphicsAdaptor } from '../../../scene/graphics/gpu/GpuGraphicsAdaptor'; import { GpuMeshAdapter } from '../../../scene/mesh/gpu/GpuMeshAdapter'; import { GpuBatchAdaptor } from '../../batcher/gpu/GpuBatchAdaptor'; import { Abstract...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/GpuUboSystem.ts
src/rendering/renderers/gpu/GpuUboSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { UboSystem } from '../shared/shader/UboSystem'; import { createUboElementsWGSL } from './shader/utils/createUboElementsWGSL'; import { createUboSyncFunctionWGSL } from './shader/utils/createUboSyncFunctionWGSL'; /** * System plugin to the rendere...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/state/GpuStateSystem.ts
src/rendering/renderers/gpu/state/GpuStateSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { State } from '../../shared/state/State'; import { GpuBlendModesToPixi } from './GpuBlendModesToPixi'; import type { BLEND_MODES } from '../../shared/state/const'; import type { System } from '../../shared/system/System'; import type { GPU } fr...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/state/GpuStencilModesToPixi.ts
src/rendering/renderers/gpu/state/GpuStencilModesToPixi.ts
import { STENCIL_MODES } from '../../shared/state/const'; /** * The stencil state for the GPU renderer. * This is used to define how the stencil buffer should be configured. * @category rendering * @advanced */ export interface StencilState { stencilWriteMask?: number stencilReadMask?: number; stencil...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/state/GpuBlendModesToPixi.ts
src/rendering/renderers/gpu/state/GpuBlendModesToPixi.ts
import type { BLEND_MODES } from '../../shared/state/const'; /** @internal */ export const GpuBlendModesToPixi: Partial<Record<BLEND_MODES, GPUBlendState>> = {}; GpuBlendModesToPixi.normal = { alpha: { srcFactor: 'one', dstFactor: 'one-minus-src-alpha', operation: 'add', }, color: ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/BindGroup.ts
src/rendering/renderers/gpu/shader/BindGroup.ts
import { type GCable } from '../../shared/GCSystem'; import type { BindResource } from './BindResource'; /** * A bind group is a collection of resources that are bound together for use by a shader. * They are essentially a wrapper for the WebGPU BindGroup class. But with the added bonus * that WebGL can also work ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/GpuProgram.ts
src/rendering/renderers/gpu/shader/GpuProgram.ts
import { createIdFromString } from '../../shared/utils/createIdFromString'; import { extractAttributesFromGpuProgram } from './utils/extractAttributesFromGpuProgram'; import { extractStructAndGroups } from './utils/extractStructAndGroups'; import { generateGpuLayoutGroups } from './utils/generateGpuLayoutGroups'; impor...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/BindResource.ts
src/rendering/renderers/gpu/shader/BindResource.ts
import type { BindGroup } from './BindGroup'; /** * an interface that allows a resource to be bound to the gpu in a bind group * @category rendering * @advanced */ export interface BindResource { /** * The type of resource this is * @ignore */ _resourceType: string; /** * Unique id...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/GpuShaderSystem.ts
src/rendering/renderers/gpu/shader/GpuShaderSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import type { GPU } from '../GpuDeviceSystem'; import type { GpuProgram } from './GpuProgram'; /** * Data structure for GPU program layout. * Contains bind group layouts and pipeline layout. * @category rendering * @advanced */ export interface G...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/removeStructAndGroupDuplicates.ts
src/rendering/renderers/gpu/shader/utils/removeStructAndGroupDuplicates.ts
import type { StructsAndGroups } from './extractStructAndGroups'; /** * @param vertexStructsAndGroups * @param fragmentStructsAndGroups * @internal */ export function removeStructAndGroupDuplicates( vertexStructsAndGroups: StructsAndGroups, fragmentStructsAndGroups: StructsAndGroups ) { const structNam...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/extractStructAndGroups.ts
src/rendering/renderers/gpu/shader/utils/extractStructAndGroups.ts
/** * Defines the structure of the extracted WGSL structs and groups. * @category rendering * @advanced */ export interface StructsAndGroups { groups: { group: number; binding: number; name: string; isUniform: boolean; type: string; }[]; structs: { name: s...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/generateGpuLayoutGroups.ts
src/rendering/renderers/gpu/shader/utils/generateGpuLayoutGroups.ts
import { ShaderStage } from '../../../shared/shader/const'; import type { ProgramPipelineLayoutDescription } from '../GpuProgram'; import type { StructsAndGroups } from './extractStructAndGroups'; /** * @param root0 * @param root0.groups * @internal */ export function generateGpuLayoutGroups({ groups }: StructsAn...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/createUboSyncFunctionWGSL.ts
src/rendering/renderers/gpu/shader/utils/createUboSyncFunctionWGSL.ts
import { createUboSyncFunction } from '../../../shared/shader/utils/createUboSyncFunction'; import { uboSyncFunctionsWGSL } from '../../../shared/shader/utils/uboSyncFunctions'; import { generateArraySyncWGSL } from './generateArraySyncWGSL'; import type { UboElement, UniformsSyncCallback } from '../../../shared/shade...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/generateArraySyncWGSL.ts
src/rendering/renderers/gpu/shader/utils/generateArraySyncWGSL.ts
import { WGSL_ALIGN_SIZE_DATA } from './createUboElementsWGSL'; import type { UboElement } from '../../../shared/shader/types'; /** * This generates a function that will sync an array to the uniform buffer * following the wgsl layout * @param uboElement - the element to generate the array sync for * @param offset...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/extractAttributesFromGpuProgram.ts
src/rendering/renderers/gpu/shader/utils/extractAttributesFromGpuProgram.ts
import { getAttributeInfoFromFormat } from '../../../shared/geometry/utils/getAttributeInfoFromFormat'; import type { ExtractedAttributeData } from '../../../gl/shader/program/extractAttributesFromGlProgram'; import type { VertexFormat } from '../../../shared/geometry/const'; import type { ProgramSource } from '../Gpu...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/createUboElementsWGSL.ts
src/rendering/renderers/gpu/shader/utils/createUboElementsWGSL.ts
import type { UboElement, UboLayout, UNIFORM_TYPES, UniformData } from '../../../shared/shader/types'; /** @internal */ export const WGSL_ALIGN_SIZE_DATA: Record<UNIFORM_TYPES | string, {align: number, size: number}> = { i32: { align: 4, size: 4 }, u32: { align: 4, size: 4 }, f32: { align: 4, size: 4 }, ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/generateLayoutHash.ts
src/rendering/renderers/gpu/shader/utils/generateLayoutHash.ts
import type { ProgramLayout } from '../GpuProgram'; import type { StructsAndGroups } from './extractStructAndGroups'; /** * @param root0 * @param root0.groups * @internal */ export function generateLayoutHash({ groups }: StructsAndGroups): ProgramLayout { const layout: ProgramLayout = []; for (let i = 0; ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/__tests__/createUboElementsWGSL.test.ts
src/rendering/renderers/gpu/shader/utils/__tests__/createUboElementsWGSL.test.ts
import { createUboElementsWGSL } from '../createUboElementsWGSL'; import type { UniformData } from '~/rendering'; describe('createUboElementsWGSL', () => { it('do the things', async () => { const toTest = [ { values: ['mat3x3<f32>', 'vec3<f32>'], expected: {...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/shader/utils/__tests__/extractAttributesFromGpuProgram.test.ts
src/rendering/renderers/gpu/shader/utils/__tests__/extractAttributesFromGpuProgram.test.ts
import { extractAttributesFromGpuProgram } from '../extractAttributesFromGpuProgram'; const shaderCode = ` struct VSOutput { @builtin(position) position: vec4<f32>, @location(0) color : vec3<f32>, @location(1) uv : vec2<f32>, }; @vertex fn mainVert( @location(0) aPosition : vec2<f32>, @location(...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/texture/GpuTextureSystem.ts
src/rendering/renderers/gpu/texture/GpuTextureSystem.ts
import { DOMAdapter } from '../../../../environment/adapter'; import { ExtensionType } from '../../../../extensions/Extensions'; import { type GPUData } from '../../../../scene/view/ViewContainer'; import { GCManagedHash } from '../../../../utils/data/GCManagedHash'; import { UniformGroup } from '../../shared/shader/Un...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/texture/uploaders/gpuUploadBufferImageResource.ts
src/rendering/renderers/gpu/texture/uploaders/gpuUploadBufferImageResource.ts
import type { BufferImageSource } from '../../../shared/texture/sources/BufferImageSource'; import type { GPU } from '../../GpuDeviceSystem'; import type { GpuTextureUploader } from './GpuTextureUploader'; /** @internal */ export const gpuUploadBufferImageResource = { type: 'image', upload(source: BufferImag...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false