MCPcopy Create free account
hub / github.com/melonjs/melonJS / createLinearGradient

Method createLinearGradient

packages/melonjs/src/video/renderer.js:624–626  ·  view source on GitHub ↗

* Create a linear gradient that can be used with Renderer#setColor. * @param {number} x0 - x-axis coordinate of the start point * @param {number} y0 - y-axis coordinate of the start point * @param {number} x1 - x-axis coordinate of the end point * @param {number} y1 - y-axis coordina

(x0, y0, x1, y1)

Source from the content-addressed store, hash-verified

622 * @returns {Gradient} a Gradient object
623 */
624 createLinearGradient(x0, y0, x1, y1) {
625 return new Gradient("linear", [x0, y0, x1, y1]);
626 }
627
628 /**
629 * Create a radial gradient that can be used with {@link Renderer#setColor}.

Callers 12

toCanvasGradientMethod · 0.80
toCanvasMethod · 0.80
gradient.spec.jsFile · 0.80
onActivateEventMethod · 0.80
bakeVerticalGradientFunction · 0.80
bakeSkyFunction · 0.80
bakeSkyFunction · 0.80
drawMethod · 0.80
bakeSlotBinsMethod · 0.80
bakeBackgroundMethod · 0.80
bakeNightSkyFunction · 0.80
bakeSkyFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected