Skip to content

Commit

Permalink
fixes from rens' PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yustarandomname committed Aug 29, 2023
1 parent 4dfb32b commit bc4a810
Show file tree
Hide file tree
Showing 22 changed files with 16 additions and 985 deletions.
1 change: 0 additions & 1 deletion svelte-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@threlte/extras": "^5.0.1",
"aframe": "^1.4.2",
"gammacv": "^0.5.3",
"imagetracerjs": "^1.2.6",
"mdi-svelte-ts": "^1.0.0",
"opencv-ts": "^1.3.6",
"p5": "^1.7.0",
Expand Down
2 changes: 1 addition & 1 deletion svelte-app/src/lib/components/Video.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
try {
stream = await navigator.mediaDevices.getUserMedia({ video: constraints });
// TODO: set stream id to deviceId
deviceId = stream.getVideoTracks()[0].getSettings().deviceId || '';
loading = false;
error = '';
Expand Down
292 changes: 0 additions & 292 deletions svelte-app/src/routes/capture/-page.svelte

This file was deleted.

1 change: 1 addition & 0 deletions svelte-app/src/routes/crop/gamma-cv/inverseKernel.glsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Kernel for inverting the colors of an image
vec4 operation(float y, float x) {
vec4 data = pickValue_tSrc(y, x);

Expand Down
2 changes: 1 addition & 1 deletion svelte-app/src/routes/crop/open-cv/imageToContours.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { contourLines } from '$lib/stores/contourLineStore';
import { matCVToContourHierarchy, getCurvesFromContourHierarchy, detectCurvesFromCanvas } from './detectCurves';

/**
* Draws the provided curves on the provided canvas.
* Draws debug lines curves on the provided canvas.
* @param canvas Debug canvas
* @param curves Curves to draw
*/
Expand Down
4 changes: 3 additions & 1 deletion svelte-app/src/routes/crop/p5/SnapCenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import type p5 from 'p5';
import SnapMember from './SnapMember';
import type SnapCorner from './SnapCorner';
import type SnapEdge from './SnapEdge';

/**
* This class represents the center of the crop area. It is used to translate the entire the crop area around.
*/
export default class SnapCenter extends SnapMember {

constructor(p5: p5, id: string, a: SnapCorner, b: SnapCorner, c: SnapCorner, d: SnapCorner) {
Expand Down
3 changes: 3 additions & 0 deletions svelte-app/src/routes/crop/p5/SnapCorner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import SnapMember from './SnapMember';
import type SnapEdge from './SnapEdge';
import type SnapCenter from './SnapCenter';

/**
* This class represents the corners of the crop area. It is used to resize the crop area.
*/
export default class SnapCorner extends SnapMember {

constructor(p5: p5, id: string, vec: { x: number, y: number }) {
Expand Down
5 changes: 4 additions & 1 deletion svelte-app/src/routes/crop/p5/SnapEdge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
*/

import type p5 from 'p5';
import SnapMember from './SnapMember';
import type SnapCorner from './SnapCorner';
import SnapMember from './SnapMember';

/**
* This class represents the edges of the crop area. It is used to resize the crop area.
*/
export default class SnapEdge extends SnapMember {

constructor(p5: p5, id: string, a: SnapCorner, b: SnapCorner) {
Expand Down
3 changes: 3 additions & 0 deletions svelte-app/src/routes/crop/p5/SnapMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

import type p5 from 'p5';

/**
* This class represents a member of the crop area. It is used to resize the crop area.
*/
export default class SnapMember {

id: string;
Expand Down
Loading

0 comments on commit bc4a810

Please sign in to comment.