sdfsdfs
This commit is contained in:
22
node_modules/pixi.js/lib/Shaders.d.ts
generated
vendored
Normal file
22
node_modules/pixi.js/lib/Shaders.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/// <reference types="@webgpu/types" />
|
||||
|
||||
declare module '*.wgsl'
|
||||
{
|
||||
const shader: 'string';
|
||||
|
||||
export default shader;
|
||||
}
|
||||
|
||||
declare module '*.vert'
|
||||
{
|
||||
const shader: 'string';
|
||||
|
||||
export default shader;
|
||||
}
|
||||
|
||||
declare module '*.frag'
|
||||
{
|
||||
const shader: 'string';
|
||||
|
||||
export default shader;
|
||||
}
|
28
node_modules/pixi.js/lib/_virtual/basis.worker.js
generated
vendored
Normal file
28
node_modules/pixi.js/lib/_virtual/basis.worker.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const WORKER_CODE = "(function () {\n 'use strict';\n\n function createLevelBuffers(basisTexture, basisTranscoderFormat) {\n const images = basisTexture.getNumImages();\n const levels = basisTexture.getNumLevels(0);\n const success = basisTexture.startTranscoding();\n if (!success) {\n throw new Error(\"startTranscoding failed\");\n }\n const levelBuffers = [];\n for (let levelIndex = 0; levelIndex < levels; ++levelIndex) {\n for (let sliceIndex = 0; sliceIndex < images; ++sliceIndex) {\n const transcodeSize = basisTexture.getImageTranscodedSizeInBytes(sliceIndex, levelIndex, basisTranscoderFormat);\n const levelBuffer = new Uint8Array(transcodeSize);\n const success2 = basisTexture.transcodeImage(levelBuffer, sliceIndex, levelIndex, basisTranscoderFormat, 1, 0);\n if (!success2) {\n throw new Error(\"transcodeImage failed\");\n }\n levelBuffers.push(levelBuffer);\n }\n }\n return levelBuffers;\n }\n\n const gpuFormatToBasisTranscoderFormatMap = {\n \"bc3-rgba-unorm\": 3,\n // cTFBC3_RGBA\n \"bc7-rgba-unorm\": 6,\n // cTFBC7_RGBA,\n \"etc2-rgba8unorm\": 1,\n // cTFETC2_RGBA,\n \"astc-4x4-unorm\": 10,\n // cTFASTC_4x4_RGBA,\n // Uncompressed\n rgba8unorm: 13,\n // cTFRGBA32,\n rgba4unorm: 16\n // cTFRGBA4444,\n };\n function gpuFormatToBasisTranscoderFormat(transcoderFormat) {\n const format = gpuFormatToBasisTranscoderFormatMap[transcoderFormat];\n if (format) {\n return format;\n }\n throw new Error(`Unsupported transcoderFormat: ${transcoderFormat}`);\n }\n\n const settings = {\n jsUrl: \"basis/basis_transcoder.js\",\n wasmUrl: \"basis/basis_transcoder.wasm\"\n };\n let basisTranscoderFormat;\n let basisTranscodedTextureFormat;\n let basisPromise;\n async function getBasis() {\n if (!basisPromise) {\n const absoluteJsUrl = new URL(settings.jsUrl, location.origin).href;\n const absoluteWasmUrl = new URL(settings.wasmUrl, location.origin).href;\n importScripts(absoluteJsUrl);\n basisPromise = new Promise((resolve) => {\n BASIS({\n locateFile: (_file) => absoluteWasmUrl\n }).then((module) => {\n module.initializeBasis();\n resolve(module.BasisFile);\n });\n });\n }\n return basisPromise;\n }\n async function fetchBasisTexture(url, BasisTexture) {\n const basisResponse = await fetch(url);\n if (basisResponse.ok) {\n const basisArrayBuffer = await basisResponse.arrayBuffer();\n return new BasisTexture(new Uint8Array(basisArrayBuffer));\n }\n throw new Error(`Failed to load Basis texture: ${url}`);\n }\n const preferredTranscodedFormat = [\n \"bc7-rgba-unorm\",\n \"astc-4x4-unorm\",\n \"etc2-rgba8unorm\",\n \"bc3-rgba-unorm\",\n \"rgba8unorm\"\n ];\n async function load(url) {\n const BasisTexture = await getBasis();\n const basisTexture = await fetchBasisTexture(url, BasisTexture);\n const levelBuffers = createLevelBuffers(basisTexture, basisTranscoderFormat);\n return {\n width: basisTexture.getImageWidth(0, 0),\n height: basisTexture.getImageHeight(0, 0),\n format: basisTranscodedTextureFormat,\n resource: levelBuffers,\n alphaMode: \"no-premultiply-alpha\"\n };\n }\n async function init(jsUrl, wasmUrl, supportedTextures) {\n if (jsUrl)\n settings.jsUrl = jsUrl;\n if (wasmUrl)\n settings.wasmUrl = wasmUrl;\n basisTranscodedTextureFormat = preferredTranscodedFormat.filter((format) => supportedTextures.includes(format))[0];\n basisTranscoderFormat = gpuFormatToBasisTranscoderFormat(basisTranscodedTextureFormat);\n await getBasis();\n }\n const messageHandlers = {\n init: async (data) => {\n const { jsUrl, wasmUrl, supportedTextures } = data;\n await init(jsUrl, wasmUrl, supportedTextures);\n },\n load: async (data) => {\n try {\n const textureOptions = await load(data.url);\n return {\n type: \"load\",\n url: data.url,\n success: true,\n textureOptions,\n transferables: textureOptions.resource?.map((arr) => arr.buffer)\n };\n } catch (e) {\n throw e;\n }\n }\n };\n self.onmessage = async (messageEvent) => {\n const message = messageEvent.data;\n const response = await messageHandlers[message.type](message);\n if (response) {\n self.postMessage(response, response.transferables);\n }\n };\n\n})();\n";
|
||||
let WORKER_URL = null;
|
||||
class WorkerInstance
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
if (!WORKER_URL)
|
||||
{
|
||||
WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: 'application/javascript' }));
|
||||
}
|
||||
this.worker = new Worker(WORKER_URL);
|
||||
}
|
||||
}
|
||||
WorkerInstance.revokeObjectURL = function revokeObjectURL()
|
||||
{
|
||||
if (WORKER_URL)
|
||||
{
|
||||
URL.revokeObjectURL(WORKER_URL);
|
||||
WORKER_URL = null;
|
||||
}
|
||||
};
|
||||
|
||||
exports.default = WorkerInstance;
|
||||
//# sourceMappingURL=basis.worker.js.map
|
1
node_modules/pixi.js/lib/_virtual/basis.worker.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/_virtual/basis.worker.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"basis.worker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
24
node_modules/pixi.js/lib/_virtual/basis.worker.mjs
generated
vendored
Normal file
24
node_modules/pixi.js/lib/_virtual/basis.worker.mjs
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
const WORKER_CODE = "(function () {\n 'use strict';\n\n function createLevelBuffers(basisTexture, basisTranscoderFormat) {\n const images = basisTexture.getNumImages();\n const levels = basisTexture.getNumLevels(0);\n const success = basisTexture.startTranscoding();\n if (!success) {\n throw new Error(\"startTranscoding failed\");\n }\n const levelBuffers = [];\n for (let levelIndex = 0; levelIndex < levels; ++levelIndex) {\n for (let sliceIndex = 0; sliceIndex < images; ++sliceIndex) {\n const transcodeSize = basisTexture.getImageTranscodedSizeInBytes(sliceIndex, levelIndex, basisTranscoderFormat);\n const levelBuffer = new Uint8Array(transcodeSize);\n const success2 = basisTexture.transcodeImage(levelBuffer, sliceIndex, levelIndex, basisTranscoderFormat, 1, 0);\n if (!success2) {\n throw new Error(\"transcodeImage failed\");\n }\n levelBuffers.push(levelBuffer);\n }\n }\n return levelBuffers;\n }\n\n const gpuFormatToBasisTranscoderFormatMap = {\n \"bc3-rgba-unorm\": 3,\n // cTFBC3_RGBA\n \"bc7-rgba-unorm\": 6,\n // cTFBC7_RGBA,\n \"etc2-rgba8unorm\": 1,\n // cTFETC2_RGBA,\n \"astc-4x4-unorm\": 10,\n // cTFASTC_4x4_RGBA,\n // Uncompressed\n rgba8unorm: 13,\n // cTFRGBA32,\n rgba4unorm: 16\n // cTFRGBA4444,\n };\n function gpuFormatToBasisTranscoderFormat(transcoderFormat) {\n const format = gpuFormatToBasisTranscoderFormatMap[transcoderFormat];\n if (format) {\n return format;\n }\n throw new Error(`Unsupported transcoderFormat: ${transcoderFormat}`);\n }\n\n const settings = {\n jsUrl: \"basis/basis_transcoder.js\",\n wasmUrl: \"basis/basis_transcoder.wasm\"\n };\n let basisTranscoderFormat;\n let basisTranscodedTextureFormat;\n let basisPromise;\n async function getBasis() {\n if (!basisPromise) {\n const absoluteJsUrl = new URL(settings.jsUrl, location.origin).href;\n const absoluteWasmUrl = new URL(settings.wasmUrl, location.origin).href;\n importScripts(absoluteJsUrl);\n basisPromise = new Promise((resolve) => {\n BASIS({\n locateFile: (_file) => absoluteWasmUrl\n }).then((module) => {\n module.initializeBasis();\n resolve(module.BasisFile);\n });\n });\n }\n return basisPromise;\n }\n async function fetchBasisTexture(url, BasisTexture) {\n const basisResponse = await fetch(url);\n if (basisResponse.ok) {\n const basisArrayBuffer = await basisResponse.arrayBuffer();\n return new BasisTexture(new Uint8Array(basisArrayBuffer));\n }\n throw new Error(`Failed to load Basis texture: ${url}`);\n }\n const preferredTranscodedFormat = [\n \"bc7-rgba-unorm\",\n \"astc-4x4-unorm\",\n \"etc2-rgba8unorm\",\n \"bc3-rgba-unorm\",\n \"rgba8unorm\"\n ];\n async function load(url) {\n const BasisTexture = await getBasis();\n const basisTexture = await fetchBasisTexture(url, BasisTexture);\n const levelBuffers = createLevelBuffers(basisTexture, basisTranscoderFormat);\n return {\n width: basisTexture.getImageWidth(0, 0),\n height: basisTexture.getImageHeight(0, 0),\n format: basisTranscodedTextureFormat,\n resource: levelBuffers,\n alphaMode: \"no-premultiply-alpha\"\n };\n }\n async function init(jsUrl, wasmUrl, supportedTextures) {\n if (jsUrl)\n settings.jsUrl = jsUrl;\n if (wasmUrl)\n settings.wasmUrl = wasmUrl;\n basisTranscodedTextureFormat = preferredTranscodedFormat.filter((format) => supportedTextures.includes(format))[0];\n basisTranscoderFormat = gpuFormatToBasisTranscoderFormat(basisTranscodedTextureFormat);\n await getBasis();\n }\n const messageHandlers = {\n init: async (data) => {\n const { jsUrl, wasmUrl, supportedTextures } = data;\n await init(jsUrl, wasmUrl, supportedTextures);\n },\n load: async (data) => {\n try {\n const textureOptions = await load(data.url);\n return {\n type: \"load\",\n url: data.url,\n success: true,\n textureOptions,\n transferables: textureOptions.resource?.map((arr) => arr.buffer)\n };\n } catch (e) {\n throw e;\n }\n }\n };\n self.onmessage = async (messageEvent) => {\n const message = messageEvent.data;\n const response = await messageHandlers[message.type](message);\n if (response) {\n self.postMessage(response, response.transferables);\n }\n };\n\n})();\n";
|
||||
let WORKER_URL = null;
|
||||
class WorkerInstance
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
if (!WORKER_URL)
|
||||
{
|
||||
WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: 'application/javascript' }));
|
||||
}
|
||||
this.worker = new Worker(WORKER_URL);
|
||||
}
|
||||
}
|
||||
WorkerInstance.revokeObjectURL = function revokeObjectURL()
|
||||
{
|
||||
if (WORKER_URL)
|
||||
{
|
||||
URL.revokeObjectURL(WORKER_URL);
|
||||
WORKER_URL = null;
|
||||
}
|
||||
};
|
||||
|
||||
export { WorkerInstance as default };
|
||||
//# sourceMappingURL=basis.worker.mjs.map
|
1
node_modules/pixi.js/lib/_virtual/basis.worker.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/_virtual/basis.worker.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"basis.worker.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
28
node_modules/pixi.js/lib/_virtual/checkImageBitmap.worker.js
generated
vendored
Normal file
28
node_modules/pixi.js/lib/_virtual/checkImageBitmap.worker.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const WORKER_CODE = "(function () {\n 'use strict';\n\n const WHITE_PNG = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=\";\n async function checkImageBitmap() {\n try {\n if (typeof createImageBitmap !== \"function\")\n return false;\n const response = await fetch(WHITE_PNG);\n const imageBlob = await response.blob();\n const imageBitmap = await createImageBitmap(imageBlob);\n return imageBitmap.width === 1 && imageBitmap.height === 1;\n } catch (e) {\n return false;\n }\n }\n void checkImageBitmap().then((result) => {\n self.postMessage(result);\n });\n\n})();\n";
|
||||
let WORKER_URL = null;
|
||||
class WorkerInstance
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
if (!WORKER_URL)
|
||||
{
|
||||
WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: 'application/javascript' }));
|
||||
}
|
||||
this.worker = new Worker(WORKER_URL);
|
||||
}
|
||||
}
|
||||
WorkerInstance.revokeObjectURL = function revokeObjectURL()
|
||||
{
|
||||
if (WORKER_URL)
|
||||
{
|
||||
URL.revokeObjectURL(WORKER_URL);
|
||||
WORKER_URL = null;
|
||||
}
|
||||
};
|
||||
|
||||
exports.default = WorkerInstance;
|
||||
//# sourceMappingURL=checkImageBitmap.worker.js.map
|
1
node_modules/pixi.js/lib/_virtual/checkImageBitmap.worker.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/_virtual/checkImageBitmap.worker.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"checkImageBitmap.worker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
24
node_modules/pixi.js/lib/_virtual/checkImageBitmap.worker.mjs
generated
vendored
Normal file
24
node_modules/pixi.js/lib/_virtual/checkImageBitmap.worker.mjs
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
const WORKER_CODE = "(function () {\n 'use strict';\n\n const WHITE_PNG = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=\";\n async function checkImageBitmap() {\n try {\n if (typeof createImageBitmap !== \"function\")\n return false;\n const response = await fetch(WHITE_PNG);\n const imageBlob = await response.blob();\n const imageBitmap = await createImageBitmap(imageBlob);\n return imageBitmap.width === 1 && imageBitmap.height === 1;\n } catch (e) {\n return false;\n }\n }\n void checkImageBitmap().then((result) => {\n self.postMessage(result);\n });\n\n})();\n";
|
||||
let WORKER_URL = null;
|
||||
class WorkerInstance
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
if (!WORKER_URL)
|
||||
{
|
||||
WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: 'application/javascript' }));
|
||||
}
|
||||
this.worker = new Worker(WORKER_URL);
|
||||
}
|
||||
}
|
||||
WorkerInstance.revokeObjectURL = function revokeObjectURL()
|
||||
{
|
||||
if (WORKER_URL)
|
||||
{
|
||||
URL.revokeObjectURL(WORKER_URL);
|
||||
WORKER_URL = null;
|
||||
}
|
||||
};
|
||||
|
||||
export { WorkerInstance as default };
|
||||
//# sourceMappingURL=checkImageBitmap.worker.mjs.map
|
1
node_modules/pixi.js/lib/_virtual/checkImageBitmap.worker.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/_virtual/checkImageBitmap.worker.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"checkImageBitmap.worker.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
28
node_modules/pixi.js/lib/_virtual/ktx.worker.js
generated
vendored
Normal file
28
node_modules/pixi.js/lib/_virtual/ktx.worker.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/pixi.js/lib/_virtual/ktx.worker.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/_virtual/ktx.worker.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ktx.worker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
24
node_modules/pixi.js/lib/_virtual/ktx.worker.mjs
generated
vendored
Normal file
24
node_modules/pixi.js/lib/_virtual/ktx.worker.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/pixi.js/lib/_virtual/ktx.worker.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/_virtual/ktx.worker.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ktx.worker.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
28
node_modules/pixi.js/lib/_virtual/loadImageBitmap.worker.js
generated
vendored
Normal file
28
node_modules/pixi.js/lib/_virtual/loadImageBitmap.worker.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const WORKER_CODE = "(function () {\n 'use strict';\n\n async function loadImageBitmap(url, alphaMode) {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`[WorkerManager.loadImageBitmap] Failed to fetch ${url}: ${response.status} ${response.statusText}`);\n }\n const imageBlob = await response.blob();\n return alphaMode === \"premultiplied-alpha\" ? createImageBitmap(imageBlob, { premultiplyAlpha: \"none\" }) : createImageBitmap(imageBlob);\n }\n self.onmessage = async (event) => {\n try {\n const imageBitmap = await loadImageBitmap(event.data.data[0], event.data.data[1]);\n self.postMessage({\n data: imageBitmap,\n uuid: event.data.uuid,\n id: event.data.id\n }, [imageBitmap]);\n } catch (e) {\n self.postMessage({\n error: e,\n uuid: event.data.uuid,\n id: event.data.id\n });\n }\n };\n\n})();\n";
|
||||
let WORKER_URL = null;
|
||||
class WorkerInstance
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
if (!WORKER_URL)
|
||||
{
|
||||
WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: 'application/javascript' }));
|
||||
}
|
||||
this.worker = new Worker(WORKER_URL);
|
||||
}
|
||||
}
|
||||
WorkerInstance.revokeObjectURL = function revokeObjectURL()
|
||||
{
|
||||
if (WORKER_URL)
|
||||
{
|
||||
URL.revokeObjectURL(WORKER_URL);
|
||||
WORKER_URL = null;
|
||||
}
|
||||
};
|
||||
|
||||
exports.default = WorkerInstance;
|
||||
//# sourceMappingURL=loadImageBitmap.worker.js.map
|
1
node_modules/pixi.js/lib/_virtual/loadImageBitmap.worker.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/_virtual/loadImageBitmap.worker.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"loadImageBitmap.worker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
24
node_modules/pixi.js/lib/_virtual/loadImageBitmap.worker.mjs
generated
vendored
Normal file
24
node_modules/pixi.js/lib/_virtual/loadImageBitmap.worker.mjs
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
const WORKER_CODE = "(function () {\n 'use strict';\n\n async function loadImageBitmap(url, alphaMode) {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`[WorkerManager.loadImageBitmap] Failed to fetch ${url}: ${response.status} ${response.statusText}`);\n }\n const imageBlob = await response.blob();\n return alphaMode === \"premultiplied-alpha\" ? createImageBitmap(imageBlob, { premultiplyAlpha: \"none\" }) : createImageBitmap(imageBlob);\n }\n self.onmessage = async (event) => {\n try {\n const imageBitmap = await loadImageBitmap(event.data.data[0], event.data.data[1]);\n self.postMessage({\n data: imageBitmap,\n uuid: event.data.uuid,\n id: event.data.id\n }, [imageBitmap]);\n } catch (e) {\n self.postMessage({\n error: e,\n uuid: event.data.uuid,\n id: event.data.id\n });\n }\n };\n\n})();\n";
|
||||
let WORKER_URL = null;
|
||||
class WorkerInstance
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
if (!WORKER_URL)
|
||||
{
|
||||
WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: 'application/javascript' }));
|
||||
}
|
||||
this.worker = new Worker(WORKER_URL);
|
||||
}
|
||||
}
|
||||
WorkerInstance.revokeObjectURL = function revokeObjectURL()
|
||||
{
|
||||
if (WORKER_URL)
|
||||
{
|
||||
URL.revokeObjectURL(WORKER_URL);
|
||||
WORKER_URL = null;
|
||||
}
|
||||
};
|
||||
|
||||
export { WorkerInstance as default };
|
||||
//# sourceMappingURL=loadImageBitmap.worker.mjs.map
|
1
node_modules/pixi.js/lib/_virtual/loadImageBitmap.worker.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/_virtual/loadImageBitmap.worker.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"loadImageBitmap.worker.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
18
node_modules/pixi.js/lib/accessibility/AccessibilityMixins.d.ts
generated
vendored
Normal file
18
node_modules/pixi.js/lib/accessibility/AccessibilityMixins.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
declare global
|
||||
{
|
||||
namespace PixiMixins
|
||||
{
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface Container extends Partial<import('./accessibilityTarget').AccessibleTarget> {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface ContainerOptions extends Partial<import('./accessibilityTarget').AccessibleOptions> {}
|
||||
|
||||
interface RendererSystems
|
||||
{
|
||||
accessibility: import('./AccessibilitySystem').AccessibilitySystem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
164
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.d.ts
generated
vendored
Normal file
164
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.d.ts
generated
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
import { ExtensionType } from '../extensions/Extensions';
|
||||
import type { System } from '../rendering/renderers/shared/system/System';
|
||||
import type { Renderer } from '../rendering/renderers/types';
|
||||
import type { isMobileResult } from '../utils/browser/isMobile';
|
||||
/** @ignore */
|
||||
export interface AccessibilityOptions {
|
||||
/** Setting this to true will visually show the divs. */
|
||||
debug?: boolean;
|
||||
}
|
||||
/**
|
||||
* The Accessibility system recreates the ability to tab and have content read by screen readers.
|
||||
* This is very important as it can possibly help people with disabilities access PixiJS content.
|
||||
*
|
||||
* A Container can be made accessible just like it can be made interactive. This manager will map the
|
||||
* events as if the mouse was being used, minimizing the effort required to implement.
|
||||
*
|
||||
* An instance of this class is automatically created by default, and can be found at `renderer.accessibility`
|
||||
* @memberof accessibility
|
||||
*/
|
||||
export declare class AccessibilitySystem implements System<AccessibilityOptions> {
|
||||
private readonly _mobileInfo;
|
||||
/** @ignore */
|
||||
static extension: {
|
||||
readonly type: readonly [ExtensionType.WebGLSystem, ExtensionType.WebGPUSystem];
|
||||
readonly name: "accessibility";
|
||||
};
|
||||
/** Setting this to true will visually show the divs. */
|
||||
debug: boolean;
|
||||
/**
|
||||
* The renderer this accessibility manager works for.
|
||||
* @type {WebGLRenderer|WebGPURenderer}
|
||||
*/
|
||||
private _renderer;
|
||||
/** Internal variable, see isActive getter. */
|
||||
private _isActive;
|
||||
/** Internal variable, see isMobileAccessibility getter. */
|
||||
private _isMobileAccessibility;
|
||||
/** Button element for handling touch hooks. */
|
||||
private _hookDiv;
|
||||
/** This is the dom element that will sit over the PixiJS element. This is where the div overlays will go. */
|
||||
private _div;
|
||||
/** A simple pool for storing divs. */
|
||||
private _pool;
|
||||
/** This is a tick used to check if an object is no longer being rendered. */
|
||||
private _renderId;
|
||||
/** The array of currently active accessible items. */
|
||||
private _children;
|
||||
/** Count to throttle div updates on android devices. */
|
||||
private _androidUpdateCount;
|
||||
/** The frequency to update the div elements. */
|
||||
private readonly _androidUpdateFrequency;
|
||||
/**
|
||||
* @param {WebGLRenderer|WebGPURenderer} renderer - A reference to the current renderer
|
||||
*/
|
||||
constructor(renderer: Renderer, _mobileInfo?: isMobileResult);
|
||||
/**
|
||||
* Value of `true` if accessibility is currently active and accessibility layers are showing.
|
||||
* @member {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get isActive(): boolean;
|
||||
/**
|
||||
* Value of `true` if accessibility is enabled for touch devices.
|
||||
* @member {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get isMobileAccessibility(): boolean;
|
||||
get hookDiv(): HTMLElement;
|
||||
/**
|
||||
* Creates the touch hooks.
|
||||
* @private
|
||||
*/
|
||||
private _createTouchHook;
|
||||
/**
|
||||
* Destroys the touch hooks.
|
||||
* @private
|
||||
*/
|
||||
private _destroyTouchHook;
|
||||
/**
|
||||
* Activating will cause the Accessibility layer to be shown.
|
||||
* This is called when a user presses the tab key.
|
||||
* @private
|
||||
*/
|
||||
private _activate;
|
||||
/**
|
||||
* Deactivating will cause the Accessibility layer to be hidden.
|
||||
* This is called when a user moves the mouse.
|
||||
* @private
|
||||
*/
|
||||
private _deactivate;
|
||||
/**
|
||||
* This recursive function will run through the scene graph and add any new accessible objects to the DOM layer.
|
||||
* @private
|
||||
* @param {Container} container - The Container to check.
|
||||
*/
|
||||
private _updateAccessibleObjects;
|
||||
/**
|
||||
* Runner init called, view is available at this point.
|
||||
* @ignore
|
||||
*/
|
||||
init(options?: AccessibilityOptions): void;
|
||||
/**
|
||||
* Runner postrender was called, ensure that all divs are mapped correctly to their Containers.
|
||||
* Only fires while active.
|
||||
* @ignore
|
||||
*/
|
||||
postrender(): void;
|
||||
/**
|
||||
* private function that will visually add the information to the
|
||||
* accessibility div
|
||||
* @param {HTMLElement} div -
|
||||
*/
|
||||
private _updateDebugHTML;
|
||||
/**
|
||||
* Adjust the hit area based on the bounds of a display object
|
||||
* @param {Rectangle} hitArea - Bounds of the child
|
||||
*/
|
||||
private _capHitArea;
|
||||
/**
|
||||
* Adds a Container to the accessibility manager
|
||||
* @private
|
||||
* @param {Container} container - The child to make accessible.
|
||||
*/
|
||||
private _addChild;
|
||||
/**
|
||||
* Dispatch events with the EventSystem.
|
||||
* @param e
|
||||
* @param type
|
||||
* @private
|
||||
*/
|
||||
private _dispatchEvent;
|
||||
/**
|
||||
* Maps the div button press to pixi's EventSystem (click)
|
||||
* @private
|
||||
* @param {MouseEvent} e - The click event.
|
||||
*/
|
||||
private _onClick;
|
||||
/**
|
||||
* Maps the div focus events to pixi's EventSystem (mouseover)
|
||||
* @private
|
||||
* @param {FocusEvent} e - The focus event.
|
||||
*/
|
||||
private _onFocus;
|
||||
/**
|
||||
* Maps the div focus events to pixi's EventSystem (mouseout)
|
||||
* @private
|
||||
* @param {FocusEvent} e - The focusout event.
|
||||
*/
|
||||
private _onFocusOut;
|
||||
/**
|
||||
* Is called when a key is pressed
|
||||
* @private
|
||||
* @param {KeyboardEvent} e - The keydown event.
|
||||
*/
|
||||
private _onKeyDown;
|
||||
/**
|
||||
* Is called when the mouse moves across the renderer element
|
||||
* @private
|
||||
* @param {MouseEvent} e - The mouse event.
|
||||
*/
|
||||
private _onMouseMove;
|
||||
/** Destroys the accessibility manager */
|
||||
destroy(): void;
|
||||
}
|
404
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.js
generated
vendored
Normal file
404
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.js
generated
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
'use strict';
|
||||
|
||||
var FederatedEvent = require('../events/FederatedEvent.js');
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var isMobile = require('../utils/browser/isMobile.js');
|
||||
var removeItems = require('../utils/data/removeItems.js');
|
||||
|
||||
"use strict";
|
||||
const KEY_CODE_TAB = 9;
|
||||
const DIV_TOUCH_SIZE = 100;
|
||||
const DIV_TOUCH_POS_X = 0;
|
||||
const DIV_TOUCH_POS_Y = 0;
|
||||
const DIV_TOUCH_ZINDEX = 2;
|
||||
const DIV_HOOK_SIZE = 1;
|
||||
const DIV_HOOK_POS_X = -1e3;
|
||||
const DIV_HOOK_POS_Y = -1e3;
|
||||
const DIV_HOOK_ZINDEX = 2;
|
||||
class AccessibilitySystem {
|
||||
// 2fps
|
||||
// eslint-disable-next-line jsdoc/require-param
|
||||
/**
|
||||
* @param {WebGLRenderer|WebGPURenderer} renderer - A reference to the current renderer
|
||||
*/
|
||||
constructor(renderer, _mobileInfo = isMobile.isMobile) {
|
||||
this._mobileInfo = _mobileInfo;
|
||||
/** Setting this to true will visually show the divs. */
|
||||
this.debug = false;
|
||||
/** Internal variable, see isActive getter. */
|
||||
this._isActive = false;
|
||||
/** Internal variable, see isMobileAccessibility getter. */
|
||||
this._isMobileAccessibility = false;
|
||||
/** A simple pool for storing divs. */
|
||||
this._pool = [];
|
||||
/** This is a tick used to check if an object is no longer being rendered. */
|
||||
this._renderId = 0;
|
||||
/** The array of currently active accessible items. */
|
||||
this._children = [];
|
||||
/** Count to throttle div updates on android devices. */
|
||||
this._androidUpdateCount = 0;
|
||||
/** The frequency to update the div elements. */
|
||||
this._androidUpdateFrequency = 500;
|
||||
this._hookDiv = null;
|
||||
if (_mobileInfo.tablet || _mobileInfo.phone) {
|
||||
this._createTouchHook();
|
||||
}
|
||||
const div = document.createElement("div");
|
||||
div.style.width = `${DIV_TOUCH_SIZE}px`;
|
||||
div.style.height = `${DIV_TOUCH_SIZE}px`;
|
||||
div.style.position = "absolute";
|
||||
div.style.top = `${DIV_TOUCH_POS_X}px`;
|
||||
div.style.left = `${DIV_TOUCH_POS_Y}px`;
|
||||
div.style.zIndex = DIV_TOUCH_ZINDEX.toString();
|
||||
this._div = div;
|
||||
this._renderer = renderer;
|
||||
this._onKeyDown = this._onKeyDown.bind(this);
|
||||
this._onMouseMove = this._onMouseMove.bind(this);
|
||||
globalThis.addEventListener("keydown", this._onKeyDown, false);
|
||||
}
|
||||
/**
|
||||
* Value of `true` if accessibility is currently active and accessibility layers are showing.
|
||||
* @member {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get isActive() {
|
||||
return this._isActive;
|
||||
}
|
||||
/**
|
||||
* Value of `true` if accessibility is enabled for touch devices.
|
||||
* @member {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get isMobileAccessibility() {
|
||||
return this._isMobileAccessibility;
|
||||
}
|
||||
get hookDiv() {
|
||||
return this._hookDiv;
|
||||
}
|
||||
/**
|
||||
* Creates the touch hooks.
|
||||
* @private
|
||||
*/
|
||||
_createTouchHook() {
|
||||
const hookDiv = document.createElement("button");
|
||||
hookDiv.style.width = `${DIV_HOOK_SIZE}px`;
|
||||
hookDiv.style.height = `${DIV_HOOK_SIZE}px`;
|
||||
hookDiv.style.position = "absolute";
|
||||
hookDiv.style.top = `${DIV_HOOK_POS_X}px`;
|
||||
hookDiv.style.left = `${DIV_HOOK_POS_Y}px`;
|
||||
hookDiv.style.zIndex = DIV_HOOK_ZINDEX.toString();
|
||||
hookDiv.style.backgroundColor = "#FF0000";
|
||||
hookDiv.title = "select to enable accessibility for this content";
|
||||
hookDiv.addEventListener("focus", () => {
|
||||
this._isMobileAccessibility = true;
|
||||
this._activate();
|
||||
this._destroyTouchHook();
|
||||
});
|
||||
document.body.appendChild(hookDiv);
|
||||
this._hookDiv = hookDiv;
|
||||
}
|
||||
/**
|
||||
* Destroys the touch hooks.
|
||||
* @private
|
||||
*/
|
||||
_destroyTouchHook() {
|
||||
if (!this._hookDiv) {
|
||||
return;
|
||||
}
|
||||
document.body.removeChild(this._hookDiv);
|
||||
this._hookDiv = null;
|
||||
}
|
||||
/**
|
||||
* Activating will cause the Accessibility layer to be shown.
|
||||
* This is called when a user presses the tab key.
|
||||
* @private
|
||||
*/
|
||||
_activate() {
|
||||
if (this._isActive) {
|
||||
return;
|
||||
}
|
||||
this._isActive = true;
|
||||
globalThis.document.addEventListener("mousemove", this._onMouseMove, true);
|
||||
globalThis.removeEventListener("keydown", this._onKeyDown, false);
|
||||
this._renderer.runners.postrender.add(this);
|
||||
this._renderer.view.canvas.parentNode?.appendChild(this._div);
|
||||
}
|
||||
/**
|
||||
* Deactivating will cause the Accessibility layer to be hidden.
|
||||
* This is called when a user moves the mouse.
|
||||
* @private
|
||||
*/
|
||||
_deactivate() {
|
||||
if (!this._isActive || this._isMobileAccessibility) {
|
||||
return;
|
||||
}
|
||||
this._isActive = false;
|
||||
globalThis.document.removeEventListener("mousemove", this._onMouseMove, true);
|
||||
globalThis.addEventListener("keydown", this._onKeyDown, false);
|
||||
this._renderer.runners.postrender.remove(this);
|
||||
this._div.parentNode?.removeChild(this._div);
|
||||
}
|
||||
/**
|
||||
* This recursive function will run through the scene graph and add any new accessible objects to the DOM layer.
|
||||
* @private
|
||||
* @param {Container} container - The Container to check.
|
||||
*/
|
||||
_updateAccessibleObjects(container) {
|
||||
if (!container.visible || !container.accessibleChildren) {
|
||||
return;
|
||||
}
|
||||
if (container.accessible && container.isInteractive()) {
|
||||
if (!container._accessibleActive) {
|
||||
this._addChild(container);
|
||||
}
|
||||
container._renderId = this._renderId;
|
||||
}
|
||||
const children = container.children;
|
||||
if (children) {
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
this._updateAccessibleObjects(children[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Runner init called, view is available at this point.
|
||||
* @ignore
|
||||
*/
|
||||
init(options) {
|
||||
this.debug = options?.debug ?? this.debug;
|
||||
this._renderer.runners.postrender.remove(this);
|
||||
}
|
||||
/**
|
||||
* Runner postrender was called, ensure that all divs are mapped correctly to their Containers.
|
||||
* Only fires while active.
|
||||
* @ignore
|
||||
*/
|
||||
postrender() {
|
||||
const now = performance.now();
|
||||
if (this._mobileInfo.android.device && now < this._androidUpdateCount) {
|
||||
return;
|
||||
}
|
||||
this._androidUpdateCount = now + this._androidUpdateFrequency;
|
||||
if (!this._renderer.renderingToScreen || !this._renderer.view.canvas) {
|
||||
return;
|
||||
}
|
||||
if (this._renderer.lastObjectRendered) {
|
||||
this._updateAccessibleObjects(this._renderer.lastObjectRendered);
|
||||
}
|
||||
const { x, y, width, height } = this._renderer.view.canvas.getBoundingClientRect();
|
||||
const { width: viewWidth, height: viewHeight, resolution } = this._renderer;
|
||||
const sx = width / viewWidth * resolution;
|
||||
const sy = height / viewHeight * resolution;
|
||||
let div = this._div;
|
||||
div.style.left = `${x}px`;
|
||||
div.style.top = `${y}px`;
|
||||
div.style.width = `${viewWidth}px`;
|
||||
div.style.height = `${viewHeight}px`;
|
||||
for (let i = 0; i < this._children.length; i++) {
|
||||
const child = this._children[i];
|
||||
if (child._renderId !== this._renderId) {
|
||||
child._accessibleActive = false;
|
||||
removeItems.removeItems(this._children, i, 1);
|
||||
this._div.removeChild(child._accessibleDiv);
|
||||
this._pool.push(child._accessibleDiv);
|
||||
child._accessibleDiv = null;
|
||||
i--;
|
||||
} else {
|
||||
div = child._accessibleDiv;
|
||||
let hitArea = child.hitArea;
|
||||
const wt = child.worldTransform;
|
||||
if (child.hitArea) {
|
||||
div.style.left = `${(wt.tx + hitArea.x * wt.a) * sx}px`;
|
||||
div.style.top = `${(wt.ty + hitArea.y * wt.d) * sy}px`;
|
||||
div.style.width = `${hitArea.width * wt.a * sx}px`;
|
||||
div.style.height = `${hitArea.height * wt.d * sy}px`;
|
||||
} else {
|
||||
hitArea = child.getBounds().rectangle;
|
||||
this._capHitArea(hitArea);
|
||||
div.style.left = `${hitArea.x * sx}px`;
|
||||
div.style.top = `${hitArea.y * sy}px`;
|
||||
div.style.width = `${hitArea.width * sx}px`;
|
||||
div.style.height = `${hitArea.height * sy}px`;
|
||||
if (div.title !== child.accessibleTitle && child.accessibleTitle !== null) {
|
||||
div.title = child.accessibleTitle || "";
|
||||
}
|
||||
if (div.getAttribute("aria-label") !== child.accessibleHint && child.accessibleHint !== null) {
|
||||
div.setAttribute("aria-label", child.accessibleHint || "");
|
||||
}
|
||||
}
|
||||
if (child.accessibleTitle !== div.title || child.tabIndex !== div.tabIndex) {
|
||||
div.title = child.accessibleTitle || "";
|
||||
div.tabIndex = child.tabIndex;
|
||||
if (this.debug) {
|
||||
this._updateDebugHTML(div);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this._renderId++;
|
||||
}
|
||||
/**
|
||||
* private function that will visually add the information to the
|
||||
* accessibility div
|
||||
* @param {HTMLElement} div -
|
||||
*/
|
||||
_updateDebugHTML(div) {
|
||||
div.innerHTML = `type: ${div.type}</br> title : ${div.title}</br> tabIndex: ${div.tabIndex}`;
|
||||
}
|
||||
/**
|
||||
* Adjust the hit area based on the bounds of a display object
|
||||
* @param {Rectangle} hitArea - Bounds of the child
|
||||
*/
|
||||
_capHitArea(hitArea) {
|
||||
if (hitArea.x < 0) {
|
||||
hitArea.width += hitArea.x;
|
||||
hitArea.x = 0;
|
||||
}
|
||||
if (hitArea.y < 0) {
|
||||
hitArea.height += hitArea.y;
|
||||
hitArea.y = 0;
|
||||
}
|
||||
const { width: viewWidth, height: viewHeight } = this._renderer;
|
||||
if (hitArea.x + hitArea.width > viewWidth) {
|
||||
hitArea.width = viewWidth - hitArea.x;
|
||||
}
|
||||
if (hitArea.y + hitArea.height > viewHeight) {
|
||||
hitArea.height = viewHeight - hitArea.y;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Adds a Container to the accessibility manager
|
||||
* @private
|
||||
* @param {Container} container - The child to make accessible.
|
||||
*/
|
||||
_addChild(container) {
|
||||
let div = this._pool.pop();
|
||||
if (!div) {
|
||||
div = document.createElement("button");
|
||||
div.style.width = `${DIV_TOUCH_SIZE}px`;
|
||||
div.style.height = `${DIV_TOUCH_SIZE}px`;
|
||||
div.style.backgroundColor = this.debug ? "rgba(255,255,255,0.5)" : "transparent";
|
||||
div.style.position = "absolute";
|
||||
div.style.zIndex = DIV_TOUCH_ZINDEX.toString();
|
||||
div.style.borderStyle = "none";
|
||||
if (navigator.userAgent.toLowerCase().includes("chrome")) {
|
||||
div.setAttribute("aria-live", "off");
|
||||
} else {
|
||||
div.setAttribute("aria-live", "polite");
|
||||
}
|
||||
if (navigator.userAgent.match(/rv:.*Gecko\//)) {
|
||||
div.setAttribute("aria-relevant", "additions");
|
||||
} else {
|
||||
div.setAttribute("aria-relevant", "text");
|
||||
}
|
||||
div.addEventListener("click", this._onClick.bind(this));
|
||||
div.addEventListener("focus", this._onFocus.bind(this));
|
||||
div.addEventListener("focusout", this._onFocusOut.bind(this));
|
||||
}
|
||||
div.style.pointerEvents = container.accessiblePointerEvents;
|
||||
div.type = container.accessibleType;
|
||||
if (container.accessibleTitle && container.accessibleTitle !== null) {
|
||||
div.title = container.accessibleTitle;
|
||||
} else if (!container.accessibleHint || container.accessibleHint === null) {
|
||||
div.title = `container ${container.tabIndex}`;
|
||||
}
|
||||
if (container.accessibleHint && container.accessibleHint !== null) {
|
||||
div.setAttribute("aria-label", container.accessibleHint);
|
||||
}
|
||||
if (this.debug) {
|
||||
this._updateDebugHTML(div);
|
||||
}
|
||||
container._accessibleActive = true;
|
||||
container._accessibleDiv = div;
|
||||
div.container = container;
|
||||
this._children.push(container);
|
||||
this._div.appendChild(container._accessibleDiv);
|
||||
container._accessibleDiv.tabIndex = container.tabIndex;
|
||||
}
|
||||
/**
|
||||
* Dispatch events with the EventSystem.
|
||||
* @param e
|
||||
* @param type
|
||||
* @private
|
||||
*/
|
||||
_dispatchEvent(e, type) {
|
||||
const { container: target } = e.target;
|
||||
const boundary = this._renderer.events.rootBoundary;
|
||||
const event = Object.assign(new FederatedEvent.FederatedEvent(boundary), { target });
|
||||
boundary.rootTarget = this._renderer.lastObjectRendered;
|
||||
type.forEach((type2) => boundary.dispatchEvent(event, type2));
|
||||
}
|
||||
/**
|
||||
* Maps the div button press to pixi's EventSystem (click)
|
||||
* @private
|
||||
* @param {MouseEvent} e - The click event.
|
||||
*/
|
||||
_onClick(e) {
|
||||
this._dispatchEvent(e, ["click", "pointertap", "tap"]);
|
||||
}
|
||||
/**
|
||||
* Maps the div focus events to pixi's EventSystem (mouseover)
|
||||
* @private
|
||||
* @param {FocusEvent} e - The focus event.
|
||||
*/
|
||||
_onFocus(e) {
|
||||
if (!e.target.getAttribute("aria-live")) {
|
||||
e.target.setAttribute("aria-live", "assertive");
|
||||
}
|
||||
this._dispatchEvent(e, ["mouseover"]);
|
||||
}
|
||||
/**
|
||||
* Maps the div focus events to pixi's EventSystem (mouseout)
|
||||
* @private
|
||||
* @param {FocusEvent} e - The focusout event.
|
||||
*/
|
||||
_onFocusOut(e) {
|
||||
if (!e.target.getAttribute("aria-live")) {
|
||||
e.target.setAttribute("aria-live", "polite");
|
||||
}
|
||||
this._dispatchEvent(e, ["mouseout"]);
|
||||
}
|
||||
/**
|
||||
* Is called when a key is pressed
|
||||
* @private
|
||||
* @param {KeyboardEvent} e - The keydown event.
|
||||
*/
|
||||
_onKeyDown(e) {
|
||||
if (e.keyCode !== KEY_CODE_TAB) {
|
||||
return;
|
||||
}
|
||||
this._activate();
|
||||
}
|
||||
/**
|
||||
* Is called when the mouse moves across the renderer element
|
||||
* @private
|
||||
* @param {MouseEvent} e - The mouse event.
|
||||
*/
|
||||
_onMouseMove(e) {
|
||||
if (e.movementX === 0 && e.movementY === 0) {
|
||||
return;
|
||||
}
|
||||
this._deactivate();
|
||||
}
|
||||
/** Destroys the accessibility manager */
|
||||
destroy() {
|
||||
this._destroyTouchHook();
|
||||
this._div = null;
|
||||
globalThis.document.removeEventListener("mousemove", this._onMouseMove, true);
|
||||
globalThis.removeEventListener("keydown", this._onKeyDown);
|
||||
this._pool = null;
|
||||
this._children = null;
|
||||
this._renderer = null;
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
AccessibilitySystem.extension = {
|
||||
type: [
|
||||
Extensions.ExtensionType.WebGLSystem,
|
||||
Extensions.ExtensionType.WebGPUSystem
|
||||
],
|
||||
name: "accessibility"
|
||||
};
|
||||
|
||||
exports.AccessibilitySystem = AccessibilitySystem;
|
||||
//# sourceMappingURL=AccessibilitySystem.js.map
|
1
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
402
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.mjs
generated
vendored
Normal file
402
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.mjs
generated
vendored
Normal file
@@ -0,0 +1,402 @@
|
||||
import { FederatedEvent } from '../events/FederatedEvent.mjs';
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { isMobile } from '../utils/browser/isMobile.mjs';
|
||||
import { removeItems } from '../utils/data/removeItems.mjs';
|
||||
|
||||
"use strict";
|
||||
const KEY_CODE_TAB = 9;
|
||||
const DIV_TOUCH_SIZE = 100;
|
||||
const DIV_TOUCH_POS_X = 0;
|
||||
const DIV_TOUCH_POS_Y = 0;
|
||||
const DIV_TOUCH_ZINDEX = 2;
|
||||
const DIV_HOOK_SIZE = 1;
|
||||
const DIV_HOOK_POS_X = -1e3;
|
||||
const DIV_HOOK_POS_Y = -1e3;
|
||||
const DIV_HOOK_ZINDEX = 2;
|
||||
class AccessibilitySystem {
|
||||
// 2fps
|
||||
// eslint-disable-next-line jsdoc/require-param
|
||||
/**
|
||||
* @param {WebGLRenderer|WebGPURenderer} renderer - A reference to the current renderer
|
||||
*/
|
||||
constructor(renderer, _mobileInfo = isMobile) {
|
||||
this._mobileInfo = _mobileInfo;
|
||||
/** Setting this to true will visually show the divs. */
|
||||
this.debug = false;
|
||||
/** Internal variable, see isActive getter. */
|
||||
this._isActive = false;
|
||||
/** Internal variable, see isMobileAccessibility getter. */
|
||||
this._isMobileAccessibility = false;
|
||||
/** A simple pool for storing divs. */
|
||||
this._pool = [];
|
||||
/** This is a tick used to check if an object is no longer being rendered. */
|
||||
this._renderId = 0;
|
||||
/** The array of currently active accessible items. */
|
||||
this._children = [];
|
||||
/** Count to throttle div updates on android devices. */
|
||||
this._androidUpdateCount = 0;
|
||||
/** The frequency to update the div elements. */
|
||||
this._androidUpdateFrequency = 500;
|
||||
this._hookDiv = null;
|
||||
if (_mobileInfo.tablet || _mobileInfo.phone) {
|
||||
this._createTouchHook();
|
||||
}
|
||||
const div = document.createElement("div");
|
||||
div.style.width = `${DIV_TOUCH_SIZE}px`;
|
||||
div.style.height = `${DIV_TOUCH_SIZE}px`;
|
||||
div.style.position = "absolute";
|
||||
div.style.top = `${DIV_TOUCH_POS_X}px`;
|
||||
div.style.left = `${DIV_TOUCH_POS_Y}px`;
|
||||
div.style.zIndex = DIV_TOUCH_ZINDEX.toString();
|
||||
this._div = div;
|
||||
this._renderer = renderer;
|
||||
this._onKeyDown = this._onKeyDown.bind(this);
|
||||
this._onMouseMove = this._onMouseMove.bind(this);
|
||||
globalThis.addEventListener("keydown", this._onKeyDown, false);
|
||||
}
|
||||
/**
|
||||
* Value of `true` if accessibility is currently active and accessibility layers are showing.
|
||||
* @member {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get isActive() {
|
||||
return this._isActive;
|
||||
}
|
||||
/**
|
||||
* Value of `true` if accessibility is enabled for touch devices.
|
||||
* @member {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get isMobileAccessibility() {
|
||||
return this._isMobileAccessibility;
|
||||
}
|
||||
get hookDiv() {
|
||||
return this._hookDiv;
|
||||
}
|
||||
/**
|
||||
* Creates the touch hooks.
|
||||
* @private
|
||||
*/
|
||||
_createTouchHook() {
|
||||
const hookDiv = document.createElement("button");
|
||||
hookDiv.style.width = `${DIV_HOOK_SIZE}px`;
|
||||
hookDiv.style.height = `${DIV_HOOK_SIZE}px`;
|
||||
hookDiv.style.position = "absolute";
|
||||
hookDiv.style.top = `${DIV_HOOK_POS_X}px`;
|
||||
hookDiv.style.left = `${DIV_HOOK_POS_Y}px`;
|
||||
hookDiv.style.zIndex = DIV_HOOK_ZINDEX.toString();
|
||||
hookDiv.style.backgroundColor = "#FF0000";
|
||||
hookDiv.title = "select to enable accessibility for this content";
|
||||
hookDiv.addEventListener("focus", () => {
|
||||
this._isMobileAccessibility = true;
|
||||
this._activate();
|
||||
this._destroyTouchHook();
|
||||
});
|
||||
document.body.appendChild(hookDiv);
|
||||
this._hookDiv = hookDiv;
|
||||
}
|
||||
/**
|
||||
* Destroys the touch hooks.
|
||||
* @private
|
||||
*/
|
||||
_destroyTouchHook() {
|
||||
if (!this._hookDiv) {
|
||||
return;
|
||||
}
|
||||
document.body.removeChild(this._hookDiv);
|
||||
this._hookDiv = null;
|
||||
}
|
||||
/**
|
||||
* Activating will cause the Accessibility layer to be shown.
|
||||
* This is called when a user presses the tab key.
|
||||
* @private
|
||||
*/
|
||||
_activate() {
|
||||
if (this._isActive) {
|
||||
return;
|
||||
}
|
||||
this._isActive = true;
|
||||
globalThis.document.addEventListener("mousemove", this._onMouseMove, true);
|
||||
globalThis.removeEventListener("keydown", this._onKeyDown, false);
|
||||
this._renderer.runners.postrender.add(this);
|
||||
this._renderer.view.canvas.parentNode?.appendChild(this._div);
|
||||
}
|
||||
/**
|
||||
* Deactivating will cause the Accessibility layer to be hidden.
|
||||
* This is called when a user moves the mouse.
|
||||
* @private
|
||||
*/
|
||||
_deactivate() {
|
||||
if (!this._isActive || this._isMobileAccessibility) {
|
||||
return;
|
||||
}
|
||||
this._isActive = false;
|
||||
globalThis.document.removeEventListener("mousemove", this._onMouseMove, true);
|
||||
globalThis.addEventListener("keydown", this._onKeyDown, false);
|
||||
this._renderer.runners.postrender.remove(this);
|
||||
this._div.parentNode?.removeChild(this._div);
|
||||
}
|
||||
/**
|
||||
* This recursive function will run through the scene graph and add any new accessible objects to the DOM layer.
|
||||
* @private
|
||||
* @param {Container} container - The Container to check.
|
||||
*/
|
||||
_updateAccessibleObjects(container) {
|
||||
if (!container.visible || !container.accessibleChildren) {
|
||||
return;
|
||||
}
|
||||
if (container.accessible && container.isInteractive()) {
|
||||
if (!container._accessibleActive) {
|
||||
this._addChild(container);
|
||||
}
|
||||
container._renderId = this._renderId;
|
||||
}
|
||||
const children = container.children;
|
||||
if (children) {
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
this._updateAccessibleObjects(children[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Runner init called, view is available at this point.
|
||||
* @ignore
|
||||
*/
|
||||
init(options) {
|
||||
this.debug = options?.debug ?? this.debug;
|
||||
this._renderer.runners.postrender.remove(this);
|
||||
}
|
||||
/**
|
||||
* Runner postrender was called, ensure that all divs are mapped correctly to their Containers.
|
||||
* Only fires while active.
|
||||
* @ignore
|
||||
*/
|
||||
postrender() {
|
||||
const now = performance.now();
|
||||
if (this._mobileInfo.android.device && now < this._androidUpdateCount) {
|
||||
return;
|
||||
}
|
||||
this._androidUpdateCount = now + this._androidUpdateFrequency;
|
||||
if (!this._renderer.renderingToScreen || !this._renderer.view.canvas) {
|
||||
return;
|
||||
}
|
||||
if (this._renderer.lastObjectRendered) {
|
||||
this._updateAccessibleObjects(this._renderer.lastObjectRendered);
|
||||
}
|
||||
const { x, y, width, height } = this._renderer.view.canvas.getBoundingClientRect();
|
||||
const { width: viewWidth, height: viewHeight, resolution } = this._renderer;
|
||||
const sx = width / viewWidth * resolution;
|
||||
const sy = height / viewHeight * resolution;
|
||||
let div = this._div;
|
||||
div.style.left = `${x}px`;
|
||||
div.style.top = `${y}px`;
|
||||
div.style.width = `${viewWidth}px`;
|
||||
div.style.height = `${viewHeight}px`;
|
||||
for (let i = 0; i < this._children.length; i++) {
|
||||
const child = this._children[i];
|
||||
if (child._renderId !== this._renderId) {
|
||||
child._accessibleActive = false;
|
||||
removeItems(this._children, i, 1);
|
||||
this._div.removeChild(child._accessibleDiv);
|
||||
this._pool.push(child._accessibleDiv);
|
||||
child._accessibleDiv = null;
|
||||
i--;
|
||||
} else {
|
||||
div = child._accessibleDiv;
|
||||
let hitArea = child.hitArea;
|
||||
const wt = child.worldTransform;
|
||||
if (child.hitArea) {
|
||||
div.style.left = `${(wt.tx + hitArea.x * wt.a) * sx}px`;
|
||||
div.style.top = `${(wt.ty + hitArea.y * wt.d) * sy}px`;
|
||||
div.style.width = `${hitArea.width * wt.a * sx}px`;
|
||||
div.style.height = `${hitArea.height * wt.d * sy}px`;
|
||||
} else {
|
||||
hitArea = child.getBounds().rectangle;
|
||||
this._capHitArea(hitArea);
|
||||
div.style.left = `${hitArea.x * sx}px`;
|
||||
div.style.top = `${hitArea.y * sy}px`;
|
||||
div.style.width = `${hitArea.width * sx}px`;
|
||||
div.style.height = `${hitArea.height * sy}px`;
|
||||
if (div.title !== child.accessibleTitle && child.accessibleTitle !== null) {
|
||||
div.title = child.accessibleTitle || "";
|
||||
}
|
||||
if (div.getAttribute("aria-label") !== child.accessibleHint && child.accessibleHint !== null) {
|
||||
div.setAttribute("aria-label", child.accessibleHint || "");
|
||||
}
|
||||
}
|
||||
if (child.accessibleTitle !== div.title || child.tabIndex !== div.tabIndex) {
|
||||
div.title = child.accessibleTitle || "";
|
||||
div.tabIndex = child.tabIndex;
|
||||
if (this.debug) {
|
||||
this._updateDebugHTML(div);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this._renderId++;
|
||||
}
|
||||
/**
|
||||
* private function that will visually add the information to the
|
||||
* accessibility div
|
||||
* @param {HTMLElement} div -
|
||||
*/
|
||||
_updateDebugHTML(div) {
|
||||
div.innerHTML = `type: ${div.type}</br> title : ${div.title}</br> tabIndex: ${div.tabIndex}`;
|
||||
}
|
||||
/**
|
||||
* Adjust the hit area based on the bounds of a display object
|
||||
* @param {Rectangle} hitArea - Bounds of the child
|
||||
*/
|
||||
_capHitArea(hitArea) {
|
||||
if (hitArea.x < 0) {
|
||||
hitArea.width += hitArea.x;
|
||||
hitArea.x = 0;
|
||||
}
|
||||
if (hitArea.y < 0) {
|
||||
hitArea.height += hitArea.y;
|
||||
hitArea.y = 0;
|
||||
}
|
||||
const { width: viewWidth, height: viewHeight } = this._renderer;
|
||||
if (hitArea.x + hitArea.width > viewWidth) {
|
||||
hitArea.width = viewWidth - hitArea.x;
|
||||
}
|
||||
if (hitArea.y + hitArea.height > viewHeight) {
|
||||
hitArea.height = viewHeight - hitArea.y;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Adds a Container to the accessibility manager
|
||||
* @private
|
||||
* @param {Container} container - The child to make accessible.
|
||||
*/
|
||||
_addChild(container) {
|
||||
let div = this._pool.pop();
|
||||
if (!div) {
|
||||
div = document.createElement("button");
|
||||
div.style.width = `${DIV_TOUCH_SIZE}px`;
|
||||
div.style.height = `${DIV_TOUCH_SIZE}px`;
|
||||
div.style.backgroundColor = this.debug ? "rgba(255,255,255,0.5)" : "transparent";
|
||||
div.style.position = "absolute";
|
||||
div.style.zIndex = DIV_TOUCH_ZINDEX.toString();
|
||||
div.style.borderStyle = "none";
|
||||
if (navigator.userAgent.toLowerCase().includes("chrome")) {
|
||||
div.setAttribute("aria-live", "off");
|
||||
} else {
|
||||
div.setAttribute("aria-live", "polite");
|
||||
}
|
||||
if (navigator.userAgent.match(/rv:.*Gecko\//)) {
|
||||
div.setAttribute("aria-relevant", "additions");
|
||||
} else {
|
||||
div.setAttribute("aria-relevant", "text");
|
||||
}
|
||||
div.addEventListener("click", this._onClick.bind(this));
|
||||
div.addEventListener("focus", this._onFocus.bind(this));
|
||||
div.addEventListener("focusout", this._onFocusOut.bind(this));
|
||||
}
|
||||
div.style.pointerEvents = container.accessiblePointerEvents;
|
||||
div.type = container.accessibleType;
|
||||
if (container.accessibleTitle && container.accessibleTitle !== null) {
|
||||
div.title = container.accessibleTitle;
|
||||
} else if (!container.accessibleHint || container.accessibleHint === null) {
|
||||
div.title = `container ${container.tabIndex}`;
|
||||
}
|
||||
if (container.accessibleHint && container.accessibleHint !== null) {
|
||||
div.setAttribute("aria-label", container.accessibleHint);
|
||||
}
|
||||
if (this.debug) {
|
||||
this._updateDebugHTML(div);
|
||||
}
|
||||
container._accessibleActive = true;
|
||||
container._accessibleDiv = div;
|
||||
div.container = container;
|
||||
this._children.push(container);
|
||||
this._div.appendChild(container._accessibleDiv);
|
||||
container._accessibleDiv.tabIndex = container.tabIndex;
|
||||
}
|
||||
/**
|
||||
* Dispatch events with the EventSystem.
|
||||
* @param e
|
||||
* @param type
|
||||
* @private
|
||||
*/
|
||||
_dispatchEvent(e, type) {
|
||||
const { container: target } = e.target;
|
||||
const boundary = this._renderer.events.rootBoundary;
|
||||
const event = Object.assign(new FederatedEvent(boundary), { target });
|
||||
boundary.rootTarget = this._renderer.lastObjectRendered;
|
||||
type.forEach((type2) => boundary.dispatchEvent(event, type2));
|
||||
}
|
||||
/**
|
||||
* Maps the div button press to pixi's EventSystem (click)
|
||||
* @private
|
||||
* @param {MouseEvent} e - The click event.
|
||||
*/
|
||||
_onClick(e) {
|
||||
this._dispatchEvent(e, ["click", "pointertap", "tap"]);
|
||||
}
|
||||
/**
|
||||
* Maps the div focus events to pixi's EventSystem (mouseover)
|
||||
* @private
|
||||
* @param {FocusEvent} e - The focus event.
|
||||
*/
|
||||
_onFocus(e) {
|
||||
if (!e.target.getAttribute("aria-live")) {
|
||||
e.target.setAttribute("aria-live", "assertive");
|
||||
}
|
||||
this._dispatchEvent(e, ["mouseover"]);
|
||||
}
|
||||
/**
|
||||
* Maps the div focus events to pixi's EventSystem (mouseout)
|
||||
* @private
|
||||
* @param {FocusEvent} e - The focusout event.
|
||||
*/
|
||||
_onFocusOut(e) {
|
||||
if (!e.target.getAttribute("aria-live")) {
|
||||
e.target.setAttribute("aria-live", "polite");
|
||||
}
|
||||
this._dispatchEvent(e, ["mouseout"]);
|
||||
}
|
||||
/**
|
||||
* Is called when a key is pressed
|
||||
* @private
|
||||
* @param {KeyboardEvent} e - The keydown event.
|
||||
*/
|
||||
_onKeyDown(e) {
|
||||
if (e.keyCode !== KEY_CODE_TAB) {
|
||||
return;
|
||||
}
|
||||
this._activate();
|
||||
}
|
||||
/**
|
||||
* Is called when the mouse moves across the renderer element
|
||||
* @private
|
||||
* @param {MouseEvent} e - The mouse event.
|
||||
*/
|
||||
_onMouseMove(e) {
|
||||
if (e.movementX === 0 && e.movementY === 0) {
|
||||
return;
|
||||
}
|
||||
this._deactivate();
|
||||
}
|
||||
/** Destroys the accessibility manager */
|
||||
destroy() {
|
||||
this._destroyTouchHook();
|
||||
this._div = null;
|
||||
globalThis.document.removeEventListener("mousemove", this._onMouseMove, true);
|
||||
globalThis.removeEventListener("keydown", this._onKeyDown);
|
||||
this._pool = null;
|
||||
this._children = null;
|
||||
this._renderer = null;
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
AccessibilitySystem.extension = {
|
||||
type: [
|
||||
ExtensionType.WebGLSystem,
|
||||
ExtensionType.WebGPUSystem
|
||||
],
|
||||
name: "accessibility"
|
||||
};
|
||||
|
||||
export { AccessibilitySystem };
|
||||
//# sourceMappingURL=AccessibilitySystem.mjs.map
|
1
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/accessibility/AccessibilitySystem.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
86
node_modules/pixi.js/lib/accessibility/accessibilityTarget.d.ts
generated
vendored
Normal file
86
node_modules/pixi.js/lib/accessibility/accessibilityTarget.d.ts
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
import type { Container } from '../scene/container/Container';
|
||||
/**
|
||||
* The type of the pointer event to listen for.
|
||||
* Can be any of the following:
|
||||
* - `auto`
|
||||
* - `none`
|
||||
* - `visiblePainted`
|
||||
* - `visibleFill`
|
||||
* - `visibleStroke`
|
||||
* - `visible`
|
||||
* - `painted`
|
||||
* - `fill`
|
||||
* - `stroke`
|
||||
* - `all`
|
||||
* - `inherit`
|
||||
* @memberof accessibility
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events
|
||||
*/
|
||||
export type PointerEvents = 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibleStroke' | 'visible' | 'painted' | 'fill' | 'stroke' | 'all' | 'inherit';
|
||||
/**
|
||||
* When `accessible` is enabled on any display object, these properties will affect its accessibility.
|
||||
* @memberof accessibility
|
||||
*/
|
||||
export interface AccessibleOptions {
|
||||
/**
|
||||
* Flag for if the object is accessible. If true AccessibilityManager will overlay a
|
||||
* shadow div with attributes set
|
||||
* @default false
|
||||
*/
|
||||
accessible: boolean;
|
||||
/**
|
||||
* Sets the title attribute of the shadow div
|
||||
* If accessibleTitle AND accessibleHint has not been this will default to 'container [tabIndex]'
|
||||
* @member {string}
|
||||
*/
|
||||
accessibleTitle: string | null;
|
||||
/** Sets the aria-label attribute of the shadow div */
|
||||
accessibleHint: string | null;
|
||||
/**
|
||||
* @default 0
|
||||
*/
|
||||
tabIndex: number;
|
||||
/**
|
||||
* Specify the type of div the accessible layer is. Screen readers treat the element differently
|
||||
* depending on this type. Defaults to button.
|
||||
* @default 'button'
|
||||
*/
|
||||
accessibleType: string;
|
||||
/**
|
||||
* Specify the pointer-events the accessible div will use
|
||||
* Defaults to auto.
|
||||
* @default 'auto'
|
||||
* @type {accessibility.PointerEvents}
|
||||
*/
|
||||
accessiblePointerEvents: PointerEvents;
|
||||
/**
|
||||
* Setting to false will prevent any children inside this container to
|
||||
* be accessible. Defaults to true.
|
||||
* @default true
|
||||
*/
|
||||
accessibleChildren: boolean;
|
||||
}
|
||||
/**
|
||||
* The Accessibility object is attached to the {@link Container}.
|
||||
* @private
|
||||
*/
|
||||
export interface AccessibleTarget extends AccessibleOptions {
|
||||
_accessibleActive: boolean;
|
||||
_accessibleDiv: AccessibleHTMLElement | null;
|
||||
_renderId: number;
|
||||
}
|
||||
export interface AccessibleHTMLElement extends HTMLElement {
|
||||
type?: string;
|
||||
container?: Container;
|
||||
}
|
||||
/**
|
||||
* Default property values of accessible objects
|
||||
* used by {@link AccessibilitySystem}.
|
||||
* @private
|
||||
* @example
|
||||
* import { accessibleTarget } from 'pixi.js';
|
||||
*
|
||||
* function MyObject() {}
|
||||
* Object.assign(MyObject.prototype, accessibleTarget);
|
||||
*/
|
||||
export declare const accessibilityTarget: AccessibleTarget;
|
75
node_modules/pixi.js/lib/accessibility/accessibilityTarget.js
generated
vendored
Normal file
75
node_modules/pixi.js/lib/accessibility/accessibilityTarget.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
'use strict';
|
||||
|
||||
"use strict";
|
||||
const accessibilityTarget = {
|
||||
/**
|
||||
* Flag for if the object is accessible. If true AccessibilityManager will overlay a
|
||||
* shadow div with attributes set
|
||||
* @member {boolean}
|
||||
* @memberof scene.Container#
|
||||
*/
|
||||
accessible: false,
|
||||
/**
|
||||
* Sets the title attribute of the shadow div
|
||||
* If accessibleTitle AND accessibleHint has not been this will default to 'container [tabIndex]'
|
||||
* @member {string}
|
||||
* @memberof scene.Container#
|
||||
*/
|
||||
accessibleTitle: null,
|
||||
/**
|
||||
* Sets the aria-label attribute of the shadow div
|
||||
* @member {string}
|
||||
* @memberof scene.Container#
|
||||
*/
|
||||
accessibleHint: null,
|
||||
/**
|
||||
* @member {number}
|
||||
* @memberof scene.Container#
|
||||
* @todo Needs docs.
|
||||
*/
|
||||
tabIndex: 0,
|
||||
/**
|
||||
* @member {boolean}
|
||||
* @memberof scene.Container#
|
||||
* @private
|
||||
*/
|
||||
_accessibleActive: false,
|
||||
/**
|
||||
* @memberof scene.Container#
|
||||
* @private
|
||||
*/
|
||||
_accessibleDiv: null,
|
||||
/**
|
||||
* Specify the type of div the accessible layer is. Screen readers treat the element differently
|
||||
* depending on this type. Defaults to button.
|
||||
* @member {string}
|
||||
* @memberof scene.Container#
|
||||
* @default 'button'
|
||||
*/
|
||||
accessibleType: "button",
|
||||
/**
|
||||
* Specify the pointer-events the accessible div will use
|
||||
* Defaults to auto.
|
||||
* @type {PointerEvents}
|
||||
* @memberof scene.Container#
|
||||
* @default 'auto'
|
||||
*/
|
||||
accessiblePointerEvents: "auto",
|
||||
/**
|
||||
* Setting to false will prevent any children inside this container to
|
||||
* be accessible. Defaults to true.
|
||||
* @member {boolean}
|
||||
* @memberof scene.Container#
|
||||
* @default true
|
||||
*/
|
||||
accessibleChildren: true,
|
||||
/**
|
||||
* @member {number}
|
||||
* @memberof scene.Container#
|
||||
* @private
|
||||
*/
|
||||
_renderId: -1
|
||||
};
|
||||
|
||||
exports.accessibilityTarget = accessibilityTarget;
|
||||
//# sourceMappingURL=accessibilityTarget.js.map
|
1
node_modules/pixi.js/lib/accessibility/accessibilityTarget.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/accessibility/accessibilityTarget.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
73
node_modules/pixi.js/lib/accessibility/accessibilityTarget.mjs
generated
vendored
Normal file
73
node_modules/pixi.js/lib/accessibility/accessibilityTarget.mjs
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
const accessibilityTarget = {
|
||||
/**
|
||||
* Flag for if the object is accessible. If true AccessibilityManager will overlay a
|
||||
* shadow div with attributes set
|
||||
* @member {boolean}
|
||||
* @memberof scene.Container#
|
||||
*/
|
||||
accessible: false,
|
||||
/**
|
||||
* Sets the title attribute of the shadow div
|
||||
* If accessibleTitle AND accessibleHint has not been this will default to 'container [tabIndex]'
|
||||
* @member {string}
|
||||
* @memberof scene.Container#
|
||||
*/
|
||||
accessibleTitle: null,
|
||||
/**
|
||||
* Sets the aria-label attribute of the shadow div
|
||||
* @member {string}
|
||||
* @memberof scene.Container#
|
||||
*/
|
||||
accessibleHint: null,
|
||||
/**
|
||||
* @member {number}
|
||||
* @memberof scene.Container#
|
||||
* @todo Needs docs.
|
||||
*/
|
||||
tabIndex: 0,
|
||||
/**
|
||||
* @member {boolean}
|
||||
* @memberof scene.Container#
|
||||
* @private
|
||||
*/
|
||||
_accessibleActive: false,
|
||||
/**
|
||||
* @memberof scene.Container#
|
||||
* @private
|
||||
*/
|
||||
_accessibleDiv: null,
|
||||
/**
|
||||
* Specify the type of div the accessible layer is. Screen readers treat the element differently
|
||||
* depending on this type. Defaults to button.
|
||||
* @member {string}
|
||||
* @memberof scene.Container#
|
||||
* @default 'button'
|
||||
*/
|
||||
accessibleType: "button",
|
||||
/**
|
||||
* Specify the pointer-events the accessible div will use
|
||||
* Defaults to auto.
|
||||
* @type {PointerEvents}
|
||||
* @memberof scene.Container#
|
||||
* @default 'auto'
|
||||
*/
|
||||
accessiblePointerEvents: "auto",
|
||||
/**
|
||||
* Setting to false will prevent any children inside this container to
|
||||
* be accessible. Defaults to true.
|
||||
* @member {boolean}
|
||||
* @memberof scene.Container#
|
||||
* @default true
|
||||
*/
|
||||
accessibleChildren: true,
|
||||
/**
|
||||
* @member {number}
|
||||
* @memberof scene.Container#
|
||||
* @private
|
||||
*/
|
||||
_renderId: -1
|
||||
};
|
||||
|
||||
export { accessibilityTarget };
|
||||
//# sourceMappingURL=accessibilityTarget.mjs.map
|
1
node_modules/pixi.js/lib/accessibility/accessibilityTarget.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/accessibility/accessibilityTarget.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/pixi.js/lib/accessibility/index.d.ts
generated
vendored
Normal file
2
node_modules/pixi.js/lib/accessibility/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './AccessibilitySystem';
|
||||
export * from './accessibilityTarget';
|
10
node_modules/pixi.js/lib/accessibility/index.js
generated
vendored
Normal file
10
node_modules/pixi.js/lib/accessibility/index.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
var AccessibilitySystem = require('./AccessibilitySystem.js');
|
||||
var accessibilityTarget = require('./accessibilityTarget.js');
|
||||
|
||||
"use strict";
|
||||
|
||||
exports.AccessibilitySystem = AccessibilitySystem.AccessibilitySystem;
|
||||
exports.accessibilityTarget = accessibilityTarget.accessibilityTarget;
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/pixi.js/lib/accessibility/index.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/accessibility/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
5
node_modules/pixi.js/lib/accessibility/index.mjs
generated
vendored
Normal file
5
node_modules/pixi.js/lib/accessibility/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { AccessibilitySystem } from './AccessibilitySystem.mjs';
|
||||
export { accessibilityTarget } from './accessibilityTarget.mjs';
|
||||
|
||||
"use strict";
|
||||
//# sourceMappingURL=index.mjs.map
|
1
node_modules/pixi.js/lib/accessibility/index.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/accessibility/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
1
node_modules/pixi.js/lib/accessibility/init.d.ts
generated
vendored
Normal file
1
node_modules/pixi.js/lib/accessibility/init.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
11
node_modules/pixi.js/lib/accessibility/init.js
generated
vendored
Normal file
11
node_modules/pixi.js/lib/accessibility/init.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var Container = require('../scene/container/Container.js');
|
||||
var AccessibilitySystem = require('./AccessibilitySystem.js');
|
||||
var accessibilityTarget = require('./accessibilityTarget.js');
|
||||
|
||||
"use strict";
|
||||
Extensions.extensions.add(AccessibilitySystem.AccessibilitySystem);
|
||||
Container.Container.mixin(accessibilityTarget.accessibilityTarget);
|
||||
//# sourceMappingURL=init.js.map
|
1
node_modules/pixi.js/lib/accessibility/init.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/accessibility/init.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"init.js","sources":["../../src/accessibility/init.ts"],"sourcesContent":["import { extensions } from '../extensions/Extensions';\nimport { Container } from '../scene/container/Container';\nimport { AccessibilitySystem } from './AccessibilitySystem';\nimport { accessibilityTarget } from './accessibilityTarget';\n\nextensions.add(AccessibilitySystem);\nContainer.mixin(accessibilityTarget);\n"],"names":["extensions","AccessibilitySystem","Container","accessibilityTarget"],"mappings":";;;;;;;;AAKAA,qBAAA,CAAW,IAAIC,uCAAmB,CAAA,CAAA;AAClCC,mBAAA,CAAU,MAAMC,uCAAmB,CAAA;;"}
|
9
node_modules/pixi.js/lib/accessibility/init.mjs
generated
vendored
Normal file
9
node_modules/pixi.js/lib/accessibility/init.mjs
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { extensions } from '../extensions/Extensions.mjs';
|
||||
import { Container } from '../scene/container/Container.mjs';
|
||||
import { AccessibilitySystem } from './AccessibilitySystem.mjs';
|
||||
import { accessibilityTarget } from './accessibilityTarget.mjs';
|
||||
|
||||
"use strict";
|
||||
extensions.add(AccessibilitySystem);
|
||||
Container.mixin(accessibilityTarget);
|
||||
//# sourceMappingURL=init.mjs.map
|
1
node_modules/pixi.js/lib/accessibility/init.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/accessibility/init.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"init.mjs","sources":["../../src/accessibility/init.ts"],"sourcesContent":["import { extensions } from '../extensions/Extensions';\nimport { Container } from '../scene/container/Container';\nimport { AccessibilitySystem } from './AccessibilitySystem';\nimport { accessibilityTarget } from './accessibilityTarget';\n\nextensions.add(AccessibilitySystem);\nContainer.mixin(accessibilityTarget);\n"],"names":[],"mappings":";;;;;;AAKA,UAAA,CAAW,IAAI,mBAAmB,CAAA,CAAA;AAClC,SAAA,CAAU,MAAM,mBAAmB,CAAA"}
|
17
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.d.ts
generated
vendored
Normal file
17
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Available as `container.blendMode = 'color'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'color'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class ColorBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
48
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.js
generated
vendored
Normal file
48
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
var GLhls = require('../filters/blend-modes/hls/GLhls.js');
|
||||
var GPUhls = require('../filters/blend-modes/hls/GPUhls.js');
|
||||
|
||||
"use strict";
|
||||
class ColorBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
${GLhls.hslgl}
|
||||
|
||||
vec3 blendColor(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (setLuminosity(blend, getLuminosity(base)) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendColor(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
${GPUhls.hslgpu}
|
||||
|
||||
fn blendColorOpacity(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
return (setLuminosity(blend, getLuminosity(base)) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendColorOpacity(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
ColorBlend.extension = {
|
||||
name: "color",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.ColorBlend = ColorBlend;
|
||||
//# sourceMappingURL=ColorBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ColorBlend.js","sources":["../../src/advanced-blend-modes/ColorBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\nimport { hslgl } from '../filters/blend-modes/hls/GLhls';\nimport { hslgpu } from '../filters/blend-modes/hls/GPUhls';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'color'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'color'\n * @memberof filters\n */\nexport class ColorBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'color',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n ${hslgl}\n\n vec3 blendColor(vec3 base, vec3 blend, float opacity)\n {\n return (setLuminosity(blend, getLuminosity(base)) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendColor(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n ${hslgpu}\n\n fn blendColorOpacity(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n return (setLuminosity(blend, getLuminosity(base)) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendColorOpacity(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","hslgl","hslgpu","ExtensionType"],"mappings":";;;;;;;;AAiBO,MAAM,mBAAmBA,+BAChC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA,gBAAA,EACTC,WAAK,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAOP,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA,gBAAA,EACTC,aAAM,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAOR,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAvCa,UAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,OAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
46
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.mjs
generated
vendored
Normal file
46
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
import { hslgl } from '../filters/blend-modes/hls/GLhls.mjs';
|
||||
import { hslgpu } from '../filters/blend-modes/hls/GPUhls.mjs';
|
||||
|
||||
"use strict";
|
||||
class ColorBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
${hslgl}
|
||||
|
||||
vec3 blendColor(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (setLuminosity(blend, getLuminosity(base)) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendColor(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
${hslgpu}
|
||||
|
||||
fn blendColorOpacity(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
return (setLuminosity(blend, getLuminosity(base)) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendColorOpacity(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
ColorBlend.extension = {
|
||||
name: "color",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { ColorBlend };
|
||||
//# sourceMappingURL=ColorBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ColorBlend.mjs","sources":["../../src/advanced-blend-modes/ColorBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\nimport { hslgl } from '../filters/blend-modes/hls/GLhls';\nimport { hslgpu } from '../filters/blend-modes/hls/GPUhls';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'color'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'color'\n * @memberof filters\n */\nexport class ColorBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'color',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n ${hslgl}\n\n vec3 blendColor(vec3 base, vec3 blend, float opacity)\n {\n return (setLuminosity(blend, getLuminosity(base)) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendColor(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n ${hslgpu}\n\n fn blendColorOpacity(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n return (setLuminosity(blend, getLuminosity(base)) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendColorOpacity(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;;;AAiBO,MAAM,mBAAmB,eAChC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA,gBAAA,EACT,KAAK,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAOP,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA,gBAAA,EACT,MAAM,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAOR,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAvCa,UAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,OAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
20
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.d.ts
generated
vendored
Normal file
20
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Looks at the color information in each channel and darkens the base color to
|
||||
* reflect the blend color by increasing the contrast between the two.
|
||||
*
|
||||
* Available as `container.blendMode = 'color-burn'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'color-burn'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class ColorBurnBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
64
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.js
generated
vendored
Normal file
64
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class ColorBurnBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float colorBurn(float base, float blend)
|
||||
{
|
||||
return max((1.0 - ((1.0 - base) / blend)), 0.0);
|
||||
}
|
||||
|
||||
vec3 blendColorBurn(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
colorBurn(base.r, blend.r),
|
||||
colorBurn(base.g, blend.g),
|
||||
colorBurn(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendColorBurn(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn colorBurn(base:f32, blend:f32) -> f32
|
||||
{
|
||||
return max((1.0-((1.0-base)/blend)),0.0);
|
||||
}
|
||||
|
||||
fn blendColorBurn(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
colorBurn(base.r, blend.r),
|
||||
colorBurn(base.g, blend.g),
|
||||
colorBurn(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendColorBurn(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
ColorBurnBlend.extension = {
|
||||
name: "color-burn",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.ColorBurnBlend = ColorBurnBlend;
|
||||
//# sourceMappingURL=ColorBurnBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ColorBurnBlend.js","sources":["../../src/advanced-blend-modes/ColorBurnBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Looks at the color information in each channel and darkens the base color to\n * reflect the blend color by increasing the contrast between the two.\n *\n * Available as `container.blendMode = 'color-burn'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'color-burn'\n * @memberof filters\n */\nexport class ColorBurnBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'color-burn',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float colorBurn(float base, float blend)\n {\n return max((1.0 - ((1.0 - base) / blend)), 0.0);\n }\n\n vec3 blendColorBurn(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n colorBurn(base.r, blend.r),\n colorBurn(base.g, blend.g),\n colorBurn(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendColorBurn(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn colorBurn(base:f32, blend:f32) -> f32\n {\n return max((1.0-((1.0-base)/blend)),0.0);\n }\n\n fn blendColorBurn(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n colorBurn(base.r, blend.r),\n colorBurn(base.g, blend.g),\n colorBurn(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendColorBurn(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAoBO,MAAM,uBAAuBA,+BACpC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAzDa,cAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,YAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
62
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.mjs
generated
vendored
Normal file
62
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class ColorBurnBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float colorBurn(float base, float blend)
|
||||
{
|
||||
return max((1.0 - ((1.0 - base) / blend)), 0.0);
|
||||
}
|
||||
|
||||
vec3 blendColorBurn(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
colorBurn(base.r, blend.r),
|
||||
colorBurn(base.g, blend.g),
|
||||
colorBurn(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendColorBurn(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn colorBurn(base:f32, blend:f32) -> f32
|
||||
{
|
||||
return max((1.0-((1.0-base)/blend)),0.0);
|
||||
}
|
||||
|
||||
fn blendColorBurn(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
colorBurn(base.r, blend.r),
|
||||
colorBurn(base.g, blend.g),
|
||||
colorBurn(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendColorBurn(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
ColorBurnBlend.extension = {
|
||||
name: "color-burn",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { ColorBurnBlend };
|
||||
//# sourceMappingURL=ColorBurnBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorBurnBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ColorBurnBlend.mjs","sources":["../../src/advanced-blend-modes/ColorBurnBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Looks at the color information in each channel and darkens the base color to\n * reflect the blend color by increasing the contrast between the two.\n *\n * Available as `container.blendMode = 'color-burn'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'color-burn'\n * @memberof filters\n */\nexport class ColorBurnBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'color-burn',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float colorBurn(float base, float blend)\n {\n return max((1.0 - ((1.0 - base) / blend)), 0.0);\n }\n\n vec3 blendColorBurn(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n colorBurn(base.r, blend.r),\n colorBurn(base.g, blend.g),\n colorBurn(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendColorBurn(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn colorBurn(base:f32, blend:f32) -> f32\n {\n return max((1.0-((1.0-base)/blend)),0.0);\n }\n\n fn blendColorBurn(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n colorBurn(base.r, blend.r),\n colorBurn(base.g, blend.g),\n colorBurn(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendColorBurn(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAoBO,MAAM,uBAAuB,eACpC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAzDa,cAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,YAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
18
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.d.ts
generated
vendored
Normal file
18
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Looks at the color information in each channel and brightens the base color to reflect the blend color by decreasing contrast between the two.
|
||||
* Available as `container.blendMode = 'color-dodge'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'color-dodge'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class ColorDodgeBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
64
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.js
generated
vendored
Normal file
64
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class ColorDodgeBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float colorDodge(float base, float blend)
|
||||
{
|
||||
return base / (1.0 - blend);
|
||||
}
|
||||
|
||||
vec3 blendColorDodge(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
colorDodge(base.r, blend.r),
|
||||
colorDodge(base.g, blend.g),
|
||||
colorDodge(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendColorDodge(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn colorDodge(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return base / (1.0 - blend);
|
||||
}
|
||||
|
||||
fn blendColorDodge(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
colorDodge(base.r, blend.r),
|
||||
colorDodge(base.g, blend.g),
|
||||
colorDodge(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendColorDodge(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
ColorDodgeBlend.extension = {
|
||||
name: "color-dodge",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.ColorDodgeBlend = ColorDodgeBlend;
|
||||
//# sourceMappingURL=ColorDodgeBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ColorDodgeBlend.js","sources":["../../src/advanced-blend-modes/ColorDodgeBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Looks at the color information in each channel and brightens the base color to reflect the blend color by decreasing contrast between the two.\n * Available as `container.blendMode = 'color-dodge'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'color-dodge'\n * @memberof filters\n */\nexport class ColorDodgeBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'color-dodge',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float colorDodge(float base, float blend)\n {\n return base / (1.0 - blend);\n }\n\n vec3 blendColorDodge(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n colorDodge(base.r, blend.r),\n colorDodge(base.g, blend.g),\n colorDodge(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendColorDodge(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn colorDodge(base: f32, blend: f32) -> f32\n {\n return base / (1.0 - blend);\n }\n\n fn blendColorDodge(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n colorDodge(base.r, blend.r),\n colorDodge(base.g, blend.g),\n colorDodge(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendColorDodge(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `,\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAkBO,MAAM,wBAAwBA,+BACrC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAzDa,eAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,aAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
62
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.mjs
generated
vendored
Normal file
62
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class ColorDodgeBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float colorDodge(float base, float blend)
|
||||
{
|
||||
return base / (1.0 - blend);
|
||||
}
|
||||
|
||||
vec3 blendColorDodge(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
colorDodge(base.r, blend.r),
|
||||
colorDodge(base.g, blend.g),
|
||||
colorDodge(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendColorDodge(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn colorDodge(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return base / (1.0 - blend);
|
||||
}
|
||||
|
||||
fn blendColorDodge(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
colorDodge(base.r, blend.r),
|
||||
colorDodge(base.g, blend.g),
|
||||
colorDodge(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendColorDodge(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
ColorDodgeBlend.extension = {
|
||||
name: "color-dodge",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { ColorDodgeBlend };
|
||||
//# sourceMappingURL=ColorDodgeBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/ColorDodgeBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ColorDodgeBlend.mjs","sources":["../../src/advanced-blend-modes/ColorDodgeBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Looks at the color information in each channel and brightens the base color to reflect the blend color by decreasing contrast between the two.\n * Available as `container.blendMode = 'color-dodge'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'color-dodge'\n * @memberof filters\n */\nexport class ColorDodgeBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'color-dodge',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float colorDodge(float base, float blend)\n {\n return base / (1.0 - blend);\n }\n\n vec3 blendColorDodge(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n colorDodge(base.r, blend.r),\n colorDodge(base.g, blend.g),\n colorDodge(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendColorDodge(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn colorDodge(base: f32, blend: f32) -> f32\n {\n return base / (1.0 - blend);\n }\n\n fn blendColorDodge(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n colorDodge(base.r, blend.r),\n colorDodge(base.g, blend.g),\n colorDodge(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendColorDodge(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `,\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAkBO,MAAM,wBAAwB,eACrC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAzDa,eAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,aAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
18
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.d.ts
generated
vendored
Normal file
18
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Uses each color channel to select the darker of the following two values; base or blend color
|
||||
* Available as `container.blendMode = 'darken'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'darken'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class DarkenBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
42
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.js
generated
vendored
Normal file
42
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class DarkenBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
vec3 blendDarken(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (min(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendDarken(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn blendDarken(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
return (min(blend,base) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendDarken(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
DarkenBlend.extension = {
|
||||
name: "darken",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.DarkenBlend = DarkenBlend;
|
||||
//# sourceMappingURL=DarkenBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DarkenBlend.js","sources":["../../src/advanced-blend-modes/DarkenBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Uses each color channel to select the darker of the following two values; base or blend color\n * Available as `container.blendMode = 'darken'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'darken'\n * @memberof filters\n */\nexport class DarkenBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'darken',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n vec3 blendDarken(vec3 base, vec3 blend, float opacity)\n {\n return (min(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendDarken(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn blendDarken(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n return (min(blend,base) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendDarken(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAgBO,MAAM,oBAAoBA,+BACjC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAnCa,WAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,QAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
40
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.mjs
generated
vendored
Normal file
40
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class DarkenBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
vec3 blendDarken(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (min(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendDarken(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn blendDarken(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
return (min(blend,base) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendDarken(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
DarkenBlend.extension = {
|
||||
name: "darken",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { DarkenBlend };
|
||||
//# sourceMappingURL=DarkenBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/DarkenBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DarkenBlend.mjs","sources":["../../src/advanced-blend-modes/DarkenBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Uses each color channel to select the darker of the following two values; base or blend color\n * Available as `container.blendMode = 'darken'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'darken'\n * @memberof filters\n */\nexport class DarkenBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'darken',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n vec3 blendDarken(vec3 base, vec3 blend, float opacity)\n {\n return (min(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendDarken(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn blendDarken(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n return (min(blend,base) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendDarken(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAgBO,MAAM,oBAAoB,eACjC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAnCa,WAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,QAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
17
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.d.ts
generated
vendored
Normal file
17
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Available as `container.blendMode = 'difference'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'difference'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class DifferenceBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
42
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.js
generated
vendored
Normal file
42
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class DifferenceBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
vec3 blendDifference(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (abs(blend - base) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendDifference(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn blendDifference(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
return (abs(blend - base) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendDifference(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
DifferenceBlend.extension = {
|
||||
name: "difference",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.DifferenceBlend = DifferenceBlend;
|
||||
//# sourceMappingURL=DifferenceBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DifferenceBlend.js","sources":["../../src/advanced-blend-modes/DifferenceBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'difference'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'difference'\n * @memberof filters\n */\nexport class DifferenceBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'difference',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n vec3 blendDifference(vec3 base, vec3 blend, float opacity)\n {\n return (abs(blend - base) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendDifference(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn blendDifference(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n return (abs(blend - base) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendDifference(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAeO,MAAM,wBAAwBA,+BACrC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAnCa,eAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,YAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
40
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.mjs
generated
vendored
Normal file
40
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class DifferenceBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
vec3 blendDifference(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (abs(blend - base) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendDifference(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn blendDifference(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
return (abs(blend - base) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendDifference(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
DifferenceBlend.extension = {
|
||||
name: "difference",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { DifferenceBlend };
|
||||
//# sourceMappingURL=DifferenceBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/DifferenceBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DifferenceBlend.mjs","sources":["../../src/advanced-blend-modes/DifferenceBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'difference'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'difference'\n * @memberof filters\n */\nexport class DifferenceBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'difference',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n vec3 blendDifference(vec3 base, vec3 blend, float opacity)\n {\n return (abs(blend - base) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendDifference(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn blendDifference(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n return (abs(blend - base) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendDifference(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAeO,MAAM,wBAAwB,eACrC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAnCa,eAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,YAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
18
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.d.ts
generated
vendored
Normal file
18
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Divides the blend from the base color using each color channel
|
||||
* Available as `container.blendMode = 'divide'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'divide'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class DivideBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
63
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.js
generated
vendored
Normal file
63
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class DivideBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float divide(float base, float blend)
|
||||
{
|
||||
return (blend > 0.0) ? clamp(base / blend, 0.0, 1.0) : 1.0;
|
||||
}
|
||||
|
||||
vec3 blendDivide(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
divide(base.r, blend.r),
|
||||
divide(base.g, blend.g),
|
||||
divide(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendDivide(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn divide(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return select(1.0, clamp(base / blend, 0.0, 1.0), blend > 0.0);
|
||||
}
|
||||
|
||||
fn blendDivide(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
divide(base.r, blend.r),
|
||||
divide(base.g, blend.g),
|
||||
divide(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendDivide(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
DivideBlend.extension = {
|
||||
name: "divide",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.DivideBlend = DivideBlend;
|
||||
//# sourceMappingURL=DivideBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DivideBlend.js","sources":["../../src/advanced-blend-modes/DivideBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Divides the blend from the base color using each color channel\n * Available as `container.blendMode = 'divide'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'divide'\n * @memberof filters\n */\nexport class DivideBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'divide',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float divide(float base, float blend)\n {\n return (blend > 0.0) ? clamp(base / blend, 0.0, 1.0) : 1.0;\n }\n\n vec3 blendDivide(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n divide(base.r, blend.r),\n divide(base.g, blend.g),\n divide(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendDivide(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn divide(base: f32, blend: f32) -> f32\n {\n return select(1.0, clamp(base / blend, 0.0, 1.0), blend > 0.0);\n }\n\n fn blendDivide(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n divide(base.r, blend.r),\n divide(base.g, blend.g),\n divide(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendDivide(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAkBO,MAAM,oBAAoBA,+BACjC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAgBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAxDa,WAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,QAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
61
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.mjs
generated
vendored
Normal file
61
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class DivideBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float divide(float base, float blend)
|
||||
{
|
||||
return (blend > 0.0) ? clamp(base / blend, 0.0, 1.0) : 1.0;
|
||||
}
|
||||
|
||||
vec3 blendDivide(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
divide(base.r, blend.r),
|
||||
divide(base.g, blend.g),
|
||||
divide(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendDivide(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn divide(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return select(1.0, clamp(base / blend, 0.0, 1.0), blend > 0.0);
|
||||
}
|
||||
|
||||
fn blendDivide(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
divide(base.r, blend.r),
|
||||
divide(base.g, blend.g),
|
||||
divide(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendDivide(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
DivideBlend.extension = {
|
||||
name: "divide",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { DivideBlend };
|
||||
//# sourceMappingURL=DivideBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/DivideBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DivideBlend.mjs","sources":["../../src/advanced-blend-modes/DivideBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Divides the blend from the base color using each color channel\n * Available as `container.blendMode = 'divide'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'divide'\n * @memberof filters\n */\nexport class DivideBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'divide',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float divide(float base, float blend)\n {\n return (blend > 0.0) ? clamp(base / blend, 0.0, 1.0) : 1.0;\n }\n\n vec3 blendDivide(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n divide(base.r, blend.r),\n divide(base.g, blend.g),\n divide(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendDivide(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn divide(base: f32, blend: f32) -> f32\n {\n return select(1.0, clamp(base / blend, 0.0, 1.0), blend > 0.0);\n }\n\n fn blendDivide(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n divide(base.r, blend.r),\n divide(base.g, blend.g),\n divide(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendDivide(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAkBO,MAAM,oBAAoB,eACjC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAgBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAxDa,WAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,QAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
17
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.d.ts
generated
vendored
Normal file
17
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Available as `container.blendMode = 'exclusion'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'exclusion'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class ExclusionBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
52
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.js
generated
vendored
Normal file
52
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class ExclusionBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
vec3 exclusion(vec3 base, vec3 blend)
|
||||
{
|
||||
return base + blend - 2.0 * base * blend;
|
||||
}
|
||||
|
||||
vec3 blendExclusion(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (exclusion(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendExclusion(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn exclusion(base: vec3<f32>, blend: vec3<f32>) -> vec3<f32>
|
||||
{
|
||||
return base+blend-2.0*base*blend;
|
||||
}
|
||||
|
||||
fn blendExclusion(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
return (exclusion(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendExclusion(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
ExclusionBlend.extension = {
|
||||
name: "exclusion",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.ExclusionBlend = ExclusionBlend;
|
||||
//# sourceMappingURL=ExclusionBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ExclusionBlend.js","sources":["../../src/advanced-blend-modes/ExclusionBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'exclusion'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'exclusion'\n * @memberof filters\n */\nexport class ExclusionBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'exclusion',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n vec3 exclusion(vec3 base, vec3 blend)\n {\n return base + blend - 2.0 * base * blend;\n }\n\n vec3 blendExclusion(vec3 base, vec3 blend, float opacity)\n {\n return (exclusion(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendExclusion(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn exclusion(base: vec3<f32>, blend: vec3<f32>) -> vec3<f32>\n {\n return base+blend-2.0*base*blend;\n }\n\n fn blendExclusion(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n return (exclusion(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendExclusion(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAeO,MAAM,uBAAuBA,+BACpC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAWX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAWX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AA7Ca,cAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,WAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
50
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.mjs
generated
vendored
Normal file
50
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class ExclusionBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
vec3 exclusion(vec3 base, vec3 blend)
|
||||
{
|
||||
return base + blend - 2.0 * base * blend;
|
||||
}
|
||||
|
||||
vec3 blendExclusion(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (exclusion(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendExclusion(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn exclusion(base: vec3<f32>, blend: vec3<f32>) -> vec3<f32>
|
||||
{
|
||||
return base+blend-2.0*base*blend;
|
||||
}
|
||||
|
||||
fn blendExclusion(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
return (exclusion(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendExclusion(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
ExclusionBlend.extension = {
|
||||
name: "exclusion",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { ExclusionBlend };
|
||||
//# sourceMappingURL=ExclusionBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/ExclusionBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ExclusionBlend.mjs","sources":["../../src/advanced-blend-modes/ExclusionBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'exclusion'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'exclusion'\n * @memberof filters\n */\nexport class ExclusionBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'exclusion',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n vec3 exclusion(vec3 base, vec3 blend)\n {\n return base + blend - 2.0 * base * blend;\n }\n\n vec3 blendExclusion(vec3 base, vec3 blend, float opacity)\n {\n return (exclusion(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendExclusion(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn exclusion(base: vec3<f32>, blend: vec3<f32>) -> vec3<f32>\n {\n return base+blend-2.0*base*blend;\n }\n\n fn blendExclusion(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n return (exclusion(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendExclusion(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAeO,MAAM,uBAAuB,eACpC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAWX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAWX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AA7Ca,cAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,WAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
17
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.d.ts
generated
vendored
Normal file
17
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Available as `container.blendMode = 'hard-light'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'hard-light'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class HardLightBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
63
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.js
generated
vendored
Normal file
63
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class HardLightBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float hardLight(float base, float blend)
|
||||
{
|
||||
return (blend < 0.5) ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);
|
||||
}
|
||||
|
||||
vec3 blendHardLight(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
hardLight(base.r, blend.r),
|
||||
hardLight(base.g, blend.g),
|
||||
hardLight(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendHardLight(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn hardLight(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return select(1.0 - 2.0 * (1.0 - base) * (1.0 - blend), 2.0 * base * blend, blend < 0.5);
|
||||
}
|
||||
|
||||
fn blendHardLight(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
hardLight(base.r, blend.r),
|
||||
hardLight(base.g, blend.g),
|
||||
hardLight(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendHardLight(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
HardLightBlend.extension = {
|
||||
name: "hard-light",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.HardLightBlend = HardLightBlend;
|
||||
//# sourceMappingURL=HardLightBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HardLightBlend.js","sources":["../../src/advanced-blend-modes/HardLightBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'hard-light'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'hard-light'\n * @memberof filters\n */\nexport class HardLightBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'hard-light',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float hardLight(float base, float blend)\n {\n return (blend < 0.5) ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);\n }\n\n vec3 blendHardLight(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n hardLight(base.r, blend.r),\n hardLight(base.g, blend.g),\n hardLight(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendHardLight(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn hardLight(base: f32, blend: f32) -> f32\n {\n return select(1.0 - 2.0 * (1.0 - base) * (1.0 - blend), 2.0 * base * blend, blend < 0.5);\n }\n\n fn blendHardLight(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n hardLight(base.r, blend.r),\n hardLight(base.g, blend.g),\n hardLight(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendHardLight(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAiBO,MAAM,uBAAuBA,+BACpC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAgBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAxDa,cAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,YAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
61
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.mjs
generated
vendored
Normal file
61
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class HardLightBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float hardLight(float base, float blend)
|
||||
{
|
||||
return (blend < 0.5) ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);
|
||||
}
|
||||
|
||||
vec3 blendHardLight(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
hardLight(base.r, blend.r),
|
||||
hardLight(base.g, blend.g),
|
||||
hardLight(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendHardLight(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn hardLight(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return select(1.0 - 2.0 * (1.0 - base) * (1.0 - blend), 2.0 * base * blend, blend < 0.5);
|
||||
}
|
||||
|
||||
fn blendHardLight(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
hardLight(base.r, blend.r),
|
||||
hardLight(base.g, blend.g),
|
||||
hardLight(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendHardLight(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
HardLightBlend.extension = {
|
||||
name: "hard-light",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { HardLightBlend };
|
||||
//# sourceMappingURL=HardLightBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/HardLightBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HardLightBlend.mjs","sources":["../../src/advanced-blend-modes/HardLightBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'hard-light'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'hard-light'\n * @memberof filters\n */\nexport class HardLightBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'hard-light',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float hardLight(float base, float blend)\n {\n return (blend < 0.5) ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);\n }\n\n vec3 blendHardLight(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n hardLight(base.r, blend.r),\n hardLight(base.g, blend.g),\n hardLight(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendHardLight(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn hardLight(base: f32, blend: f32) -> f32\n {\n return select(1.0 - 2.0 * (1.0 - base) * (1.0 - blend), 2.0 * base * blend, blend < 0.5);\n }\n\n fn blendHardLight(base: vec3<f32>, blend: vec3<f32>, opacity: f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n hardLight(base.r, blend.r),\n hardLight(base.g, blend.g),\n hardLight(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendHardLight(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAiBO,MAAM,uBAAuB,eACpC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAgBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAxDa,cAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,YAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
20
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.d.ts
generated
vendored
Normal file
20
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Hard defines each of the color channel values of the blend color to the RGB values of the base color.
|
||||
* If the sum of a channel is 255, it receives a value of 255; if less than 255, a value of 0.
|
||||
*
|
||||
* Available as `container.blendMode = 'hard-mix'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'hard-mix'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class HardMixBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
62
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.js
generated
vendored
Normal file
62
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class HardMixBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float hardMix(float base, float blend)
|
||||
{
|
||||
return (base + blend >= 1.0) ? 1.0 : 0.0;
|
||||
}
|
||||
|
||||
vec3 blendHardMix(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
hardMix(base.r, blend.r),
|
||||
hardMix(base.g, blend.g),
|
||||
hardMix(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendHardMix(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn hardMix(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return select(0.0, 1.0, base + blend >= 1.0);
|
||||
}
|
||||
|
||||
fn blendHardMix(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
let blended: vec3<f32> = vec3<f32>(
|
||||
hardMix(base.r, blend.r),
|
||||
hardMix(base.g, blend.g),
|
||||
hardMix(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendHardMix(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
HardMixBlend.extension = {
|
||||
name: "hard-mix",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.HardMixBlend = HardMixBlend;
|
||||
//# sourceMappingURL=HardMixBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HardMixBlend.js","sources":["../../src/advanced-blend-modes/HardMixBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Hard defines each of the color channel values of the blend color to the RGB values of the base color.\n * If the sum of a channel is 255, it receives a value of 255; if less than 255, a value of 0.\n *\n * Available as `container.blendMode = 'hard-mix'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'hard-mix'\n * @memberof filters\n */\nexport class HardMixBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'hard-mix',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float hardMix(float base, float blend)\n {\n return (base + blend >= 1.0) ? 1.0 : 0.0;\n }\n\n vec3 blendHardMix(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n hardMix(base.r, blend.r),\n hardMix(base.g, blend.g),\n hardMix(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendHardMix(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn hardMix(base: f32, blend: f32) -> f32\n {\n return select(0.0, 1.0, base + blend >= 1.0);\n }\n\n fn blendHardMix(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n let blended: vec3<f32> = vec3<f32>(\n hardMix(base.r, blend.r),\n hardMix(base.g, blend.g),\n hardMix(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendHardMix(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAoBO,MAAM,qBAAqBA,+BAClC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAgBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAgBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAvDa,YAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,UAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
60
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.mjs
generated
vendored
Normal file
60
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class HardMixBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float hardMix(float base, float blend)
|
||||
{
|
||||
return (base + blend >= 1.0) ? 1.0 : 0.0;
|
||||
}
|
||||
|
||||
vec3 blendHardMix(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
hardMix(base.r, blend.r),
|
||||
hardMix(base.g, blend.g),
|
||||
hardMix(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendHardMix(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn hardMix(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return select(0.0, 1.0, base + blend >= 1.0);
|
||||
}
|
||||
|
||||
fn blendHardMix(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
let blended: vec3<f32> = vec3<f32>(
|
||||
hardMix(base.r, blend.r),
|
||||
hardMix(base.g, blend.g),
|
||||
hardMix(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendHardMix(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
HardMixBlend.extension = {
|
||||
name: "hard-mix",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { HardMixBlend };
|
||||
//# sourceMappingURL=HardMixBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/HardMixBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HardMixBlend.mjs","sources":["../../src/advanced-blend-modes/HardMixBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Hard defines each of the color channel values of the blend color to the RGB values of the base color.\n * If the sum of a channel is 255, it receives a value of 255; if less than 255, a value of 0.\n *\n * Available as `container.blendMode = 'hard-mix'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'hard-mix'\n * @memberof filters\n */\nexport class HardMixBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'hard-mix',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float hardMix(float base, float blend)\n {\n return (base + blend >= 1.0) ? 1.0 : 0.0;\n }\n\n vec3 blendHardMix(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n hardMix(base.r, blend.r),\n hardMix(base.g, blend.g),\n hardMix(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendHardMix(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn hardMix(base: f32, blend: f32) -> f32\n {\n return select(0.0, 1.0, base + blend >= 1.0);\n }\n\n fn blendHardMix(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n let blended: vec3<f32> = vec3<f32>(\n hardMix(base.r, blend.r),\n hardMix(base.g, blend.g),\n hardMix(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendHardMix(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAoBO,MAAM,qBAAqB,eAClC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAgBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAgBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAvDa,YAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,UAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
17
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.d.ts
generated
vendored
Normal file
17
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Available as `container.blendMode = 'lighten'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'lighten'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class LightenBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
42
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.js
generated
vendored
Normal file
42
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class LightenBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
vec3 blendLighten(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (max(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendLighten(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn blendLighten(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
return (max(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendLighten(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
LightenBlend.extension = {
|
||||
name: "lighten",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.LightenBlend = LightenBlend;
|
||||
//# sourceMappingURL=LightenBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"LightenBlend.js","sources":["../../src/advanced-blend-modes/LightenBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'lighten'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'lighten'\n * @memberof filters\n */\nexport class LightenBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'lighten',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n vec3 blendLighten(vec3 base, vec3 blend, float opacity)\n {\n return (max(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendLighten(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn blendLighten(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n return (max(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendLighten(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAeO,MAAM,qBAAqBA,+BAClC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAnCa,YAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,SAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
40
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.mjs
generated
vendored
Normal file
40
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class LightenBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
vec3 blendLighten(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
return (max(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendLighten(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn blendLighten(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
return (max(base, blend) * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendLighten(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
LightenBlend.extension = {
|
||||
name: "lighten",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { LightenBlend };
|
||||
//# sourceMappingURL=LightenBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/LightenBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"LightenBlend.mjs","sources":["../../src/advanced-blend-modes/LightenBlend.ts"],"sourcesContent":["import { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Available as `container.blendMode = 'lighten'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'lighten'\n * @memberof filters\n */\nexport class LightenBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'lighten',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n vec3 blendLighten(vec3 base, vec3 blend, float opacity)\n {\n return (max(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendLighten(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn blendLighten(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n return (max(base, blend) * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendLighten(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAeO,MAAM,qBAAqB,eAClC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAMX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAnCa,YAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,SAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
20
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.d.ts
generated
vendored
Normal file
20
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Looks at the color information in each channel and darkens the base color to
|
||||
* reflect the blend color by increasing the contrast between the two.
|
||||
*
|
||||
* Available as `container.blendMode = 'linear-burn'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'linear-burn'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class LinearBurnBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
64
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.js
generated
vendored
Normal file
64
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class LinearBurnBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float linearBurn(float base, float blend)
|
||||
{
|
||||
return max(0.0, base + blend - 1.0);
|
||||
}
|
||||
|
||||
vec3 blendLinearBurn(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
linearBurn(base.r, blend.r),
|
||||
linearBurn(base.g, blend.g),
|
||||
linearBurn(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendLinearBurn(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn linearBurn(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return max(0.0, base + blend - 1.0);
|
||||
}
|
||||
|
||||
fn blendLinearBurn(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
linearBurn(base.r, blend.r),
|
||||
linearBurn(base.g, blend.g),
|
||||
linearBurn(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendLinearBurn(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
LinearBurnBlend.extension = {
|
||||
name: "linear-burn",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.LinearBurnBlend = LinearBurnBlend;
|
||||
//# sourceMappingURL=LinearBurnBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"LinearBurnBlend.js","sources":["../../src/advanced-blend-modes/LinearBurnBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Looks at the color information in each channel and darkens the base color to\n * reflect the blend color by increasing the contrast between the two.\n *\n * Available as `container.blendMode = 'linear-burn'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'linear-burn'\n * @memberof filters\n */\nexport class LinearBurnBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'linear-burn',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float linearBurn(float base, float blend)\n {\n return max(0.0, base + blend - 1.0);\n }\n\n vec3 blendLinearBurn(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n linearBurn(base.r, blend.r),\n linearBurn(base.g, blend.g),\n linearBurn(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendLinearBurn(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn linearBurn(base: f32, blend: f32) -> f32\n {\n return max(0.0, base + blend - 1.0);\n }\n\n fn blendLinearBurn(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n linearBurn(base.r, blend.r),\n linearBurn(base.g, blend.g),\n linearBurn(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendLinearBurn(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAoBO,MAAM,wBAAwBA,+BACrC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAzDa,eAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,aAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
62
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.mjs
generated
vendored
Normal file
62
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class LinearBurnBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float linearBurn(float base, float blend)
|
||||
{
|
||||
return max(0.0, base + blend - 1.0);
|
||||
}
|
||||
|
||||
vec3 blendLinearBurn(vec3 base, vec3 blend, float opacity)
|
||||
{
|
||||
vec3 blended = vec3(
|
||||
linearBurn(base.r, blend.r),
|
||||
linearBurn(base.g, blend.g),
|
||||
linearBurn(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendLinearBurn(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn linearBurn(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return max(0.0, base + blend - 1.0);
|
||||
}
|
||||
|
||||
fn blendLinearBurn(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
linearBurn(base.r, blend.r),
|
||||
linearBurn(base.g, blend.g),
|
||||
linearBurn(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendLinearBurn(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
LinearBurnBlend.extension = {
|
||||
name: "linear-burn",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { LinearBurnBlend };
|
||||
//# sourceMappingURL=LinearBurnBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/LinearBurnBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"LinearBurnBlend.mjs","sources":["../../src/advanced-blend-modes/LinearBurnBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Looks at the color information in each channel and darkens the base color to\n * reflect the blend color by increasing the contrast between the two.\n *\n * Available as `container.blendMode = 'linear-burn'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'linear-burn'\n * @memberof filters\n */\nexport class LinearBurnBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'linear-burn',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float linearBurn(float base, float blend)\n {\n return max(0.0, base + blend - 1.0);\n }\n\n vec3 blendLinearBurn(vec3 base, vec3 blend, float opacity)\n {\n vec3 blended = vec3(\n linearBurn(base.r, blend.r),\n linearBurn(base.g, blend.g),\n linearBurn(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendLinearBurn(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn linearBurn(base: f32, blend: f32) -> f32\n {\n return max(0.0, base + blend - 1.0);\n }\n\n fn blendLinearBurn(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n linearBurn(base.r, blend.r),\n linearBurn(base.g, blend.g),\n linearBurn(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendLinearBurn(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAoBO,MAAM,wBAAwB,eACrC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAzDa,eAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,aAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
18
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.d.ts
generated
vendored
Normal file
18
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Looks at the color information in each channel and brightens the base color to reflect the blend color by decreasing contrast between the two.
|
||||
* Available as `container.blendMode = 'linear-dodge'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'linear-dodge'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class LinearDodgeBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
61
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.js
generated
vendored
Normal file
61
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class LinearDodgeBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float linearDodge(float base, float blend) {
|
||||
return min(1.0, base + blend);
|
||||
}
|
||||
|
||||
vec3 blendLinearDodge(vec3 base, vec3 blend, float opacity) {
|
||||
vec3 blended = vec3(
|
||||
linearDodge(base.r, blend.r),
|
||||
linearDodge(base.g, blend.g),
|
||||
linearDodge(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendLinearDodge(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn linearDodge(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return min(1, base + blend);
|
||||
}
|
||||
|
||||
fn blendLinearDodge(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
linearDodge(base.r, blend.r),
|
||||
linearDodge(base.g, blend.g),
|
||||
linearDodge(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendLinearDodge(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
LinearDodgeBlend.extension = {
|
||||
name: "linear-dodge",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.LinearDodgeBlend = LinearDodgeBlend;
|
||||
//# sourceMappingURL=LinearDodgeBlend.js.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"LinearDodgeBlend.js","sources":["../../src/advanced-blend-modes/LinearDodgeBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Looks at the color information in each channel and brightens the base color to reflect the blend color by decreasing contrast between the two.\n * Available as `container.blendMode = 'linear-dodge'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'linear-dodge'\n * @memberof filters\n */\nexport class LinearDodgeBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'linear-dodge',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float linearDodge(float base, float blend) {\n return min(1.0, base + blend);\n }\n\n vec3 blendLinearDodge(vec3 base, vec3 blend, float opacity) {\n vec3 blended = vec3(\n linearDodge(base.r, blend.r),\n linearDodge(base.g, blend.g),\n linearDodge(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendLinearDodge(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn linearDodge(base: f32, blend: f32) -> f32\n {\n return min(1, base + blend);\n }\n\n fn blendLinearDodge(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n linearDodge(base.r, blend.r),\n linearDodge(base.g, blend.g),\n linearDodge(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendLinearDodge(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":["BlendModeFilter","ExtensionType"],"mappings":";;;;;;AAkBO,MAAM,yBAAyBA,+BACtC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAcX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAtDa,gBAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,cAAA;AAAA,EACN,MAAMC,wBAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
59
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.mjs
generated
vendored
Normal file
59
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.mjs
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
import { ExtensionType } from '../extensions/Extensions.mjs';
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter.mjs';
|
||||
|
||||
"use strict";
|
||||
class LinearDodgeBlend extends BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float linearDodge(float base, float blend) {
|
||||
return min(1.0, base + blend);
|
||||
}
|
||||
|
||||
vec3 blendLinearDodge(vec3 base, vec3 blend, float opacity) {
|
||||
vec3 blended = vec3(
|
||||
linearDodge(base.r, blend.r),
|
||||
linearDodge(base.g, blend.g),
|
||||
linearDodge(base.b, blend.b)
|
||||
);
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendLinearDodge(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn linearDodge(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return min(1, base + blend);
|
||||
}
|
||||
|
||||
fn blendLinearDodge(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
linearDodge(base.r, blend.r),
|
||||
linearDodge(base.g, blend.g),
|
||||
linearDodge(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendLinearDodge(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
LinearDodgeBlend.extension = {
|
||||
name: "linear-dodge",
|
||||
type: ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
export { LinearDodgeBlend };
|
||||
//# sourceMappingURL=LinearDodgeBlend.mjs.map
|
1
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/advanced-blend-modes/LinearDodgeBlend.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"LinearDodgeBlend.mjs","sources":["../../src/advanced-blend-modes/LinearDodgeBlend.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { ExtensionType } from '../extensions/Extensions';\nimport { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';\n\nimport type { ExtensionMetadata } from '../extensions/Extensions';\n\n/**\n * Looks at the color information in each channel and brightens the base color to reflect the blend color by decreasing contrast between the two.\n * Available as `container.blendMode = 'linear-dodge'` after importing `pixi.js/advanced-blend-modes`.\n * @example\n * import 'pixi.js/advanced-blend-modes';\n * import { Sprite } from 'pixi.js';\n *\n * const sprite = Sprite.from('something.png');\n * sprite.blendMode = 'linear-dodge'\n * @memberof filters\n */\nexport class LinearDodgeBlend extends BlendModeFilter\n{\n /** @ignore */\n public static extension: ExtensionMetadata = {\n name: 'linear-dodge',\n type: ExtensionType.BlendMode\n };\n\n constructor()\n {\n super({\n gl: {\n functions: `\n float linearDodge(float base, float blend) {\n return min(1.0, base + blend);\n }\n\n vec3 blendLinearDodge(vec3 base, vec3 blend, float opacity) {\n vec3 blended = vec3(\n linearDodge(base.r, blend.r),\n linearDodge(base.g, blend.g),\n linearDodge(base.b, blend.b)\n );\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n finalColor = vec4(blendLinearDodge(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;\n `\n },\n gpu: {\n functions: `\n fn linearDodge(base: f32, blend: f32) -> f32\n {\n return min(1, base + blend);\n }\n\n fn blendLinearDodge(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>\n {\n let blended = vec3<f32>(\n linearDodge(base.r, blend.r),\n linearDodge(base.g, blend.g),\n linearDodge(base.b, blend.b)\n );\n\n return (blended * opacity + base * (1.0 - opacity));\n }\n `,\n main: `\n out = vec4<f32>(blendLinearDodge(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;\n `\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;AAkBO,MAAM,yBAAyB,eACtC,CAAA;AAAA,EAOI,WACA,GAAA;AACI,IAAM,KAAA,CAAA;AAAA,MACF,EAAI,EAAA;AAAA,QACA,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,QAcX,IAAM,EAAA,CAAA;AAAA;AAAA,gBAAA,CAAA;AAAA,OAGV;AAAA,MACA,GAAK,EAAA;AAAA,QACD,SAAW,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,CAAA;AAAA,QAiBX,IAAM,EAAA,CAAA;AAAA;AAAA,YAAA,CAAA;AAAA,OAGV;AAAA,KACH,CAAA,CAAA;AAAA,GACL;AACJ,CAAA;AAAA;AAtDa,gBAAA,CAGK,SAA+B,GAAA;AAAA,EACzC,IAAM,EAAA,cAAA;AAAA,EACN,MAAM,aAAc,CAAA,SAAA;AACxB,CAAA;;;;"}
|
18
node_modules/pixi.js/lib/advanced-blend-modes/LinearLightBlend.d.ts
generated
vendored
Normal file
18
node_modules/pixi.js/lib/advanced-blend-modes/LinearLightBlend.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { BlendModeFilter } from '../filters/blend-modes/BlendModeFilter';
|
||||
import type { ExtensionMetadata } from '../extensions/Extensions';
|
||||
/**
|
||||
* Increase or decrease brightness by burning or dodging color values, based on the blend color
|
||||
* Available as `container.blendMode = 'linear-light'` after importing `pixi.js/advanced-blend-modes`.
|
||||
* @example
|
||||
* import 'pixi.js/advanced-blend-modes';
|
||||
* import { Sprite } from 'pixi.js';
|
||||
*
|
||||
* const sprite = Sprite.from('something.png');
|
||||
* sprite.blendMode = 'linear-light'
|
||||
* @memberof filters
|
||||
*/
|
||||
export declare class LinearLightBlend extends BlendModeFilter {
|
||||
/** @ignore */
|
||||
static extension: ExtensionMetadata;
|
||||
constructor();
|
||||
}
|
80
node_modules/pixi.js/lib/advanced-blend-modes/LinearLightBlend.js
generated
vendored
Normal file
80
node_modules/pixi.js/lib/advanced-blend-modes/LinearLightBlend.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
'use strict';
|
||||
|
||||
var Extensions = require('../extensions/Extensions.js');
|
||||
var BlendModeFilter = require('../filters/blend-modes/BlendModeFilter.js');
|
||||
|
||||
"use strict";
|
||||
class LinearLightBlend extends BlendModeFilter.BlendModeFilter {
|
||||
constructor() {
|
||||
super({
|
||||
gl: {
|
||||
functions: `
|
||||
float linearBurn(float base, float blend) {
|
||||
return max(0.0, base + blend - 1.0);
|
||||
}
|
||||
|
||||
float linearDodge(float base, float blend) {
|
||||
return min(1.0, base + blend);
|
||||
}
|
||||
|
||||
float linearLight(float base, float blend) {
|
||||
return (blend <= 0.5) ? linearBurn(base,2.0*blend) : linearBurn(base,2.0*(blend-0.5));
|
||||
}
|
||||
|
||||
vec3 blendLinearLight(vec3 base, vec3 blend, float opacity) {
|
||||
vec3 blended = vec3(
|
||||
linearLight(base.r, blend.r),
|
||||
linearLight(base.g, blend.g),
|
||||
linearLight(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
finalColor = vec4(blendLinearLight(back.rgb, front.rgb,front.a), blendedAlpha) * uBlend;
|
||||
`
|
||||
},
|
||||
gpu: {
|
||||
functions: `
|
||||
fn linearBurn(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return max(0.0, base + blend - 1.0);
|
||||
}
|
||||
|
||||
fn linearDodge(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return min(1.0, base + blend);
|
||||
}
|
||||
|
||||
fn linearLight(base: f32, blend: f32) -> f32
|
||||
{
|
||||
return select(linearBurn(base,2.0*(blend-0.5)), linearBurn(base,2.0*blend), blend <= 0.5);
|
||||
}
|
||||
|
||||
fn blendLinearLightOpacity(base:vec3<f32>, blend:vec3<f32>, opacity:f32) -> vec3<f32>
|
||||
{
|
||||
let blended = vec3<f32>(
|
||||
linearLight(base.r, blend.r),
|
||||
linearLight(base.g, blend.g),
|
||||
linearLight(base.b, blend.b)
|
||||
);
|
||||
|
||||
return (blended * opacity + base * (1.0 - opacity));
|
||||
}
|
||||
`,
|
||||
main: `
|
||||
out = vec4<f32>(blendLinearLightOpacity(back.rgb, front.rgb, front.a), blendedAlpha) * blendUniforms.uBlend;
|
||||
`
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @ignore */
|
||||
LinearLightBlend.extension = {
|
||||
name: "linear-light",
|
||||
type: Extensions.ExtensionType.BlendMode
|
||||
};
|
||||
|
||||
exports.LinearLightBlend = LinearLightBlend;
|
||||
//# sourceMappingURL=LinearLightBlend.js.map
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user