Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .changeset/default-assets-folder.md

This file was deleted.

15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
---
name: Changelog
index: 85
index: 86
lang: en
---

## 6.5.0



A window loads a folder named `assets` while its loading screen shows, without the folder being passed to its constructor: `new Window(480, 360)` is enough. An assets folder that is passed but does not exist now gets a warning instead of being skipped in silence.

The images, sounds and fonts loaded in advance are now also found again when a sprite uses them. When the assets folder was on the classpath, they were stored under a different path than the one a sprite asks for, so each was loaded a second time on first use, in the middle of the game.

An assets folder inside a jar is now loaded in advance too, so a project that was packaged and shared starts with its assets ready.

In debug mode, each image, sound or font that is loaded only once the project is running is printed, together with the folder to put it in, so it can be loaded while the loading screen shows instead of in the middle of the game.


## 6.4.0

A stage can draw with several shaders at once, like Scratch's graphic effects. `getShaders().activate(name)` adds a shader to those already active and `deactivate(name)` removes one; `isActive(name)` and `getActive()` tell which are on. Active shaders take turns in the order they were added, each working on what the one before it drew, so a stage can be tinted and wobble at the same time.
Expand Down
12 changes: 6 additions & 6 deletions catalogs/api.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"libraryVersion": "6.4.0",
"browserVersion": "6.4.0-browser.1",
"libraryVersion": "6.5.0",
"browserVersion": "6.5.0-browser.1",
"methods": [
{
"id": "AnimatedSprite/addAnimation(String,String,int)",
Expand Down Expand Up @@ -14109,7 +14109,7 @@
"parameterNames": [],
"params": [],
"summary": "Constructs a new Window with default dimensions. The default width is 480\npixels and the\ndefault height is 360 pixels.",
"description": "Constructs a new Window with default dimensions. The default width is 480\npixels and the\ndefault height is 360 pixels.",
"description": "Constructs a new Window with default dimensions. The default width is 480\npixels and the\ndefault height is 360 pixels.\n\nA folder named `assets` is loaded while the loading screen shows, if\nthe project has one.",
"scratchblock": null,
"paramDocs": [],
"returns": null,
Expand Down Expand Up @@ -14141,7 +14141,7 @@
"String assets"
],
"summary": "Constructs a new Window with the specified assets. The window will have a\ndefault width of 480\npixels and a height of 360 pixels.",
"description": "Constructs a new Window with the specified assets. The window will have a\ndefault width of 480\npixels and a height of 360 pixels.",
"description": "Constructs a new Window with the specified assets. The window will have a\ndefault width of 480\npixels and a height of 360 pixels.\n\nThe images, sounds and fonts in that folder are loaded while the loading\nscreen shows, so they are ready when a sprite first uses them. Without\nit, a folder named `assets` is loaded, if there is one.",
"scratchblock": null,
"paramDocs": [
"assets: the path to the assets to be used in the window"
Expand Down Expand Up @@ -14178,7 +14178,7 @@
"int height"
],
"summary": "Constructs a new Window with the specified width and height.",
"description": "Constructs a new Window with the specified width and height.",
"description": "Constructs a new Window with the specified width and height.\n\nA folder named `assets` is loaded while the loading screen shows, if\nthe project has one.",
"scratchblock": null,
"paramDocs": [
"width: the width of the window",
Expand Down Expand Up @@ -14223,7 +14223,7 @@
"scratchblock": null,
"paramDocs": [
"width: the width of the window",
"height: the height of the window",
"height: the height of the window\n\nThe images, sounds and fonts in the assets folder are loaded while the\nloading screen shows, so they are ready when a sprite first uses them.\nWithout it, a folder named `assets` is loaded, if there is one.",
"assets: the path to the assets"
],
"returns": null,
Expand Down
4 changes: 2 additions & 2 deletions catalogs/assets.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"libraryVersion": "6.4.0",
"browserVersion": "6.4.0-browser.1",
"libraryVersion": "6.5.0",
"browserVersion": "6.5.0-browser.1",
"license": "CC0",
"images": [
{
Expand Down
Loading
Loading