You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Boris Sekachev 6a0379c3b9
Fixed hundreds of vulnerabilities in npm audit (#3169)
* Fixed hundreds of vulnerabilities in npm audit

* Updated package-lock for canvases

* Fixed package-lock

* Fixed vulnerabilities in cvat-canvas3d and cvat-data
5 years ago
..
src/typescript CVAT 3D - Milestone-4 (#2891) 5 years ago
.eslintignore CVAT-3D Milestone2 (#2645) 5 years ago
.eslintrc.js CVAT-3D Milestone2 (#2645) 5 years ago
.gitignore CVAT-3D Milestone2 (#2645) 5 years ago
README.md CVAT-3D-M3 (#2768) 5 years ago
package-lock.json Fixed hundreds of vulnerabilities in npm audit (#3169) 5 years ago
package.json Fixed hundreds of vulnerabilities in npm audit (#3169) 5 years ago
postcss.config.js CVAT-3D Milestone2 (#2645) 5 years ago
tsconfig.json CVAT-3D Milestone2 (#2645) 5 years ago
webpack.config.js CVAT-3D Milestone2 (#2645) 5 years ago

README.md

Module CVAT-CANVAS-3D

Description

The CVAT module written in TypeScript language. It presents a canvas to viewing, drawing and editing of 3D annotations.

Versioning

If you make changes in this package, please do following:

  • After not important changes (typos, backward compatible bug fixes, refactoring) do: npm version patch
  • After changing API (backward compatible new features) do: npm version minor
  • After changing API (changes that break backward compatibility) do: npm version major

Commands

  • Building of the module from sources in the dist directory:
npm run build
npm run build -- --mode=development     # without a minification

API Methods

interface Canvas3d {
  html(): HTMLDivElement;
  setup(frameData: any): void;
  mode(): Mode;
  isAbleToChangeFrame(): boolean;
  render(): void;
}

WEB

// Create an instance of a canvas
const canvas = new window.canvas.Canvas3d();

console.log('Version ', window.canvas.CanvasVersion);
console.log('Current mode is ', window.canvas.mode());

// Put canvas to a html container
htmlContainer.appendChild(canvas.html());