diffusionstudio / core

The Video Creation Engine: Edit videos with code, featuring the fastest WebCodecs renderer for in-browser video processing.
https://examples.diffusion.studio/
Mozilla Public License 2.0
269 stars 19 forks source link

AttachPlayer loosing interactivity #19

Open girayk opened 2 weeks ago

girayk commented 2 weeks ago

When we call Composition.attachPlayer its creating new canvas 2D element and its not binding some pixi events such as onmouseleave Maybe its better instead of creating new Canvas element, returning renderer.view.canvas then we can bind reactivities.

public attachPlayer(element: HTMLElement) { element.appendChild(this.renderer.view.canvas); }

k9p5 commented 3 days ago

The reason why we don't use the Pixi canvas is so that we can change the resolution during rendering. Otherwise the canvas would be rescaled. But I agree that we should propagate the events

girayk commented 2 days ago

👍🏻

k9p5 commented 2 days ago

I'll leave it open until the changes were merged