// npm package
@antv/g-camera-api
A simple implementation of Camera API.
versions
136
maintainers
51
license
MIT
first publish
2022-09-15
publisher
alex_zjt
tarball
1,267,042 B
AUTO-PUBLISHED·1 version indexed·latest published 2025-12-15
// publisher campaignby alex_zjt
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· @2.0.42-beta.0· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s), 3 other host(s).
- @2.0.42-beta.0··AUTO-PUBLISHED·publisher: alex_zjtheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3910public-github-push
→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s), 3 other host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/g-camera-api", "version": "2.0.42-beta.0", "description": "A simple implementation of Camera API.", "keywords": [ "antv", "g", "rendering engine" ], "homepage": "https://github.com/antvis/g#readme", "bugs": { "url": "https://github.com/antvis/g/issues" }, "repository": { "type": "git", "url": "git+https://github.com/antvis/g.git", "directory": "packages/g-camera-api" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "sideEffects": true, "exports": { "types": "./types/index.d.ts", "import": "./dist/index.esm.js", "default": "./dist/index.js" }, "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "types/index.d.ts", "files": [ "package.json", "dist", "types", "LICENSE", "README.md" ], "dependencies": { "@antv/util": "^3.3.5", "@babel/runtime": "^7.25.6", "gl-matrix": "^3.4.3", "tslib": "^2.5.3", "@antv/g-lite": "2.3.3-beta.2" }, "publishConfig": { "access": "public" }, "scripts": { "build:types": "tsc --emitDeclarationOnly --noCheck", "build": "npm run clean && npm run build:types && rollup -c", "clean": "rimraf dist", "sync": "tnpm sync", "watch": "rollup -c -w" } } --- package.json (entry) --- { "name": "@antv/g-camera-api", "version": "2.0.42-beta.0", "description": "A simple implementation of Camera API.", "keywords": [ "antv", "g", "rendering engine" ], "homepage": "https://github.com/antvis/g#readme", "bugs": { "url": "https://github.com/antvis/g/issues" }, "repository": { "type": "git", "url": "git+https://github.com/antvis/g.git", "directory": "packages/g-camera-api" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "sideEffects": true, "exports": { "types": "./types/index.d.ts", "import": "./dist/index.esm.js", "default": "./dist/index.js" }, "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "types/index.d.ts", "files": [ "package.json", "dist", "types", "LICENSE", "README.md" ], "dependencies": { "@antv/util": "^3.3.5", "@babel/runtime": "^7.25.6", "gl-matrix": "^3.4.3", "tslib": "^2.5.3", "@antv/g-lite": "2.3.3-beta.2" }, "publishConfig": { "access": "public" }, "scripts": { "build:types": "tsc --emitDeclarationOnly --noCheck", "build": "npm run clean --- index.js (entry) --- /*! * @antv/g-camera-api * @description A simple implementation of Camera API. * @version 2.0.42-beta.0 * @date 12/12/2025, 2:49:06 PM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; var gLite = require('@antv/g-lite'); var _classCallCheck = require('@babel/runtime/helpers/classCallCheck'); var _createClass = require('@babel/runtime/helpers/createClass'); var _callSuper = require('@babel/runtime/helpers/callSuper'); var _inherits = require('@babel/runtime/helpers/inherits'); var util = require('@antv/util'); var glMatrix = require('gl-matrix'); /** * Provides camera action & animation. */ var AdvancedCamera = /*#__PURE__*/function (_Camera) { function AdvancedCamera() { var _this; _classCallCheck(this, AdvancedCamera); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _callSuper(this, AdvancedCamera, [].concat(args)); /** * switch between multiple landmarks */ _this.landmarks = []; return _this; } _inherits(AdvancedCamera, _Camera); return _createClass(AdvancedCamera, [{ key: "rotate", value: /** --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.esm.js (bundled) --- /*! * @antv/g-camera-api * @description A simple implementation of Camera API. * @version 2.0.42-beta.0 * @date 12/12/2025, 2:49:06 PM * @author AntVis * @docs https://g.antv.antgroup.com/ */ import { getAngle, CameraType, deg2rad, createVec3, runtime, Camera } from '@antv/g-lite'; import _classCallCheck from '@babel/runtime/helpers/classCallCheck'; import _createClass from '@babel/runtime/helpers/createClass'; import _callSuper from '@babel/runtime/helpers/callSuper'; import _inherits from '@babel/runtime/helpers/inherits'; import { isString, isNumber } from '@antv/util'; import { quat, mat4, vec3 } from 'gl-matrix'; /** * Provides camera action & animation. */ var AdvancedCamera = /*#__PURE__*/function (_Camera) { function AdvancedCamera() { var _this; _classCallCheck(this, AdvancedCamera); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _callSuper(this, AdvancedCamera, [].concat(args)); /** * switch between multiple landmarks */ _this.landmarks = []; return _this; } _inherits(AdvancedCamera, _Camera); return _createClass(AdvancedCamera, [{ key: "rotate", value: /** * Changes the azimuth and elevation with respect to the current camera axes * @param {Number} azimuth the relative azimuth * @param {Number} elevation the relative elevation * @param {Number} roll the relative roll */ function rotate(azimuth, elevation, roll) { this.relElevation = getAngle(elevation); this.relAzimuth = getAngle(azimuth); this.relRoll = getAngle(roll); this.elevation += this.relElevation; this.azimuth += this.relAzimuth; this.roll += this.relRoll; if (this.type === CameraType.EXPLORING) { var rotX = quat.setAxisAngle(quat.create(), [1, 0, 0], deg2rad((this.rotateWorld ? 1 : -1) * this.relElevation)); var rotY = quat.setAxisAngle(quat.create(), --- dist/index.js (bundled) --- /*! * @antv/g-camera-api * @description A simple implementation of Camera API. * @version 2.0.42-beta.0 * @date 12/12/2025, 2:49:06 PM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; var gLite = require('@antv/g-lite'); var _classCallCheck = require('@babel/runtime/helpers/classCallCheck'); var _createClass = require('@babel/runtime/helpers/createClass'); var _callSuper = require('@babel/runtime/helpers/callSuper'); var _inherits = require('@babel/runtime/helpers/inherits'); var util = require('@antv/util'); var glMatrix = require('gl-matrix'); /** * Provides camera action & animation. */ var AdvancedCamera = /*#__PURE__*/function (_Camera) { function AdvancedCamera() { var _this; _classCallCheck(this, AdvancedCamera); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _callSuper(this, AdvancedCamera, [].concat(args)); /** * switch between multiple landmarks */ _this.landmarks = []; return _this; } _inherits(AdvancedCamera, _Camera); return _createClass(AdvancedCamera, [{ key: "rotate", value: /** * Changes the azimuth and elevation with respect to the current camera axes * @param {Number} azimuth the relative azimuth * @param {Number} elevation the relative elevation * @param {Number} roll the relative roll */ function rotate(azimuth, elevation, roll) { this.relElevation = gLite.getAngle(elevation); this.relAzimuth = gLite.getAngle(azimuth); this.relRoll = gLite.getAngle(roll); this.elevation += this.relElevation; this.azimuth += this.relAzimuth; this.roll += this.relRoll; if (this.type === gLite.CameraType.EXPLORING) { var rotX = glMatrix.quat.setAxisAngle(glMatrix.quat.create(), [1, 0, 0], gLite.deg2rad((this.rotateWorld ? 1 : -1) * this.relElevation)); var rotY = glMatrix.quat.setAxisAngle(glMatrix --- dist/index.umd.min.js (bundled) --- /*! * @antv/g-camera-api * @description A simple implementation of Camera API. * @version 2.0.42-beta.0 * @date 12/12/2025, 2:49:06 PM * @author AntVis * @docs https://g.antv.antgroup.com/ */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.CameraAPI={}))}(this,function(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function r(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){r(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;e.length>r;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}function u(t,e,n){return e&&s(t.prototype,e),n&
