mirror of
https://git.roussel.pro/telecom-paris/pact.git
synced 2026-02-09 10:30:17 +01:00
Intégration de la reco d'image à l'interface borne
This commit is contained in:
@@ -84,7 +84,6 @@ class CameraPage {
|
||||
_frame() {
|
||||
if (this.streaming && this.enabled && this.width && this.height) {
|
||||
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
||||
// this.ctx.drawImage(this.video, 0, 0, this.width, this.height);
|
||||
this._drawEffects();
|
||||
}
|
||||
if (this.enabled) {
|
||||
@@ -106,6 +105,11 @@ class CameraPage {
|
||||
_drawEffects() {
|
||||
for (let effect of this.activeEffects) {
|
||||
let { x, y, width, height } = this._scaleEffect(effect.x, effect.y, effect.width, effect.height);
|
||||
width = width * this.videoWidth * 2;
|
||||
height = height * this.videoHeight * 2;
|
||||
x = x * this.videoWidth - width / 2;
|
||||
y = y * this.videoHeight - height / 2;
|
||||
console.log(width, height);
|
||||
if (effect.type == "thumbs_down") {
|
||||
this._drawThumbsDown(x, y, width, height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user