Graphics::createEntityOverlayBatch

From RAGE Multiplayer Wiki

Client-Side
Function

 JavaScript



JavaScript Syntax


Overlay Params

{
    enableDepth: boolean,
    deleteWhenUnused: boolean,
    keepNonBlurred: boolean,
    processAttachments: boolean,
    fill: { enable: boolean, color: 0xhex },
    noise: { enable: boolean, size: number, speed: number, intensity: number },
    outline: { enable: boolean, color: 0xhex, width: number, blurRadius: number, blurIntensity: number },
    wireframe: { enable: boolean }
}

Required Params

  • overlayParams: object

Return value

  • object

Syntax

mp.game.graphics.createEntityOverlayBatch(overlayParams)

Example

let overlayParams = {
    enableDepth: true,
    deleteWhenUnused: false,
    keepNonBlurred: true,
    processAttachments: true,
    fill: { enable: false, color: 0xFFFFFFFF },
    noise: { enable: false, size: 0.0, speed: 0.0, intensity: 0.0 },
    outline: { enable: true, color: 0xFF9000FF, width: 5.0, blurRadius: 1.0, blurIntensity: 1.0 },
    wireframe: { enable: false }
};

mp.game.graphics.setEntityOverlayPassEnabled(true);

let batch = mp.game.graphics.createEntityOverlayBatch(overlayParams);

mp.events.add('render', () => {
    batch.addThisFrame(mp.players.local);
});


See also