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 |
|---|---|---|---|---|---|---|---|---|
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/assets/detections/utils/testVideoFormat.ts | src/assets/detections/utils/testVideoFormat.ts | /* eslint-disable no-restricted-globals */
const inWorker = 'WorkerGlobalScope' in globalThis
&& globalThis instanceof (globalThis as any).WorkerGlobalScope;
/**
* @param mimeType
* @internal
*/
export function testVideoFormat(mimeType: string): boolean
{
if (inWorker)
{
return false;
}
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/assets/detections/utils/testImageFormat.ts | src/assets/detections/utils/testImageFormat.ts | /**
* @param imageData
* @internal
*/
export async function testImageFormat(imageData: string): Promise<boolean>
{
// Some browsers currently do not support createImageBitmap with Blob, so new Image() is preferred when exist.
// See https://caniuse.com/createimagebitmap for more information.
if ('Image'... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/assets/detections/parsers/detectAvif.ts | src/assets/detections/parsers/detectAvif.ts | import { ExtensionType } from '../../../extensions/Extensions';
import { testImageFormat } from '../utils/testImageFormat';
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the AVIF image format.
* @category assets
* @internal
*/
export const detectAvif: FormatDetection... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/assets/detections/parsers/detectWebp.ts | src/assets/detections/parsers/detectWebp.ts | import { ExtensionType } from '../../../extensions/Extensions';
import { testImageFormat } from '../utils/testImageFormat';
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the WebP image format.
* @category assets
* @internal
*/
export const detectWebp = {
extensio... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/assets/detections/parsers/detectWebm.ts | src/assets/detections/parsers/detectWebm.ts | import { ExtensionType } from '../../../extensions/Extensions';
import { testVideoFormat } from '../utils/testVideoFormat';
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the WebM video format.
* @category assets
* @internal
*/
export const detectWebm = {
extensio... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/assets/detections/parsers/detectMp4.ts | src/assets/detections/parsers/detectMp4.ts | import { ExtensionType } from '../../../extensions/Extensions';
import { testVideoFormat } from '../utils/testVideoFormat';
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the MP4 video format.
* @category assets
* @internal
*/
export const detectMp4 = {
extension:... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/assets/detections/parsers/detectDefaults.ts | src/assets/detections/parsers/detectDefaults.ts | import { ExtensionType } from '../../../extensions/Extensions';
import type { FormatDetectionParser } from '../types';
const imageFormats = ['png', 'jpg', 'jpeg'];
/**
* Adds some default image formats to the detection parser
* @category assets
* @internal
*/
export const detectDefaults = {
extension: {
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/assets/detections/parsers/detectOgv.ts | src/assets/detections/parsers/detectOgv.ts | import { ExtensionType } from '../../../extensions/Extensions';
import { testVideoFormat } from '../utils/testVideoFormat';
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the OGV video format.
* @category assets
* @internal
*/
export const detectOgv = {
extension:... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/dom/init.ts | src/dom/init.ts | import { extensions } from '../extensions/Extensions';
import { DOMPipe } from './DOMPipe';
export * from './index';
extensions.add(DOMPipe);
| typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/dom/DOMPipe.ts | src/dom/DOMPipe.ts | /* eslint-disable no-restricted-globals */
import { ExtensionType } from '../extensions/Extensions';
import { CanvasObserver } from './CanvasObserver';
import { type DOMContainer } from './DOMContainer';
import type { InstructionSet } from '../rendering/renderers/shared/instructions/InstructionSet';
import type { Rend... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/dom/CanvasObserver.ts | src/dom/CanvasObserver.ts | import { type Renderer } from '../rendering/renderers/types';
import { UPDATE_PRIORITY } from '../ticker/const';
import { Ticker } from '../ticker/Ticker';
/**
* CanvasObserver class synchronizes the DOM element's transform with the canvas size and position.
* It uses ResizeObserver for efficient updates and request... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/dom/index.ts | src/dom/index.ts | // Auto-generated code, do not edit manually
export * from './CanvasObserver';
export * from './DOMContainer';
export * from './DOMPipe';
| typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/dom/DOMMixins.d.ts | src/dom/DOMMixins.d.ts | declare global
{
namespace PixiMixins
{
interface RendererPipes
{
dom: import('./DOMPipe').DOMPipe;
}
}
}
export {};
| typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/dom/DOMContainer.ts | src/dom/DOMContainer.ts | /* eslint-disable no-restricted-globals */
import { Point } from '../maths/point/Point';
import { ViewContainer, type ViewContainerOptions } from '../scene/view/ViewContainer';
import type { PointData } from '../maths/point/PointData';
/**
* Options for configuring a {@link DOMContainer}.
* Controls how DOM element... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/dom/__tests__/DOMContainer.test.ts | src/dom/__tests__/DOMContainer.test.ts | import { DOMContainer } from '../DOMContainer';
import { getApp } from '@test-utils';
import { Point } from '~/maths/point/Point';
describe('DOMContainer', () =>
{
let domContainer: DOMContainer;
beforeEach(() =>
{
domContainer = new DOMContainer();
});
afterEach(() =>
{
domCo... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/FederatedEventMap.ts | src/events/FederatedEventMap.ts | import type { FederatedPointerEvent } from './FederatedPointerEvent';
import type { FederatedWheelEvent } from './FederatedWheelEvent';
/**
* The types for the events that can be emitted by a Container
* @category events
* @advanced
*/
export type FederatedEventMap = {
click: FederatedPointerEvent;
mousedo... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/EventsMixins.d.ts | src/events/EventsMixins.d.ts | import type { FederatedEventEmitterTypes } from './FederatedEventMap';
import type { FederatedOptions, IFederatedContainer } from './FederatedEventTarget';
declare global
{
namespace PixiMixins
{
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface Container extends IF... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/init.ts | src/events/init.ts | import { extensions } from '../extensions/Extensions';
import { Container } from '../scene/container/Container';
import { EventSystem } from './EventSystem';
import { FederatedContainer } from './FederatedEventTarget';
extensions.add(EventSystem);
extensions.mixin(Container, FederatedContainer);
| typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/FederatedEventTarget.ts | src/events/FederatedEventTarget.ts | import { EventSystem } from './EventSystem';
import { FederatedEvent } from './FederatedEvent';
import type EventEmitter from 'eventemitter3';
import type { Container } from '../scene/container/Container';
import type { AllFederatedEventMap } from './FederatedEventMap';
import type { FederatedPointerEvent } from './Fe... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | true |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/EventTicker.ts | src/events/EventTicker.ts | import { UPDATE_PRIORITY } from '../ticker/const';
import { Ticker } from '../ticker/Ticker';
import type { EventSystem } from './EventSystem';
/** @advanced */
class EventsTickerClass
{
/** The event system. */
public events: EventSystem;
/** The DOM element to listen to events on. */
public domEleme... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/EventBoundary.ts | src/events/EventBoundary.ts | import EventEmitter from 'eventemitter3';
import { Point } from '../maths/point/Point';
import { warn } from '../utils/logging/warn';
import { EventsTicker } from './EventTicker';
import { FederatedMouseEvent } from './FederatedMouseEvent';
import { FederatedPointerEvent } from './FederatedPointerEvent';
import { Feder... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | true |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/deprecatedTypes.ts | src/events/deprecatedTypes.ts | import type EventEmitter from 'eventemitter3';
import type { EventMode, FederatedOptions } from './FederatedEventTarget';
/**
* A simplified shape of an interactive object for the `eventTarget` property of a {@link FederatedEvent}
* @category events
* @deprecated since 8.1.4
* @internal
*/
export interface Federa... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/FederatedEvent.ts | src/events/FederatedEvent.ts | import { Point } from '../maths/point/Point';
import type { Container } from '../scene/container/Container';
import type { EventBoundary } from './EventBoundary';
/**
* A PixiJS compatible touch event interface that extends the standard DOM Touch interface.
* Provides additional properties to normalize touch input ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/EventSystem.ts | src/events/EventSystem.ts | import { ExtensionType } from '../extensions/Extensions';
import { EventBoundary } from './EventBoundary';
import { EventsTicker } from './EventTicker';
import { FederatedPointerEvent } from './FederatedPointerEvent';
import { FederatedWheelEvent } from './FederatedWheelEvent';
import type { ExtensionMetadata } from '... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | true |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/FederatedPointerEvent.ts | src/events/FederatedPointerEvent.ts | import { FederatedMouseEvent } from './FederatedMouseEvent';
/**
* A specialized event class for pointer interactions in PixiJS applications.
* Extends {@link FederatedMouseEvent} to provide advanced pointer-specific features
* while maintaining compatibility with the DOM PointerEvent interface.
*
* Key features:... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/FederatedMouseEvent.ts | src/events/FederatedMouseEvent.ts | import { Point } from '../maths/point/Point';
import { FederatedEvent } from './FederatedEvent';
import type { PointData } from '../maths/point/PointData';
import type { Container } from '../scene/container/Container';
import type { PixiTouch } from './FederatedEvent';
/**
* A specialized event class for mouse inter... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/index.ts | src/events/index.ts | // Auto-generated code, do not edit manually
export * from './deprecatedTypes';
export * from './EventBoundary';
export * from './EventBoundaryTypes';
export * from './EventSystem';
export * from './EventTicker';
export * from './FederatedEvent';
export * from './FederatedEventMap';
export * from './FederatedEventTarge... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/EventBoundaryTypes.ts | src/events/EventBoundaryTypes.ts | import type { Container } from '../scene/container/Container';
/**
* The tracking data for each pointer held in the state of an {@link EventBoundary}.
*
* ```ts
* pressTargetsByButton: {
* [id: number]: Container[];
* };
* clicksByButton: {
* [id: number]: {
* clickCount: number;
* ta... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/FederatedWheelEvent.ts | src/events/FederatedWheelEvent.ts | import { FederatedMouseEvent } from './FederatedMouseEvent';
/**
* A specialized event class for wheel/scroll interactions in PixiJS applications.
* Extends {@link FederatedMouseEvent} to provide wheel-specific properties while
* maintaining compatibility with the DOM WheelEvent interface.
*
* Key features:
* - ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/__tests__/EventSystem.test.ts | src/events/__tests__/EventSystem.test.ts | import { setTimeout } from 'timers/promises';
import '~/scene/graphics/init';
import { EventSystem } from '../EventSystem';
import '../init';
import { getApp, getWebGLRenderer } from '@test-utils';
import { Rectangle } from '~/maths';
import { Container, Graphics } from '~/scene';
import type { RendererOptions } from ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | true |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/events/__tests__/EventBoundary.test.ts | src/events/__tests__/EventBoundary.test.ts | import { EventBoundary } from '../EventBoundary';
import { FederatedPointerEvent } from '../FederatedPointerEvent';
import { getApp } from '@test-utils';
import { Container, Graphics } from '~/scene';
function graphicsWithRect(x: number, y: number, width: number, height: number)
{
const graphics = new Graphics();
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/FilterSystem.ts | src/filters/FilterSystem.ts | import { ExtensionType } from '../extensions/Extensions';
import { PassthroughFilter } from '../filters/defaults/passthrough/PassthroughFilter';
import { Matrix } from '../maths/matrix/Matrix';
import { type Rectangle } from '../maths/shapes/Rectangle';
import { BindGroup } from '../rendering/renderers/gpu/shader/BindG... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | true |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/init.ts | src/filters/init.ts | import { extensions } from '../extensions/Extensions';
import { FilterPipe } from './FilterPipe';
import { FilterSystem } from './FilterSystem';
extensions.add(FilterSystem);
extensions.add(FilterPipe);
| typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/FilterMixins.d.ts | src/filters/FilterMixins.d.ts | declare global
{
namespace PixiMixins
{
interface RendererSystems
{
filter: import('./FilterSystem').FilterSystem;
}
interface RendererPipes
{
filter: import('./FilterPipe').FilterPipe;
}
}
}
export {};
| typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/FilterPipe.ts | src/filters/FilterPipe.ts | import { ExtensionType } from '../extensions/Extensions';
import type { InstructionSet } from '../rendering/renderers/shared/instructions/InstructionSet';
import type { InstructionPipe } from '../rendering/renderers/shared/instructions/RenderPipe';
import type { Renderer } from '../rendering/renderers/types';
import t... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/FilterEffect.ts | src/filters/FilterEffect.ts | import type { Rectangle } from '../maths/shapes/Rectangle';
import type { Effect } from '../scene/container/Effect';
import type { Filter } from './Filter';
/**
* A filter effect is an effect that can be applied to a container that involves applying special pixel effects
* to that container as it is rendered. Used i... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/Filter.ts | src/filters/Filter.ts | import { GlProgram } from '../rendering/renderers/gl/shader/GlProgram';
import { GpuProgram } from '../rendering/renderers/gpu/shader/GpuProgram';
import { Shader } from '../rendering/renderers/shared/shader/Shader';
import { State } from '../rendering/renderers/shared/state/State';
import type { RenderSurface } from ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/index.ts | src/filters/index.ts | // Auto-generated code, do not edit manually
export * from './blend-modes/BlendModeFilter';
export * from './blend-modes/hls/GLhls';
export * from './blend-modes/hls/GPUhls';
export * from './defaults/alpha/AlphaFilter';
export * from './defaults/blur/BlurFilter';
export * from './defaults/blur/BlurFilterPass';
export ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/displacement/DisplacementFilter.ts | src/filters/defaults/displacement/DisplacementFilter.ts | import { Matrix } from '../../../maths/matrix/Matrix';
import { Point } from '../../../maths/point/Point';
import { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';
import { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';
import { UniformGroup } from '../../../rendering/rende... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/displacement/__tests__/DisplacementFilter.test.ts | src/filters/defaults/displacement/__tests__/DisplacementFilter.test.ts | import { DisplacementFilter } from '../DisplacementFilter';
import { Texture } from '~/rendering';
import { Sprite } from '~/scene';
describe('DisplacementFilter', () =>
{
it('should construct filter', () =>
{
const sprite = new Sprite(Texture.WHITE);
const filter = new DisplacementFilter({
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/color-matrix/ColorMatrixFilter.ts | src/filters/defaults/color-matrix/ColorMatrixFilter.ts | import { Color } from '../../../color/Color';
import { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';
import { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';
import { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';
import { Filter } from '../... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | true |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/color-matrix/__tests__/ColorMatrixFilter.test.ts | src/filters/defaults/color-matrix/__tests__/ColorMatrixFilter.test.ts | import { ColorMatrixFilter } from '../ColorMatrixFilter';
describe('ColorMatrixFilter', () =>
{
it('should construct filter', () =>
{
const filter = new ColorMatrixFilter();
expect(filter).toBeInstanceOf(ColorMatrixFilter);
expect(filter.alpha).toEqual(1);
filter.alpha = 0.5;
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/passthrough/PassthroughFilter.ts | src/filters/defaults/passthrough/PassthroughFilter.ts | import { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';
import { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';
import { Filter } from '../../Filter';
import vertex from '../defaultFilter.vert';
import fragment from './passthrough.frag';
import source from './passthrough.w... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/alpha/AlphaFilter.ts | src/filters/defaults/alpha/AlphaFilter.ts | import { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';
import { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';
import { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';
import { Filter } from '../../Filter';
import vertex from '../defaultFilt... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/alpha/__tests__/AlphaFilter.test.ts | src/filters/defaults/alpha/__tests__/AlphaFilter.test.ts | import { AlphaFilter } from '../AlphaFilter';
describe('AlphaFilter', () =>
{
it('should construct filter', () =>
{
const filter = new AlphaFilter();
expect(filter).toBeInstanceOf(AlphaFilter);
expect(filter.alpha).toEqual(1);
filter.destroy();
});
it('should allow al... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/noise/NoiseFilter.ts | src/filters/defaults/noise/NoiseFilter.ts | import { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram';
import { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram';
import { UniformGroup } from '../../../rendering/renderers/shared/shader/UniformGroup';
import { Filter } from '../../Filter';
import vertex from '../defaultFilt... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/blur/const.ts | src/filters/defaults/blur/const.ts | interface IGAUSSIAN_VALUES
{
[x: number]: number[];
}
/** @internal */
export const GAUSSIAN_VALUES: IGAUSSIAN_VALUES = {
5: [0.153388, 0.221461, 0.250301],
7: [0.071303, 0.131514, 0.189879, 0.214607],
9: [0.028532, 0.067234, 0.124009, 0.179044, 0.20236],
11: [0.0093, 0.028002, 0.065984, 0.121703, ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/blur/BlurFilter.ts | src/filters/defaults/blur/BlurFilter.ts | import { TexturePool } from '../../../rendering/renderers/shared/texture/TexturePool';
import { RendererType } from '../../../rendering/renderers/types';
import { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';
import { Filter } from '../../Filter';
import { BlurFilterPass } from './BlurFilterPass';
i... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/blur/BlurFilterPass.ts | src/filters/defaults/blur/BlurFilterPass.ts | import { TexturePool } from '../../../rendering/renderers/shared/texture/TexturePool';
import { RendererType } from '../../../rendering/renderers/types';
import { Filter } from '../../Filter';
import { generateBlurGlProgram } from './gl/generateBlurGlProgram';
import { generateBlurProgram } from './gpu/generateBlurProg... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/blur/gpu/generateBlurProgram.ts | src/filters/defaults/blur/gpu/generateBlurProgram.ts | import { GpuProgram } from '../../../../rendering/renderers/gpu/shader/GpuProgram';
import { GAUSSIAN_VALUES } from '../const';
import source from './blur-template.wgsl';
/**
* @internal
* @param horizontal - Whether to generate a horizontal or vertical blur program.
* @param kernelSize - The size of the kernel.
*... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/blur/__tests__/BlurFilter.test.ts | src/filters/defaults/blur/__tests__/BlurFilter.test.ts | import { BlurFilter } from '../BlurFilter';
describe('BlurFilter', () =>
{
it('should construct filter', () =>
{
const filter = new BlurFilter();
expect(filter).toBeInstanceOf(BlurFilter);
expect(filter.strength).toEqual(8);
expect(filter.strengthX).toEqual(8);
expect(f... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/blur/gl/generateBlurFragSource.ts | src/filters/defaults/blur/gl/generateBlurFragSource.ts | import { GAUSSIAN_VALUES } from '../const';
const fragTemplate = [
'in vec2 vBlurTexCoords[%size%];',
'uniform sampler2D uTexture;',
'out vec4 finalColor;',
'void main(void)',
'{',
' finalColor = vec4(0.0);',
' %blur%',
'}',
].join('\n');
/**
* @internal
* @param kernelSize -... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/blur/gl/generateBlurGlProgram.ts | src/filters/defaults/blur/gl/generateBlurGlProgram.ts | import { GlProgram } from '../../../../rendering/renderers/gl/shader/GlProgram';
import { generateBlurFragSource } from './generateBlurFragSource';
import { generateBlurVertSource } from './generateBlurVertSource';
/**
* @internal
* @param horizontal - Whether to generate a horizontal or vertical blur program.
* @p... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/defaults/blur/gl/generateBlurVertSource.ts | src/filters/defaults/blur/gl/generateBlurVertSource.ts | const vertTemplate = `
in vec2 aPosition;
uniform float uStrength;
out vec2 vBlurTexCoords[%size%];
uniform vec4 uInputSize;
uniform vec4 uOutputFrame;
uniform vec4 uOutputTexture;
vec4 filterVertexPosition( void )
{
vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/mask/MaskFilter.ts | src/filters/mask/MaskFilter.ts | import { Matrix } from '../../maths/matrix/Matrix';
import { GlProgram } from '../../rendering/renderers/gl/shader/GlProgram';
import { GpuProgram } from '../../rendering/renderers/gpu/shader/GpuProgram';
import { UniformGroup } from '../../rendering/renderers/shared/shader/UniformGroup';
import { TextureMatrix } from ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/__tests__/FilterEffect.test.ts | src/filters/__tests__/FilterEffect.test.ts | import { AlphaFilter } from '../defaults/alpha/AlphaFilter';
import { NoiseFilter } from '../defaults/noise/NoiseFilter';
import { Container } from '~/scene';
import type { FilterEffect } from '../FilterEffect';
describe('FilterEffect', () =>
{
it('should set filter effects correctly', async () =>
{
c... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/blend-modes/BlendModeFilter.ts | src/filters/blend-modes/BlendModeFilter.ts | import { GlProgram } from '../../rendering/renderers/gl/shader/GlProgram';
import { GpuProgram } from '../../rendering/renderers/gpu/shader/GpuProgram';
import { UniformGroup } from '../../rendering/renderers/shared/shader/UniformGroup';
import { Texture } from '../../rendering/renderers/shared/texture/Texture';
import... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/blend-modes/hls/GPUhls.ts | src/filters/blend-modes/hls/GPUhls.ts | /**
* A helper object containing the hsl shader code for wgsl
* @internal
*/
export const hslgpu = `
fn getLuminosity(c: vec3<f32>) -> f32
{
return 0.3*c.r + 0.59*c.g + 0.11*c.b;
}
fn setLuminosity(c: vec3<f32>, lum: f32) -> vec3<f32>
{
var modLum: f32 = lum - getLuminosity(c);
var color: vec3<f32> = c.r... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/filters/blend-modes/hls/GLhls.ts | src/filters/blend-modes/hls/GLhls.ts | /**
* A helper object containing the hsl shader code for both glsl
* @internal
*/
export const hslgl = `
float getLuminosity(vec3 c) {
return 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;
}
vec3 setLuminosity(vec3 c, float lum) {
float modLum = lum - getLuminosity(c);
vec3 color = c.rgb + vec3(modLum);
// clip b... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment/adapter.ts | src/environment/adapter.ts | import { BrowserAdapter } from '../environment-browser/BrowserAdapter';
import { type ImageLike } from './ImageLike';
import type { ICanvas } from './canvas/ICanvas';
import type { ICanvasRenderingContext2D } from './canvas/ICanvasRenderingContext2D';
/**
* This interface describes all the DOM dependent calls that P... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment/autoDetectEnvironment.ts | src/environment/autoDetectEnvironment.ts | import { extensions, ExtensionType } from '../extensions/Extensions';
const environments: { name: string; value: { test: () => boolean; load: () => Promise<boolean> } }[] = [];
extensions.handleByNamedList(ExtensionType.Environment, environments);
/**
* Automatically detects the environment and loads the appropriat... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment/ImageLike.ts | src/environment/ImageLike.ts | /**
* Interface for HTMLImageElement.
* @category environment
* @advanced
*/
export interface ImageLike extends EventTarget
{
/** Whether or not the image has completely loaded. */
readonly complete: boolean;
/** The Cross-Origin Resource Sharing (CORS) setting to use when retrieving the image. */
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment/index.ts | src/environment/index.ts | // Auto-generated code, do not edit manually
export * from './adapter';
export * from './autoDetectEnvironment';
export * from './canvas/ICanvas';
export * from './canvas/ICanvasRenderingContext2D';
export * from './ImageLike';
| typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment/canvas/ICanvas.ts | src/environment/canvas/ICanvas.ts | import type { ICanvasRenderingContext2D } from './ICanvasRenderingContext2D';
/**
* The context identifiers for the canvas.
* These identifiers are used to specify the type of rendering context to create.
* @category environment
* @advanced
*/
export type ContextIds = '2d'
| 'bitmaprenderer'
| 'webgl'
| 'experime... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment/canvas/ICanvasRenderingContext2D.ts | src/environment/canvas/ICanvasRenderingContext2D.ts | import { type ImageLike } from '../ImageLike';
import type { ICanvas } from './ICanvas';
/**
* Common interface for CanvasRenderingContext2D, OffscreenCanvasRenderingContext2D, and other custom canvas 2D context.
* @category environment
* @advanced
*/
export interface ICanvasRenderingContext2D extends
CanvasS... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment-webworker/webworkerAll.ts | src/environment-webworker/webworkerAll.ts | import '../app/init';
import '../spritesheet/init';
import '../rendering/init';
import '../scene/graphics/init';
import '../scene/mesh/init';
import '../scene/particle-container/init';
import '../scene/text/init';
import '../scene/text-bitmap/init';
import '../scene/text-html/init';
import '../scene/sprite-tiling/init'... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment-webworker/webworkerExt.ts | src/environment-webworker/webworkerExt.ts | import { ExtensionType } from '../extensions/Extensions';
/**
* Extension for the webworker environment.
* @category environment
* @internal
*/
export const webworkerExt = {
extension: {
type: ExtensionType.Environment,
name: 'webworker',
priority: 0,
},
test: () => typeof self ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment-webworker/index.ts | src/environment-webworker/index.ts | // Auto-generated code, do not edit manually
export * from './WebWorkerAdapter';
export * from './webworkerExt';
| typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/environment-webworker/WebWorkerAdapter.ts | src/environment-webworker/WebWorkerAdapter.ts | /* eslint-disable no-restricted-globals */
import { type Adapter } from '../environment/adapter';
import { type ImageLike } from '../environment/ImageLike';
import { DOMParser } from '@xmldom/xmldom';
/**
* This is an implementation of the {@link Adapter} interface.
* It can be used to make Pixi work in a Web Worker... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/index.ts | src/maths/index.ts | // Auto-generated code, do not edit manually
export * from './matrix/groupD8';
export * from './matrix/Matrix';
export * from './misc/const';
export * from './misc/pow2';
export * from './misc/Size';
export * from './misc/squaredDistanceToLineSegment';
export * from './point/ObservablePoint';
export * from './point/Poi... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/misc/const.ts | src/maths/misc/const.ts | /**
* Two Pi.
* @type {number}
* @category maths
* @standard
*/
export const PI_2 = Math.PI * 2;
/**
* Conversion factor for converting radians to degrees.
* @type {number} RAD_TO_DEG
* @category maths
* @standard
*/
export const RAD_TO_DEG = 180 / Math.PI;
/**
* Conversion factor for converting degrees to... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/misc/Size.ts | src/maths/misc/Size.ts | /**
* Defines a size with a width and a height.
* @category maths
* @standard
*/
export interface Size
{
/** The width. */
width: number;
/** The height. */
height: number;
}
| typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/misc/squaredDistanceToLineSegment.ts | src/maths/misc/squaredDistanceToLineSegment.ts | /**
* Calculates the squared distance from a point to a line segment defined by two endpoints.
* @param x - x coordinate of the point
* @param y - y coordinate of the point
* @param x1 - x coordinate of the first endpoint of the line segment
* @param y1 - y coordinate of the first endpoint of the line segment
* @... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/misc/pow2.ts | src/maths/misc/pow2.ts | // Taken from the bit-twiddle package
/**
* Rounds to next power of two.
* @function nextPow2
* @param {number} v - input value
* @returns {number} - next rounded power of two
* @category maths
* @advanced
*/
export function nextPow2(v: number): number
{
v += v === 0 ? 1 : 0;
--v;
v |= v >>> 1;
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/matrix/groupD8.ts | src/maths/matrix/groupD8.ts | // Your friendly neighbour https://en.wikipedia.org/wiki/Dihedral_group
//
// This file implements the dihedral group of order 16, also called
// of degree 8. That's why its called groupD8.
import { type RectangleLike } from '../../culling/Culler';
import { type Rectangle } from '../shapes/Rectangle';
import { Matrix ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/matrix/Matrix.ts | src/maths/matrix/Matrix.ts | /* eslint-disable @typescript-eslint/no-use-before-define */
import { PI_2 } from '../misc/const';
import { Point } from '../point/Point';
import type { PointData } from '../point/PointData';
/**
* The data structure that contains the position, scale, pivot, skew and rotation of an object.
* This is used by the {@l... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/Matrix.test.ts | src/maths/__tests__/Matrix.test.ts | import { Matrix } from '../matrix/Matrix';
import { Transform } from '~/utils';
describe('Matrix', () =>
{
it('should create a new matrix', () =>
{
const matrix = new Matrix();
expect(matrix.a).toEqual(1);
expect(matrix.b).toEqual(0);
expect(matrix.c).toEqual(0);
expect... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/RoundedRectangle.test.ts | src/maths/__tests__/RoundedRectangle.test.ts | import { RoundedRectangle } from '../shapes/RoundedRectangle';
describe('RoundedRectangle', () =>
{
it('should create a new rounded rectangle', () =>
{
const rrect = new RoundedRectangle(5, 5, 1, 1);
expect(rrect.x).toEqual(5);
expect(rrect.y).toEqual(5);
expect(rrect.width).to... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/Transform.test.ts | src/maths/__tests__/Transform.test.ts | import { Transform } from '~/utils';
describe('Transform', () =>
{
describe('setFromMatrix', () =>
{
it('should decompose negative scale into rotation', () =>
{
const eps = 1e-3;
const transform = new Transform();
// const parent = new Transform();
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/Point.test.ts | src/maths/__tests__/Point.test.ts | import { Point } from '../point/Point';
describe('Point', () =>
{
it('should create a new point', () =>
{
const pt = new Point();
expect(pt.x).toEqual(0);
expect(pt.y).toEqual(0);
});
it('should clone a new point', () =>
{
const p1 = new Point(10, 20);
exp... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/ObservablePoint.test.ts | src/maths/__tests__/ObservablePoint.test.ts | import { ObservablePoint } from '../point/ObservablePoint';
describe('ObservablePoint', () =>
{
it('should create a new observable point', () =>
{
const cb = { _onUpdate: jest.fn() };
const pt = new ObservablePoint(cb);
expect(pt.x).toEqual(0);
expect(pt.y).toEqual(0);
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/groupD8.test.ts | src/maths/__tests__/groupD8.test.ts | import { groupD8 } from '../matrix/groupD8';
import { Rectangle } from '../shapes/Rectangle';
describe('groupD8', () =>
{
describe('transformRectCoords', () =>
{
const rect = { x: 10, y: 20, width: 30, height: 40 };
const sourceFrame = { x: 5, y: 15, width: 100, height: 150 };
it('shou... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/Ellipse.test.ts | src/maths/__tests__/Ellipse.test.ts | import { Ellipse } from '../shapes/Ellipse';
describe('Ellipse', () =>
{
it('should create a new ellipse', () =>
{
const ellipse1 = new Ellipse();
expect(ellipse1.x).toEqual(0);
expect(ellipse1.y).toEqual(0);
expect(ellipse1.halfWidth).toEqual(0);
expect(ellipse1.halfHe... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/Circle.test.ts | src/maths/__tests__/Circle.test.ts | import { Circle } from '../shapes/Circle';
describe('Circle', () =>
{
it('should create a new circle', () =>
{
const circ1 = new Circle();
expect(circ1.x).toEqual(0);
expect(circ1.y).toEqual(0);
expect(circ1.radius).toEqual(0);
const circ2 = new Circle(10, 10, 5);
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/Polygon.test.ts | src/maths/__tests__/Polygon.test.ts | import { Point } from '../point/Point';
import { Polygon } from '../shapes/Polygon';
describe('Polygon', () =>
{
describe('constructor', () =>
{
it('should accept a spread of values', () =>
{
const polygon = new Polygon(0, 0, 10, 0, 0, 10);
expect(polygon.points).toHave... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/__tests__/Rectangle.test.ts | src/maths/__tests__/Rectangle.test.ts | import { Matrix } from '../matrix/Matrix';
import { Rectangle } from '../shapes/Rectangle';
describe('Rectangle', () =>
{
it('should create a new rectangle', () =>
{
const rect = new Rectangle(5, 5, 1, 1);
expect(rect.left).toEqual(5);
expect(rect.top).toEqual(5);
expect(rect.r... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/point/ObservablePoint.ts | src/maths/point/ObservablePoint.ts | import type { PointData } from './PointData';
import type { PointLike } from './PointLike';
// eslint-disable-next-line max-len
// eslint-disable-next-line @typescript-eslint/no-empty-object-type, requireExport/require-export-jsdoc, requireMemberAPI/require-member-api-doc
export interface ObservablePoint extends PixiM... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/point/PointData.ts | src/maths/point/PointData.ts | /**
* Common interface for points. Both Point and ObservablePoint implement it.
* Provides a standard way to represent 2D coordinates.
*
* Many PixiJS methods accept PointData for transformations,
* making it easy to work with different point types interchangeably.
* @example
* ```ts
* // Create an object imple... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/point/PointLike.ts | src/maths/point/PointLike.ts | import type { PointData } from './PointData';
/**
* Common interface for points with manipulation methods.
*
* Extends PointData to add operations for copying, comparison and setting values.
* @example
* ```ts
* // Basic point manipulation
* const point: PointLike = new Point(10, 20);
* point.set(30, 40);
*
... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/point/pointInTriangle.ts | src/maths/point/pointInTriangle.ts | /**
* Check if a point is inside a triangle.
* @param px - x coordinate of the point
* @param py - y coordinate of the point
* @param x1 - x coordinate of the first vertex of the triangle
* @param y1 - y coordinate of the first vertex of the triangle
* @param x2 - x coordinate of the second vertex of the triangle... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/point/Point.ts | src/maths/point/Point.ts | /* eslint-disable @typescript-eslint/no-use-before-define */
import type { PointData } from './PointData';
import type { PointLike } from './PointLike';
// eslint-disable-next-line max-len
// eslint-disable-next-line @typescript-eslint/no-empty-object-type, requireExport/require-export-jsdoc, requireMemberAPI/require-... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/shapes/ShapePrimitive.ts | src/maths/shapes/ShapePrimitive.ts | import type { SHAPE_PRIMITIVE } from '../misc/const';
import type { Rectangle } from './Rectangle';
/**
* A basic interface that defines common properties and methods for all Pixi shape primitives.
* Provides a standard API for shape manipulation, hit testing, and bounds calculation.
* @example
* ```ts
* // Imple... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/shapes/Triangle.ts | src/maths/shapes/Triangle.ts | import { squaredDistanceToLineSegment } from '../misc/squaredDistanceToLineSegment';
import { Rectangle } from './Rectangle';
import type { SHAPE_PRIMITIVE } from '../misc/const';
import type { ShapePrimitive } from './ShapePrimitive';
/**
* A class to define a shape of a triangle via user defined coordinates.
*
*... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/shapes/Circle.ts | src/maths/shapes/Circle.ts | import { Rectangle } from './Rectangle';
import type { SHAPE_PRIMITIVE } from '../misc/const';
import type { ShapePrimitive } from './ShapePrimitive';
/**
* The Circle object represents a circle shape in a two-dimensional coordinate system.
* Used for drawing graphics and specifying hit areas for containers.
* @ex... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/shapes/Rectangle.ts | src/maths/shapes/Rectangle.ts | // import { SHAPES } from '../const';
import { Point } from '../point/Point';
import type { Bounds } from '../../scene/container/bounds/Bounds';
import type { Matrix } from '../matrix/Matrix';
import type { SHAPE_PRIMITIVE } from '../misc/const';
import type { ShapePrimitive } from './ShapePrimitive';
const tempPoint... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/shapes/RoundedRectangle.ts | src/maths/shapes/RoundedRectangle.ts | import { type SHAPE_PRIMITIVE } from '../misc/const';
import { Rectangle } from './Rectangle';
import type { ShapePrimitive } from './ShapePrimitive';
const isCornerWithinStroke = (
pX: number,
pY: number,
cornerX: number,
cornerY: number,
radius: number,
strokeWidthInner: number,
strokeWi... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/shapes/Polygon.ts | src/maths/shapes/Polygon.ts | import { deprecation } from '../../utils/logging/deprecation';
import { squaredDistanceToLineSegment } from '../misc/squaredDistanceToLineSegment';
import { Rectangle } from './Rectangle';
import type { SHAPE_PRIMITIVE } from '../misc/const';
import type { PointData } from '../point/PointData';
import type { ShapePrim... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/maths/shapes/Ellipse.ts | src/maths/shapes/Ellipse.ts | import { Rectangle } from './Rectangle';
import type { ShapePrimitive } from './ShapePrimitive';
/**
* The Ellipse object is used to help draw graphics and can also be used to specify a hit area for containers.
* @example
* ```ts
* // Basic ellipse creation
* const ellipse = new Ellipse(100, 100, 20, 10);
*
* ... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
pixijs/pixijs | https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/culling/CullingMixins.d.ts | src/culling/CullingMixins.d.ts | declare global
{
namespace PixiMixins
{
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface Container extends Partial<import('./cullingMixin').CullingMixinConstructor> {}
// 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/culling/Culler.ts | src/culling/Culler.ts | import { Bounds } from '../scene/container/bounds/Bounds';
import { getGlobalBounds } from '../scene/container/bounds/getGlobalBounds';
import type { Container } from '../scene/container/Container';
const tempBounds = new Bounds();
/**
* A rectangle-like object that contains x, y, width, and height properties.
* @... | typescript | MIT | 98ea728fc887ea93a1131a61cac66ab4fc45eebe | 2026-01-04T15:41:01.429164Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.