Revision 13155c68
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/sink/SinkRenderer.java | ||
---|---|---|
59 | 59 |
SinkRenderer(GLSurfaceView v) |
60 | 60 |
{ |
61 | 61 |
mView = v; |
62 |
|
|
63 |
Static3D pLeft = new Static3D(214, 206, 0); |
|
64 |
Static3D pRight= new Static3D(390, 212, 0); |
|
65 |
Static4D Region= new Static4D(0,0,60,60); |
|
66 | 62 |
|
67 |
Dynamic1D dSink = new Dynamic1D(2000,0.0f);
|
|
68 |
dSink.add(new Static1D( 1));
|
|
69 |
dSink.add(new Static1D(10));
|
|
63 |
Dynamic1D sink = new Dynamic1D(2000,0.0f);
|
|
64 |
sink.add(new Static1D(1.0f));
|
|
65 |
sink.add(new Static1D(0.2f));
|
|
70 | 66 |
|
71 | 67 |
mEffects = new DistortedEffects(); |
72 |
mEffects.sink( dSink, pLeft, Region); |
|
73 |
mEffects.sink( dSink, pRight,Region); |
|
68 |
mEffects.sink( sink, new Static3D(297, 320, 0), null); |
|
74 | 69 |
|
75 | 70 |
mScreen = new DistortedFramebuffer(0); |
76 | 71 |
} |
... | ... | |
115 | 110 |
{ |
116 | 111 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
117 | 112 |
|
118 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.dog);
|
|
113 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.cat);
|
|
119 | 114 |
Bitmap bitmap; |
120 | 115 |
|
121 | 116 |
try |
src/main/res/values/strings.xml | ||
---|---|---|
74 | 74 |
|
75 | 75 |
<string name="example_monalisa">Mona Lisa</string> |
76 | 76 |
<string name="example_monalisa_subtitle">The basics of Distortions.</string> |
77 |
<string name="example_sink">Dog</string>
|
|
77 |
<string name="example_sink">Cat</string>
|
|
78 | 78 |
<string name="example_sink_subtitle">Learn about sinks.</string> |
79 | 79 |
<string name="example_bean">Mr. Bean</string> |
80 | 80 |
<string name="example_bean_subtitle">Interpolation between more than two Points.</string> |
Also available in: Unified diff
Improve the Sink app (funny?)