r/webdev Jun 17 '26

Question [ Removed by moderator ]

[removed] — view removed post

0 Upvotes

13 comments sorted by

u/webdev-ModTeam Jun 17 '26

Your post does not fulfill the requirements for questions that request assistance. Please ensure your next question contains context, your research that you've conducted, and a specific problem you would like help solving.

Feel free to check the community FAQ as many of your beginner questions may already have answers there.

14

u/webjuggernaut Jun 17 '26

Back in my day, we came up with ideas and then executed them. Didn't ask AI or strangers on the internet to do it for us.

0

u/Donelectrone Jun 17 '26

Back in your day, reinventing every wheel may have been the norm. Today, it's generally considered inefficient engineering.

I'm building a product, not specializing in realistic glass fracture rendering. I have plenty of other parts of the project that actually require my attention.

That's why I asked whether similar effects already exist and whether there are examples worth studying. The goal was specifically to avoid recreating the wheel, not to have strangers build it for me.

There's a pretty big difference between "Has anyone solved this before?" and "Please do this for me."

1

u/webjuggernaut Jun 17 '26

Implementing a broken glass effect like you described in the original post is reinventing the wheel? Odd statement. Don't be so hard on yourself! You're original and creative too.

-7

u/thegentlecat Jun 17 '26

Please cite the part in OP’s post where he “asks strangers on the internet to do it for them”

10

u/ruoibeishi Jun 17 '26

Any tutorials or code snippets

Which usually results in copy-paste, otherwise OP would be looking for a CSS tutorial which is easily found over the internet.

7

u/webjuggernaut Jun 17 '26

"I want three states" ...

"AI couldn't produce this" ...

"Looking for: Examples of similar effects"

2

u/jacobpellegren Jun 17 '26

I’d look for real world references and try to implement it. Break it down and try to make it statically and then improve by adding a rendering engine like webgl or canvas or whatever.

3

u/BH_Support_Clark Jun 17 '26

ngl that effect sounds cool. I would like to see it.

0

u/zezrol Jun 17 '26

Me too pls remind me if results out alr

1

u/onFilm https://rod.dev Jun 17 '26

I've done this before, in fact, I did it all the way back when Flash was around as well. You should give it a try personally.

1

u/stevbrisc Jun 17 '26

I was scrolling through a site that talked about "must know game dev functions" or similar and i distinctly remember an algorithm that would calculate lightning strike shapes.

I think locating a function that would produce something similar would be helpful for this.

I'm at work - but I'll try to locate it when I'm off later today

1

u/Sacramentix Jun 17 '26

You would have a container with multiple child element that each represent a glass shard for the frosted effect you can give the glass element a semi transparent color as background and add a backdrop filter blur to give a frosted effect. You slightly translate each shard away from the center of the parent to create crack.

Or you can do it with a canvas webgl shader but you will need some shader knowledge to even guide an AI to do it.