Background command
-
Is there a background () command in Fuze ? Just to load a simple background color ? I've looked in the help section, but cant find it....
-
There might be but when I wanted one I couldn't find it, so I cheated and used the box command right after the 'clear()' command, to be exact
box(0,0,1920,1080,black,false)Worked okay for me but there's probably a better solution
-
@kendog400 try clear(colour) e.g. clear(red)
-
@kendog400 Just know you can also do clear with a vector to fine tune an exact rgb color combination!
Example:
bg = {1.0,1.0,1.0,1.0} // white clear(bg) // clears as "white"
bg = {0.0,0.5,1.0} // sky blue clear(bg) //clears as "sky blue"
Break down of this is {red,green,blue,alpha) between 0.0 and 1.0
The alpha(transparency) is optional however useful if you're fading into an image @FuzeTeam correct me if im wrong here about that fourth parameter
You can also incorporate for loops to make a fun fade effect, example belowsetmode(1280,720) // Set the switch to handheld mode.. coz i like that! bg = { 0.0, 0.0, 0.0 } // Create a variable vector named bg, color black (all rgb values are at 0) // Create a loop that slowly increases each of the color ranges from black to white for i = 0.0 to 1.0 step 0.001 loop bg = ({i,i,i}) clear(bg) update() repeat
-
@Tratax FWIW, your example will go from transparent black to full white, meaning that the white will arrive later than during a linear fade in.
-
@Nisse5 Thanks, good point! I'll update that now
-
I found the way to load a background color : clear(green), but I want Dark green,
is the code clear(darkGreen) ? -
@kendog400 said in Background command:
I found the way to load a background color : clear(green), but I want Dark green,
is the code clear(darkGreen) ?Yes. Here's a list of known preset colors.
-
@kendog400 said in Background command:
I found the way to load a background color : clear(green), but I want Dark green,
is the code clear(darkGreen) ?If you're interested, I've made a utility where you can visually see how all the color constants look on screen:
https://fuzearena.com/forum/topic/497/colour-browser-utility-and-questions-about-colour-numbers