Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tinyjin
Copy link
Member

@tinyjin tinyjin commented Dec 11, 2024

This change enables users to host and use their own WASM file instead of relying on unpkg.com CDN.

  • Add wasmUrl property to allow custom WASM file location
  • Move WASM module initialization inside component
  • Keep default unpkg.com URL as fallback

Usage

Users can specify a custom WASM URL in the following scenarios:

  • When they want to use their own built binary (specific engine/build, compact binary)
  • When they prefer to use their own CDN hosting due to network performance considerations
<lottie-player
  src="path/to/animation.json"
  wasmUrl="https://my-cdn.com/thorvg-wasm.wasm"
  autoplay
></lottie-player>

This change enables users to host and use their own WASM file instead of relying on unpkg.com CDN.

- Add wasmUrl property to allow custom WASM file location
- Move WASM module initialization inside component
- Keep default unpkg.com URL as fallback
@tinyjin tinyjin added enhancement Improve features optimization Enhance performance / Reduce memory usage or binary size labels Dec 11, 2024
@tinyjin tinyjin requested a review from hermet December 11, 2024 02:54
@tinyjin tinyjin self-assigned this Dec 11, 2024
@vercel
Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thorvg-perf-test ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 2:54am

@hermet hermet merged commit e189798 into main Dec 13, 2024
2 checks passed
@hermet hermet deleted the jinny/wasm-url branch December 13, 2024 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improve features optimization Enhance performance / Reduce memory usage or binary size

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants