Public
Edited
Apr 1, 2021
1 star
Insert cell
Insert cell
{
var glc = new GLC(document.getElementById('mount'))
glc.loop()
glc.size(540,540)
glc.setFPS(33)
glc.setDuration(3)
glc.styles.backgroundColor = 'black'
var list = glc.renderList
var width = glc.w
var height = glc.h
var color = glc.color;
list.addStar({
x: width / 2,
y: height / 2,
outerRadius: 200,
innerRadius: 150,
points: 30,
//fillStyle: color.rgb(150,55,250 ),
rotation: [ 0, 360/6 ],
fillStyle: function( t ){
return color.hsv( 280 + Math.sin(t*2*Math.PI)*30, 0.4, 0.7 );
},
phase: 0.5,
});
list.addHeart({
x: width / 2,
y: height / 2,
//w: [180,-180],
w: function( t ){
return 90 + Math.sin(t*2*Math.PI) * 90;
},
h: 180,
//fillStyle: color.rgb(250,100,150),
//rotation: [ 0, 360 ],
//fillStyle: ['pink','yellow','pink']
fillStyle: function( t ){
return color.hsv( 300 + Math.sin(t*2*Math.PI)*30, 0.4, 1 );
},
});
return `Code for looping gif animation`
}
Insert cell
GLC = require('gifloopcoder@0.0.3/dist/glc.js')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more