Revision 8db5b725
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/examples/dynamic/DynamicSurfaceView.java | ||
---|---|---|
111 | 111 |
di3D = new Dynamic3D(mDuration,mCount); |
112 | 112 |
p3N = new Static3D(mNoise0,mNoise1,mNoise2); |
113 | 113 |
|
114 |
di1D.setAccessMode(Dynamic.ACCESS_SEQUENTIAL);
|
|
115 |
di2D.setAccessMode(Dynamic.ACCESS_SEQUENTIAL);
|
|
116 |
di3D.setAccessMode(Dynamic.ACCESS_SEQUENTIAL);
|
|
114 |
di1D.setAccessType(Dynamic.ACCESS_TYPE_SEQUENTIAL);
|
|
115 |
di2D.setAccessType(Dynamic.ACCESS_TYPE_SEQUENTIAL);
|
|
116 |
di3D.setAccessType(Dynamic.ACCESS_TYPE_SEQUENTIAL);
|
|
117 | 117 |
|
118 | 118 |
if(!isInEditMode()) |
119 | 119 |
{ |
src/main/java/org/distorted/examples/wind/WindEffectsManager.java | ||
---|---|---|
74 | 74 |
windDynamic1.add(windFactor11); |
75 | 75 |
windDynamic1.add(windFactor12); |
76 | 76 |
windDynamic1.setMode(Dynamic.MODE_JUMP); |
77 |
windDynamic1.setAccessMode(Dynamic.ACCESS_SEQUENTIAL);
|
|
77 |
windDynamic1.setAccessType(Dynamic.ACCESS_TYPE_SEQUENTIAL);
|
|
78 | 78 |
|
79 | 79 |
windFactor21 = new Static5D(mHeight/10,mHeight/5,-180, 90, 10); |
80 | 80 |
windFactor22 = new Static5D(mHeight/10,mHeight/5,+180, 90, 10); |
... | ... | |
82 | 82 |
windDynamic2.add(windFactor21); |
83 | 83 |
windDynamic2.add(windFactor22); |
84 | 84 |
windDynamic2.setMode(Dynamic.MODE_JUMP); |
85 |
windDynamic2.setAccessMode(Dynamic.ACCESS_SEQUENTIAL);
|
|
85 |
windDynamic2.setAccessType(Dynamic.ACCESS_TYPE_SEQUENTIAL);
|
|
86 | 86 |
|
87 | 87 |
windFactor31 = new Static5D(mHeight/10,mHeight/10,-180, 90, 90); |
88 | 88 |
windFactor32 = new Static5D(mHeight/10,mHeight/10,+180, 90, 90); |
... | ... | |
90 | 90 |
windDynamic3.add(windFactor31); |
91 | 91 |
windDynamic3.add(windFactor32); |
92 | 92 |
windDynamic3.setMode(Dynamic.MODE_JUMP); |
93 |
windDynamic3.setAccessMode(Dynamic.ACCESS_SEQUENTIAL);
|
|
93 |
windDynamic3.setAccessType(Dynamic.ACCESS_TYPE_SEQUENTIAL);
|
|
94 | 94 |
|
95 | 95 |
windFactor41 = new Static5D(mHeight/10,mHeight/5,-180, 0, 0); |
96 | 96 |
windFactor42 = new Static5D(mHeight/10,mHeight/5,+180, 0, 0); |
... | ... | |
98 | 98 |
windDynamic4.add(windFactor41); |
99 | 99 |
windDynamic4.add(windFactor42); |
100 | 100 |
windDynamic4.setMode(Dynamic.MODE_JUMP); |
101 |
windDynamic4.setAccessMode(Dynamic.ACCESS_SEQUENTIAL);
|
|
101 |
windDynamic4.setAccessType(Dynamic.ACCESS_TYPE_SEQUENTIAL);
|
|
102 | 102 |
} |
103 | 103 |
|
104 | 104 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/res/layout/dynamicslayout.xml | ||
---|---|---|
6 | 6 |
android:gravity="fill_horizontal" |
7 | 7 |
android:orientation="vertical" > |
8 | 8 |
|
9 |
<LinearLayout |
|
10 |
android:orientation="horizontal" |
|
11 |
android:layout_width="match_parent" |
|
12 |
android:layout_height="48dp"> |
|
13 |
|
|
14 |
<Button |
|
15 |
android:id="@+id/dynamicButtonStart" |
|
16 |
android:layout_width="wrap_content" |
|
17 |
android:layout_height="match_parent" |
|
18 |
android:layout_weight="0.5" |
|
19 |
android:paddingLeft="10dp" |
|
20 |
android:paddingRight="10dp" |
|
21 |
android:onClick="Start" |
|
22 |
android:text="@string/start" /> |
|
23 |
|
|
24 |
<Button |
|
25 |
android:id="@+id/dynamicButtonReset" |
|
26 |
android:layout_width="wrap_content" |
|
27 |
android:layout_height="match_parent" |
|
28 |
android:layout_weight="0.5" |
|
29 |
android:paddingLeft="10dp" |
|
30 |
android:paddingRight="10dp" |
|
31 |
android:onClick="Reset" |
|
32 |
android:text="@string/reset" /> |
|
33 |
</LinearLayout> |
|
34 |
|
|
35 |
<org.distorted.examples.dynamic.DynamicSurfaceView |
|
36 |
android:id="@+id/dynamicSurfaceView" |
|
37 |
android:layout_width="fill_parent" |
|
38 |
android:layout_height="0dp" |
|
39 |
android:layout_weight="1" /> |
|
40 |
|
|
41 | 9 |
<LinearLayout |
42 | 10 |
android:orientation="horizontal" |
43 | 11 |
android:layout_width="match_parent" |
... | ... | |
167 | 135 |
|
168 | 136 |
</LinearLayout> |
169 | 137 |
|
138 |
<org.distorted.examples.dynamic.DynamicSurfaceView |
|
139 |
android:id="@+id/dynamicSurfaceView" |
|
140 |
android:layout_width="fill_parent" |
|
141 |
android:layout_height="0dp" |
|
142 |
android:layout_weight="1" /> |
|
143 |
|
|
144 |
<LinearLayout |
|
145 |
android:orientation="horizontal" |
|
146 |
android:layout_width="match_parent" |
|
147 |
android:layout_height="48dp"> |
|
148 |
|
|
149 |
<Button |
|
150 |
android:id="@+id/dynamicButtonStart" |
|
151 |
android:layout_width="wrap_content" |
|
152 |
android:layout_height="match_parent" |
|
153 |
android:layout_weight="0.5" |
|
154 |
android:paddingLeft="10dp" |
|
155 |
android:paddingRight="10dp" |
|
156 |
android:onClick="Start" |
|
157 |
android:text="@string/start" /> |
|
158 |
|
|
159 |
<Button |
|
160 |
android:id="@+id/dynamicButtonReset" |
|
161 |
android:layout_width="wrap_content" |
|
162 |
android:layout_height="match_parent" |
|
163 |
android:layout_weight="0.5" |
|
164 |
android:paddingLeft="10dp" |
|
165 |
android:paddingRight="10dp" |
|
166 |
android:onClick="Reset" |
|
167 |
android:text="@string/reset" /> |
|
168 |
</LinearLayout> |
|
169 |
|
|
170 | 170 |
</LinearLayout> |
Also available in: Unified diff
Minor improvements in the Dynamics.