-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
✔️ 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/ |
src/components/ThreeCanvas.tsx
Outdated
} | ||
|
||
export default function ThreeCanvas({ appBarHeight }: ThreeCanvasProps) { | ||
export default function ThreeCanvas(props: ThreeCanvasProps) { |
There was a problem hiding this comment.
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) {
....
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Console.log Ci został
There was a problem hiding this comment.
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
onRegionsChange={(regions) => { | ||
setRegions(regions); | ||
console.log(regions[0].transparency); | ||
}} |
There was a problem hiding this comment.
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}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poprawione.
colorIntensity={brightness / 100} | ||
opacity={regions.length > 0 ? regions[0].transparency / 100 : 0.8} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
src/components/BasicSettings.tsx
Outdated
export default function BasicSettings() { | ||
interface BasicSettingsProps { | ||
brightness: number; | ||
onBrightnessChange: (event: unknown, newValue: number | number[]) => void; |
There was a problem hiding this comment.
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ą?
There was a problem hiding this comment.
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
src/components/BasicSettings.tsx
Outdated
onCutChange: (event: unknown, newValue: number | number[]) => void; | ||
} | ||
|
||
export default function BasicSettings(props: BasicSettingsProps) { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poprawione.
src/components/Slider.tsx
Outdated
title: string; | ||
leftIcon: SVGProps<SVGElement>; | ||
rightIcon: SVGProps<SVGElement>; | ||
value: number; | ||
onValueChange: (event: unknown, newValue: number | number[]) => void; | ||
}; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 <></>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nie powinnaś zwracać Plane
?
There was a problem hiding this comment.
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.
No description provided.