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.
* Migrated to new antd and react, fixed tests * Popover visibility reworked * Fixed package-lock * Fix command for a shape drawning. * Fix command for 3D functionality * Fixed cannot read property map of undefined * Updated cypress and plugins * Update main.yml * Update popover visibility in the tests * Replace "be.visible" to check "ant-popover-hidden" class * Implemented tricky way to setup popover visibility Co-authored-by: Boris Sekachev <boris.sekachev@yandex.ru> |
5 years ago | |
|---|---|---|
| .. | ||
| src/typescript | 5 years ago | |
| .eslintignore | 5 years ago | |
| .eslintrc.js | 5 years ago | |
| .gitignore | 5 years ago | |
| README.md | 5 years ago | |
| package-lock.json | 5 years ago | |
| package.json | 5 years ago | |
| tsconfig.json | 5 years ago | |
| webpack.config.js | 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
distdirectory:
npm run build
npm run build -- --mode=development # without a minification
API Methods
interface Canvas3d {
html(): ViewsDOM;
setup(frameData: any, objectStates: any[]): void;
isAbleToChangeFrame(): boolean;
mode(): Mode;
render(): void;
keyControls(keys: KeyboardEvent): void;
draw(drawData: DrawData): void;
cancel(): void;
dragCanvas(enable: boolean): void;
activate(clientID: number | null, attributeID?: number): void;
configureShapes(shapeProperties: ShapeProperties): void;
fitCanvas(): void;
fit(): void;
group(groupData: GroupData): 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
const views = canvas.html();
htmlContainer.appendChild(views.perspective);
htmlContainer.appendChild(views.top);
htmlContainer.appendChild(views.side);
htmlContainer.appendChild(views.front);