Mike Welsh
c1b8978555
core: Add max frames-per-tick as sanity
...
Avoid running too many frames at once.
2019-08-22 13:31:24 -07:00
Mike Welsh
3933b00000
web: Use initial timestamp from requestAnimationFrame
...
Previously Performance.now() was used to grab the initial timestamp
for calculating dt in requestAnimationFrame. However, this doesn't
seem to be reliable and resulted in negative dt values in Chrome.
Now we just use an Option for the timestamp and initialize it to None.
The first animation callback will set the timestamp.
2019-08-22 13:28:06 -07:00
Mike Welsh
8117b0cfdc
avm1: Remove some debug spew
2019-08-22 10:24:38 -07:00
Mike Welsh
b49cce2a48
ci: Run core tests
2019-08-22 09:54:40 -07:00
Mike Welsh
7b6a3d525a
core: Single frame movieclips should stop
2019-08-22 09:54:40 -07:00
Mike Welsh
a220a98c5b
tests: Add looping clip test
2019-08-22 09:54:40 -07:00
Mike Welsh
b0eff353a9
tests: Add initial SWF tests
2019-08-22 09:54:40 -07:00
Mike Welsh
5fdc7168a7
web: Fix DefineBitsJPEG3 + alpha
...
DefineBitsJPEG3 tags also include a zlib-encoded alpha channel.
This wasn't working on web (it was trying to use the raw RBGA also
an image!) Now these are re-encoded to PNG.
Addresses #27 .
2019-08-20 16:23:46 -07:00
Mike Welsh
6277a5450b
docs: Fix link in CI badge
...
CI link was pointing to Travis instead of Circle!
2019-08-20 12:48:28 -07:00
Mike Welsh
d021b02e90
web: Disable alpha on canvas
2019-08-19 23:33:12 -07:00
Mike Welsh
dd3748a520
core: GC collect_debt each frame
2019-08-19 22:34:49 -07:00
Mike Welsh
9cbeacd7b2
core: Transform mouse coordinates from viewport to stage
2019-08-19 22:27:38 -07:00
Mike Welsh
637588fae5
core: Store view matrix in player
...
Player is now in charge of scaling/cropping/translating the content
to fit the viewport size supplied by the frontend.
Added backend::render::Letterbox, which stores the margin sizes
for letter/pillarboxing.
2019-08-19 22:27:38 -07:00
Mike Welsh
f3f4fa6179
web: Add mouse up/down/move handlers
2019-08-19 22:27:38 -07:00
Mike Welsh
8be9b9089b
avm1: Stub out StartDrag/EndDrag
2019-08-19 22:27:38 -07:00
Mike Welsh
ff74409d20
core: Tick audio backend each frame
2019-08-19 22:27:38 -07:00
Mike Welsh
7922aca921
core: Mouse pick in top-to-bottom order
2019-08-19 22:27:38 -07:00
Mike Welsh
59c9385cb7
core: Collect GC debt at the end of each frame
2019-08-19 22:27:38 -07:00
Mike Welsh
0143d9716e
core: Button work
2019-08-19 22:27:38 -07:00
Mike Welsh
91a0272773
avm1: Log errors/unimplemented actions
2019-08-19 22:27:38 -07:00
Mike Welsh
9d962fd634
core: Improve button support
2019-08-19 22:27:38 -07:00
Mike Welsh
d8ddf78bdc
avm1: Implement _rotation and improve SetProperty
...
Implement _rotation and add SetProperty/GetProperty for these
values.
2019-08-19 22:27:38 -07:00
Mike Welsh
017cd563dc
avm1: Implement ActionPush for constant pool vals
2019-08-19 22:27:38 -07:00
Mike Welsh
e890ad33e6
avm1: Allow String for ActionGotoFrame2
2019-08-19 22:27:38 -07:00
Mike Welsh
fe086c11ff
core: Store clip frame labels
...
Bump swf-rs revision to allow for read_frame_label calls.
Also fix read_place_object to take an explicit length.
2019-08-19 22:27:38 -07:00
Mike Welsh
7e1b1e0357
avm1: Adjust for Twips in GetProperty/SetProperty
2019-08-19 22:27:38 -07:00
Mike Welsh
6c923930e6
avm1: Stub out ActionSetProperty
...
Rough impl of ActionSetProperty action. Not all properties
implemented. Add DisplayObject::matrix_mut.
2019-08-19 22:27:38 -07:00
Mike Welsh
0ab20e01c1
Add dyn
2019-08-19 22:27:38 -07:00
Mike Welsh
20ec170552
avm1: Implement GetVariable/SetVariable
2019-08-19 22:27:38 -07:00
Mike Welsh
ecd9b18e90
core: Squelch warning in Button
2019-08-19 22:27:37 -07:00
Mike Welsh
1b86162bf1
avm1: Fix warning in SetTarget
2019-08-19 22:27:37 -07:00
Mike Welsh
49cc48d2d1
core: Run actions after a goto
2019-08-19 22:27:37 -07:00
Mike Welsh
ce606cece8
core: Re-enable AVM1
2019-08-19 22:27:37 -07:00
Mike Welsh
5bba546a53
core: Add BoundingBox calculations
...
TODO: Add dirty flag and cache matrices.
2019-08-19 17:29:55 -07:00
Mike Welsh
2c4639eb6c
core: Add BoundingBox and static data to Graphic
...
Add BoundingBox, which will store the AABB of dispaly objects.
Added static_data to Graphic, which is a reference to constant data
shared between each instance of a specific graphic. Currently
holds the render handle, bounding box, and character ID.
2019-08-19 17:29:55 -07:00
Mike Welsh
2c7e3c835f
core: Add parent to DisplayObjectBase
2019-08-19 17:29:55 -07:00
Mike Welsh
7005dd7621
web: Remove debug spew in web renderer
2019-08-19 17:29:08 -07:00
Mike Welsh
e788381200
Update cargo.toml to point to new repo URL
2019-08-18 16:34:44 -07:00
Mike Welsh
e11a8d416e
Merge branch 'ruffle'
2019-08-18 16:30:58 -07:00
Mike Welsh
937acf018e
Merge pull request #5 from OmarShehata/master
...
Add runnable examples, and fix zlib writing with libflate
2019-08-18 16:24:30 -07:00
Omar Shehata
f4d79b7b35
Fix indentation
2019-08-18 17:46:57 -04:00
Omar Shehata
27a0368897
Add runnable examples for reading & writing
2019-08-18 17:44:32 -04:00
Omar Shehata
418b46ebbc
Make sure Zlib finishes encoding before returning
2019-08-18 17:40:51 -04:00
Mike Welsh
d0413da381
web: Set preserveAspectRatio to none on SVGs
...
Firefox would fudge with the dimensions of the SVG when we tried
to draw a scaled SVG to the canvas. Disabling preserveAspectRatio
prevents that. Fixes part of #24 .
2019-08-18 13:44:44 -07:00
Mike Welsh
fecb981b13
web: Fix color transforms in Firefox
...
Firefox required the color matrix filter to be inside and <svg>
tag. Also, set color-interpolation-filters to sRGB to ensure
color transforms match Flash's output.
2019-08-18 13:18:22 -07:00
David Pendray
cca9c8e6f3
Update README.md
...
Fix links to licences
2019-08-18 08:13:16 -07:00
Mike Welsh
39f1853440
core: Bump swf-rs revision to support ProductInfo
...
swf-rs now reads ProductInfo and DebugId SWF tags. These are not
documented by SWF19.
See: http://wahlers.com.br/claus/blog/undocumented-swf-tags-written-by-mxmlc/
Fixes #20 .
2019-08-16 10:03:16 -07:00
Mike Welsh
07eb5bb8e8
Implement DebugId tag
2019-08-16 09:56:49 -07:00
Mike Welsh
874759b84a
Implement ProductInfo tag
2019-08-16 09:50:54 -07:00
Mike Welsh
cc2a0c01d7
Use explicit tag length when reading PlaceObject
2019-08-15 17:39:47 -07:00