Skip to content

Commit 33ef8c3

Browse files
mikebarkmingithub-actions[bot]
authored andcommitted
chore: release v6.0.0
1 parent d6215e4 commit 33ef8c3

6 files changed

Lines changed: 41 additions & 45 deletions

File tree

‎.changeset/pen-sprites.md‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎.changeset/preview.md‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎.changeset/tiled-spawn.md‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎.changeset/window-first.md‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎CHANGELOG.md‎

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,48 @@
11
---
22
name: Changelog
3-
index: 76
3+
index: 77
44
lang: en
55
---
66

7+
## 6.0.0
8+
9+
10+
11+
`TiledMap.spawn("Objects")` creates a sprite for each object of a layer whose
12+
type (Tiled's "class") is the name of a sprite class, puts it where the object
13+
is and adds it to the stage. Objects drawn as areas give their sprite that area
14+
as its hitbox. The sprite class needs a constructor taking the `MapObject`, one
15+
taking `(double x, double y)`, or one without parameters.
16+
17+
18+
A sprite that only draws with its pen no longer shows the red "?" marker for a
19+
missing costume. The marker (and its warning) now appears only for a sprite that
20+
stays without a costume, a hitbox and a used pen for a second.
21+
22+
23+
Editors can show a preview of a stage: started with
24+
`-Dscratch4j.preview=<folder>`, a program draws the first frame of its stage,
25+
saves it as `frame.png` with the sprites described in `stage.json`, and ends.
26+
`-Dscratch4j.preview.stage=<Class>` previews another stage, and
27+
`-Dscratch4j.preview.omit=<fields>` leaves the sprites in those fields out of
28+
the picture.
29+
30+
31+
💥 BREAKING CHANGE: A stage no longer opens the window itself. Create the window
32+
first and put the stage into it:
33+
34+
```java
35+
Window myWindow = new Window(480, 360);
36+
myWindow.setStage(new MyStage());
37+
```
38+
39+
`new Stage(width, height)` and `new Stage(width, height, assets)` are gone: a
40+
stage is always as big as the window it is shown in, so the size (and the assets
41+
folder) go to `new Window(...)`. Remove `super(width, height)` from your stages.
42+
A stage made before there is a window says how to fix it, and a window nobody
43+
put a stage into says so too.
44+
45+
746
## 5.8.0
847

948
Add the Scratch for Java cat as built-in sprites. Its animations - idle, walk, crouch, jump, fall, land, punch, hurt, ko, cheer and climb - load by name, for example `addAnimation("walk", "cat_walk_%d", 6)`. Coffee beans, a bug, a goal mug and hearts for a platformer come with it. The new Cat Platformer example shows them all in a game.

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>org.openpatch</groupId>
77
<artifactId>scratch</artifactId>
8-
<version>5.8.0</version>
8+
<version>6.0.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>Scratch for Java</name>

0 commit comments

Comments
 (0)