Open pjc0247 opened 5 years ago
The low level API allows this, but you will have to fetch the data yourself. Example:
var c = document.getElementById("..."); // get canvas element somehow
var buffer = ... // get data in Uint8Array; via XHR, for example.
var pf = new PolyFlif({
canvas: c,
buf: buffer
});
pf.beginPercent(true, 0, 0, 0);
@hrj Yeah, maybe that would be an answer. but what I want to say is the conviences
.
@pjc0247 Sure, but which part is inconvenient? I want to support maximum flexibility with minimum API. Given that the above example is just a couple of lines of code, I think it is a good tradeoff between flexibility and minimalism.
@hrj Because, I have to fill out the buffer myself and params (x, 0, 0, 0) is not intuitive.
You've already implemented everything such as DOM controlling, fetching, initializing(beginPercent
). but you didn't expose it.
So I need to make a wrapper even if there is a full implementation somewhere.
At least, additional url
or src
option in current API would be great.
Thanks
I read your docs and assumed that there is no API provided to handle lazy-loaded element. It would be great to give a chance to handle it like below:
Thanks.