• Home
  • Blog
  • C# / Unity
  • C++ / Unreal Engine
  • Python strategy games
  • Python arcade games
  • Python other
  • Machine Learning
  • C
  • Scratch
  • Coding and electronics
  • How I learnt to code
  • Project Euler
  • Feedback
  James L.'s coding

James's blog

what I've been doing.

Graphite - Transforming layers with shortcuts

30/8/2021

0 Comments

 
Picture
I added a way to transform layers with the mouse by pressing the 'G', 'R' or 'S' keys to grab, rotate and scale the selected layers in a similar fashion to blender. I made shift slow the transformation speed by a tenth and ctrl to snap the transformation to intervals. I also allowed users to type in the value for the transformation with the number keys if they wanted a specific value and constrain their transformation to one axis with the 'x' and 'y' keys. You can try the build at https://714e13e8.graphite-master.pages.dev. This was one of my bigger PRs (Collaborating with pull requests - GitHub) at about 550 lines of code available at github.com/GraphiteEditor/Graphite/pull/356/files.
​
I worked closely with @Keavon to refine the UX with things like reversing an operation if you switch directly to a new transform operation, removing the negative when all numbers are deleted and ignoring presses to decimal point when there is already a decimal point.
0 Comments

Graphite - Scroll bars

17/8/2021

0 Comments

 
Picture
I recently made the scrollbar functional in graphite - an open source drawing program for the web. This built on TrueDoctor's work of finding the bounding box of artwork.

The scrollbars where difficult to implement because they needed to allow users to scroll infinitly far by reserving a space at the end of the scrollbar whilst also not just sharply stopping as they reached a certain point but slowing down the position change as it got further up the track (as specified by Keavon).

My initial approach with this caused some strange issues like the going back over the artwork when the scrollbar was dragged very far or when zoomed out very far (thanks to Keavon and TrueDoctor for finding these problems).  My initial implementation also caused the scrollbar to stop when the artwork was inside the viewport which combined poorly with the dragging mechanism.

This taught me about planning things out on paper as well as responding to feedback.
0 Comments
    Advert:

    Author

    I am doing lots of projects every projects all the time and I can't put them all on the website so I've made a blog.

    Archives

    April 2023
    September 2022
    August 2022
    April 2022
    March 2022
    February 2022
    January 2022
    November 2021
    October 2021
    August 2021
    July 2021
    June 2021
    April 2021
    March 2021
    June 2020
    May 2020
    April 2020
    March 2020
    September 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    November 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017

    Categories

    All

Proudly powered by Weebly
  • Home
  • Blog
  • C# / Unity
  • C++ / Unreal Engine
  • Python strategy games
  • Python arcade games
  • Python other
  • Machine Learning
  • C
  • Scratch
  • Coding and electronics
  • How I learnt to code
  • Project Euler
  • Feedback