191 |
* self.windowAnimation.animate() |
* self.windowAnimation.animate() |
192 |
* </pre> |
* </pre> |
193 |
* </li><li> |
* </li><li> |
194 |
* Example: When you want to pop a red box from left to right: |
* Example: When you want to pop a red box from left to right. |
195 |
|
* The point of example is to use creation of new scene without |
196 |
|
* animation: |
197 |
* <pre> |
* <pre> |
198 |
* class Scene: |
* class Scene: |
199 |
* """ Example scene to pop red box from left to right |
* """ Example scene to pop red box from left to right |
214 |
* vs.put(vob.vobs.RectBgVob(java.awt.Color.red), cs) |
* vs.put(vob.vobs.RectBgVob(java.awt.Color.red), cs) |
215 |
* def key(self, key): |
* def key(self, key): |
216 |
* self.keyHit = 1 - self.keyHit |
* self.keyHit = 1 - self.keyHit |
217 |
* self.windowAnimation.animate() |
* self.windowAnimation.switchVS() |
218 |
* </pre> |
* </pre> |
219 |
* </li><li> |
* </li><li> |
220 |
* Example: Another way to pop a red box from left to right. |
* Example: Another way to pop a red box from left to right. |
221 |
* This way is like ten times faster than creating a new scene: |
* This way is like ten times faster than previous example |
222 |
|
* where we created a new scene. In this example we set |
223 |
|
* coordinate system parameters instead: |
224 |
* <pre> |
* <pre> |
225 |
* class Scene: |
* class Scene: |
226 |
* """ Example scene to pop red box from left to right |
* """ Example scene to pop red box from left to right |
252 |
* </li><li> |
* </li><li> |
253 |
* Example: Quite a difficult example where we start to drag |
* Example: Quite a difficult example where we start to drag |
254 |
* red box around the scene that may end to be yellow one. |
* red box around the scene that may end to be yellow one. |
255 |
* Point of the example is to use both rerendering of one |
* Point of the example is to use both (fast) rerendering of one |
256 |
* scene and switching of scene. |
* scene and switch scene when it's unavoidable. |
257 |
* <p> |
* <p> |
258 |
* The main problem in example is that when handling mouse event you |
* The main problem in example is that when handling mouse event you |
259 |
* don't know what is it in the current window: a yellow or red |
* don't know what is drawn in the current window: a yellow or red |
260 |
* box. We try to guess *the position of the moon* from previous |
* box? We try to guess *the position of the moon* from previous |
261 |
* event if we even have a one. |
* event if we even have a one. |
262 |
* |
* |
263 |
* <pre> |
* <pre> |