Skip to content

Instantly share code, notes, and snippets.


Oleg Berman olegberman

Block or report user

Report or block olegberman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
olegberman / calc.html
Created Jul 12, 2016
Points based system calculator
View calc.html
<!DOCTYPE html>
<meta charset="utf-8">
<select id="age">
<option value="1">20</option>
View wrap-text.js
- There's no native support of mulitline text in Canvas,
- this function will help you to draw multiline text
- by providing max width, line breaks will happen there
var wrap_text = (ctx, text, x, y, lineHeight, maxWidth, textAlign) => {
if(!textAlign) textAlign = 'center'
ctx.textAlign = textAlign
var words = text.split(' ')
You can’t perform that action at this time.