50 lines
588 B
JavaScript
50 lines
588 B
JavaScript
|
|
|
||
|
|
|
||
|
|
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();
|
||
|
|
|
||
|
|
}
|