Open voladelta opened 1 month ago
It's not implemented yet, although it shouldn’t take more than an hour to get done.
It's not implemented yet, although it shouldn’t take more than an hour to get done.
So how about you spend that hour for timeline and i could help for that?
I'm constantly working on the timeline but go ahead, I appreciate any help I can get
I'm constantly working on the timeline but go ahead, I appreciate any help I can get
Exactly please keep going on timeline and i will happy to help , if I can
` import {Clip, VisualMixin} from "@diffusionstudio/core"; import { Graphics } from "pixi.js";
class CircleMaskProps { radius?: string; fill?: string; position: { x: number, y: number, } }
export class CircleMask extends VisualMixin(Clip
public graphics = new Graphics()
public radius = 50;
public fill = null
public constructor(props: CircleMaskProps = {}) {
super();
console.log(this)
Object.assign(this, props);
this.graphics.circle(this._position.x + this.radius , this._position.y + this.radius , this.radius)
if (this.fill === null){
this.graphics.fill({color: '#FFF', alpha: 1});
}
else{
this.graphics.fill({color: this.fill, alpha: this.alpha});
}
}
} `
and for the add
let mask = new CircleMask({radius: 360, position: {x: 250, y: 0}}) videoClip.addMask(mask)
write way?
I would implement it exactly the same as the filters and each mask should inherit from graphics. E.g. class CircleMask extends Graphics
. Then you can draw the circle in the constructor.
Is there a way to shape/crop video into any size and shape?
For example: A 16:9 video can be shaped into 1:1 or crop center in 9:16 box, or a circle?