Comments (11)
@theashraf It looks like invalid JSON data (the whole text shouldn't be quoted). Could you please use this?
{"v":"5.5.1","ip":0,"op":60.0,"fr":30.0,"w":300.0,"h":300.0,"nm":"C","assets":[],"layers":[{"ind":1,"ty":4,"nm":"S","sr":1.0,"ks":{"o":{"a":0,"k":100.0},"r":{"a":0,"k":0},"p":{"a":0,"k":[159.5,252.0,0]},"a":{"a":0,"k":[0.5,104.0,0]},"s":{"a":0,"k":[100.0,100.0,100.0]}},"shapes":[{"ty":"gr","nm":"E","bm":0,"it":[{"ty":"el","nm":"E","d":1,"p":{"a":0,"k":[0,0]},"s":{"a":0,"k":[45.0,45.0]}},{"ty":"fl","nm":"F","bm":0,"c":{"a":0,"k":[1.0,0,0,1.0]},"o":{"a":0,"k":100.0},"r":1},{"ty":"tr","o":{"a":0,"k":100.0},"r":{"a":0,"k":0},"p":{"a":0,"k":[0.5,104.0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100.0,100.0]},"nm":"T","sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"rp","nm":"R","c":{"a":0,"k":8.0},"o":{"a":0,"k":-17.0},"m":1.0,"tr":{"ty":"tr","nm":"T","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[-5.0,5.0]},"s":{"a":0,"k":[100.0,100.0]},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[45.0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30.0,"s":[0]},{"t":60.0,"s":[-45.0]}]},"so":{"a":0,"k":25.0},"eo":{"a":0,"k":100.0}}}],"ip":0,"op":60.0,"st":0}],"markers":[]}
from thorvg.
when I tried to load the data one problem was a crash - solved here
the other problem is that in this data in the repeater section, the Composite is float and I think it should be integer. right?
afterr applying 2392 and changing "m" = 1,
it worked
from thorvg.
I wonder if ThorVG can cast that specific property to an integer. Would that be okay ?
@theashraf If the Lottie data (JSON) violates the spec, it must be fixed there because we can't guarantee the resource compatibility with other situations(i.e other players).
Thanks @hermet, makes sense. i'll report to the user
from thorvg.
@
I wonder if ThorVG can cast that specific property to an integer. Would that be okay ?
@theashraf If the Lottie data (JSON) violates the spec, it must be fixed there because we can't guarantee the resource compatibility with other situations(i.e other players).
Thanks @hermet, makes sense. i'll report to the user
@theashraf It will be nice if we know which design tools or toolkits/libraries, the user used for exporting the resource. If it's related to our service, then we can correct the root-cause there.
from thorvg.
@theashraf The fix will be applied in version 0.14.1. Please note that incompatible type values could be ignored (set to 0).
from thorvg.
@hermet my bad, the extra double quote is from my debugging message, but it's passed to thorvg without the wrapping double quotes as you mentioned
from thorvg.
@theashraf then it should work. I confirmed it works on thorvg-viewer.
from thorvg.
@hermet, I've tested it on the ThorVG viewer as well, and it works fine. but, I'm not sure why I'm unable to load it using the tvg_picture_load_data C API.
Here is the exact valid JSON string passed to tvg_picture_load_data 😕
{\"v\": \"5.5.1\", \"ip\": 0.0, \"op\": 60.0, \"fr\": 30.0, \"w\": 300.0, \"h\": 300.0, \"nm\": \"C\", \"assets\": [], \"layers\": [{\"ind\": 1, \"ty\": 4, \"nm\": \"S\", \"sr\": 1.0, \"ks\": {\"o\": {\"a\": 0, \"k\": 100.0}, \"r\": {\"a\": 0, \"k\": 0.0}, \"p\": {\"a\": 0, \"k\": [159.5, 252.0, 0.0]}, \"a\": {\"a\": 0, \"k\": [0.5, 104.0, 0.0]}, \"s\": {\"a\": 0, \"k\": [100.0, 100.0, 100.0]}}, \"shapes\": [{\"ty\": \"gr\", \"nm\": \"E\", \"bm\": 0, \"it\": [{\"ty\": \"el\", \"nm\": \"E\", \"d\": 1, \"p\": {\"a\": 0, \"k\": [0.0, 0.0]}, \"s\": {\"a\": 0, \"k\": [45.0, 45.0]}}, {\"ty\": \"fl\", \"nm\": \"F\", \"bm\": 0, \"c\": {\"a\": 0, \"k\": [1.0, 0.0, 0.0, 1.0]}, \"o\": {\"a\": 0, \"k\": 100.0}, \"r\": 1}, {\"ty\": \"tr\", \"o\": {\"a\": 0, \"k\": 100.0}, \"r\": {\"a\": 0, \"k\": 0.0}, \"p\": {\"a\": 0, \"k\": [0.5, 104.0]}, \"a\": {\"a\": 0, \"k\": [0.0, 0.0]}, \"s\": {\"a\": 0, \"k\": [100.0, 100.0]}, \"nm\": \"T\", \"sk\": {\"a\": 0, \"k\": 0.0}, \"sa\": {\"a\": 0, \"k\": 0.0}}]}, {\"ty\": \"rp\", \"nm\": \"R\", \"c\": {\"a\": 0, \"k\": 8.0}, \"o\": {\"a\": 0, \"k\": -17.0}, \"m\": 1.0, \"tr\": {\"ty\": \"tr\", \"nm\": \"T\", \"p\": {\"a\": 0, \"k\": [0.0, 0.0]}, \"a\": {\"a\": 0, \"k\": [-5.0, 5.0]}, \"s\": {\"a\": 0, \"k\": [100.0, 100.0]}, \"r\": {\"a\": 1, \"k\": [{\"i\": {\"x\": [0.833], \"y\": [0.833]}, \"o\": {\"x\": [0.167], \"y\": [0.167]}, \"t\": 0.0, \"s\": [45.0]}, {\"i\": {\"x\": [0.833], \"y\": [0.833]}, \"o\": {\"x\": [0.167], \"y\": [0.167]}, \"t\": 30.0, \"s\": [0.0]}, {\"t\": 60.0, \"s\": [-45.0]}]}, \"so\": {\"a\": 0, \"k\": 25.0}, \"eo\": {\"a\": 0, \"k\": 100.0}}}], \"ip\": 0.0, \"op\": 60.0, \"st\": 0.0}], \"markers\": []}
from thorvg.
the other problem is that in this data in the repeater section, the Composite is float and I think it should be integer. right?
Thanks @mgrudzinska !!
You're right, but this asset is from Iconscout, and I'm not sure which Lottie plugin was used to export that specific animation. I wonder if ThorVG can cast that specific property to an integer. Would that be okay ?
from thorvg.
I wonder if ThorVG can cast that specific property to an integer. Would that be okay ?
@theashraf If the Lottie data (JSON) violates the spec, it must be fixed there because we can't guarantee the resource compatibility with other situations(i.e other players).
from thorvg.
when I tried to load the data one problem was a crash - solved here
@mgrudzinska This is not the issue point. Strings are expected to end with \0
. Otherwise, it is an invalid parameter due to user error. We can deal it just as for the exceptional handling just in case user mistake(your sample might have also this), but please note that it's not the thorvg responsibility.
from thorvg.
Related Issues (20)
- Failure to compile on vs 2017 HOT 4
- Works
- example: multithread task cause the Lottie example crashed when using GLEngine HOT 11
- svg: Graphic elements declared in <defs> are displayed.
- gl_engine: fillSpread quality enhancement
- gl_engine: regression of memory leak
- tvg: Text serialization / restore implementation is missing.
- sw_engine: incorrect radial grad result HOT 2
- example: There is no file named test.tvg in the directory resources/tvg HOT 2
- Support version api HOT 7
- gl renderer on Windows: using glew or not HOT 8
- Performance Compared to RLottie HOT 7
- lottie: rendering issue when resizing frame buffer after upgrading to thorvg 0.14.x HOT 1
- linearGradient doesn't abide by certain specifications
- lottie: Slot overriding enhancement HOT 2
- wg_engine: SVG rendering compatibility HOT 1
- lottie: transparency bug? HOT 2
- wg_engine: stroke trim issue HOT 6
- renderer: introduce an interface to retrieve a specific paint from a canvas. HOT 1
- renderer/text: Text with composite glyphs issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thorvg.