Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.3.0.3 version #57

Merged
merged 6 commits into from
Jun 23, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
brush settings update
  • Loading branch information
viliusle committed Jun 22, 2017
commit bcc88d167f321fa76ae3ee7aeead1571d2bd08f3
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var DRAW_TOOLS_CONFIG = [
{name: 'letters', title: 'Draw letters', icon: ['sprites.png', -350+3, 4], attributes: {} },
{name: 'draw_square', title: 'Draw rectangle', icon: ['sprites.png', -400+3, 5], attributes: {fill: false, square: false} },
{name: 'draw_circle', title: 'Draw circle', icon: ['sprites.png', -450+3, 5], attributes: {fill: false, circle: false} },
{name: 'brush', title: 'Brush', icon: ['sprites.png', -500+6, 3], attributes: {type: 'Brush', type_values: ['Brush', 'BezierCurve', 'Chrome', 'Fur', 'Grouped', 'Shaded', 'Sketchy'], size: 10, anti_aliasing: false }, on_update: 'update_brush', },
{name: 'brush', title: 'Brush', icon: ['sprites.png', -500+6, 3], attributes: {type: 'Brush', type_values: ['Brush', 'BezierCurve', 'Chrome', 'Fur', 'Grouped', 'Shaded', 'Sketchy'], size: 5, anti_aliasing: false }, on_update: 'update_brush', },
{name: 'blur_tool', title: 'Blur tool', icon: ['sprites.png', -250+5, -50+2], attributes: {size: 30, power: 1} },
{name: 'sharpen_tool', title: 'Sharpen tool', icon: ['sprites.png', -300+5, -50+2], attributes: {size: 30 } },
{name: 'burn_dodge_tool', title: 'Burn/Dodge tool', icon: ['sprites.png', -500+3, -50+4], attributes: {burn: true, size: 30, power: 50} },
Expand Down
4 changes: 2 additions & 2 deletions js/draw_tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -822,9 +822,9 @@ function DRAW_TOOLS_CLASS() {

//detect line size
var max_speed = 20;
var power = 0.7; //max 1, how much speed reduce size, 1 means reduce to 0
var power = 2; //how speed affects size

var new_size = size - size / max_speed * mouse.speed_average * power;
var new_size = size + size / max_speed * mouse.speed_average * power;
new_size = Math.max(new_size, size/4);
new_size = Math.round(new_size);
canvas_front.lineWidth = new_size;
Expand Down