Directional-Boring icon indicating copy to clipboard operation
Directional-Boring copied to clipboard

draw two house and a hill, fix styling

Open amnindersingh12 opened this issue 3 years ago • 8 comments

Regarding #46

  • [x] Add two houses
  • [x] Add a hill
  • [x] Attachments of the changes

Updated View

pic

Crash on drilling into hill (same is applicable for houses)

poc

amnindersingh12 avatar Oct 19 '22 11:10 amnindersingh12

Thank you for contributing @amnindersingh12!

shiffman avatar Oct 19 '22 12:10 shiffman

@amnindersingh12 thank you for your contribution. Can you fix the roof of the right house? It looks off by some pixels.

@shiffman I will try to review and merge before the end of the week.

alin256 avatar Oct 19 '22 17:10 alin256

Hi @alin256 , I have fixed that distorted pixel for the house. Thank you

amnindersingh12 avatar Oct 20 '22 04:10 amnindersingh12

@amnindersingh12, would your changes work with the 600x400 canvas that was there before?

Currently, the styling is slightly inconsistent between the desktop and mobile versions, and the instruction fonts have become too small on mobile.

@shiffman, maybe we should create a feature branch [CodingTrain:houses] to collaboratively refine it further before merging it into [main].

alin256 avatar Oct 21 '22 11:10 alin256

@amnindersingh12, do you want to create a pull request to CodingTrain:houses-feature

I can advertise it, e.g. in the Readme, if you want some help with the styling/scaling.

alin256 avatar Oct 21 '22 11:10 alin256

@amnindersingh12, would your changes work with the 600x400 canvas that was there before?

Currently, the styling is slightly inconsistent between the desktop and mobile versions, and the instruction fonts have become too small on mobile.

@shiffman, maybe we should create a feature branch [CodingTrain:houses] to collaboratively refine it further before merging it into [main].

I have checked in mobile and desktop, the scaling is inconsistent. And my changes are not working with 600x400 canvas. Can you guide me through styling/scaling or provide any resources to learn more about scaling and mobile/desktop thing ?

amnindersingh12 avatar Oct 21 '22 12:10 amnindersingh12

@amnindersingh12 I commented regarding the scaling in CSS in the pull request to your branch that I made earlier today.

In the sketch itself, the scaling is adjusted down if needed during the setup:

  const allowedWidth = min(windowWidth, screen.width);
  if (allowedWidth > defaultWidth) {
    canvas = createCanvas(defaultWidth, defaultHeight);
  } else {
    ratio = allowedWidth / defaultWidth;
    canvas = createCanvas(defaultWidth * ratio, defaultHeight * ratio);
    // scale(ratio);
  }

alin256 avatar Oct 21 '22 13:10 alin256

@alin256 your plan sounds great to me!

shiffman avatar Oct 21 '22 14:10 shiffman