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

魔方旋转到正面时存在一道阴影裂缝 #3

Open
wjploop opened this issue Aug 8, 2021 · 0 comments
Open

魔方旋转到正面时存在一道阴影裂缝 #3

wjploop opened this issue Aug 8, 2021 · 0 comments

Comments

@wjploop
Copy link

wjploop commented Aug 8, 2021

如下图:

bug_feedback

复现步骤:

不修改代码,旋转魔方到正面,角度刚刚好时会出现该问题。

也可通过代码直接复现问题,reset时注释掉旋转的代码,如下:

// file lib/cube.dart 
  void reset() {
    cameraTransform.setIdentity();
    cameraTransform
      ..setIdentity()
      ..setEntry(3, 2, -0.0015);
      // from https://medium.com/flutter-io/perspective-on-flutter-6f832f4d912e
      // ..rotate(Vector3(0.0, 1.0, 0.0), -math.pi / 4) // rotate left 45c
      // ..rotate(Vector3(1.0, 0.0, -1.0), -math.pi / 8); // show the orange face
    pieces.forEach((p) {
      p.reset();
      positionMap[p.position] = p;
    });
    cameraChanged();
  }

最后,非常感谢大佬开源本项目,3D魔方真的很酷!

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

No branches or pull requests

1 participant