Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Refactor AR Screen to not destroy all pieces' node #391

Merged
merged 49 commits into from May 25, 2022

Conversation

KurohanaJuri
Copy link
Contributor

@KurohanaJuri KurohanaJuri commented May 17, 2022

Refactor the AR scene to not destroy the piece's nodes at each update.

In this refactor, we integrate the AR screen with the new delegate introduced in #331

The update function takes the current a list of piece present on the board (from the state) and compare with the local version to update (move, delete, add piece for the promotion) the view.

This refactor produces the same behaviour that what we have in the main branch.

Some line cannot be tested because it required to create a screen, and we still have the bug #213.

This code still have a problem for the future issue #369, for some reason we cannot call smooth which is used to animate the 3D model. (Need more investigation)

Closes #284, Closes #377

@KurohanaJuri KurohanaJuri changed the title Refactor/cyk/update pieces Refactor AR Screen to not destroy all pieces' node May 17, 2022
@KurohanaJuri KurohanaJuri self-assigned this May 17, 2022
@KurohanaJuri KurohanaJuri added the AR Issues related to the AR features label May 17, 2022
Copy link
Contributor

@alexandrepiveteau alexandrepiveteau left a comment

Choose a reason for hiding this comment

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

Since ArGameScreenState and ChessBoardState share a lot of functionality and implementation, we should probably use ChessBoardState in the StatefulArScreen.

KurohanaJuri and others added 4 commits May 25, 2022 11:50
Move the decleration insize the scope, that allow use to remove the null check
Co-authored-by: Alexandre Piveteau <alexandre@piveteau.email>
@KurohanaJuri KurohanaJuri enabled auto-merge (squash) May 25, 2022 09:57
Copy link
Contributor

@alexandrepiveteau alexandrepiveteau left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

Copy link
Contributor

@Fouad-sys Fouad-sys left a comment

Choose a reason for hiding this comment

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

Great work! Just a few documentation typos and suggestions to follow our documentation convention, but overall looks great!

Co-authored-by: Fouad-sys <61212919+Fouad-sys@users.noreply.github.com>
Copy link
Contributor

@Fouad-sys Fouad-sys left a comment

Choose a reason for hiding this comment

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

Thanks!

@codeclimate
Copy link

codeclimate bot commented May 25, 2022

Code Climate has analyzed commit c28d57f and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 83.3% (80% is the threshold).

This pull request will bring the total coverage in the repository to 96.7% (0.2% change).

View more on Code Climate.

@KurohanaJuri KurohanaJuri merged commit ec8c9fb into main May 25, 2022
@KurohanaJuri KurohanaJuri deleted the refactor/cyk/update_pieces branch May 25, 2022 18:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AR Issues related to the AR features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor AR code Fix AR destroy() all nodes in AR
4 participants