Knightro63 / three_js

A dart conversion of three.js.
MIT License
17 stars 6 forks source link

example using VideoTexture from live feed camera #10

Open RansomBroker opened 6 days ago

RansomBroker commented 6 days ago

i have facing problem E/flutter ( 983): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: NoSuchMethodError: Class 'VideoTexture' has no instance method '[]'.

when pass camera to VideoTexture from flutter

Knightro63 commented 5 days ago

HI @RansomBroker,

There is currently a bug with VideoTexture. I have resolved it but have not pushed to pub.dev because of other things that are being worked on as well.

Please use CanvasTexture as a workaround for the moment. Here is an example of how to do that.

Hope this helps.

RansomBroker commented 5 days ago

Screenshot from 2024-09-13 01-11-19

when i use that code example the image show like that, are there another method ? or i can pass the live feed camera, to the shadersMaterial ? or i can transform image in easy way ?

Knightro63 commented 5 days ago

Hi @RansomBroker,

I am sorry for the issue. This is the only way currently to use the video feed.

What platform are you using?

I just tested it on Mac and it works fine, but I have not tested it on Android or web.

There is currently an issue with windows and camera feeds. I will work on it soon.

Sorry for the issue. I hope to resolve it soon.

RansomBroker commented 5 days ago

yeah im testing it on android and desktop

RansomBroker commented 5 days ago

are video texture will release in near future? or webcam update for that issues on android and web?

Knightro63 commented 3 days ago

Hi @RansomBroker,

I have updated the examples to fix the issue you are having with the android and web camera versions.

Hope this helps.