-
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
hugo/feature/Add Pairing #536
Conversation
HPezz
commented
Dec 13, 2023
- ✨ (GEK): Add PlayerButton to Melody
- 🔥 (GEK): Remove oldSystem PairingView
- ♻️ (RobotKit): Add custom Color init rgb and gradient
- x:sparkles: (GEK): Add Pairing views
- ✨ (ContentKitxUIExplorer): Add Pairing activity
f2c27a0
to
aefaeb8
Compare
dd86422
to
b8c25bd
Compare
b8c25bd
to
9e23b6b
Compare
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.
LGTM 👍
deux petites suggestions, celle pour le gradient pouvant être faite dans une autre PR
il y a aussi ce commit qui a un x
en trop dans le message
...s/GameEngineKit/Sources/_NewSystem/Exercises/Specialized/Pairing/PairingView+Animation.swift
Outdated
Show resolved
Hide resolved
public init(fromGradient colors: (Color, Color), at position: Float) { | ||
let positionClamped = max(min(position, 1), 0) | ||
let (r1, g1, b1) = (Float(colors.0.robotRGB[0]), Float(colors.0.robotRGB[1]), Float(colors.0.robotRGB[2])) | ||
let (r2, g2, b2) = (Float(colors.1.robotRGB[0]), Float(colors.1.robotRGB[1]), Float(colors.1.robotRGB[2])) | ||
|
||
let r = UInt8(r1 + (r2 - r1) * positionClamped) | ||
let g = UInt8(g1 + (g2 - g1) * positionClamped) | ||
let b = UInt8(b1 + (b2 - b1) * positionClamped) | ||
|
||
self.robotRGB = [r, g, b] | ||
self.screenRGB = [r, g, b] | ||
} |
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.
je sais plus si on en avait parlé à l'oral ou si j'avais déjà mis dans une précédente review, mais je pense que ça serait mieux de sortir ça dans une struct Gradient à part
l'idée est de créer un gradient avec le nombre de couleur que tu veux puis ensuite d'itérer dessus comme pour un array
b00378b
to
0ecbd35
Compare
0ecbd35
to
2ae8a43
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |