* chore(flutter): remove old build scrips
* chore(flutter): fix analyzer warnings
* chore(flutter): update rive_native 0.0.4
* docs(flutter): update readme to point to legacy code
List virtualization hit testing 3 (#10157) 8b7aa84704
* feat: propagate hit tests up in the component tree to detect if they are hitting a clipped area
Fix bug with Artboard ScaleType in Lists (#10159) 8251f1b259
Fixes a bug when databinding scale type to Artboards used in Lists due to the created Artboard not knowing what it's parent's main layout axis was. We need to pass it down as soon as the artboard is created.
List fixes 2 (#10153) 8749deb70a
When virtualizing lists, there were some issues with instanced artboards not rendering correctly until the following frame. This fixes that issue, as addresses similar 1 frame delayed layout updates particularly when using nested artboards
fix: only shape text with modifiers if the shapes are not empty (#10147) 95bf14f49b
fix: include missing header for randomization (#10126) 099266fec8
fix: change keys to rcp to avoid memory issues (#10146) 11042e5b4c
change keys to rcp to avoid memory issues
List virtualization fixes (#10143) bf3b33a30a
First round of fixes for List Virtualization/Carousel
Fix layout flicker when adding a new artboard using virtualization
Fix hit detection
Fix scroll snapping not working properly in Carousel mode
Fix z-index issue with Carousel when items wrapped around from end to start.
Fix a transform issue found by @JcToon
Nnnn data biinding artboard fixes (#10139) e54d2ba962
* update overrides when artboard changes
* add nested artboard as hit component even if it does not have state machines to support data binding
* when adding a new item to a list, use the previous view model from the list as source if it exists
feature: scripting require (#10133) 496fa2b490
* fix: working on dependent imports
* feature: add full problem report to wasm
* feature: runtime require
* feature: scripting require
* chore: remove string_view
* chore: assert instead of runtime error
* chore: fix warning on windows
* chore: fix memory leak
* chore: fix unused var
* chore: more windows warnings
* chore: fix dart code_core tests
* fix: missing bool in FFI setScriptSource
List Virtualization & Scroll Carousel (#9965) d973e8c253
Add support for List virtualization as well as a parameter to the ScrollConstraint to support infinite scrolling (Carousel).
There are important caveats with Virtualization enabled:
The List instances enough artboards to fit into their parent's bounds and when not rendered, they are pooled and reused as necessary. Lists can be non-uniform meaning they can consist of more than 1 Artboard (ViewModel) type
Does not currently work when its parent is set to wrap because more complex computations may result when wrapping
In order to use Carousel, virtualization must also be enabled
Infinite scroll only works in a single direction, not both at the same time
feat(apple): add support for data binding list properties (#9936) d2997eeef4
feat: nested artboards -> components (#10082) 7379bdd49f
* publishable mixin
* only show components in nested artboard list
* updates
* icons…
* icons
* change increment to boolean
* remove lib component keys in ext
* remove icons
* flag
* remove `didPublish` property
* get this library
* fix ups
* test fixes
* flag inspcetor icons
* move publishable to custom enums
* tool icon fix
* extra flags
* use resolver to check if nestable
* panel sizes
* regen keys
* panel width core default value
Co-authored-by: Gordon <pggordonhayes@gmail.com>
Adds feathering support to the runtime and editor.
A few important changes:
- Runtime now deals in RawPaths via ShapePaintPath. We no longer store a bunch of RenderPaths that we don't always end up using. Instead we use a light wrapper around RawPath (ShapePaintPath) to track intention of space (local, world, etc) and fill rule for the path so the runtime can pass that around and further mutate it or upgrade it to an immutable RenderPath only when it wants to actually draw it.
- Stroke effects like Dash and Trim now build on the update instead of render!
Diffs=
1b51fe394e Editor + Runtime Feathers! (#8891)
60a2eec998 Fix the notorious pnglibconf.h error for v2 (#8905)
24d9162103 Propagate layout's display to children in runtime (#8908)
90da85fbb4 editor+runtime: fix slow hit-testing (#8907)
b03d365c93 Fix more bit rotting in webgpu_player (#8906)
77a886e285 Work around Android GL driver bugs that surfaced with the feather change (#8901)
52c045aaf7 Require Android NDK r27c from premake (#8900)
d5a774b4b4 Add an android_api option for premake (#8892)
5328d573c7 Converter inspectors Part 1 (#8882)
7ed60faf76 Vector feathering v1! (#8799)
e042c0af4c Update the atan2 definition in shaders (#8883)
2240d091f8 Nnnn add extra functionality to string converter (#8876)
5574d9e34e add atan2 (#8878)
61e927c9cf Fix layout animation repeat (#8875)
5b9b388fe9 initial work for testing data binding in the editor (#8873)
88d24b0cd4 only reset state change on new frame (#8863)
ac230e44d0 export data enum names (#8870)
21c7498489 Vulkan Support ! (#8851)
f33a5984e2 use triggers per state machine layer (#8853)
20d09e2a84 More Android GL fixes (#8868)
9324024cc9 add more arithmetic operations (#8862)
b153a81b61 Fix premake tag (#8865)
8c9dc78dbd Android BrowserStack fixups (#8856)
eca00184b8 Runtime fix for image scale with mesh (#8840)
7c018ff174 editor+runtime: fix text hit-testing on a locally transformed text (#8860)
8e792d564f Reduce the number of GradientSpans (#8847)
2db9a9bd5c Update webgpu/glsl permutation #defines to "true" (#8845)
792049458c Delete the simple gradient texture transfer (#8844)
Co-authored-by: Alex Gibson <agibson.uk@gmail.com>
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: Luigi Rosso <luigi.rosso@gmail.com>
Co-authored-by: hernan <hernan@rive.app>
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)
fb8ecf3552 fixed url for canddiates and goldens in not pack mode (#8649)
4b82cf2e91 treat remapped animations as always settled (#8643)
d7db032e08 update measure function to use its text wrap and max size (#8640)
406e938c3d add support for standalone custom properties to bind values to (#8634)
8f3b760a6c Dx11 support (#8577)
Co-authored-by: David Skuza <david@rive.app>
Co-authored-by: Umberto <usonnino@gmail.com>
Co-authored-by: Umberto Sonnino <umberto@rive.app>
Adds an audio engine abstraction (implemented with miniaudio) in Rive. We can selectively replace it with other abstractions later if we find miniaudio isn't well suited everywhere but I'm confident it will be based on flexibility with getting it working in the recorder.
Adds audio support in:
- packages/rive_common
- WASM: rive_audio_wasm.dart
- FFI: rive_audio_ffi.dart
- packages/runtime
- packages/recorder
Subsequent PR will add support in:
- packages/rive_unity
- This is getting meaty enough...
- packages/rive_flutter
- This requires publishing rive_common so I want to make sure this is reviewed and accepted before publishing
- I'd also prefer to merge layout constraints into rive_common before this lands.
Editor features:
- Updated preview window:
<img width="248" alt="CleanShot 2024-01-15 at 14 44 31@2x" src="https://github.com/rive-app/rive/assets/454182/a9588be6-8370-4e22-ab32-af1e9ed71183">
- Preview waveforms in the timeline:
<img width="651" alt="CleanShot 2024-01-15 at 14 44 53@2x" src="https://github.com/rive-app/rive/assets/454182/2710667f-838f-483d-9647-e2bcb9e0237a">
- Subsequent PR will also use threads in web editor build (currently uses a time/frame based decoder to offload ui). I can't do that until I can verify the Shared Memory access is granted once rive_common lands in pub.dev and then we can push to UAT.
Diffs=
73bf11db3 Audio engine (#6454)
b098ad23a IntersectionBoard optimizations (#6486)
fafdef56c IntersectionBoard cleanups (#6474)
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
This counter type is single-threaded and makes all objects using it thread-unsafe.
Diffs=
6a74a01f2 Removed single-threaded counter. (#6090)
b4ef09a6d Removed Cargo workspace dependencies. (#6089)
c63346b93 Fission the CG and Skia renderers (#6071)
Co-authored-by: Dragoș Tiselice <dragos@rive.app>
Uses it in the artboard title but also updates the flutter runtime massively to support FFI & WASM C++ Rive Text. PRing to let the tests run.
Diffs=
3be5ff0d8 Text (#4372)
90245a5e1 Fix the Android debug build
0a0f3c267 Fix for missing animation in a blend state. (#4415)
440512dca Add simd::if_then_else (#4403)
ec9fb5bfc Revert "Update SIMD booleans to use bitwise logic operators"
701d8dee2 Update SIMD booleans to use bitwise logic operators
e98b93a61 Add SIMD fallbacks for missing builtins
466f68e3a Add some more core math and SIMD functions