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

Correct shiftUpperValue() for d4 (Issue #6) #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liffiton
Copy link

Part of shift_dice_faces() from the original dice.js had not been brought into this adaptation. I've attempted to port it over. It seems to work in my tests, but I am not 100% confident given I haven't fully understood the underlying code.

Part of shift_dice_faces() from the original dice.js had not been brought into this adaptation.  I've attempted to port it over.  It seems to work in my tests, but I am not 100% confident given I haven't fully understood the underlying code.
@@ -206,6 +206,18 @@ class DiceObject {

geometry.faces[i].materialIndex = materialIndex + 1;
}
if (this.values == 4 && toValue != fromValue) {

Choose a reason for hiding this comment

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

@liffiton, I see this working in most cases, but it fails where the && toValue != fromValue condition is met. Removing that restriction from the if seems to work in all cases that I have observed.

Suggested change
if (this.values == 4 && toValue != fromValue) {
if (this.values == 4) {

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