Comments (3)
Should I open a pull request, even though I haven't tested it?
@leoxshn please, open, I will test it. Sorry for the long delay with the answer.
from shaderview.
@leoxshn
I didn't expect that it's needed to change bitmap for each onBind()
.
Could you describe your use case where you need to update the bitmap on each binding?
Nevertheless, I've added a new API:
Bitmap:
shaderView?.shaderParams?.updateValue2D("albedo", bitmap)
or for drawable:
shaderParams?.updateValue2D("albedo", R.drawable.albedo)
Here is a PR: https://github.com/appspell/ShaderView/pull/9/files
from shaderview.
Could you describe your use case where you need to update the bitmap on each binding?
I was making an android launcher, that has a feed, where one of the cards is a music player, and wanted to use a shader to stretch the music covers to fit the card without distorting them in an ugly way, and also add a little blur.
Thanks a lot for the new API
Also I don't technically update it for each onBind() anymore, just when the cover changes
from shaderview.
Related Issues (8)
- Are there plans to switch to something else from jcenter? HOT 6
- Performance issue (not really) HOT 1
- Do we need to downgrade compileSdkVersion / targetSdkVersion? HOT 1
- Do someone need to support Jetpack Compose? HOT 3
- I need your ideas how to simplify interface! HOT 1
- Strange behavior: doesn't work in real project HOT 1
- Surface is invalid when put ShaderView in ViewPager2 and swipe to previous page item HOT 1
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 shaderview.