m-r-davari / flutter_3d_controller

A Flutter package for rendering interactive 3D models in different formats(glb, gltf, fbx, obj), with ability to control animations, textures and camera.
https://pub.dev/packages/flutter_3d_controller
MIT License
85 stars 11 forks source link

GLB Animation Input Different Fix Parsing #18

Closed danieljiwonkang98 closed 3 days ago

danieljiwonkang98 commented 4 months ago

Below was the input for the parsing animation, but since each word did not have quotation it was not parsing correctly, the code fix fixes this issue String input = ''' ( Attack, Bounce, Clicked, Death, Eat, Fear, Fly, Hit, "Idle_A", "Idle_B", "Idle_C", Jump, Roll, Run, Sit, Spin, Swim, Walk ) ''';

danieljiwonkang98 commented 4 months ago

@m-r-davari Can you check this? The current package has issue when parsing animation list that is listed like below (since double quotation is not included in all animation words it causes parsing issue)

String input = ''' ( Attack, Bounce, Clicked, Death, Eat, Fear, Fly, Hit, "Idle_A", "Idle_B", "Idle_C", Jump, Roll, Run, Sit, Spin, Swim, Walk ) ''';

m-r-davari commented 3 months ago

Thanks for your PR, It is not very regular that some animation name contains "" and some don't, but code improvement to support this kind of models is helpful. The method "_tupleToList" is necessary for loading some model in iOS, you must edit your pr to make sure both your logic and previous will work together. and check it on Android, iOS and Web platform. also please include your model to PR in package example that I could check it too.