Problem:
I am new to Saola Animate and Javascript.
-
If I add an external Javascript file to Saola, does it show errors?
-
I am trying to create a circle filled with white on one color stop and a random color for the second color stop to create a radial gradient effect.
This is what I have so far:
document.addEventListener('DOMContentLoaded', function() {
function gumb() {
var gumball = document.getElementById("ball");
function newGradient() {
var randomColor1 = "#" + Math.floor(Math.random()*16777215).toString(16);
return randomColor1;
}
// Create gradient
// (x0,y0,r0 (starting circle),x1,y1, r1(ending circle))
var grd = gumball.createRadialGradient(100,65,5,100,65,50);
gumball.addColorStop(0,"white");
gumball.addColorStop(1,newGradient());
// Fill with gradient
gumball.fill();
});
I would appreciate any suggestions.
Saola Animate version: 3.1.1
OS:
Ventura 13.0.1
Notes: