Giter Site home page Giter Site logo

Comments (4)

23d1 avatar 23d1 commented on May 9, 2024

You could probably achieve it with shaders, but the purpose of Curtains is to apply effects to multiple elements on a page. If you need finer control, you might be better off using something else. I could be wrong, but that's my take.

from curtainsjs.

martinlaxenaire avatar martinlaxenaire commented on May 9, 2024

Hi @grahambates-sp,

As @23d1 said implementing a fold effect on a plane should be pretty straigthforward. You'd have to update the vertices Z positions based on their X positions using a mod() function in your vertex shader for example.

However as far as I know, embedded google maps only work within iframes and you won't be able to you use that as a plane texture. You could use a jpg of that map, but then you'll lose the ability to interact with the map.

To sum up: the fold effect is definitely doable but I don't think there's any way to use a google map as a plane texture.

Hope I've been helpful there.

Cheers,

from curtainsjs.

grahambates-sp avatar grahambates-sp commented on May 9, 2024

Luckily its not google maps I am going to use - it will be one of ESRI or Deckgl canvas based libraries.

from curtainsjs.

martinlaxenaire avatar martinlaxenaire commented on May 9, 2024

Well then, if you're map is rendered in a canvas (preferably offscreen), then you should be able to use it as a plane texture.

Two things that comes to my mind however:

  • You might have some trouble computing the right mouse coordinates on the map since you're gonna displace the vertices of the plane.
  • With 2 separate webgl contexts and a canvas texture that will need to be constantly updated, I won't be surprised if you encounter some performance issues.

from curtainsjs.

Related Issues (20)

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.