ClementCariou / virtual-art-gallery

Explore an Art Gallery in your browser.
https://clementcariou.github.io/virtual-art-gallery/build
MIT License
202 stars 84 forks source link

How to change the Gallery structure? #24

Closed harshitsharma03 closed 2 years ago

harshitsharma03 commented 2 years ago

Hi There,

You are super awesome boss, greatest open source art gallery I saw till now.

Possible if you can help me out in just one thing.

How can I change a structure ? Just wanted to add one wall in between just once so as to show a welcome message? How can I do so ?

Please advise

ClementCariou commented 2 years ago

Hello,

I have to warn you, this project isn't designed to have this kind of changes. The wall structure is generated by map.js when the page loads. Multiple data are generated :

The walls are then rendered in index.js ("drawMap" calls) using the shader defined in mesh.js. If you want to render new walls, I suggest you to make your own geometry and render it with the same shader. This way you will be able to change or remove it at runtime.

If you want the physical boundaries to work as well, you will have to overwrite the getGridSegments and getGridParts as well.

For the text rendering you can use text.js to create a texture with a text written on it and then rendering it.

If you don't know how to use REGL, you should conder other solutions, you could show your welcome message in a modal for example.

Good luck 🙂

harshitsharma03 commented 2 years ago

Hi Sir, Thanks for the update. Possible if you can suggest any other example. where I can try looking into it.??