First commit
This commit is contained in:
50
application/demo/animations/animation.render.js
Normal file
50
application/demo/animations/animation.render.js
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
|
||||
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();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user