// npm package
@antv/g2-extension-3d
The [threed](https://github.com/antvis/G2/blob/v5/src/lib/std.ts) lib for G2.
weekly
790
monthly
1,677
versions
11
maintainers
51
first publish
2023-11-13
publisher
panyuqi
tarball
534,284 B
AUTO-PUBLISHED·1 version indexed·latest published 2024-04-08
// publisher campaignby panyuqi
9 caught packages from this accountThis is not an isolated catch. The same publisher has shipped 8 other packages that our pipeline flagged — the shape of a coordinated campaign, not a one-off. Each link below opens that sibling's analysis.
// offending code· @0.2.0· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
- @0.2.0··AUTO-PUBLISHED·publisher: panyuqiheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3975public-github-push
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/g2-extension-3d", "version": "0.2.0", "main": "lib/index.js", "module": "esm/index.js", "unpkg": "dist/index.umd.min.js", "types": "lib/index.d.ts", "files": [ "lib", "esm", "dist", "README.md" ], "sideEffects": [ "./esm/index.js" ], "scripts": { "dev": "vite", "fix": "prettier --write src __tests__", "test": "jest", "build:cjs": "rimraf ./lib && tsc --module commonjs --outDir lib", "build:esm": "rimraf ./esm && tsc --module ESNext --outDir esm", "build:umd": "rimraf ./dist && rollup -c", "build": "run-p build:*", "ci": "npm run test && npm run build" }, "dependencies": { "d3-array": "^3.2.2", "@antv/coord": "^0.4.7", "@antv/g": "^6.0.0", "@antv/g2": "^5.1.8", "@antv/g-plugin-3d": "^2.0.0", "@antv/util": "^3.3.5", "ndarray": "^1.0.19", "ndarray-ops": "^1.2.2", "ndarray-pack": "^1.2.1", "ndarray-gradient": "^1.0.1", "colormap": "^2.3.2" }, "devDependencies": { "@antv/g-webgl": "^2.0.0", "@antv/g-plugin-control": "^2.0.0", "@types/d3-array": "3.0.5", "@types/node": "^16.11.7", "@types/ndarray": "^1.0.14", "@types/ndarray-ops": "^1.2.7", "@types/jest": "^29.0.0", "@types/pixelmatch": "^5.2.5", "@types/pngjs": "^6.0.3", "@types/colormap": "^2.3.4", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.2.1", "@rollup/plugin-terser": "^0.4.3", "@rollup/plugin-typescr --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.d.ts (bundled) --- export declare function threedlib(): { readonly "coordinate.cartesian3D": import("./coordinate/coordinate3D").Coordinate3DComponent<import("./coordinate/coordinate3D").Cartesian3DCoordinate>; readonly "component.axisZ": import("@antv/g2").GuideComponentComponent<import("@antv/g2").AxisOptions>; readonly "mark.point3D": import("@antv/g2").MarkComponent<import("./mark/point3D").PointOptions>; readonly "mark.line3D": import("@antv/g2").MarkComponent<import("./mark/line3D").LineOptions>; readonly "mark.interval3D": import("@antv/g2").MarkComponent<import("./mark/interval3D").PointOptions>; readonly "mark.surface3D": import("@antv/g2").MarkComponent<import("./mark/surface3D").Surface3DOptions>; }; --- dist/index.umd.min.js (bundled) --- !function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g2"),require("@antv/g-plugin-3d")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g2","@antv/g-plugin-3d"],e):e(((r="undefined"!=typeof globalThis?globalThis:r||self).G2=r.G2||{},r.G2.Extension3D={}),r.window.G,r.window.G2,r.window.G["3D"])}(this,(function(r,e,t,n){"use strict";function a(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&0>e.indexOf(n)&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(r);n.length>a;a++)0>e.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(t[n[a]]=r[n[a]])}return t}function i(r,e){for(const[t,n]of Object.entries(e))r.style(t,n)}function s(r){const{colorAttribute:e,opacityAttribute:t=e}=r;return t+"Opacity"}function o(r){if(1===r.length)return r[0];const[[e,t,n=0],[a,i,s=0]]=r;return[(e+a)/2,(t+i)/2,(n+s)/2]}function l(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)+1}"function"==typeof SuppressedError&&SuppressedError;const c=(r,e)=>{const l=a(r,[]);if(!e.coneGeometry){const r=e.canvas.getConfig().renderer.getPlugin("device-renderer").getDevice();e.coneGeometry=new n.ConeGeometry(r,{peakRadius:0,baseRadius:.5,height:1}),e.coneMaterial=new n.MeshLambertMaterial(r)}return(a,c,u)=>{const d=a,{color:g}=u,{color:h=g,transform:b,opacity:p}=c,[f,y,x]=o(d),_=Math.abs(d[1][0]-d[0][0]),m=Math.abs(d[1][1]-d[0][1]),v=Math.abs(d[1][2]-d[0][2]),M=new n.Mesh({style:{geometry:e.coneGeometry,material:e.coneMaterial}});M.scale([_,m,v]),M.setPosition(f,y,x);return t.select(M).call(i,u).style("fill",h).style("transform",b).style("visibility","visible").style(s(r),p).call(i,l).node()}};c.props={defaultMarker:"cone"};const u=(r,e)=>{const l=a(r,[]);if(!e.cylinderGeometry){const r=e.canvas.getConfig().renderer.getPlugin("device-renderer").getDevice();e.cylinderGeometry=new n.CylinderGeometry(r --- dist/shape/utils.d.ts (bundled) --- import { Primitive } from "d3-array"; import { Selection, Vector2, Vector3 } from "@antv/g2"; export declare function applyStyle(selection: Selection, style: Record<string, Primitive>): void; export declare function toOpacityKey(options: any): string; export declare function getOrigin(points: (Vector2 | Vector3)[]): number[]; export declare function nextPow2(v: number): number; --- dist/shape/surface3D/surface.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type SurfaceOptions = Record<string, any>; /** * @see https://g.antv.antgroup.com/api/3d/geometry#cubegeometry */ export declare const Surface: SC<SurfaceOptions>; --- dist/shape/point3D/bowtie.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type BowtieOptions = Record<string, any>; /** * ▶◀ */ export declare const Bowtie: SC<BowtieOptions>; --- dist/shape/point3D/color.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type ColorOptions = { colorAttribute: "fill" | "stroke"; symbol: string; mode?: "fixed" | "auto" | "normal"; [key: string]: any; }; /** * Render point in different coordinate. */ export declare const Color: SC<ColorOptions>; --- dist/shape/point3D/cross.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type CrossOptions = Record<string, any>; /** * ✕ */ export declare const Cross: SC<CrossOptions>; --- dist/shape/point3D/cube.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type CubeOptions = Record<string, any>; /** * @see https://g.antv.antgroup.com/api/3d/geometry#cubegeometry */ export declare const Cube: SC<CubeOptions>; --- dist/shape/point3D/diamond.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type DiamondOptions = Record<string, any>; /** * ◆ */ export declare const Diamond: SC<DiamondOptions>; --- dist/shape/point3D/hexagon.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type HexagonOptions = Record<string, any>; /** * ⭓ */ export declare const Hexagon: SC<HexagonOptions>; --- dist/shape/point3D/hollow.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type HollowPointOptions = Record<string, any>; /** * ○ */ export declare const HollowPoint: SC<HollowPointOptions>; --- dist/shape/point3D/hollowBowtie.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type HollowBowtieOptions = Record<string, any>; /** * ▷◁ */ export declare const HollowBowtie: SC<HollowBowtieOptions>; --- dist/shape/point3D/hollowDiamond.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type HollowDiamondOptions = Record<string, any>; /** * ◇ */ export declare const HollowDiamond: SC<HollowDiamondOptions>; --- dist/shape/point3D/hollowHexagon.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type HollowHexagonOptions = Record<string, any>; /** * ⬡ */ export declare const HollowHexagon: SC<HollowHexagonOptions>; --- dist/shape/point3D/hollowSquare.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type HollowSquareOptions = Record<string, any>; /** * □ */ export declare const HollowSquare: SC<HollowSquareOptions>; --- dist/shape/point3D/hollowTriangle.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type HollowTriangleOptions = Record<string, any>; /** * △ */ export declare const HollowTriangle: SC<HollowTriangleOptions>; --- dist/shape/point3D/hollowTriangleDown.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type HollowTriangleDownOptions = Record<string, any>; /** * ▽ */ export declare const HollowTriangleDown: SC<HollowTriangleDownOptions>; --- dist/shape/point3D/hyphen.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type HyphenOptions = Record<string, any>; /** * - */ export declare const Hyphen: SC<HyphenOptions>; --- dist/shape/point3D/line.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type LineOptions = Record<string, any>; /** * | */ export declare const Line: SC<LineOptions>; --- dist/shape/point3D/plus.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type PlusOptions = Record<string, any>; /** * + */ export declare const Plus: SC<PlusOptions>; --- dist/shape/point3D/point.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type PointOptions = Record<string, any>; /** * ● */ export declare const Point: SC<PointOptions>; --- dist/shape/point3D/sphere.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type SphereOptions = Record<string, any>; /** * @see https://g.antv.antgroup.com/api/3d/geometry#spheregeometry */ export declare const Sphere: SC<SphereOptions>; --- dist/shape/point3D/square.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type SquareOptions = Record<string, any>; /** * ■ */ export declare const Square: SC<SquareOptions>; --- dist/shape/point3D/tick.d.ts (bundled) --- import { ShapeComponent as SC } from "@antv/g2"; export type TickOpt
