Streaming live at 10am (PST)

Use .js code from github on webflow


#1

Hey everybody,

is it possible to use a js code from github inside a section in your website?
I would like to use this glitch effect as a hero for one website but with a different image.

Does anyone know if this is possible?

Thanks!


Here is my public share link: LINK
(how to access public share link)


#2

In theory it should be possible. I can get the three.js to work in an embed in webflow

It is a huge JS so I guess it depends what script you are using and you would have to link the image you want to it.

Here is the basic three.js in action.
Using the code from this github. https://github.com/mrdoob/three.js/

Its at the bottom of the page
http://truereflectionmedia-sandbox.webflow.io/

The share link is
https://preview.webflow.com/preview/truereflectionmedia-sandbox?preview=220e9c00ea9b62c3fe967cedf843ee11

I just pasted the three.js URL for the source script file and the script in an simple webflow embed.

So three.js can play with Webflow.
It looks like there are more components built onto glitch. So you would need to load that js as well and then whatever the script is for glitch. as opposed to the one from the other github.

I’m no pro at js. but I use jquery a lot in projects to expand webflow capabilities. It definitely looks possible.

The other thing that often has to be done to make sure the js script works is use the div class and Id’s that are called for in the script. Often I can get an idea of that by inspecting the page html using chrome inspect.

If you need some more help. Let me know. Because your profficency with Js could very much exceed mine.

Jeremy


#3

Hey Jeremy,

thanks for your help. Yeah, i’m no pro in js too but I’ve been testing a lot of stuff into webflow too.
It is just this code in particular, is massive and I can’t seem to get it to work it out the way that I want to.
The artist even shares his github and codepen page with all the code for free use.
I was actually going to try to build a page from this js into github pages and “import” that html into my page as a header.
have you tried this or something similar before?

Gustavo


#4

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.