Jump to content
Search Community

Recommended Posts

Posted

Hello everyone

 

Sorry to bother you with my questions :)

Has anyone tried to integrate Gsap into Blazor?
Does anyone know if Gsap is going to develop a library for Blazor? 

 

Thank you for your attention.

mvaneijgen
Posted
18 minutes ago, Diolix said:

Has anyone tried to integrate Gsap into Blazor?

Never came across it here on the forum. 

 

19 minutes ago, Diolix said:

Does anyone know if Gsap is going to develop a library for Blazor? 

You can just import it like you can import any other library it looks like https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/static-files?view=aspnetcore-9.0#import-maps. So to use GSAP you don't need anything special, just import it like Blazor wants it and you're off to the races. 

 

Hope it helps and happy tweening! 

  • Like 1
Posted

Hi,

 

Until now I didn't even knew about Blazor, but if it creates web apps/sites, it runs on the browser and JS can be used, so just include GSAP and your custom JS files following the approaches suggested by them and you should be OK:

https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/location-of-javascript

 

https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/?view=aspnetcore-9.0

 

Happy Tweening!

  • Like 1
Posted

Yeah the development is made in C# but the end result runs on browsers and browsers use JS, no way around it as far as I can tell, but I could be wrong about it. Even in frameworks that use PHP, Python, Ruby, etc. that language is ran on the server not on the browser. If you want to use some kind of language to do stuff in the browser Javascript is the one. I know that there are JS compilers for several languages but the end result is JS. The only language I've seen running on the HTML directly is the one used for GLSL Shaders:

https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders#html_structure

  • Like 1
  • 3 weeks later...
Posted

Hello guys


So it works under Blazor! :)
To make it work I have to copy gsap.mini.js in the project and declare it in App.razor like this:  <script src="gsap.min.js"></script>

Do I need to copy other files and declare them for this to work properly?

That will be beautiful if in the future you can create a package NuGet :)

Thank you for your help:)

mvaneijgen
Posted
On 2/23/2025 at 2:16 AM, Diolix said:

To make it work I have to copy gsap.mini.js in the project and declare it in App.razor like this:  <script src="gsap.min.js"></script>

That looks like you just install it like any other website, so you can just follow our installation guide https://gsap.com/docs/v3/Installation?tab=cdn

 

Hope it helps and happy tweening! 

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...