Skip to content

Commit

Permalink
Unity webgl!
Browse files Browse the repository at this point in the history
Thread here: https://2dimensions.slack.com/archives/CHMAP278R/p1709934972246289

![image](https://github.com/rive-app/rive/assets/454182/cc72ee80-4506-4e45-a65a-d994cae0a1a8)

Uses PLS when draft extensions are enabled in Chrome!
![image](https://github.com/rive-app/rive/assets/454182/fadb112f-1bff-457f-98a1-6fe524224398)

Details on how it works and how to patch Unity's emscripten here (part of this PR which will push downstream):
https://github.com/rive-app/rive/blob/unity_webgl/packages/runtime_unity/public/WEBGL.md

Diffs=
bcf6451f4 Unity webgl! (#6816)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
  • Loading branch information
luigi-rosso and luigi-rosso committed Mar 9, 2024
1 parent 033a452 commit 9e000b0
Show file tree
Hide file tree
Showing 4 changed files with 459 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
09feaccb0c5bb3a2f88c23aca6c669d79eee4428
bcf6451f442d7d55ed423982b58204e93c1d8791
5 changes: 4 additions & 1 deletion dependencies/premake5_libpng.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ local dependency = require('dependency')
libpng = dependency.github('glennrp/libpng', 'libpng16')
zlib = dependency.github('madler/zlib', '04f42ceca40f73e2978b50e93806c2a18c1281fc')

includedirs({ './' })
forceincludes({ 'rive_png_renames.h' })

project('libpng')
do
kind('StaticLib')
Expand All @@ -11,7 +14,7 @@ do
targetdir('%{cfg.system}/cache/bin/%{cfg.buildcfg}/')
objdir('%{cfg.system}/cache/obj/%{cfg.buildcfg}/')
os.copyfile(libpng .. '/scripts/pnglibconf.h.prebuilt', libpng .. '/pnglibconf.h')
includedirs({ './', libpng, zlib })
includedirs({ libpng, zlib })
files({
libpng .. '/png.c',
libpng .. '/pngerror.c',
Expand Down
5 changes: 4 additions & 1 deletion dependencies/premake5_libpng_v2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ local dependency = require('dependency')
libpng = dependency.github('glennrp/libpng', 'libpng16')
zlib = dependency.github('madler/zlib', '04f42ceca40f73e2978b50e93806c2a18c1281fc')

includedirs({ './' })
forceincludes({ 'rive_png_renames.h' })

project('libpng')
do
kind('StaticLib')
os.copyfile(libpng .. '/scripts/pnglibconf.h.prebuilt', libpng .. '/pnglibconf.h')
includedirs({ './', libpng, zlib })
includedirs({ libpng, zlib })
files({
libpng .. '/png.c',
libpng .. '/pngerror.c',
Expand Down
Loading

0 comments on commit 9e000b0

Please sign in to comment.