Giter Site home page Giter Site logo

drcmda / the-substance Goto Github PK

View Code? Open in Web Editor NEW
397.0 11.0 88.0 3.02 MB

Scroll, Refraction and Shader Effects in Three.js and React

Home Page: http://tympanus.net/Tutorials/the-substance/

License: MIT License

HTML 6.66% JavaScript 85.69% CSS 7.65%

the-substance's Introduction

the-substance's People

Contributors

crnacura avatar drcmda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

the-substance's Issues

Updating to react-three-fiber 5.0.x slows the project down

I've tried updating to the latest version of react-three-fiber and running this project, after making a few necessary updates to the code including changing the vertex shader functions texture2d to texture, replacing <Dom> with <Html> from Drei, and changing the <bufferGeometry> attribute {...gltf.__$[1].geometry} to {...gltf.nodes.pCone1_lambert1_0.geometry}.

The project now runs, but much slower than using the 4.x implementation of react-three-fiber. Its adding the Diamonds class that appears to slow it down, specifically the setRenderTarget method calls. Using the latest version of three 0.121.0 and react-three-fiber 4.2.1 it is fast.

What changed in 5.0.x that's causing the slowdown?

Other strategies for scroll rig

Thank you for this example, it's really interesting to see this methodology.

In the article you mention there's lots of ways to build the decorative scroll rig. However, I'm struggling to come up with a way that decouples the content section heights from the screen height, so that sections can be driven by the amount of content within it and therefore removing the large gaps between sections, and creating uniform gaps between sections with different amounts of content within them.

Is there a method for achieving this? It seems challenging to do this as the position of a section would depend on the heights of preceding sections...

Start everything from bottom

Hey there!

First of all: very nice project, I really like it!

I just tried out, how to start the scrolling from bottom but I am not really able to enable that correctly.
If Im trying to set the state.top.current = scrollArea.current.scrollHeight in Apps Component useEffect function initially and also set scrollArea.current.scrollTo({ top: scrollArea.current.scrollHeight, behavior: 'auto' }); there, it will start from bottom, but first it will scroll down all the way. So the problem is, you see every block scrolling down automatically.

Can you give a hint, how to start from bottom corerctly, withtout the problem that all the components are visible scrolled down?

Thanks and best regards,

Sebastian

render from API

Hello everyone.
Very exciting example.
Sorry for such a simple question. I connect to the API of my WP site .How can me render this data that comes from the API, for example, instead of these images from example, display different images received from the API request.

Health to all and Happy Hacking

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.