Compare commits

..

8 commits

Author SHA1 Message Date
fff8079a63 Remove temporary files used in previous glitch-fixing commit
This reverts commit 08a64d4987.
2026-01-19 11:15:33 -08:00
08a64d4987 Remove glitch from items resolved by the new renderer fix
I'll revert this commit in a sec, these are just temporary files I used to audit our assets with the `DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN` glitch, and remove it from the ones I've decided seem functional now.

This commit is intended as a historical record of what we changed in the database and how and why.

```
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | A Grey Day Background | Item 39708 | Asset 39694 | http://impress.openneo.net/swf-assets/39694?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | A Haunting Path Background | Item 78585 | Asset 468669 | http://impress.openneo.net/swf-assets/468669?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | Autumnal Scenescape | Item 80632 | Asset 497773 | http://impress.openneo.net/swf-assets/497773?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | Beautiful Butterfly Foreground | Item 83714 | Asset 558774 | http://impress.openneo.net/swf-assets/558774?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | Food Fight Shower | Item 57781 | Asset 139542 | http://impress.openneo.net/swf-assets/139542?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | Glowing Light Sky Background | Item 54176 | Asset 112686 | http://impress.openneo.net/swf-assets/112686?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | MiniMME11-S1: Approaching Eventide Skirt | Item 65801 | Asset 225267 | http://impress.openneo.net/swf-assets/225267?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | MiniMME11-S1: Approaching Eventide Skirt | Item 65801 | Asset 225277 | http://impress.openneo.net/swf-assets/225277?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | MiniMME11-S1: Approaching Eventide Skirt | Item 65801 | Asset 225805 | http://impress.openneo.net/swf-assets/225805?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | Mutant Containment Suit | Item 81643 | Asset 520525 | http://impress.openneo.net/swf-assets/520525?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | Negg Fountain Background | Item 82391 | Asset 537342 | http://impress.openneo.net/swf-assets/537342?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | Rainbow Fountain Background | Item 36747 | Asset 27886 | http://impress.openneo.net/swf-assets/27886?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | Written Word Shower | Item 51134 | Asset 94213 | http://impress.openneo.net/swf-assets/94213?playing=true
["DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN"] -> [] | Starry Glowstone Path Background | Item 74542 | Asset 390340 | http://impress.openneo.net/swf-assets/390340?playing=true
```
2026-01-19 11:14:22 -08:00
dd2f6be79f Fix HTML5 rendering differences in us vs Neopets
I pulled the source map for the Neopets renderer, and had Claude compare it to ours. It noticed the key issue responsible for a high number of unsolved rendering issues: we weren't setting up the `MotionGuidePlugin`, which I've never heard of before. Whoops!

In addition to this, we made some other minor fixes for consistency:
- Use whatever Stage object the library exports (will sometimes be StageGL)
- Resize the stage rather than the clip (shouldn't matter?)
- Send a callback to the library when done (I'm not aware of any anims that use this but some may!)

The specific item I was debugging was "Food Fight Shower", and it works now! But I also know we've had a solid handful of similar inexplicable wild rendering bugs, which I imagine this solves as well.

We might want to consider auditing our Known Glitches on SWF assets to see how many of them can be removed, now that this is resolved.
2026-01-19 11:00:59 -08:00
6aff39dfed Always show rack-mini-profiler in development 2026-01-17 22:16:33 -08:00
5f342ae0ee Upgrade rack-mini-profiler 2026-01-17 22:16:33 -08:00
e9235d0b40 Upgrade to rspec-rails 8.0.2 2026-01-17 22:16:33 -08:00
790f8a3016 Upgrade to haml 7.2 2026-01-17 22:16:33 -08:00
d0c8c9d9c0 Upgrade from dotenv-rails to dotenv 3.2
dotenv-rails is no longer required, the Rails autoloading is included in basic dotenv now
2026-01-17 22:16:31 -08:00
14 changed files with 33 additions and 33 deletions

14
Gemfile
View file

@ -11,11 +11,11 @@ gem 'mysql2', '~> 0.5.5'
# For reading the .env file, which you can use in development to more easily
# set environment variables for secret data.
gem 'dotenv-rails', '~> 2.8', '>= 2.8.1'
gem 'dotenv', '~> 3.2'
# For the asset pipeline: templates, CSS, JS, etc.
gem 'sprockets', '~> 4.2'
gem 'haml', '~> 6.1', '>= 6.1.1'
gem 'haml', '~> 7.2'
gem 'sass-rails', '~> 6.0'
gem 'terser', '~> 1.1', '>= 1.1.17'
gem 'jsbundling-rails', '~> 1.3'
@ -74,7 +74,7 @@ end
gem 'bootsnap', '~> 1.16', require: false
# For investigating performance issues.
gem "rack-mini-profiler", "~> 3.1"
gem 'rack-mini-profiler', '~> 4.0', '>= 4.0.1'
gem "memory_profiler", "~> 1.0"
gem "stackprof", "~> 0.2.25"
@ -86,9 +86,5 @@ gem "sentry-rails", "~> 5.12"
gem "shell", "~> 0.8.1"
# For automated tests.
group :development, :test do
gem "rspec-rails", "~> 7.0"
end
group :test do
gem "webmock", "~> 3.24"
end
gem 'rspec-rails', '~> 8.0', '>= 8.0.2', group: [:development, :test]
gem "webmock", "~> 3.24", group: [:test]

View file

@ -143,10 +143,7 @@ GEM
devise-encryptable (0.2.0)
devise (>= 2.1.0)
diff-lcs (1.6.2)
dotenv (2.8.1)
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
dotenv (3.2.0)
drb (2.2.3)
e2mmap (0.1.0)
email_validator (2.2.4)
@ -184,7 +181,7 @@ GEM
fiber-storage (1.0.1)
globalid (1.3.0)
activesupport (>= 6.1)
haml (6.4.0)
haml (7.2.0)
temple (>= 0.8.2)
thor
tilt
@ -310,7 +307,7 @@ GEM
rack (3.2.4)
rack-attack (6.8.0)
rack (>= 1.0, < 4)
rack-mini-profiler (3.3.1)
rack-mini-profiler (4.0.1)
rack (>= 1.2.0)
rack-oauth2 (2.3.0)
activesupport
@ -383,10 +380,10 @@ GEM
rspec-mocks (3.13.7)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (7.1.1)
actionpack (>= 7.0)
activesupport (>= 7.0)
railties (>= 7.0)
rspec-rails (8.0.2)
actionpack (>= 7.2)
activesupport (>= 7.2)
railties (>= 7.2)
rspec-core (~> 3.13)
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
@ -493,9 +490,9 @@ DEPENDENCIES
debug (~> 1.9.2)
devise (~> 4.9, >= 4.9.2)
devise-encryptable (~> 0.2.0)
dotenv-rails (~> 2.8, >= 2.8.1)
dotenv (~> 3.2)
falcon (~> 0.48.0)
haml (~> 6.1, >= 6.1.1)
haml (~> 7.2)
http_accept_language (~> 2.1, >= 2.1.1)
jsbundling-rails (~> 1.3)
letter_opener (~> 1.8, >= 1.8.1)
@ -506,11 +503,11 @@ DEPENDENCIES
omniauth-rails_csrf_protection (~> 2.0, >= 2.0.1)
omniauth_openid_connect (~> 0.7.1)
rack-attack (~> 6.7)
rack-mini-profiler (~> 3.1)
rack-mini-profiler (~> 4.0, >= 4.0.1)
rails (~> 8.0, >= 8.0.1)
rails-i18n (~> 8.0, >= 8.0.1)
rdiscount (~> 2.2, >= 2.2.7.1)
rspec-rails (~> 7.0)
rspec-rails (~> 8.0, >= 8.0.2)
ruby-vips (~> 2.2)
sanitize (~> 7.0)
sass-rails (~> 6.0)

View file

@ -150,13 +150,13 @@ function updateStage() {
function updateCanvasDimensions() {
// Set the canvas's internal dimensions to be higher, if the device has high
// DPI. Scale the movie clip to match, too.
// DPI. Scale the stage to match, too.
const internalWidth = canvas.offsetWidth * window.devicePixelRatio;
const internalHeight = canvas.offsetHeight * window.devicePixelRatio;
canvas.width = internalWidth;
canvas.height = internalHeight;
movieClip.scaleX = internalWidth / library.properties.width;
movieClip.scaleY = internalHeight / library.properties.height;
stage.scaleX = internalWidth / library.properties.width;
stage.scaleY = internalHeight / library.properties.height;
}
window.addEventListener("resize", () => {
@ -176,23 +176,28 @@ window.addEventListener("resize", () => {
////////////////////////////////////////////////////
async function startMovie() {
// Install the MotionGuidePlugin, which is needed for motion path animations.
createjs.MotionGuidePlugin.install();
// Load the movie's library (from the JS file already run), and use it to
// build a movie clip.
library = await getLibrary();
movieClip = buildMovieClip(library);
updateCanvasDimensions();
if (canvas.getContext("2d") == null) {
console.warn(`Out of memory, can't use canvas for ${libraryUrl}.`);
// TODO: "Too many animations!"
return;
}
stage = new window.createjs.Stage(canvas);
stage = new library.Stage(canvas);
stage.addChild(movieClip);
updateCanvasDimensions();
updateStage();
// Signal to the library that the composition is ready.
AdobeAn.compositionLoaded(library.properties.id);
loadingStatus = "loaded";
canvas.setAttribute("data-status", "loaded");

View file

@ -12,11 +12,9 @@ class ApplicationController < ActionController::Base
before_action :save_return_to_path,
if: ->(c) { c.controller_name == 'sessions' && c.action_name == 'new' }
# Enable profiling tools if logged in as admin.
# Enable profiling tools in development or when logged in as an admin.
before_action do
if current_user && current_user.admin?
Rack::MiniProfiler.authorize_request
end
Rack::MiniProfiler.authorize_request if Rails.env.development? || current_user&.admin?
end
class AccessDenied < StandardError; end

View file

@ -390,6 +390,10 @@ export function loadMovieLibrary(librarySrc, { preferArchive = false } = {}) {
);
}
delete window.AdobeAn.compositions[compositionId];
// Install the MotionGuidePlugin, which is needed for motion path animations.
window.createjs.MotionGuidePlugin.install();
const library = composition.getLibrary();
// One more loading step as part of loading this library is loading the

Binary file not shown.

BIN
vendor/cache/dotenv-3.2.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/haml-7.2.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rspec-rails-8.0.2.gem vendored Normal file

Binary file not shown.