pouët.net

javascript demoscene framework

category: code [glöplog]
 
Is there any decent js-framework for demoscene? I know nin by ninjadev, but it's more like demotool than framework. And three.js, but it's more about 3d, not demoscene.
added on the 2018-12-29 13:37:53 by sq sq
What exactly do you need that's not in three.js?
added on the 2018-12-29 13:50:58 by Gargaj Gargaj
Any game development framework would/could be suitable for demo scene stuff?
You've got your graphics, your audio, even scene managers and such.

If I was nitpicky I'd say JS *is* a demo-framework. It has everything out of the box. No need for any external libraries.
added on the 2018-12-29 15:33:31 by vojd vojd
By the way, check out p5js if you haven't already.
added on the 2018-12-29 15:37:25 by vojd vojd
js1k examples are decent starting points if you want a minimal framework.
else there are a few javascript demos with open source around. all of mine are open source, p01's stuff is also open source, and damones has an engine aswell available, ninjadev have their demotool that you mentioned.
if you want more advanced stuff with graphical node interface you have vizor.io and cables.gl made by sceners with a few demos done for them.
added on the 2018-12-29 15:51:16 by psenough psenough
http://codef.santo.fr/

"CODEF aka Canvas Oldshool Demo Effect Framework, is a an open source framework that makes it easy to build demos-like animations that run in a web browser"
added on the 2018-12-29 17:48:56 by Salinga Salinga
Also check out Automaton by FMS_Cat. I haven't tried it myself (have close to zero experience with web programming), but it looks amazing.
added on the 2018-12-30 04:50:33 by provod provod
I wasn't aware that three.js was created by a demoscener! Funny...
added on the 2023-06-09 08:28:20 by Adok Adok
Quote:
I wasn't aware that three.js was created by a demoscener! Funny...
must not have come up in the mensa meetings
added on the 2023-06-09 09:04:52 by ferris ferris
Javascripting is not coding, its scripting!
added on the 2023-06-09 09:47:49 by leGend leGend
Quote:
Javascripting is not coding, its scripting!


now really.

There's nothing wrong with using JS imo. The language sucks, but so does x86 asm, C, or FUCKING C++ (which is the one of the worst languages available out there imo).

It is possible to write maintainable and well-written JS just as it is possible to do in assembly. Let them choose their tools.

"A good programmer can overcome a poor language or a clumsy operating system, but even a great programming environment will not rescue a bad programmer." (Kernighan and Pike)

On top of that, they might want to make the intentional design decision not to fuck around with handcrafted assembly because it's just taking 100 times as much time and effort to achieve anything relevant using it. I respect both approaches.
added on the 2023-06-09 12:31:16 by NR4 NR4
LOLZ ALL WEB BROGRAMMERS ARE NOOP
added on the 2023-06-09 15:16:24 by ferris ferris
Three.js currently (r153) takes 432 kB (109 kB gzipped) even with tree-shaking when we write pretty simple stuff.
added on the 2023-06-09 16:23:08 by 0b5vr 0b5vr
I was joking, if that was not somehow understood =) so here we are
added on the 2023-06-09 17:37:56 by leGend leGend
sorry @leGend, my bad, completely misunderstood
added on the 2023-06-09 21:58:52 by NR4 NR4
Quote:
I was joking, if that was not somehow understood =) so here we are

Poe's law
added on the 2023-06-09 22:22:01 by Tomoya Tomoya
https://webgl2fundamentals.org/webgl/lessons/webgl-fundamentals.html
even has boilerplate code and a tutorial how to steal shadertoy shaders so how much more demoscene do you want it? :P
i recall using one of webgl2fundamentals examples as base for https://github.com/psenough/heart_of_molvania after a few shaders weren't working as intended while porting some stuff from shadertoy, turned out was the #version of the shader that was missmatched afaicr, but webgl2fundamentals were pretty good indeed. do also recommend checking it out if you're trying to build a lightweight demo framework for yourself.
added on the 2023-06-10 17:50:50 by psenough psenough
I came across regl recently as something of a three.js alternative and it seems well designed to my (novice) eyes. It immediately "clicked" for me in ways that not many 3d libs/frameworks have.
added on the 2023-06-11 00:53:06 by skrebbel skrebbel
Quote:
By the way, check out p5js if you haven't already.


For me, as a beginner, p5.js is quite nice. It's quite easy and are well documented, but it's a bit slow.

I've coded a demo with it and a music replayer for my website xD
added on the 2023-06-12 14:09:17 by d vibe d vibe
Maybe its worth to take a look to SDF (simple demo framework) by evilpaul.

Quote:
So What Is SDF?

SDF is a simple demo framework (dur!) that should allow anyone who has (or can pick up) JavaScript and GLSL skills to create a demoscene style demo. That demo can then be easily put up on a website and shared with anyone.

SDF is built on a few assumptions:


  • Full screen shaders go a long way. Just look at ShaderToy, or any modern 1k or 4k demo. It’s all just shaders.. though.. ah.. I remember when this was all polygons mate. As such, SDF has support for full screen shaders and post processing effects right out of the box. 2D sprites are also supported – again, you can go a long way with 2D sprites. I’ll add some sort of 3D support at some stage.. but it’s not a priority.

  • No-one wants to spend their time writing the low-level stuff. SDF is a lightweight framework that covers the boring/awkward tasks: resource loading, audio playing, simple sequencing. The aim is that someone who is new to WebGL/JavaScript doesn’t need to spend time doing the hard bits – they can just get on and write effects.

  • WebGL/JavaScript are a simple set of technologies. They really are. If you’ve used any 3D API and programmed in any C like language then you’ll understand the concepts. Of course, WebGL is abstracted away behind a few simple API calls. Even if GLSL is new to you, there are plenty of tools and tutorials that’ll have you creating things in next to no time.


And SDF cuts a few corners too:


  • Simple sequencing. There is no keyframing in SDF, you can set a layers start and end point but that’s it. If you want some movement/animation then you’ll have to code it – either in a custom layer or in a shader. Shader’s get “time” as an input and that’s often all you need. You can also group layers together so that you can block out sections of your demo and then easily move them around later on.

  • You’ll need a webserver. Because SDF does resource loading through HTTP you’ll need to be running a web server – you can’t just double-click on the index.html file and expect it to work. Some platforms come with a local web server built in. I’m running Windows and I use the excellent and simple to install WAMP.



Download link
added on the 2023-06-23 20:42:22 by MrVainSCL MrVainSCL
I would say evilpaul would definitely advise against trying to write a framework and tell people to start with a very basic but solid timeline and write effects.

I'll direct him to this thread.

login