Revision 0ba5de00
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/movingglow/MovingGlowRenderer.java | ||
---|---|---|
34 | 34 |
import org.distorted.library.main.DistortedNode; |
35 | 35 |
import org.distorted.library.main.DistortedScreen; |
36 | 36 |
import org.distorted.library.main.DistortedTexture; |
37 |
import org.distorted.library.mesh.MeshBase; |
|
38 | 37 |
import org.distorted.library.mesh.MeshQuad; |
39 |
import org.distorted.library.mesh.MeshRectangles; |
|
40 | 38 |
import org.distorted.library.message.EffectListener; |
41 | 39 |
import org.distorted.library.type.Dynamic1D; |
42 | 40 |
import org.distorted.library.type.Dynamic4D; |
... | ... | |
88 | 86 |
DistortedEffects rootEffects = new DistortedEffects(); |
89 | 87 |
DistortedNode root = new DistortedNode(surface, rootEffects, rootMesh); |
90 | 88 |
|
91 |
Static3D moveVector = new Static3D(0.55f*LEAF_SIZE, (mRootH-LEAF_SIZE)/2, 0);
|
|
89 |
Static3D moveVector = new Static3D(-1.45f*LEAF_SIZE, 0, 0);
|
|
92 | 90 |
Static1D chromaLevel= new Static1D(0.5f); |
93 | 91 |
Static3D center = new Static3D(0,0,0); |
94 | 92 |
Static3D axis = new Static3D(0,0,1); |
... | ... | |
98 | 96 |
for(int j=0; j<NUM_LEAVES; j++) |
99 | 97 |
{ |
100 | 98 |
mLeafEffects[j] = new DistortedEffects(); |
101 |
mLeafEffects[j].apply( new MatrixEffectRotate(new Static1D(j*(360/NUM_LEAVES)), axis, center) ); |
|
102 | 99 |
mLeafEffects[j].apply(leafMove); |
100 |
mLeafEffects[j].apply( new MatrixEffectRotate(new Static1D(j*(360/NUM_LEAVES)), axis, center) ); |
|
103 | 101 |
mLeafEffects[j].apply( new FragmentEffectChroma(chromaLevel, new Static3D(colors[3*j],colors[3*j+1], colors[3*j+2])) ); |
104 | 102 |
DistortedNode node = new DistortedNode( mLeaf, mLeafEffects[j], leafMesh); |
105 | 103 |
root.attach(node); |
... | ... | |
113 | 111 |
rot.add(new Static1D(360)); |
114 | 112 |
|
115 | 113 |
DistortedEffects effects = root.getEffects(); |
114 |
effects.apply(new MatrixEffectRotate(rot, axis, center) ); |
|
116 | 115 |
effects.apply(new MatrixEffectScale(mScale)); |
117 |
effects.apply( new MatrixEffectRotate(rot, axis, center) ); |
|
118 | 116 |
|
119 | 117 |
Dynamic1D radiusDyn = new Dynamic1D(FLASH_TIME,1.0f); |
120 | 118 |
radiusDyn.add(new Static1D( 0)); |
Also available in: Unified diff
Fixes for the merge.