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

Error in Android real device #110

Open
vallemar opened this issue Jan 29, 2024 · 3 comments
Open

Error in Android real device #110

vallemar opened this issue Jan 29, 2024 · 3 comments

Comments

@vallemar
Copy link
Contributor

vallemar commented Jan 29, 2024

I'm trying to recreate this animation but I'm having errors on a real Android device. https://codepen.io/towc/details/yNywmX

In my simulator it looks like this. Also the FPS remains at 30

Grabacion.de.pantalla.2024-01-30.a.las.0.45.06.mov

And on a real device like this.

Screenrecorder-2024-01-30-00-46-16-81.mp4

My phone is a xiaomi 12 T pro.
This is my repo, branch android-real-device-error: https://github.com/vallemar/nativescript-canvas-vue/tree/android-real-device-error

Update:
On android using pixels I have raised the fps to 60, but I still have the same problem on the real device

 var w = Utils.layout.toDevicePixels(c.getActualSize().width),
    h = Utils.layout.toDevicePixels(c.getActualSize().height),
@triniwiz
Copy link
Member

Can you give this another try?

@vallemar
Copy link
Contributor Author

now in a real device I see
1-42cd3456

My versions:

 "dependencies": {
    "@nativescript-community/sensors": "^1.4.0",
    "@nativescript/canvas": "^2.0.0-rc.5",
    "@nativescript/core": "^8.8.6",
    "nativescript-vue": "3.0.0-rc.2"
  },
  "devDependencies": {
    "@nativescript/android": "8.8.6",
    "@nativescript/ios": "8.8.0",
    "@nativescript/tailwind": "~2.0.1",
    "@nativescript/types": "~8.6.1",
    "@nativescript/webpack": "~5.0.0",
    "@types/node": "~17.0.21",
    "tailwindcss": "^3.1.8",
    "typescript": "^5.2.2"
  }

@kakha13
Copy link

kakha13 commented Dec 18, 2024

Try ctx.clearRect(0, 0, canvas.width, canvas.height);

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

3 participants