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/rendering/renderers/gpu/texture/uploaders/gpuUploadVideoSource.ts
src/rendering/renderers/gpu/texture/uploaders/gpuUploadVideoSource.ts
import { gpuUploadImageResource } from './gpuUploadImageSource'; import type { VideoSource } from '../../../shared/texture/sources/VideoSource'; import type { GPU } from '../../GpuDeviceSystem'; import type { GpuTextureUploader } from './GpuTextureUploader'; /** @internal */ export const gpuUploadVideoResource = { ...
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/gpuUploadImageSource.ts
src/rendering/renderers/gpu/texture/uploaders/gpuUploadImageSource.ts
import { DOMAdapter } from '../../../../../environment/adapter'; import { warn } from '../../../../../utils/logging/warn'; import type { TextureSource } from '../../../shared/texture/sources/TextureSource'; import type { GPU } from '../../GpuDeviceSystem'; import type { GpuTextureUploader } from './GpuTextureUploader'...
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/gpuUploadCompressedTextureResource.ts
src/rendering/renderers/gpu/texture/uploaders/gpuUploadCompressedTextureResource.ts
import type { CompressedSource } from '../../../shared/texture/sources/CompressedSource'; import type { GPU } from '../../GpuDeviceSystem'; import type { GpuTextureUploader } from './GpuTextureUploader'; /** @internal */ export const blockDataMap: Record<string, {blockBytes: number, blockWidth: number, blockHeight: nu...
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/GpuTextureUploader.ts
src/rendering/renderers/gpu/texture/uploaders/GpuTextureUploader.ts
import type { TextureSource } from '../../../shared/texture/sources/TextureSource'; import type { GPU } from '../../GpuDeviceSystem'; /** @internal */ export interface GpuTextureUploader<T extends TextureSource = TextureSource> { type: string; upload(source: T, gpuTexture: GPUTexture, gpu: GPU): void; }
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/texture/utils/getSupportedGPUCompressedTextureFormats.ts
src/rendering/renderers/gpu/texture/utils/getSupportedGPUCompressedTextureFormats.ts
import { DOMAdapter } from '../../../../../environment/adapter'; import type { TEXTURE_FORMATS } from '../../../shared/texture/const'; let supportedGPUCompressedTextureFormats: TEXTURE_FORMATS[]; /** @internal */ export async function getSupportedGPUCompressedTextureFormats(): Promise<TEXTURE_FORMATS[]> { if (su...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/texture/utils/GpuMipmapGenerator.ts
src/rendering/renderers/gpu/texture/utils/GpuMipmapGenerator.ts
/** * A class which generates mipmaps for a GPUTexture. * Thanks to toji for the original implementation * https://github.com/toji/web-texture-tool/blob/main/src/webgpu-mipmap-generator.js * @category rendering * @ignore */ export class GpuMipmapGenerator { public device: GPUDevice; public sampler: GPUSam...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/renderTarget/GpuRenderTargetSystem.ts
src/rendering/renderers/gpu/renderTarget/GpuRenderTargetSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { RenderTargetSystem } from '../../shared/renderTarget/RenderTargetSystem'; import { GpuRenderTargetAdaptor } from './GpuRenderTargetAdaptor'; import type { WebGPURenderer } from '../WebGPURenderer'; import type { GpuRenderTarget } from './GpuRe...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/renderTarget/calculateProjection.ts
src/rendering/renderers/gpu/renderTarget/calculateProjection.ts
import type { Matrix } from '../../../../maths/matrix/Matrix'; /** * @param pm * @param x * @param y * @param width * @param height * @param flipY * @internal */ export function calculateProjection( pm: Matrix, x: number, y: number, width: number, height: number, flipY: boolean ): Matri...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/renderTarget/GpuRenderTarget.ts
src/rendering/renderers/gpu/renderTarget/GpuRenderTarget.ts
import type { TextureSource } from '../../shared/texture/sources/TextureSource'; /** * A class which holds the canvas contexts and textures for a render target. * @category rendering * @ignore */ export class GpuRenderTarget { public contexts: GPUCanvasContext[] = []; public msaaTextures: TextureSource[] =...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/renderTarget/GpuRenderTargetAdaptor.ts
src/rendering/renderers/gpu/renderTarget/GpuRenderTargetAdaptor.ts
import { CLEAR } from '../../gl/const'; import { CanvasSource } from '../../shared/texture/sources/CanvasSource'; import { TextureSource } from '../../shared/texture/sources/TextureSource'; import { GpuRenderTarget } from './GpuRenderTarget'; import type { RgbaArray } from '../../../../color/Color'; import type { Rect...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/buffer/GpuBufferSystem.ts
src/rendering/renderers/gpu/buffer/GpuBufferSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { type GPUData } from '../../../../scene/view/ViewContainer'; import { GCManagedHash } from '../../../../utils/data/GCManagedHash'; import { uid } from '../../../../utils/data/uid'; import { fastCopy } from '../../shared/buffer/utils/fastCopy'; ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/buffer/UboBatch.ts
src/rendering/renderers/gpu/buffer/UboBatch.ts
/** @internal */ export class UboBatch { public data: Float32Array; private readonly _minUniformOffsetAlignment: number = 256; public byteIndex = 0; constructor({ minUniformOffsetAlignment }: {minUniformOffsetAlignment: number}) { this._minUniformOffsetAlignment = minUniformOffsetAlignment...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gpu/pipeline/PipelineSystem.ts
src/rendering/renderers/gpu/pipeline/PipelineSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { warn } from '../../../../utils/logging/warn'; import { ensureAttributes } from '../../gl/shader/program/ensureAttributes'; import { STENCIL_MODES } from '../../shared/state/const'; import { createIdFromString } from '../../shared/utils/createId...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/RenderTargetSystem.test.ts
src/rendering/renderers/__tests__/RenderTargetSystem.test.ts
import { RenderTarget } from '../shared/renderTarget/RenderTarget'; import { getWebGLRenderer } from '@test-utils'; import type { WebGLRenderer } from '../gl/WebGLRenderer'; describe('RenderTargetSystem', () => { it('should return a render target for canvas elements', async () => { const renderer = aw...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/Shader.test.ts
src/rendering/renderers/__tests__/Shader.test.ts
import { Shader } from '../shared/shader/Shader'; import { getGlProgram } from '@test-utils'; describe('Shader', () => { it('should create correctly', () => { const shader = new Shader({ glProgram: getGlProgram(), resources: {} }); expect(shader).toBeInstanceOf(...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/Geometry.test.ts
src/rendering/renderers/__tests__/Geometry.test.ts
import { Buffer } from '../shared/buffer/Buffer'; import { BufferUsage } from '../shared/buffer/const'; import { Geometry } from '../shared/geometry/Geometry'; import { getGeometry, getGlProgram, getWebGLRenderer } from '@test-utils'; import type { WebGLRenderer } from '../gl/WebGLRenderer'; describe('Geometry', () =...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/Extract.test.ts
src/rendering/renderers/__tests__/Extract.test.ts
import '~/scene/graphics/init'; import { ExtractSystem } from '../shared/extract/ExtractSystem'; import { RenderTexture } from '../shared/texture/RenderTexture'; import { Texture } from '../shared/texture/Texture'; import '../../init'; import { getTexture, getWebGLRenderer } from '@test-utils'; import { Rectangle } fro...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/BindGroup.test.ts
src/rendering/renderers/__tests__/BindGroup.test.ts
import { BindGroup } from '../gpu/shader/BindGroup'; import { Buffer } from '../shared/buffer/Buffer'; import { BufferResource } from '../shared/buffer/BufferResource'; import { BufferUsage } from '../shared/buffer/const'; import { UniformGroup } from '../shared/shader/UniformGroup'; import { RenderTexture } from '../s...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/GlBackBufferSystem.test.ts
src/rendering/renderers/__tests__/GlBackBufferSystem.test.ts
import { RenderTexture } from '../shared/texture/RenderTexture'; import { getWebGLRenderer } from '@test-utils'; import { Container } from '~/scene'; import type { WebGLRenderer } from '../gl/WebGLRenderer'; describe('GlBackBufferSystem', () => { it('should activate only when the target is a canvas element (rathe...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/Renderer.test.ts
src/rendering/renderers/__tests__/Renderer.test.ts
import { WebGLRenderer } from '../gl/WebGLRenderer'; describe('Renderer', () => { it('should emit resize event', async () => { const renderer = new WebGLRenderer(); await renderer.init({ width: 1, height: 1 }); const spy = jest.fn(); renderer.on('resize', spy); rendere...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/RenderTarget.test.ts
src/rendering/renderers/__tests__/RenderTarget.test.ts
import { GlRenderTarget } from '../gl/GlRenderTarget'; import { isRenderingToScreen } from '../shared/renderTarget/isRenderingToScreen'; import { RenderTarget } from '../shared/renderTarget/RenderTarget'; import { RenderTexture } from '../shared/texture/RenderTexture'; import { CanvasSource } from '../shared/texture/so...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/UniformBatch.test.ts
src/rendering/renderers/__tests__/UniformBatch.test.ts
import { GpuUniformBatchPipe } from '../gpu/GpuUniformBatchPipe'; import { SchedulerSystem } from '../shared/SchedulerSystem'; import { SystemRunner } from '../shared/system/SystemRunner'; import { RenderableGCSystem } from '../shared/texture/RenderableGCSystem'; import type { WebGPURenderer } from '../gpu/WebGPURende...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/__tests__/GlobalUniformSystem.test.ts
src/rendering/renderers/__tests__/GlobalUniformSystem.test.ts
import { GlobalUniformSystem } from '../shared/renderTarget/GlobalUniformSystem'; import { Matrix, Point } from '~/maths'; import type { WebGLRenderer } from '../gl/WebGLRenderer'; import type { UboSystem } from '../shared/shader/UboSystem'; import type { UniformGroup } from '../shared/shader/UniformGroup'; function ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/const.ts
src/rendering/renderers/gl/const.ts
/** * Constants used by the renderer for clearing the screen or render textures. * @category rendering * @advanced */ export enum CLEAR { /** No clear operation. */ NONE = 0, /** Clear the color buffer. */ COLOR = 16384, /** Clear the stencil buffer. */ STENCIL = 1024, /** Clear the dept...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/GlBackBufferSystem.ts
src/rendering/renderers/gl/GlBackBufferSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { warn } from '../../../utils/logging/warn'; import { Geometry } from '../shared/geometry/Geometry'; import { Shader } from '../shared/shader/Shader'; import { State } from '../shared/state/State'; import { TextureSource } from '../shared/texture/so...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/GlColorMaskSystem.ts
src/rendering/renderers/gl/GlColorMaskSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import type { System } from '../shared/system/System'; import type { WebGLRenderer } from './WebGLRenderer'; /** * The system that handles color masking for the WebGL. * @category rendering * @advanced */ export class GlColorMaskSystem implements Sys...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/GlEncoderSystem.ts
src/rendering/renderers/gl/GlEncoderSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import type { Topology } from '../shared/geometry/const'; import type { Geometry } from '../shared/geometry/Geometry'; import type { Shader } from '../shared/shader/Shader'; import type { State } from '../shared/state/State'; import type { System } from '...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/GlUboSystem.ts
src/rendering/renderers/gl/GlUboSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { UboSystem } from '../shared/shader/UboSystem'; import { createUboElementsSTD40 } from './shader/utils/createUboElementsSTD40'; import { createUboSyncFunctionSTD40 } from './shader/utils/createUboSyncSTD40'; /** * System plugin to the renderer to...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/GlLimitsSystem.ts
src/rendering/renderers/gl/GlLimitsSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { checkMaxIfStatementsInShader } from '../../batcher/gl/utils/checkMaxIfStatementsInShader'; import { type System } from '../shared/system/System'; import type { WebGLRenderer } from './WebGLRenderer'; /** * The GpuLimitsSystem provides informatio...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/WebGLRenderer.ts
src/rendering/renderers/gl/WebGLRenderer.ts
import { extensions, ExtensionType } from '../../../extensions/Extensions'; import { GlGraphicsAdaptor } from '../../../scene/graphics/gl/GlGraphicsAdaptor'; import { GlMeshAdaptor } from '../../../scene/mesh/gl/GlMeshAdaptor'; import { GlBatchAdaptor } from '../../batcher/gl/GlBatchAdaptor'; import { AbstractRenderer ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/GlStencilSystem.ts
src/rendering/renderers/gl/GlStencilSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { GpuStencilModesToPixi } from '../gpu/state/GpuStencilModesToPixi'; import { STENCIL_MODES } from '../shared/state/const'; import type { RenderTarget } from '../shared/renderTarget/RenderTarget'; import type { System } from '../shared/system/Syste...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/GlRenderTarget.ts
src/rendering/renderers/gl/GlRenderTarget.ts
/** * Represents a render target. * @category rendering * @ignore */ export class GlRenderTarget { public width = -1; public height = -1; public msaa = false; public framebuffer: WebGLFramebuffer; public resolveTargetFramebuffer: WebGLFramebuffer; public msaaRenderBuffer: WebGLRenderbuffer[]...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/state/mapWebGLBlendModesToPixi.ts
src/rendering/renderers/gl/state/mapWebGLBlendModesToPixi.ts
import { DOMAdapter } from '../../../../environment/adapter'; import type { BLEND_MODES } from '../../shared/state/const'; import type { GlRenderingContext } from '../context/GlRenderingContext'; /** * Maps gl blend combinations to WebGL. * @param gl * @returns {object} Map of gl blend combinations to WebGL. * @i...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/state/GlStateSystem.ts
src/rendering/renderers/gl/state/GlStateSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { type RenderTarget } from '../../shared/renderTarget/RenderTarget'; import { State } from '../../shared/state/State'; import { type WebGLRenderer } from '../WebGLRenderer'; import { mapWebGLBlendModesToPixi } from './mapWebGLBlendModesToPixi'; ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/geometry/GlGeometrySystem.ts
src/rendering/renderers/gl/geometry/GlGeometrySystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { type GPUData } from '../../../../scene/view/ViewContainer'; import { GCManagedHash } from '../../../../utils/data/GCManagedHash'; import { getAttributeInfoFromFormat } from '../../shared/geometry/utils/getAttributeInfoFromFormat'; import { ensu...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/geometry/utils/getGlTypeFromFormat.ts
src/rendering/renderers/gl/geometry/utils/getGlTypeFromFormat.ts
import { GL_TYPES } from '../../texture/const'; import type { VertexFormat } from '../../../shared/geometry/const'; const infoMap = { uint8x2: GL_TYPES.UNSIGNED_BYTE, uint8x4: GL_TYPES.UNSIGNED_BYTE, sint8x2: GL_TYPES.BYTE, sint8x4: GL_TYPES.BYTE, unorm8x2: GL_TYPES.UNSIGNED_BYTE, unorm8x4: GL...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/const.ts
src/rendering/renderers/gl/shader/const.ts
/** * The precision types available in WebGL shaders. * * These types define the precision of floating-point calculations in shaders. * - `highp`: High precision, typically 32-bit floating-point. * - `mediump`: Medium precision, typically 16-bit floating-point. * - `lowp`: Low precision, typically 8-bit floating-...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/GenerateShaderSyncCode.ts
src/rendering/renderers/gl/shader/GenerateShaderSyncCode.ts
import { BufferResource } from '../../shared/buffer/BufferResource'; import { UniformGroup } from '../../shared/shader/UniformGroup'; import { TextureSource } from '../../shared/texture/sources/TextureSource'; import type { Shader } from '../../shared/shader/Shader'; import type { GlShaderSystem, ShaderSyncFunction } ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/GlShaderSystem.ts
src/rendering/renderers/gl/shader/GlShaderSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { generateShaderSyncCode } from './GenerateShaderSyncCode'; import { generateProgram } from './program/generateProgram'; import type { BufferResource } from '../../shared/buffer/BufferResource'; import type { Shader } from '../../shared/shader/S...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/GlUniformGroupSystem.ts
src/rendering/renderers/gl/shader/GlUniformGroupSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { generateUniformsSync } from './utils/generateUniformsSync'; import type { UniformsSyncCallback } from '../../shared/shader/types'; import type { UniformGroup } from '../../shared/shader/UniformGroup'; import type { System } from '../../shared/...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/GlProgram.ts
src/rendering/renderers/gl/shader/GlProgram.ts
import { createIdFromString } from '../../shared/utils/createIdFromString'; import { getMaxFragmentPrecision } from './program/getMaxFragmentPrecision'; import { addProgramDefines } from './program/preprocessors/addProgramDefines'; import { ensurePrecision } from './program/preprocessors/ensurePrecision'; import { inse...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/GlProgramData.ts
src/rendering/renderers/gl/shader/GlProgramData.ts
/** @private */ export class IGLUniformData { public location: WebGLUniformLocation; public value: number | boolean | Float32Array | Int32Array | Uint32Array | boolean[]; } /** * Helper class to create a WebGL Program * @private */ export class GlProgramData { /** The shader program. */ public progr...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/migrateFragmentFromV7toV8.ts
src/rendering/renderers/gl/shader/migrateFragmentFromV7toV8.ts
/** * @param fragmentShader * @internal */ export function migrateFragmentFromV7toV8(fragmentShader: string): string { fragmentShader = fragmentShader .replaceAll('texture2D', 'texture') .replaceAll('gl_FragColor', 'finalColor') .replaceAll('varying', 'in'); fragmentShader = ` ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/getBatchSamplersUniformGroup.ts
src/rendering/renderers/gl/shader/getBatchSamplersUniformGroup.ts
import { UniformGroup } from '../../shared/shader/UniformGroup'; const batchSamplersUniformGroupHash: Record<number, UniformGroup> = {}; /** * Automatically generates a uniform group that holds the texture samplers for a shader. * This is used mainly by the shaders that batch textures! * @param maxTextures - the n...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/mapSize.ts
src/rendering/renderers/gl/shader/program/mapSize.ts
import type { Dict } from '../../../../../utils/types'; const GLSL_TO_SIZE: Dict<number> = { float: 1, vec2: 2, vec3: 3, vec4: 4, int: 1, ivec2: 2, ivec3: 3, ivec4: 4, uint: 1, uvec2: 2, uvec3: 3, uvec4: 4, bool: 1, ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/extractAttributesFromGlProgram.ts
src/rendering/renderers/gl/shader/program/extractAttributesFromGlProgram.ts
import { getAttributeInfoFromFormat } from '../../../shared/geometry/utils/getAttributeInfoFromFormat'; import { mapGlToVertexFormat } from './mapType'; import type { Attribute } from '../../../shared/geometry/Geometry'; /** * This interface represents the extracted attribute data from a WebGL program. * It extends...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/getUboData.ts
src/rendering/renderers/gl/shader/program/getUboData.ts
import type { GlUniformBlockData } from '../GlProgram'; /** * returns the uniform block data from the program * @private * @param program - the webgl program * @param gl - the WebGL context * @returns {object} the uniform data for this program */ export function getUboData(program: WebGLProgram, gl: WebGL2Render...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/defaultValue.ts
src/rendering/renderers/gl/shader/program/defaultValue.ts
function booleanArray(size: number): Array<boolean> { const array = new Array(size); for (let i = 0; i < array.length; i++) { array[i] = false; } return array; } /** * @param {string} type - Type of value * @param {number} size * @private */ export function defaultValue( type: str...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/mapType.ts
src/rendering/renderers/gl/shader/program/mapType.ts
import type { Dict } from '../../../../../utils/types'; import type { VertexFormat } from '../../../shared/geometry/const'; let GL_TABLE: Dict<string> = null; const GL_TO_GLSL_TYPES: Dict<string> = { FLOAT: 'float', FLOAT_VEC2: 'vec2', FLOAT_VEC3: 'vec3', FLOAT_VEC4: 'vec4', INT: ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/compileShader.ts
src/rendering/renderers/gl/shader/program/compileShader.ts
/** * @private * @param {WebGLRenderingContext} gl - The current WebGL context {WebGLProgram} * @param {number} type - the type, can be either VERTEX_SHADER or FRAGMENT_SHADER * @param {string} src - The vertex shader source as an array of strings. * @returns {WebGLShader} the shader */ export function compileSha...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/ensureAttributes.ts
src/rendering/renderers/gl/shader/program/ensureAttributes.ts
import { warn } from '../../../../../utils/logging/warn'; import { getAttributeInfoFromFormat } from '../../../shared/geometry/utils/getAttributeInfoFromFormat'; import type { Geometry } from '../../../shared/geometry/Geometry'; import type { ExtractedAttributeData } from './extractAttributesFromGlProgram'; /** * Th...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/getTestContext.ts
src/rendering/renderers/gl/shader/program/getTestContext.ts
import { DOMAdapter } from '../../../../../environment/adapter'; import type { GlRenderingContext } from '../../context/GlRenderingContext'; let context: GlRenderingContext; /** * returns a little WebGL context to use for program inspection. * @private * @returns {WebGLRenderingContext} a gl context to test with ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/logProgramError.ts
src/rendering/renderers/gl/shader/program/logProgramError.ts
/** * will log a shader error highlighting the lines with the error * also will add numbers along the side. * @param gl - the WebGLContext * @param shader - the shader to log errors for */ function logPrettyShaderError(gl: WebGLRenderingContext, shader: WebGLShader): void { const shaderSrc = gl.getShaderSource...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/generateProgram.ts
src/rendering/renderers/gl/shader/program/generateProgram.ts
import { warn } from '../../../../../utils/logging/warn'; import { GlProgramData } from '../GlProgramData'; import { compileShader } from './compileShader'; import { defaultValue } from './defaultValue'; import { extractAttributesFromGlProgram } from './extractAttributesFromGlProgram'; import { getUboData } from './get...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/getUniformData.ts
src/rendering/renderers/gl/shader/program/getUniformData.ts
import { defaultValue } from './defaultValue'; import { mapType } from './mapType'; import type { GlUniformData } from '../GlProgram'; /** * returns the uniform data from the program * @private * @param program - the webgl program * @param gl - the WebGL context * @returns {object} the uniform data for this prog...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/getMaxFragmentPrecision.ts
src/rendering/renderers/gl/shader/program/getMaxFragmentPrecision.ts
import { getTestContext } from './getTestContext'; import type { PRECISION } from '../const'; let maxFragmentPrecision: PRECISION; /** @internal */ export function getMaxFragmentPrecision(): PRECISION { if (!maxFragmentPrecision) { maxFragmentPrecision = 'mediump'; const gl = getTestContext()...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/__tests__/glEnsureAttributes.test.ts
src/rendering/renderers/gl/shader/program/__tests__/glEnsureAttributes.test.ts
import { ensureAttributes } from '../ensureAttributes'; import { generateProgram } from '../generateProgram'; import { getTestContext } from '../getTestContext'; import { Buffer, BufferUsage, Geometry, GlProgram } from '~/rendering'; describe('glEnsureAttributes', () => { it('should ensure attributes', async () =>...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/preprocessors/ensurePrecision.ts
src/rendering/renderers/gl/shader/program/preprocessors/ensurePrecision.ts
import type { PRECISION } from '../../const'; interface EnsurePrecisionOptions { requestedVertexPrecision: PRECISION; requestedFragmentPrecision: PRECISION; maxSupportedVertexPrecision: PRECISION; maxSupportedFragmentPrecision: PRECISION; } /** * Sets the float precision on the shader, ensuring the d...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/preprocessors/stripVersion.ts
src/rendering/renderers/gl/shader/program/preprocessors/stripVersion.ts
/** * @param src * @param isES300 * @internal */ export function stripVersion(src: string, isES300: boolean): string { if (!isES300) return src; return src.replace('#version 300 es', ''); }
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/preprocessors/insertVersion.ts
src/rendering/renderers/gl/shader/program/preprocessors/insertVersion.ts
/** * @param src * @param isES300 * @internal */ export function insertVersion(src: string, isES300: boolean): string { if (!isES300) return src; return `#version 300 es\n${src}`; }
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/preprocessors/setProgramName.ts
src/rendering/renderers/gl/shader/program/preprocessors/setProgramName.ts
const fragmentNameCache: { [key: string]: number } = {}; const VertexNameCache: { [key: string]: number } = {}; /** * @param src * @param root0 * @param root0.name * @param isFragment * @internal */ export function setProgramName(src: string, { name = `pixi-program` }: { name: string; }, isFragment = true) { ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/program/preprocessors/addProgramDefines.ts
src/rendering/renderers/gl/shader/program/preprocessors/addProgramDefines.ts
/** * @param src * @param isES300 * @param isFragment * @internal */ export function addProgramDefines(src: string, isES300: boolean, isFragment?: boolean) { if (isES300) return src; if (isFragment) { src = src.replace('out vec4 finalColor;', ''); return ` #ifdef GL_ES // Thi...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/utils/generateUniformsSyncTypes.ts
src/rendering/renderers/gl/shader/utils/generateUniformsSyncTypes.ts
// cu = Cached value's uniform data field // cv = Cached value // v = value to upload // ud = uniformData // uv = uniformValue import type { UNIFORM_TYPES } from '../../../shared/shader/types'; /** @internal */ export const UNIFORM_TO_SINGLE_SETTERS: Record<UNIFORM_TYPES | string, string> = { f32: `if (cv !== v) ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/utils/createUboElementsSTD40.ts
src/rendering/renderers/gl/shader/utils/createUboElementsSTD40.ts
import type { UboElement, UboLayout, UniformData } from '../../../shared/shader/types'; /** @internal */ export const WGSL_TO_STD40_SIZE: Record<string, number> = { f32: 4, i32: 4, 'vec2<f32>': 8, 'vec3<f32>': 12, 'vec4<f32>': 16, 'vec2<i32>': 8, 'vec3<i32>': 12, 'vec4<i32>': 16, ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/utils/generateUniformsSync.ts
src/rendering/renderers/gl/shader/utils/generateUniformsSync.ts
// cu = Cached value's uniform data field // cv = Cached value // v = value to upload // ud = uniformData // uv = uniformValue import { BufferResource } from '../../../shared/buffer/BufferResource'; import { UniformGroup } from '../../../shared/shader/UniformGroup'; import { uniformParsers } from '../../../shared/shad...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/utils/generateArraySyncSTD40.ts
src/rendering/renderers/gl/shader/utils/generateArraySyncSTD40.ts
import { WGSL_TO_STD40_SIZE } from './createUboElementsSTD40'; import type { UboElement } from '../../../shared/shader/types'; /** * This generates a function that will sync an array to the uniform buffer * following the std140 layout * @param uboElement - the element to generate the array sync for * @param offse...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/utils/createUboSyncSTD40.ts
src/rendering/renderers/gl/shader/utils/createUboSyncSTD40.ts
import { createUboSyncFunction } from '../../../shared/shader/utils/createUboSyncFunction'; import { uboSyncFunctionsSTD40 } from '../../../shared/shader/utils/uboSyncFunctions'; import { generateArraySyncSTD40 } from './generateArraySyncSTD40'; import type { UboElement, UniformsSyncCallback } from '../../../shared/sh...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/shader/utils/__tests__/createUboElementsSTD40.test.ts
src/rendering/renderers/gl/shader/utils/__tests__/createUboElementsSTD40.test.ts
import { createUboElementsSTD40 } from '../createUboElementsSTD40'; import type { UNIFORM_TYPES, UniformData } from '~/rendering'; describe('createUboElementsSTD40', () => { it('do the things', async () => { const toTest = [ { values: ['mat3x3<f32>', 'vec3<f32>'], ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/GlTexture.ts
src/rendering/renderers/gl/texture/GlTexture.ts
import { type GPUData } from '../../../../scene/view/ViewContainer'; import { GL_FORMATS, GL_TARGETS, GL_TYPES } from './const'; /** * Internal texture for WebGL context * @category rendering * @ignore */ export class GlTexture implements GPUData { public target: GL_TARGETS = GL_TARGETS.TEXTURE_2D; /** Th...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/const.ts
src/rendering/renderers/gl/texture/const.ts
/** * Various GL texture/resources formats. * @category rendering * @advanced */ export enum GL_FORMATS { RGBA = 6408, RGB = 6407, RG = 33319, RED = 6403, RGBA_INTEGER = 36249, RGB_INTEGER = 36248, RG_INTEGER = 33320, RED_INTEGER = 36244, ALPHA = 6406, LUMINANCE = 6409, L...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/GlTextureSystem.ts
src/rendering/renderers/gl/texture/GlTextureSystem.ts
import { DOMAdapter } from '../../../../environment/adapter'; import { ExtensionType } from '../../../../extensions/Extensions'; import { GCManagedHash } from '../../../../utils/data/GCManagedHash'; import { Texture } from '../../shared/texture/Texture'; import { GlTexture } from './GlTexture'; import { glUploadBufferI...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/uploaders/glUploadVideoResource.ts
src/rendering/renderers/gl/texture/uploaders/glUploadVideoResource.ts
import { glUploadImageResource } from './glUploadImageResource'; import type { VideoSource } from '../../../shared/texture/sources/VideoSource'; import type { GlRenderingContext } from '../../context/GlRenderingContext'; import type { GlTexture } from '../GlTexture'; import type { GLTextureUploader } from './GLTexture...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/uploaders/glUploadImageResource.ts
src/rendering/renderers/gl/texture/uploaders/glUploadImageResource.ts
import type { CanvasSource } from '../../../shared/texture/sources/CanvasSource'; import type { ImageSource } from '../../../shared/texture/sources/ImageSource'; import type { GlRenderingContext } from '../../context/GlRenderingContext'; import type { GlTexture } from '../GlTexture'; import type { GLTextureUploader } f...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/uploaders/glUploadCompressedTextureResource.ts
src/rendering/renderers/gl/texture/uploaders/glUploadCompressedTextureResource.ts
import type { CompressedSource } from '../../../shared/texture/sources/CompressedSource'; import type { GlRenderingContext } from '../../context/GlRenderingContext'; import type { GlTexture } from '../GlTexture'; import type { GLTextureUploader } from './GLTextureUploader'; const compressedFormatMap: Record<string, bo...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/uploaders/glUploadBufferImageResource.ts
src/rendering/renderers/gl/texture/uploaders/glUploadBufferImageResource.ts
import type { TextureSource } from '../../../shared/texture/sources/TextureSource'; import type { GlRenderingContext } from '../../context/GlRenderingContext'; import type { GlTexture } from '../GlTexture'; import type { GLTextureUploader } from './GLTextureUploader'; /** @internal */ export const glUploadBufferImageR...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/uploaders/GLTextureUploader.ts
src/rendering/renderers/gl/texture/uploaders/GLTextureUploader.ts
import type { TextureSource } from '../../../shared/texture/sources/TextureSource'; import type { GlRenderingContext } from '../../context/GlRenderingContext'; import type { GlTexture } from '../GlTexture'; /** @internal */ export interface GLTextureUploader { id: string; upload(source: TextureSource, glTextur...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/utils/applyStyleParams.ts
src/rendering/renderers/gl/texture/utils/applyStyleParams.ts
import { compareModeToGlCompare, mipmapScaleModeToGlFilter, scaleModeToGlFilter, wrapModeToGlAddress } from './pixiToGlMaps'; import type { TextureStyle } from '../../../shared/texture/TextureStyle'; /** * @param style * @param gl * @param mipmaps * @param anisotropicExt * @param glFunctionName ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/utils/mapFormatToGlFormat.ts
src/rendering/renderers/gl/texture/utils/mapFormatToGlFormat.ts
import type { GlRenderingContext } from '../../context/GlRenderingContext'; /** * Returns a lookup table that maps each type-format pair to a compatible internal format. * @function mapTypeAndFormatToInternalFormat * @private * @param {WebGLRenderingContext} gl - The rendering context. * @returns Lookup table. *...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/utils/pixiToGlMaps.ts
src/rendering/renderers/gl/texture/utils/pixiToGlMaps.ts
/** @internal */ export const scaleModeToGlFilter = { linear: 9729, nearest: 9728, }; /** @internal */ export const mipmapScaleModeToGlFilter = { linear: { linear: 9987, nearest: 9985, }, nearest: { linear: 9986, nearest: 9984, } }; /** @internal */ export const...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/utils/mapFormatToGlInternalFormat.ts
src/rendering/renderers/gl/texture/utils/mapFormatToGlInternalFormat.ts
import { DOMAdapter } from '../../../../../environment/adapter'; import type { GlRenderingContext } from '../../context/GlRenderingContext'; import type { WebGLExtensions } from '../../context/WebGLExtensions'; /** * Returns a lookup table that maps each type-format pair to a compatible internal format. * @function...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/utils/mapFormatToGlType.ts
src/rendering/renderers/gl/texture/utils/mapFormatToGlType.ts
import type { GlRenderingContext } from '../../context/GlRenderingContext'; /** * Returns a lookup table that maps each type-format pair to a compatible internal format. * @function mapTypeAndFormatToInternalFormat * @private * @param {WebGLRenderingContext} gl - The rendering context. * @returns Lookup table. *...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/utils/unpremultiplyAlpha.ts
src/rendering/renderers/gl/texture/utils/unpremultiplyAlpha.ts
/** * @param pixels * @internal */ export function unpremultiplyAlpha(pixels: Uint8Array | Uint8ClampedArray): void { if (pixels instanceof Uint8ClampedArray) { pixels = new Uint8Array(pixels.buffer); } const n = pixels.length; for (let i = 0; i < n; i += 4) { const alpha = ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/texture/utils/getSupportedGlCompressedTextureFormats.ts
src/rendering/renderers/gl/texture/utils/getSupportedGlCompressedTextureFormats.ts
import { DOMAdapter } from '../../../../../environment/adapter'; import type { TEXTURE_FORMATS } from '../../../shared/texture/const'; let supportedGLCompressedTextureFormats: TEXTURE_FORMATS[]; /** @internal */ export function getSupportedGlCompressedTextureFormats(): TEXTURE_FORMATS[] { if (supportedGLCompress...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/renderTarget/GlRenderTargetSystem.ts
src/rendering/renderers/gl/renderTarget/GlRenderTargetSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { RenderTargetSystem } from '../../shared/renderTarget/RenderTargetSystem'; import { GlRenderTargetAdaptor } from './GlRenderTargetAdaptor'; import type { GlRenderTarget } from '../GlRenderTarget'; import type { WebGLRenderer } from '../WebGLRen...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/renderTarget/GlRenderTargetAdaptor.ts
src/rendering/renderers/gl/renderTarget/GlRenderTargetAdaptor.ts
import { Rectangle } from '../../../../maths/shapes/Rectangle'; import { warn } from '../../../../utils/logging/warn'; import { CanvasSource } from '../../shared/texture/sources/CanvasSource'; import { CLEAR } from '../const'; import { GlRenderTarget } from '../GlRenderTarget'; import type { RgbaArray } from '../../.....
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/context/WebGLExtensions.ts
src/rendering/renderers/gl/context/WebGLExtensions.ts
/* eslint-disable camelcase */ /** * WebGL extensions for compressed textures using the PVRTC format. * @category rendering * @advanced */ export interface WEBGL_compressed_texture_pvrtc { COMPRESSED_RGB_PVRTC_4BPPV1_IMG: number; COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: number; COMPRESSED_RGB_PVRTC_2BPPV1_IMG...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/context/GlRenderingContext.ts
src/rendering/renderers/gl/context/GlRenderingContext.ts
/** * The WebGL rendering context type used by the PixiJS WebGL renderer. * This is typically a `WebGL2RenderingContext`, which is the default for PixiJS. * It is used to ensure that the renderer operates with the correct context type. * @category rendering * @advanced */ export type GlRenderingContext = WebGL2Re...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/context/GlContextSystem.ts
src/rendering/renderers/gl/context/GlContextSystem.ts
import { DOMAdapter } from '../../../../environment/adapter'; import { ExtensionType } from '../../../../extensions/Extensions'; import { warn } from '../../../../utils/logging/warn'; import { type GpuPowerPreference } from '../../types'; import type { ICanvas } from '../../../../environment/canvas/ICanvas'; import ty...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/buffer/const.ts
src/rendering/renderers/gl/buffer/const.ts
/** * Constants for various buffer types in Pixi * @category rendering * @advanced */ export enum BUFFER_TYPE { /** buffer type for using as an index buffer */ ELEMENT_ARRAY_BUFFER = 34963, /** buffer type for using attribute data */ ARRAY_BUFFER = 34962, /** the buffer type is for uniform buffe...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/buffer/GlBufferSystem.ts
src/rendering/renderers/gl/buffer/GlBufferSystem.ts
import { ExtensionType } from '../../../../extensions/Extensions'; import { GCManagedHash } from '../../../../utils/data/GCManagedHash'; import { BufferUsage } from '../../shared/buffer/const'; import { BUFFER_TYPE } from './const'; import { GlBuffer } from './GlBuffer'; import type { Buffer } from '../../shared/buffe...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/gl/buffer/GlBuffer.ts
src/rendering/renderers/gl/buffer/GlBuffer.ts
import { type GPUData } from '../../../../scene/view/ViewContainer'; import type { BUFFER_TYPE } from './const'; /** @internal */ export class GlBuffer implements GPUData { public buffer: WebGLBuffer; public updateID: number; public byteLength: number; public type: number; public _lastBindBaseLoca...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/shared/SchedulerSystem.ts
src/rendering/renderers/shared/SchedulerSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { Ticker } from '../../../ticker/Ticker'; import type { System } from './system/System'; // start at one too keep it positive! let uid = 1; /** * The SchedulerSystem manages scheduled tasks with specific intervals. * @category rendering * @adv...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/shared/Renderable.ts
src/rendering/renderers/shared/Renderable.ts
import { type ViewContainer } from '../../../scene/view/ViewContainer'; /** * Represents a renderable object in the rendering system. * This is typically a view container that can be rendered to a target. * @internal */ export type Renderable = ViewContainer;
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/shared/GCSystem.ts
src/rendering/renderers/shared/GCSystem.ts
import { ExtensionType } from '../../../extensions/Extensions'; import { type RenderGroup } from '../../../scene/container/RenderGroup'; import { type GPUDataOwner, type Renderer } from '../types'; import { type Renderable } from './Renderable'; import { type RenderOptions } from './system/AbstractRenderer'; import ty...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/shared/system/AbstractRenderer.ts
src/rendering/renderers/shared/system/AbstractRenderer.ts
import { Color } from '../../../../color/Color'; import { loadEnvironmentExtensions } from '../../../../environment/autoDetectEnvironment'; import { Container } from '../../../../scene/container/Container'; import { unsafeEvalSupported } from '../../../../utils/browser/unsafeEvalSupported'; import { uid } from '../../....
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/shared/system/System.ts
src/rendering/renderers/shared/system/System.ts
import type { Renderer } from '../../types'; import type { RendererDestroyOptions } from './AbstractRenderer'; /** * A system is a generic interface for a renderer system. * It is used to define the methods that a system should implement. * @category rendering * @advanced */ export interface System<INIT_OPTIONS =...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/shared/system/SystemRunner.ts
src/rendering/renderers/shared/system/SystemRunner.ts
/** * SystemRunner is used internally by the renderers as an efficient way for systems to * be notified about what the renderer is up to during the rendering phase. * * ```ts * import { SystemRunner } from 'pixi.js'; * * const myObject = { * loaded: new SystemRunner('loaded') * } * * const listener = { ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/shared/system/SharedSystems.ts
src/rendering/renderers/shared/system/SharedSystems.ts
import { CustomRenderPipe } from '../../../../scene/container/CustomRenderPipe'; import { RenderGroupPipe } from '../../../../scene/container/RenderGroupPipe'; import { RenderGroupSystem } from '../../../../scene/container/RenderGroupSystem'; import { SpritePipe } from '../../../../scene/sprite/SpritePipe'; import { Re...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/shared/system/utils/typeUtils.ts
src/rendering/renderers/shared/system/utils/typeUtils.ts
/** * TS for extracting the system as a record based on a list of systems * @example * * type Systems = [ * { extension: { name: 'foo' }, defaultOptions: { foo: 1 } }, * { extension: { name: 'bar' }, defaultOptions: { bar: 2 } }, * { extension: { name: 'baz' }, defaultOptions: { baz: 3 } }, * ]; * * typ...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false
pixijs/pixijs
https://github.com/pixijs/pixijs/blob/98ea728fc887ea93a1131a61cac66ab4fc45eebe/src/rendering/renderers/shared/system/__tests__/SystemRunner.test.ts
src/rendering/renderers/shared/system/__tests__/SystemRunner.test.ts
import { SystemRunner } from '../SystemRunner'; describe('Runner', () => { it('should should exist', () => { expect(SystemRunner).toBeDefined(); expect(typeof SystemRunner).toEqual('function'); }); it('should implement emit', () => { const complete = new SystemRunner('compl...
typescript
MIT
98ea728fc887ea93a1131a61cac66ab4fc45eebe
2026-01-04T15:41:01.429164Z
false