excaliburjs / Excalibur

🎮 Your friendly TypeScript 2D game engine for the web 🗡️
https://excaliburjs.com
BSD 2-Clause "Simplified" License
1.75k stars 188 forks source link

Typescript definition for font blur has optional property offset, but it is required #3068

Open spustlik opened 3 months ago

spustlik commented 3 months ago

Steps to Reproduce

let font =  fontSource.toFont({
        family: 'pleasantly_plumpnormal',
        color: ex.Color.White,
        shadow: { 
           blur: 5, 
           color: ex.Color.Black, 
           offset: ex.vec(0, 0)  // if ommited, engine will throw error
       }
    })

Expected Result

typescript with required property, or engine accepts undefined

Environment

Excalibur: (v0.30.0-alpha.1053+29fef3b)

Current Workaround

offset: ex.vec(0,0)
eonarheim commented 3 months ago

@spustlik Thanks for the issue, definitely a bug

github-actions[bot] commented 1 month ago

This issue hasn't had any recent activity lately and is being marked as stale automatically.