// npm 패키지
@antv/a8
A music visualizer
주간
42
월간
54
버전
1
메인테이너
51
라이선스
MIT
최초 publish
2023-12-26
publisher
panyuqi
tarball
978,635 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2023-12-26
// publisher 캠페인by panyuqi
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @0.0.1· no static-pattern hits
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @0.0.1··AUTO-PUBLISHED·publisher: panyuqiheuristic 75/100static flags 0llm benign (0.85) via ollamafirst-version-of-packageosv-flagged:MAL-2026-3848
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· no static-pattern hits
--- package.json (entry) --- { "name": "@antv/a8", "version": "0.0.1", "description": "A music visualizer", "keywords": [ "antv", "music visualizer" ], "repository": { "type": "git", "url": "https://github.com/antvis/a8" }, "license": "MIT", "author": { "name": "xiaoiver", "url": "https://github.com/xiaoiver" }, "exports": { "types": "./es/index.d.ts", "import": "./es/index.js", "default": "./lib/index.js" }, "main": "lib/index.js", "module": "es/index.js", "types": "es/index.d.ts", "unpkg": "dist/index.umd.min.js", "files": [ "lib", "es", "dist" ], "sideEffects": false, "dependencies": { "@antv/util": "^3.3.4", "@antv/g-device-api": "^1.4.11", "eventemitter3": "^5.0.1", "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "devDependencies": { "@playwright/test": "^1.39.0", "@commitlint/cli": "^8.3.6", "@commitlint/config-angular": "^9.1.2", "@changesets/cli": "^2.26.2", "@rollup/plugin-babel": "^6.0.3", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.1.0", "@rollup/plugin-terser": "^0.4.3", "@rollup/plugin-typescript": "^11.1.1", "@types/jest" --- index.js (entry) --- 'use strict'; var tslib = require('tslib'); var gDeviceApi = require('@antv/g-device-api'); var Audio = /** @class */ (function () { function Audio(options) { this.options = options; this.dataArray = new Uint8Array(512).fill(0); this.mouse = { pos: { x: 0, y: 0 }, click: 0 }; this.oninit = function () { }; this.onframe = function () { }; if (options.data) { this.initAnalyser(); } if (options.effect) { this.initEffect(); } this.initMouseListener(); } Audio.prototype.initAnalyser = function () { var data = this.options.data; var context = new AudioContext(); var src = context.createMediaElementSource(data); var analyser = context.createAnalyser(); this.analyser = analyser; src.connect(analyser); analyser.connect(context.destination); analyser.fftSize = 512; var bufferLength = analyser.frequencyBinCount; var dataArray = new Uint8Array(bufferLength); this.dataArray = dataArray; }; Audio.prototype.initEffect = function () { var _a = this.options, canvas = _a.canvas, ef --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/Audio.d.ts (bundled) --- import { Effect } from './effects'; export interface Options { canvas: HTMLCanvasElement; data?: HTMLMediaElement; effect?: Effect; } export declare class Audio { private options; private analyser; private dataArray; private timer; private mouse; private ready; oninit: () => void; onframe: () => void; constructor(options: Options); private initAnalyser; private initEffect; private initMouseListener; data($audio: HTMLMediaElement): this; effect(effect: Effect): this; style(options: any): this; play(): Promise<void>; resize(width: number, height: number): void; destroy(): void; } --- dist/index.d.ts (bundled) --- export * from './Audio'; export * from './effects'; --- dist/index.umd.min.js (bundled) --- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).A8={})}(this,(function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+r+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;n>r;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function i(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{_(n.next(e))}catch(e){o(e)}}function s(e){try{_(n.throw(e))}catch(e){o(e)}}function _(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}_((n=n.apply(e,t||[])).next())}))}function o(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(_){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&i[3]>s[1])){a.label=s[1];br --- dist/utils.d.ts (bundled) --- import { TypedArray } from '@antv/g-device-api'; export declare function fractionate(val: number, minVal: number, maxVal: number): number; export declare function modulate(val: number, minVal: number, maxVal: number, outMin: number, outMax: number): number; export declare function avg(arr: number[] | TypedArray): number; export declare function max(arr: number[] | TypedArray): any; export declare function normalize(out: number[], a: number[]): number[]; --- dist/effects/Effect.d.ts (bundled) --- export interface Effect { init($canvas: HTMLCanvasElement): Promise<void>; resize(width: number, height: number): void; frame(frame: number, elapsed: number, mouse: any, buffer: Uint8Array): void; update(options: any): void; destroy(): void; } --- dist/effects/index.d.ts (bundled) --- export * from './Effect'; export * from './gpu'; --- dist/effects/utils.d.ts (bundled) --- import { Device, ProgramDescriptor, Texture } from '@antv/g-device-api'; /** * Use naga-oil to combine and manipulate shaders. * The order is important. */ export declare function registerShaderModule(device: Device, shader: string): string; export declare function defineStr(k: string, v: string): string; export declare function createProgram(device: Device, desc: ProgramDescriptor, defines?: Record<string, boolean | number>): import("@antv/g-device-api").Program; export declare const alias = "\n alias int = i32;\n alias uint = u32;\n alias float = f32;\n alias int2 = vec2<i32>;\n alias int3 = vec3<i32>;\n alias int4 = vec4<i32>;\n alias uint2 = vec2<u32>;\n alias uint3 = vec3<u32>;\n alias uint4 = vec4<u32>;\n alias float2 = vec2<f32>;\n alias float3 = vec3<f32>;\n alias float4 = vec4<f32>;\n alias bool2 = vec2<bool>;\n alias bool3 = vec3<bool>;\n alias bool4 = vec4<bool>;\n alias float2x2 = mat2x2<f32>;\n alias float2x3 = mat2x3<f32>;\n alias float2x4 = mat2x4<f32>;\n alias float3x2 = mat3x2<f32>;\n alias float3x3 = mat3x3<f32>;\n alias float3x4 = mat3x4<f32>;\n alias float4x2 = mat4x2<f32>;\n alias float4x3 = mat4x3<f32>;\n alias float4x4 = mat4x4<f32>;\n "; /** * @see https://github.com/compute-toys/wgpu-compute-toy/blob/master/src/lib.rs#L367 * @see https://github.com/compute-toys/wgpu-compute-toy/blob/master/src/bind.rs#L437 */ export declare const prelude = "\n #define_import_path prelude\n \n struct Time {\n frame: u32,\n elapsed : f32\n }\n\n struct Mouse { \n pos: uint2, \n click: int\n }\n \n @group(0) @binding(0) var<uniform> time : Time;\n @group(0) @binding(1) var<uniform> mouse: Mouse;\n @group(1) @binding(0) var pass_in: texture_2d_array<f32>;\n @group(1) @binding(1) var bilinear: sampler;\n @group(3) @binding(0) var screen : texture_storage_2d<rgba16float, write>;\n @group(3) @binding(1) var pass_out: texture_storage_2d_array<rgba16float,write>;\n \n fn passStore(pass_index: int, coord: int2, --- dist/effects/gpu/BlackHole.d.ts (bundled) --- import { GPUParticleEffect } from './GPUParticleEffect'; export interface BlackHoleOptions { radius: number; timeStep: number; samples: number; animatedNoise: number; accumulation: number; exposure: number; blurExponentA: number; blurExponentB: number; blurRadius: number; kerrA: number; kerrQ: number; initSpeed: number; initThick: number; steps: number; focalPlane: number; motionBlur: number; gamma: number; } /** * @see https://compute.toys/view/29 */ export declare class BlackHole extends GPUParticleEffect { private options; private customUniformBuffer; private simulateParticlesPipeline; private simulateParticlesBindings; private clearPipeline; private clearBindings; private rasterizePipeline; private rasterizeBindings; private mainImagePipeline; private mainImageBindings; private pass_in; private pass_out; constructor(shaderCompilerPath: string, options?: Partial<BlackHoleOptions>); registerShaderModule(): void; compute({ overallAvg, upperAvgFr, lowerAvgFr }: { overallAvg: any; upperAvgFr: any; lowerAvgFr: any; }): void; update(options: Partial<BlackHoleOptions>): void; destroy(): void; } --- dist/effects/gpu/GPUParticleEffect.d.ts (bundled) --- import { Buffer, Device, RenderTarget, SwapChain, Texture } from '@antv/g-device-api'; import { Effect } from '../Effect'; /** * WebGPU compute shader. */ export declare class GPUParticleEffect implements Effect { private shaderCompilerPath; protected $canvas: HTMLCanvasElement; protected device: Device; protected swapChain: SwapChain; protected renderTarget: RenderTarget; protected timeBuffer: Buffer; protected mouseBuffer: Buffer; protected screen: Texture; private blitPipeline; private blitBindings; private resized; private inited; constructor(shaderCompilerPath: string); /** * Register custom shader module. */ protected registerShaderModule(): void; init($canvas: HTMLCanvasElement): Promise<void>; resize(width: number, height: number): void; /** * Parame
