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

change visualization parameters #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

nankiewiczka
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Oct 1, 2021

✔️ Deploy Preview for radiotherapy-plans-visualization ready!

🔨 Explore the source changes: 91e9dbe

🔍 Inspect the deploy log: https://app.netlify.com/sites/radiotherapy-plans-visualization/deploys/615b4b25b843c00007485a3f

😎 Browse the preview: https://deploy-preview-10--radiotherapy-plans-visualization.netlify.app/

}

export default function ThreeCanvas({ appBarHeight }: ThreeCanvasProps) {
export default function ThreeCanvas(props: ThreeCanvasProps) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W js można odrazu robić destrukcję obiektów w argumentach funkcji.
Wtedy nie trzeba by było pisać props.[PROP_NAME], a można by było

ThreeCanvas({
   appBarHeight,
  colorIntensity,
 ...
}:ThreeCanvasProps) {
....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. Poprawione.

src/App.tsx Outdated
selectableRegions={["maxilla", "jawbone"]}
onRegionsChange={(regions) => {
setRegions(regions);
console.log(regions[0].transparency);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console.log Ci został

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Racja. Usuniete ;)

src/App.tsx Outdated
Comment on lines 142 to 145
onRegionsChange={(regions) => {
setRegions(regions);
console.log(regions[0].transparency);
}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Można też
onRegionsChange={setRegions}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poprawione.

Comment on lines +152 to +153
colorIntensity={brightness / 100}
opacity={regions.length > 0 ? regions[0].transparency / 100 : 0.8}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Według mnie lepiej przekazywać brightness itransperency od razu w procentach, żeby w przypadku jeśli będziemy chcieli jeszcze gdzieś tego użyć nie musieliśmy znowu dzielić przez 100.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slider przechowuje wartości 0-100, więc chyba lepiej tak jak jest zostawic.

export default function BasicSettings() {
interface BasicSettingsProps {
brightness: number;
onBrightnessChange: (event: unknown, newValue: number | number[]) => void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kiedy jasność może być tablicą?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nie wiem, taka sygnatura jest w Sliderze z material-ui

onCutChange: (event: unknown, newValue: number | number[]) => void;
}

export default function BasicSettings(props: BasicSettingsProps) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Widzę, że taka nazwa już była. ale dopiero teraz rzuciła mi się w oczy.
Czy nie lepiej nazwać GlobalSettings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poprawione.

Comment on lines 7 to 12
title: string;
leftIcon: SVGProps<SVGElement>;
rightIcon: SVGProps<SVGElement>;
value: number;
onValueChange: (event: unknown, newValue: number | number[]) => void;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Żeby za każdym razem nie dodawać nowych wartości do Slider'a można by było zrobić tak, żeby ten interfejs rozszerzał propsy które dostaje Slider z material-ui

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zrobione.

let plane = new Plane(new Vector3(0, 0, -1), props.startPoint - props.radius);
gl.clippingPlanes = [plane];
gl.localClippingEnabled = true;
return <></>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nie powinnaś zwracać Plane?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nie. Wystarczy, by funkcja się uruchomiła.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants