You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 🚀 Feat: A broadcast and whenIReceive methods for the Object-class, which makes it possible to send anything as a broadcast.
10
+
11
+
```java
12
+
sprite1.broadcast(newEvent());
13
+
14
+
classAnotherSpriteextendsSprite {
15
+
publicvoidwhenIReceive(Objectmessage) {
16
+
if (message instanceofEvent) {
17
+
// ...
18
+
}
19
+
}
20
+
}
21
+
```
22
+
23
+
## 4.10.0
24
+
25
+
- 🚀 Feat: Add new random methods for get a random position with respect to the window size.
26
+
27
+
```java
28
+
Random.randomPosition();
29
+
Random.randomX();
30
+
Random.randomY();
31
+
```
32
+
33
+
- 🐛 Fix: setSize not caching the new image, which lead to low framerates.
34
+
35
+
36
+
## 4.9.0
37
+
38
+
- 🚀 Feat: Add fullscreen mode. You can now define in the constructor of your window, if you want to operate in fullscreen mode.
39
+
40
+
```java
41
+
newWindow(true); // fullscreen
42
+
newWindow(true, assets) // fullscreen with assets loading
43
+
```
44
+
45
+
- 🐛 Fix: keyCodes for some keys were off.
46
+
- 🐛 Fix: File extension not working on Windows.
47
+
48
+
## 4.8.3
49
+
50
+
- 🐛 Fix: pointTowardsSprite pointing to the opposite direction
51
+
52
+
## 4.8.2
53
+
54
+
- 🐛 Fix: Pen position and state when using the copy-constructor.
55
+
56
+
## 4.8.1
57
+
58
+
- 🐛 Fix: Debug text influencing text size of other texts.
59
+
- 🐛 Fix: Mouse tracking not working correctly when zooming in and out.
60
+
61
+
## 4.8.0
62
+
63
+
- 💥 BREAKING CHANGE: Pen behavior was changed to work more similar to the behavior of the scratch pen.
64
+
- You should double the size of your pen in your sketches to get the same visuals as in the previous versions.
65
+
- You should also put the pen down after you have set the initial position, since the pen now draws an initial point, when it is put down.
66
+
67
+
## 4.7.0
68
+
69
+
- 🚀 Feat: Add methods to the text class to be more consistent with the sprite class in regard to positioning.
70
+
- 🚀 Feat: Update sound library to add support for mp3 and ogg files
71
+
- 🐛 Fix: Think- and say-bubble were not at the right place
72
+
73
+
## 4.6.0
74
+
75
+
- 🚀 Feat: Add setCursor method to the stage class.
76
+
- 🚀 Feat: Add extension camera. The camera object allows you to move the view of the stage without manipulating the coordinates of e.g. sprites.
77
+
78
+
You can now get the camera from a stage object.
79
+
80
+
```java
81
+
var myStage =newStage();
82
+
Camera myCamera = myStage.getCamera();
83
+
```
84
+
85
+
The three main abilities of the camera are:
86
+
87
+
1. Set the position of the camera (setX, setY, changeX, changeY, setPosition)
88
+
2. Set the zoom of the camera (setZoom, resetZoo, changeZoom, setZoomLimit)
89
+
3. Transform coordinates from local (Camera-Space) to global (Window-Space) (toLocalPosition, toLocalX, toLocalY, toGlobalPosition, toGlobalX, toGlobalY)
90
+
91
+
## 4.5.0
92
+
93
+
- 💥 BREAKING CHANGE: Only use double for methods instead of supporting both float and doubles. This was unnecessary and cluttered the BlueJ interface with "duplicated" methods. This could potentially break your project if you were using floats, just replace them with doubles, and you are good to go.
94
+
95
+
## 4.4.0
96
+
97
+
- 🚀 Feat: Revert BREAKING CHANGE and add addStage, removeStage and getStage again.
98
+
- 🚀 Feat: Add methods for counting sprites (countSprites, countSpritesOf), pens (countPens, countPensOf) and texts (countTexts, countTextsOf).
99
+
- 🚀 Feat: Add more methods for finding sprites (findSpritesOf), pens (findPensOf) and texts (findTextsOf) of a given class.
100
+
- 🚀 Feat: Add exit to Stage for easier access.
101
+
- 🚀 Feat: Add getDeltaTime to the Sprite and Stage class.
102
+
- 🚀 Feat: You can now stretch a backdrop to the window size by using `addBackdrop("name", "path", true)`.
103
+
- 🐛 Fix: Path resolution of assets
104
+
- 🐛 Fix: whenMouseMoved not working
105
+
106
+
## 4.3.0
107
+
108
+
- 🚀 Feat: Random can now create a new random unit vector (Random.randomVector2()).
109
+
- 🚀 Feat: You can now set the width of a text after calling the constructor (text.setWidth(40)).
110
+
111
+
## 4.2.1
112
+
113
+
- 🐛 Fix: AnimatedSprite throws an error, because the animationFrame is too high.
114
+
115
+
## 4.2.0
116
+
117
+
- 💥 BREAKING CHANGE: Replace addStage, removeStage and getStage in favour of setStage, which simplifies the handling of multiple stages.
118
+
- 🐛 Fix: First frame of an AnimatedSprite is skipped.
119
+
120
+
## 4.1.0
121
+
122
+
- 🚀 Feat: New extension tiled.
123
+
- 🐛 Fix: Fix isTouchingMousePointer.
124
+
125
+
## 4.0.2
126
+
127
+
- 🐛 Fix: Missing stamp method on Sprite
128
+
129
+
## 4.0.1
130
+
131
+
- 🐛 Fix: Scratch for Java Window not creating on Windows
132
+
133
+
## 4.0.0
134
+
135
+
- 💥 BREAKING CHANGE: Move (0, 0) to the center of the stage to be in-line with Scratch.
136
+
- 🚀 Feat: Add stamp method to the pen `pen.stamp()`. This is also available on a Sprite with `stamp()`, `stampToForeground()` or `stampToBackground()`.
137
+
- 🚀 Feat: Unify constructors of Window and Stage.
138
+
- 🚀 Feat: Load all tiles from a sprite sheet as costumes with addCostumes.
139
+
- 🚀 Feat: Add goToMousePointer to the sprite class.
140
+
- 🚀 Feat: Add goToRandomPosition to the sprite class.
141
+
- 🚀 Feat: switchCostumes now also accepts an integer for switching to a specific index.
142
+
- 🚀 Feat: Allow for custom sorting of sprites by providing a Comparator via the `setSorter`-method of the stage.
143
+
- 🐛 Fix: Random.randomInt did not work correct.
144
+
145
+
## 3.9.0
146
+
147
+
- 🚀 Feat: Add support for broadcast and when i receive blocks to the Sprite and the Stage class.
148
+
149
+
## 3.8.0
150
+
151
+
- 🚀 Feat: Support for vertical sprite sheets was added.
152
+
- 🚀 feat: Loading Animation got improved. The loading screen now shows the percentage of files, which are already loaded.
153
+
154
+
## 3.7.0
155
+
156
+
#scratch4j v3.7.0 got released:
157
+
158
+
- 💥 BREAKING CHANGE: AnimatedSprite, Hitbox, Text and Timer were moved into the org.openpatch.scratch.extensions package. Each extension got its package. For example, org.openpatch.scratch.extensions.animation. In the main package, we only want the classes with emulate the current Scratch behavior. This should lead to a smoother transition. The extensions package should be used, we the normal functionality is not enough.
159
+
- 🚀 Feat: New class Vector2 for the math extension. Every so often, it is easier to work with vectors. Therefore, this class got introduced. The Sprite class was updated to make use of the Vector2 class. You can, for example, call the move and setDirection methods with a Vector2.
160
+
- 🚀 Feat: New class Operators. This class has several simple methods for transforming data and working with mathematical operations – just like the Scratch operator blocks. For example, mapping values, lerping between values or using sine and cosine.
161
+
- 🚀 Feat: New class Random in the math extension. This class contains several methods for generating random numbers. This makes working with randomness outside a Sprite or Stage class easier.
162
+
- 🚀 Feat: Introduce the method ifOnEdgeBounce for the class Sprite. This method works like the if on edge, bounce-block in Scratch in is an alternative to the setOnEdgeBounce-method.
163
+
- 🚀 Feat: Introduce pointTowardsMousePointer and pointTowardsSprite methods for the class Sprite.
164
+
- 🐛 Fix: Jar files missing version information.
165
+
- 🐛 Fix: Speak and Think-bubble rendering. Speak and Think-bubbles now behave like they do in Scratch. Meaning, they will ever leave the Stage.
166
+
- 📝 Docs: Add more documentation
167
+
168
+
## 3.6.0
169
+
170
+
- 🚀 Feat: Add method `setTextSize` to the Text-class
171
+
172
+
```java
173
+
Text myText =newText();
174
+
myText.setTextSize(48);
175
+
```
176
+
177
+
- 🚀 Feat: Allow custom fonts for Text-objects. Custom fonts can be added like a costume for a Sprite-object. Each Text-object does have a default font named `default`.
178
+
179
+
```java
180
+
Text myText =newText();
181
+
myText.addFont("playful", "opensans.odt");
182
+
myText.switchFont("playful");
183
+
184
+
// get the text-object, which is used for the think and speak bubble
185
+
Text spriteText =newSprite().getText();
186
+
```
187
+
188
+
- 📝 Docs: Add example `Shakespeare` which shows the usage of the new methods of the Text-class
189
+
190
+
## 3.5.0
191
+
192
+
- 💻 OS: Added Linux ARM 32-bit and ARM 64-bit versions
193
+
194
+
## 3.4.0
195
+
196
+
- 🧹 Chore: Update Processing core to version 4.2
197
+
- 💻 OS: Added MacOS aarch64 version
198
+
199
+
## 3.3.0
200
+
201
+
- 🚀 Feat: Added `isSoundPlaying` and `stopSound` to the Sprite and Stage Class.
202
+
6
203
## 3.2.2
7
204
8
205
- 🎨 Visual: Improve Pen rendering
@@ -12,7 +209,7 @@ index: 4
12
209
13
210
## 3.2.1
14
211
15
-
-🐛 Fix: Pen only drawing dots
212
+
- 🐛 Fix: Pen only drawing dots
16
213
17
214
## 3.2.0
18
215
@@ -33,8 +230,9 @@ public class Prog {
33
230
```
34
231
35
232
- 🚀 Feat: The class Text became more usable as a standalone Drawable. You can now create a Text-object with the default constructor `new Text()`. The created Text-object will in `TextStyle.PLAIN`, meaning having nothing drawn around it and be freely placeable on the stage.
36
-
- The background color can now be set by passing a Color-object. `setBackgroundColor(Color c)`
37
-
- The text color can now be set by passing a Color-object. `setTextColor(Color c)`
233
+
234
+
- The background color can now be set by passing a Color-object. `setBackgroundColor(Color c)`
235
+
- The text color can now be set by passing a Color-object. `setTextColor(Color c)`
38
236
39
237
- 🐎 Perf: Scratch for Java now used an OpenGL renderer, which increases the performance by many times.
40
238
- 🐎 Perf: The collision detection got improved.
@@ -116,30 +314,30 @@ class AnimatedBee extends AnimatedSprite {
116
314
117
315
## 2.0.0
118
316
119
-
* BREAKING CHANGE: Rename package to `org.openpatch.scratch`
317
+
- BREAKING CHANGE: Rename package to `org.openpatch.scratch`
0 commit comments