Files
Unify/application/demo/animations/animation.render.js

50 lines
588 B
JavaScript
Raw Permalink Normal View History

2025-12-25 11:16:59 +01:00
import panelRow from '/elements/panel/row.js';
import label from '/elements/label.js';
class animationBlock{
width = 100;
height = 100;
margin = 20;
background = "#03a9f4";
time = 0;
render( ) {
this.time++;
this.width = 100 + ( Math.cos( this.time / 100 ) * 100 );
this.height = 100 + ( Math.sin( this.time / 100 ) * 100 );
}
}
class rowLabel extends label{
flex = "1";
}
export default class row extends panelRow{
boxWidth = "95%"
rowLabel = new rowLabel("RenderLoop");
animationBlock = new animationBlock();
}