ruffle icon indicating copy to clipboard operation
ruffle copied to clipboard

Supporting Cooliris

Open timmmmyboy opened this issue 1 year ago • 4 comments

Describe the bug

I was curious to see if CoolIris could be supported. It was a somewhat popular way to show dynamic image galleries in a pretty cool way and used flash.

Expected behavior

I've setup a demo page with a hosted copy of the cooliris swf file and a media rss feed from an old project. Expected output would be the gallery loading with the ability to interact with it but we only get as far as the screen saying "Cooliris"

Content Location

https://cooliris.timowens.io

Affected platform

Self-hosted version

Operating system

macOS Catalina

Browser

Google Chrome 120

Additional information

Console Error: ERROR core/src/avm2/events.rs:428 Error dispatching event EventObject(EventObject { type: "addedToStage", class: flash.events::Event, ptr: 0xe31818 }) to handler FunctionObject(FunctionObject { ptr: 0xe2f798, name: Ok("CoolirisInMotion/onAddedToStage()") }) : ReferenceError: Error #1056: Cannot create property colorCorrection on flash.display.Stage.

Player Info

Allows script access: true Renderer: wgpu Adapter Backend: Gl Adapter Name: "ANGLE (Apple, ANGLE Metal Renderer: Apple M1, Unspecified Version)" Adapter Device Type: IntegratedGpu Adapter Driver Name: "" Adapter Driver Info: "" Enabled features: Features(TEXTURE_COMPRESSION_BC | TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES | PUSH_CONSTANTS | SHADER_UNUSED_VERTEX_OUTPUT) Available features: Features(TEXTURE_COMPRESSION_ETC2 | TEXTURE_COMPRESSION_ASTC | TEXTURE_COMPRESSION_ASTC_HDR | CLEAR_TEXTURE) Current limits: Limits { max_texture_dimension_1d: 16384, max_texture_dimension_2d: 16384, max_texture_dimension_3d: 2048, max_texture_array_layers: 256, max_bind_groups: 4, max_bindings_per_bind_group: 1000, max_dynamic_uniform_buffers_per_pipeline_layout: 8, max_dynamic_storage_buffers_per_pipeline_layout: 0, max_sampled_textures_per_shader_stage: 16, max_samplers_per_shader_stage: 16, max_storage_buffers_per_shader_stage: 0, max_storage_textures_per_shader_stage: 0, max_uniform_buffers_per_shader_stage: 11, max_uniform_buffer_binding_size: 16384, max_storage_buffer_binding_size: 0, max_vertex_buffers: 8, max_buffer_size: 268435456, max_vertex_attributes: 16, max_vertex_buffer_array_stride: 255, min_uniform_buffer_offset_alignment: 32, min_storage_buffer_offset_alignment: 256, max_inter_stage_shader_components: 31, max_compute_workgroup_storage_size: 0, max_compute_invocations_per_workgroup: 0, max_compute_workgroup_size_x: 0, max_compute_workgroup_size_y: 0, max_compute_workgroup_size_z: 0, max_compute_workgroups_per_dimension: 0, max_push_constant_size: 96, max_non_sampler_bindings: 1000000 } Surface quality: high Surface samples: 4 Surface size: Extent3d { width: 550, height: 400, depth_or_array_layers: 1 }

Page Info

Page URL: https://cooliris.timowens.io/ SWF URL: https://cooliris.timowens.io/cooliris.swf

Browser Info

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Platform: MacIntel Has touch support: false

Ruffle Info

Version: 0.1.0 Name: nightly 2024-01-19 Channel: nightly Built: 2024-01-19T00:15:24.643Z Commit: 5f123c3c011b044670602c2b0bb986527fc57135 Is extension: false

Metadata

width: 500 height: 375 frameRate: 24 numFrames: 2 swfVersion: 14 backgroundColor: undefined isActionScript3: true uncompressedLength: 439043

timmmmyboy avatar Jan 19 '24 23:01 timmmmyboy

After #14854, this needs an implementation of XML.inScopeNamespaces().

n0samu avatar Jan 20 '24 02:01 n0samu

This has been significantly improved by #14865- it now finishes loading and, from what I can tell, most functions work. The only issue I can identify is that viewing the top-left image (not any of the other images) results in Ruffle hanging, with AS running (I'm not sure if it's an infinite loop or just a long operation).

Lord-McSweeney avatar Jan 20 '24 22:01 Lord-McSweeney

This seems very promising! I'll play around with it some more and see where it goes. Huge thanks for the quick work! Always exciting to see old stuff like this start to come back to life.

timmmmyboy avatar Jan 21 '24 03:01 timmmmyboy

@Lord-McSweeney I'm unable to reproduce the hang you described, though the top-left image doesn't show up because it's not found on the server (404). Same in Flash Player, so this isn't a bug.

However, I am noticing a different bug, which is that some of the images aren't loading. If you scroll far enough to the right, most/all of the images do not show up. This problem does not occur in Flash Player. image

Unfortunately I could not find a source or previous issue, but I'm pretty sure I've seen this same problem before. Ruffle doesn't seem to like loading a lot of images at once, and some of them don't show up even though the Network tab shows the request succeeded.

n0samu avatar Jan 21 '24 08:01 n0samu