NativeScript / canvas

Apache License 2.0
88 stars 18 forks source link

Error in Android real device #110

Open vallemar opened 10 months ago

vallemar commented 10 months ago

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

https://github.com/NativeScript/canvas/assets/15719383/a8e92366-19a2-4877-83ac-93e90ba4edf0

And on a real device like this.

https://github.com/NativeScript/canvas/assets/15719383/7bae614c-52ae-4564-8554-c5408ee4cb0e

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 commented 3 months ago

Can you give this another try?

vallemar commented 4 days ago

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"
  }