Commit Graph

1843 Commits

Author SHA1 Message Date
dskuza
a629422a34 Support supplying mobile fallback fonts by style with caching
This pull request builds on top of fallback font support on iOS by including the ability to provide fallback fonts based on the styling of the missing character. Currently, the style information only contains weight. This weight is grabbed by calling `getAxisValue`. According to Luigi, this is a linear search, so perhaps there's room for a performance optimization later on.

There is one lower-level C++ change: `gFallbackProc` returns the font for the missing character, in addition _to_ the missing character (as a second parameter). This font will be used to generate the requested styling within the iOS runtime.

This adds a new class property to `RiveFont`: `fallbackFontCallback` (whose name I'm open to changing). This is a block (i.e closure) that will be called when a fallback font is requested. It supplies the styling of the missing character so that, for example, different fonts can be used based on the weight of the missing character. For example usage, see `SwiftFallbackFonts.swift`. This provider is what's used under-the-hood, and utilizes the pre-existing `fallbackFonts` class property

The "trickiest" bit here is the caching. NSDictionary requires equatable / hashable types as keys, and we want to minimize additional generation of a Rive font, so we cache any used fonts in a wrapper type, used as the value. When new fallback fonts are provided, either directly or when a new provider block is set, the cache will be reset. Once the weight is determined, generating the right key is as simple as calling the right initializer, and when set, generating the right value is simple as calling the right initializer with the created Rive font.

Finally, `RiveFactory` was getting a little bloated, so I did a little file cleanup.

This pull requests also includes Android support from #8621

Diffs=
7986d64d83 Support supplying mobile fallback fonts by style with caching (#8396)

Co-authored-by: David Skuza <david@rive.app>
Co-authored-by: Umberto <usonnino@gmail.com>
Co-authored-by: Umberto Sonnino <umberto@rive.app>
2024-11-27 16:50:58 +00:00
blakdragan7
e3e0556f64 fixed url for canddiates and goldens in not pack mode
Diffs=
fb8ecf3552 fixed url for canddiates and goldens in not pack mode (#8649)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-27 02:25:07 +00:00
bodymovin
c864a22cee treat remapped animations as always settled
Diffs=
4b82cf2e91 treat remapped animations as always settled (#8643)

Co-authored-by: hernan <hernan@rive.app>
2024-11-26 16:59:06 +00:00
bodymovin
521f7866b3 update measure function to use its text wrap and max size
Diffs=
d7db032e08 update measure function to use its text wrap and max size (#8640)

Co-authored-by: hernan <hernan@rive.app>
2024-11-26 00:46:22 +00:00
bodymovin
6c8fe4f811 add support for standalone custom properties to bind values to
This PR leverages existing custom properties that are currently used as event properties to also become standalone properties.
This enables users to create single individual properties, data bind them, and animate them via timelines.
Once this PR passes, I'll add new properties like colors and data enums.
@alxgibsn icons are missing.

https://github.com/user-attachments/assets/cf669c01-d090-4a48-9583-45f61894533e

Diffs=
406e938c3d add support for standalone custom properties to bind values to (#8634)

Co-authored-by: hernan <hernan@rive.app>
2024-11-26 00:29:09 +00:00
blakdragan7
65549c105a Dx11 support
dx11 support with atomic mode for rhi.

Diffs=
8f3b760a6c Dx11 support (#8577)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-25 18:19:58 +00:00
bodymovin
c1aee63173 support wrapping text in auto width inside a layout
adding support for text inside a layout to wrap if set to auto-width

Diffs=
11ff873bf8 support wrapping text in auto width inside a layout (#8624)

Co-authored-by: hernan <hernan@rive.app>
2024-11-25 03:07:46 +00:00
blakdragan7
76cc558f74 fixed workflow stuff
fixed packed flag for diff.py

Diffs=
28582ea0fd fixed workflow stuff (#8628)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-22 20:57:40 +00:00
blakdragan7
9c8862fb81 updates to diff.py
`diff.py` now outputs a well formated html file. Also, we no longer sort by device. so that errors of all devices are at the top.

Diffs=
b32973afd6 updates to diff.py (#8623)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-21 22:31:51 +00:00
klingerj
9792df3195 Fix bug in draw key
Diffs=
c7fe86a7bf Fix bug in draw key (#8620)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-21 19:01:19 +00:00
blakdragan7
c9e60b9301 fix for incorrect android build option
Diffs=
91f9ab8aec fix for incorrect android build option (#8608)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-21 01:44:28 +00:00
dskuza
817898f860 Update linear animation advanceAndApply to return if more animation remains
Origin: using the iOS runtime, playing a linear animation (i.e an animation without a state machine) would not continue playing after the first frame, because `advanceAndApply` was returning `false`, due to the delta initially being 0 and hitting a certain codepath. After a live chat, Luigi and Hernan discussed a usable approach, which resulted in this pull request.

Diffs=
81709286ea Update linear animation advanceAndApply to return if more animation remains (#8610)

Co-authored-by: David Skuza <david@rive.app>
2024-11-20 22:44:43 +00:00
philter
48ff2c277c Add check to TextModifierGroup to prevent out of bounds access
Fixes a freeze when an artboard containing a Text layout with a text modifier group is used as a nested artboard.

Diffs=
37c6987847 Add check to TextModifierGroup to prevent out of bounds access (#8606)

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2024-11-20 19:43:54 +00:00
susan101566
6388bcfa9d editor: update the repeat limit for n-slicing
currently it's 1000, which I think is too low (i was being conservative). This bumps it up to 10k

Diffs=
7be5f73b5a editor: update the repeat limit for n-slicing (#8604)

Co-authored-by: Susan Wang <susan@rive.app>
2024-11-20 18:07:55 +00:00
luigi-rosso
bc9af4850f CoreText fallback shaper ex
More experimenting on top of https://github.com/rive-app/rive/pull/8556

This breaks some APIs that still need to be fixed up elsewhere.

The basic concept here is that when you request a system font you can tell it whether you're requesting to use it a Harfbuzz shaped system font or a CoreText (System) shaped system font.

We prioritize Harfbuzz first so that we have predictable performance and results across edit and runtime. To do this the fallback process now comes with an index. Iteration will keep happening until no font is returned (or all glyphs are found).

If the registered fallbacks look like this:
```
RiveFont.fallbackFonts = [
  UIFont(name: "PingFangSC-Semibold", size: 12)!,
  UIFont(name: "Hiragino Sans", size: 12)!
]
```

The fallback process will return:
```
iter 0: Ping Fang Harfbuzz Shaped
iter 1: Hiragino San Harfbuzz Shaped
iter 2: Ping Fang Coretext Shaped
iter 3: Hiragino Sans Coretext Shaped
```

We also use Coretext last as usually shaping with Coretext causes Apple's shaper to do its own fallbacks (it calls them cascades like css). So iter 2 (in the example above) will be the final iteration as all glyphs get filled via Apple's own fallbacks.

![CleanShot 2024-11-14 at 21 16 55@2x](https://github.com/user-attachments/assets/c12e158b-5b8e-41d4-8d9b-8184a316a079)

Diffs=
3eefba5039 CoreText fallback shaper ex (#8568)

Co-authored-by: David Skuza <david@rive.app>
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2024-11-20 17:45:44 +00:00
blakdragan7
69cb1edeb2 image diff hiistogram mode
* added `-H` flag that uses a new histogram compare mode for checking diffs of images on `diff.py` and `image_diff.py`
* added `NO_VENV` environment variable check for disabling `pyenv` for local development in `diff.py`

Diffs=
807f9b20ac image diff hiistogram mode (#8601)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-20 16:32:40 +00:00
damzobridge
2aa8e32cb5 feat: expose hit test to runtimes
This PR addresses a runtime limitation where we previously needed to trigger a pointer event to confirm if a listener existed at a specific location. With this update, users in game engines can choose whether pointer events in Rive should block raycasts from hitting items behind a Rive graphic. This change allows for hit testing without triggering the event itself.

I believe this is already available in Flutter, so this PR extends it to other runtimes as well

Diffs=
17474d3e2c feat: expose hit test to runtimes (#8598)

Co-authored-by: Adam <67035612+damzobridge@users.noreply.github.com>
2024-11-20 16:06:21 +00:00
csmartdalton
1351c0eb9e Fixup android_gms_browserstack
* Bundle 32-bit binaries in the test apk as well. Not all devices on browserstack are 64-bit.

* Save the gm pngs to different directories based on android os version. Android introduced a lot of changes to external storage at v11.

* Work around an invalid gl error being generatd by Moto G7 Play.

* Migrate the android_gms_browserstack runner to ubuntu 22.04. This is a long-running job that spends most its time waiting on browserstack and the network. It's not worth tying up a cirrus runner.

* Begin syncing android_gms_browserstack results with s3.

Diffs=
36e73f6b4b Fixup android_gms_browserstack (#8599)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-19 22:59:07 +00:00
bodymovin
e1c546d933 Nnnn range data converter
added a new data converter by request from Duo.
It defines an input range and maps it to an output range.
It includes some extra features like clamping the value, applying a modulo in order to make it loop, and reversing it.
And it also takes an interpolator such that the mapping doesn't need to be lineal.
@

https://github.com/user-attachments/assets/d18b1269-8b5e-4aad-9504-9f5f3dcdaad9

Diffs=
88543fa792 Nnnn range data converter (#8585)

Co-authored-by: hernan <hernan@rive.app>
2024-11-18 20:54:05 +00:00
csmartdalton
95187c3f2a Normalize GM tests
Remove code that made ANGLE behave differently on lots_of_images due to slowness. Now that GMs run in parallel and we have the GMREGISTER_SLOW macro, the longer test time is invisible.

Use the same number of subdivisions for mandoline on every rendering mode. It had too many subdivisions in rasterOrdering anyway and didn't render well. Since we aren't going to change it, just run tests that we are committed to keep rendering correctly.

Diffs=
a2b0cb230a Normalize GM tests (#8586)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-18 19:31:25 +00:00
klingerj
4697d23bd2 Rename USING_DEPTH_STENCIL to RENDERING_MODE_MSAA
Renamed the define to RENDERING_MODE_MSAA as we talked about yesterday.

Diffs=
e10bb4aafd Rename USING_DEPTH_STENCIL to RENDERING_MODE_MSAA (#8584)

Co-authored-by: klingerj <16977116+klingerj@users.noreply.github.com>
2024-11-18 15:41:15 +00:00
csmartdalton
ec9e105ad6 Fix invalid memory access
Diffs=
869816556f Fix invalid memory access (#8546)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-17 04:38:14 +00:00
csmartdalton
2975bab2cb Fix clip planes on S22/Xclipse/ANGLE
ANGLE advertises support for EXT_clip_cull_distance on this device but doesn't implement it correctly. Just never use this extension on ANGLE. If we're getting ANGLE, then the device most likely supports Vulkan and we will switch over to there shortly.

Diffs=
8030dc05eb Fix clip planes on S22/Xclipse/ANGLE (#8582)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-16 22:40:18 +00:00
csmartdalton
5bed75bf74 Add an android_gms job to browserstack
Diffs=
01e014f82d Add an android_gms job to browserstack (#8583)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-16 22:25:13 +00:00
susan101566
9742c2b60a editor: be more mindful of sending dirt recursively when n-slicing
A long time ago, I only sent out dirt.nslicer when anything about the vector n-slicer changed. However, this caused clipping paths inside of a vector n-slicer to not update in time. I was worried to miss a spot, so in addition to sending dirt.nslicer, I also sent out dirt.path.. recursively...

Then it turns out that if there are texts inside of the n-sliced node, they will also listen to dirt.path, and that caused some performance issues. So now we are back to wanting to send dirt.nslicer, and have places that listen to it calculate things.

The way I audited this... I first did a search for all ComponentDirt.path in the Dart codebase:
![image](https://github.com/user-attachments/assets/281df80c-3320-46f2-9ff7-c3ee6e40065a)

Then for all of them, I see whether the check occurred in a update() function. If it does, then I added an dirt.nslicer condition too. This was after the first commit. I'm hoping that doing it this way means that the checks are complete, meaning I'm not missing any dirt.nslicer checks.

I then commented each out, and see whether something will not update in time. So e.g. if the update is on a layout node, I'd check whether a hug layout node responds to an nsliced node's width/height. (in this case, I don't need the nslicer check, so i removed it). This was the second commit. I'm hoping that doing it this way means all the dirt.nslicer checks are necessary.

Then the idea is...if we are doing sth complete and necessary, it's the right amount.

Diffs=
1d23ae5782 editor: be more mindful of sending dirt recursively when n-slicing (#8576)

Co-authored-by: Susan Wang <susan@rive.app>
2024-11-16 02:53:52 +00:00
luigi-rosso
69c1c6e165 Fix NestedAnimation skipping export too late
There was a bug with how we were removing a NestedAnimation from export. The export process for an artboard does this:

- Collect all the object in an artboard which should export.
  - This is done by calling ```component.exportsWith(artboard)``` on each component.
  - The ones which return true are included in the export list.
- Assign runtime ids (indices) to each object in that list and build a remapping table to make sure edit time ids are written as their matching runtime id (index).
- Export each object in the list by calling ```writeRuntime``` in the exact order of the runtime ids as the runtime ids are indices into this export list.

We were earlying out of exporting by returning early in ```writeRuntime```. This causes a problem because the export list now is missing an item which consumes an id at that export index. If an object does not wish to be exported, it should return ```false``` in its ```exportsWith``` method.

Diffs=
cc15ffa4f6 Fix NestedAnimation skipping export too late (#8573)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2024-11-15 21:43:12 +00:00
HayesGordon
b0dabab50a Dart bump to 3.5.0
This PR is an initial step towards us using [Dart workspaces](https://docs.google.com/document/d/1UEEAGdWIgVf0X7o8WPQCPmL4LSzaGCfJTM0pURoDLfE/edit?pli=1&resourcekey=0-c5CMaOoc_pg3ZwJKMAM0og&tab=t.0), which require Dart 3.5.

The reason we want to hop on to the worskpace train is for analyzer performance and potentially big memory savings.

This PR is separated from the above effort, because I do not know what issues we might run into once we update to workspaces. Also, we should be doing a better job of keeping our packages up to date, and there isn't really a reason for us not to update these constraints.

This PR updates **most** of our packages where I did not run into big issues.

I excluded:
- `rive_common` and `rive_flutter`, because these are public releases and we need to account for that change
- `peon_worker`, `lottie_to_rive`, `json_to_rive`. For some reason or the other I ran into failing tests or some blocker that made me question updating. Needs further investigation/help from the authors of those packages.

I also removed two packages:
- `flutter_layout_test_app` and `peon_shared`

The above does not need to be in this PR. But feel free to add to this PR if you have worked on the above packages and feel comfortable making the needed changes.

These are the steps I took to when updating each package:
1. Bumped to 3.5.0
2. Ran `flutter analyze` and `dart fix --apply`
3. Reviewed and fixed big issues
4. Sometimes fixed smaller linting issues

Diffs=
527276dee4 Dart bump to 3.5.0 (#8550)

Co-authored-by: Arthur Vivian <arthur@rive.app>
Co-authored-by: Gordon <pggordonhayes@gmail.com>
2024-11-15 10:19:01 +00:00
bodymovin
4c3a82ce1d Nnnn joystick not advancing
fix for joysticks not adding dirt when their properties change

Diffs=
cda96cff1b Nnnn joystick not advancing (#8567)

Co-authored-by: hernan <hernan@rive.app>
2024-11-15 06:58:28 +00:00
csmartdalton
828f8df55c Add a skeleton workflow for android gms on browserstack
Diffs=
6f1304ef0b Add a skeleton workflow for android gms on browserstack (#8566)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-15 04:32:55 +00:00
csmartdalton
640bd5f9ed Render gms to the screen when the test app is launched without a harness
This will allow us to render gms on BrowserStack.

Diffs=
b9a4114eba Render gms to the screen when the test app is launched without a harness (#8559)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-15 02:52:23 +00:00
bodymovin
6ee812bcf2 return keep going when a state machine has changed its state
previously, when an animation advanced by 0 seconds, it would return true, which was interpreted as meaning that the animation needed to keep advancing.
We changed that behavior and now a linear animation will return false if it didn't advance.
A side effect of that is that now the animation state that calls advance, sets keepGoing to false instead of true.
So the animation wouldn't keep going in that frame.
Which is ok as long as we add a new condition to identify whether the state machine layer should keep going in the next frame based on whether it changed its state internally.
This PR adds that condition

Diffs=
51c3bbcde2 return keep going when a state machine has changed its state (#8564)

Co-authored-by: hernan <hernan@rive.app>
2024-11-15 02:21:49 +00:00
bodymovin
1d74fc9266 accept constraints without targets
we recently added validation in the runtime that discards objects if they're not valid.
And we were invalidating all constraints that didn't have targets
https://github.com/rive-app/rive/pull/8464/files

but some constraints work without targets attached to them.
This PR adds a new method that skips the validation if the constraint doesn't require a target to work.

Diffs=
f34822a124 accept constraints without targets (#8552)

Co-authored-by: hernan <hernan@rive.app>
2024-11-13 20:00:34 +00:00
csmartdalton
0c275fe9d4 Work around Galaxy S22 compiler bugs
Prevent line breaks in glsl macros, which cause a compiler error on this device.

Diffs=
3a638e61b1 Work around Galaxy S22 compiler bugs (#8549)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-13 06:59:57 +00:00
bodymovin
44d55519d2 invert order of advance between parent and child
we had inverted the order of advances between parent and child to fix a frame delay.
But this introduced a bug where the child would report an event, than in turn would trigger an event in the parent.
But immediately after, the parent would advance causing the event to get cleared.

Diffs=
01bc166a8e invert order of advance between parent and child (#8547)

Co-authored-by: hernan <hernan@rive.app>
2024-11-13 04:16:48 +00:00
philter
1ccb81eaaf Prevent NestedArtboard advance when not playing
Fixes a bug where nested artboards were advancing even when not playing a state machine or animation.

Diffs=
26d8b495b6 Prevent NestedArtboard advance when not playing (#8542)

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2024-11-12 23:41:10 +00:00
blakdragan7
f7c996fdf6 Rhi typeless uav support
Adds Typless UAV (Non 4 component read write) support. Tested on rhi dx12 & dx11

Diffs=
ded183b39c Rhi typeless uav support (#8507)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-12 22:22:55 +00:00
bodymovin
04ec46627d new arithmetic data converter that uses a viewmodel as input
Previously, arithmetic operation converters only supported const numbers as their input.
This PR adds support for arithmetic operations to use a view model value as their input, so we can chain operation where multiple data bound values are involved.
Added some comments on the relevant parts of the PR
This doesn't have the final texts, I'll update them after discussing it with the rest of the team

https://github.com/user-attachments/assets/32e3bd35-bdb3-4e25-93f8-6c11a3c69f11

Diffs=
6804948c90 new arithmetic data converter that uses a viewmodel as input (#8536)

Co-authored-by: hernan <hernan@rive.app>
2024-11-11 22:49:12 +00:00
blakdragan7
dab3562958 Unreal build use build rive.sh
Migrate build logic for unreal to use build scripts. Also, fixed multi target support for mac.
This also adds in `--with-rive-layouts` as a consequence of using the build scripts.

Diffs=
532ca5dfb3 Unreal build use build rive.sh (#8502)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-11-11 19:18:37 +00:00
bodymovin
8cdab6fe46 default data converters runtime
implementation of default converters for the cpp runtime.
This includes the same interface change that was done for the dart runtime.

Diffs=
692dc6f659 default data converters runtime (#8503)

Co-authored-by: hernan <hernan@rive.app>
2024-11-11 18:53:41 +00:00
philter
2fe034c09f LayoutComponent updates properly when scaleType changes
LayoutComponentStyle wasn't updating LayoutComponent properly when scaleType changed.

Diffs=
9aa4503c18 LayoutComponent updates properly when scaleType changes (#8535)

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2024-11-11 17:56:26 +00:00
bodymovin
e13a6ebd00 fix data enum importer
the importer was missing handling the new custom data enums

Diffs=
46b0899967 fix data enum importer (#8531)

Co-authored-by: hernan <hernan@rive.app>
2024-11-11 17:41:27 +00:00
philter
6560675058 Fix marking nested artboard layout dirty
Diffs=
4bbd7d495c Fix marking nested artboard layout dirty (#8534)

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2024-11-11 17:23:45 +00:00
bodymovin
3b9bdc5a49 add feather property
reserve feather property key for future use

Diffs=
fa4f11f061 add feather property (#8533)

Co-authored-by: hernan <hernan@rive.app>
2024-11-11 15:54:08 +00:00
philter
b34c863ca8 Pass scaleType down to sizeable children
Passing scaleType down to Layout sizeable children fixes a bug we were seeing where layout components hugging text objects set to autoWidth would sometimes inadvertently wrap when animation occurs that changes computed text bounds width. This was because once the Layout pushes a size down to Text.controlSize, the effectiveSize returned becomes fixed. This can conflict with the size we measured previously because we measured when the effectiveSize was autoWidth, causing a text wrap flicker until it corrects itself.

Had to change the API so several files were affected, but only Text currently uses the scaleType values.

Before:

https://github.com/user-attachments/assets/34b495ca-edf3-4b27-a7bb-dc69f16517df

After:

https://github.com/user-attachments/assets/c55bc14b-2809-4ce3-81aa-fc59e245a4b7

Diffs=
97050e4fa7 Pass scaleType down to sizeable children (#8524)

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2024-11-09 20:41:35 +00:00
luigi-rosso
d3e4bcf2fa don't expose yoga includes
This makes sure that the yoga includes are only included in internal headers.

Eventually we should move private headers to the "internal" folder, for now I'm just defining a helper header to include in internal only headers which will assert if it's incorrectly included by a runtime/higher level public implementation.

Diffs=
071b19ba62 don't expose yoga includes (#8526)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: blakdragan7 <jcopela4@gmail.com>
2024-11-09 18:39:48 +00:00
bodymovin
a4cee7fa7a Nnnn render update fixes
Diffs=
ad1ca22bd5 Nnnn render update fixes (#8527)

Co-authored-by: hernan <hernan@rive.app>
2024-11-09 05:09:45 +00:00
susan101566
3ff5ac9d29 editor and runtime: fix vector n-slicer hit area
This PR changes the vector slicing world upside-down (or outside in)! (hehe :P)

Before this PR, on the editor, when you are trying to alt-select a shape in a vector n-slicer, you have to hover over the original shape's position to get the box to show up. I was trying to fix this when I realized that there are many places where the bounds of the shape is checked. E.g. in the state machine, the bounds of the shape is used to detect hover listeners. There were too many places to audit, so that's when I realized I wanted to deform directly on the path instead of just at the rendering layer in the path composer.

Path can be categorized into points path and parametric paths (e.g. rects, ellipses, stars). Points path can be deformed by skin. The skin deformation is at the update level of the points path, before the super's update. So by changing _buildPath directly, the deformation happens after skin, which is the same sequence as what's on master today.

As such, there are two places I changed on the editor
1. I moved the deforming logic from path_composer to path directly, to preserve the rendering behavior.
2. I changed hit testing logic, so the bounds are computed correctly

on the runtime side, I just had to change 1, since 2 is done on the raw path directly, so it just worked.

Demo. Left is the current behavior, note that you have to hover over the original button's bounds to get the leaves to show. The right side is after this PR, right+up for editor, right+down for runtime.
![a4](https://github.com/user-attachments/assets/6128c202-0a2a-491a-875d-cbc4571f2128)

Diffs=
8826406ff1 editor and runtime: fix vector n-slicer hit area (#8512)

Co-authored-by: Susan Wang <susan@rive.app>
2024-11-08 18:49:54 +00:00
csmartdalton
308c1f1056 Rename "atlas" -> "coverage" in the clockwise shader
(The coverage buffer was initially a texture atlas, and these variables never got renamed when we switched to a buffer.)

Diffs=
98e6822f02 Rename "atlas" -> "coverage" in the clockwise shader (#8518)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-11-08 18:30:11 +00:00
luigi-rosso
9fcbaa7950 Fix bidi
We weren't properly re-ordering complex "nested levels" (more than one level of bidi) of bidi runs.

Examples from here: https://www.iamcal.com/understanding-bidirectional-text/

![CleanShot 2024-11-07 at 16 49 09@2x](https://github.com/user-attachments/assets/fbe63ea2-875c-459a-b5d5-6e0654848b33)
UAT on the left and changes from this PR on the right.

I'd applied a naive solution assuming that when the paragraph was left to right we could simply blast through the runs in logical order, but that's not strictly true. You need to always order based on bidi levels. This PR propagates the bidi level (not just whether it's LTR or RTL) so the ordering can be done correctly.

Also adds a golden (thanks @susan101566 [for the notes](https://www.notion.so/rive-app/Debug-Rive-Clients-fe6145fb4d25479b9c7122528752892e?pvs=4#ae2cbdb8bf0541fcb187bb7b330db2b1) and @csmartdalton for details).

Diffs=
01066ff6a0 Fix bidi (#8517)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2024-11-08 18:15:41 +00:00
bodymovin
c75c83b8ea conditionnally add dirt and advance
this fixes an issue where we were consuming all loops of option C even if there were no changes.
in order to avoid looping the state machine more times than what is needed, before advancing a nested state machine in the inner loop of the state machine changes attempt, we check if the state has changed.

Diffs=
8296d87711 conditionnally  add dirt and advance (#8516)

Co-authored-by: hernan <hernan@rive.app>
2024-11-08 01:59:04 +00:00