greencoder Posted August 18, 2020 Share Posted August 18, 2020 Is it possible to have a shape (consider using drawRect) with gradient color? Sorry for the noob question. Quote Link to comment Share on other sites More sharing options...
greencoder Posted December 29, 2020 Author Share Posted December 29, 2020 (edited) Found by chance that if I use the following color object to shape.color, does the trick : var color = game.renderer.context.createLinearGradient(0, 0, game.width, 0); color.addColorStop(0, "#111111"); color.addColorStop(1, "#000000"); Does anyone know of any documentations on those? Edited December 29, 2020 by greencoder Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.