As I was cleaning up the examples, with the goal of replacing uses of Geometry
with BufferGeometry
, I noticed that many examples are quite similar.
Some of these are quite nice. Perhaps some others can be removed -- or not.
Feedback requested -- otherwise, I will not remove any.
https://threejs.org/examples/canvas_lines.html
https://threejs.org/examples/canvas_lines_colors.html
https://threejs.org/examples/canvas_lines_colors_2d.html
https://threejs.org/examples/canvas_lines_dashed.html
https://threejs.org/examples/canvas_lines_sphere.html
https://threejs.org/examples/canvas_particles_floor.html
https://threejs.org/examples/canvas_particles_random.html
https://threejs.org/examples/canvas_particles_sprites.html
https://threejs.org/examples/canvas_particles_waves.html
https://threejs.org/examples/webgl_lines_colors.html
https://threejs.org/examples/webgl_lines_cubes.html
https://threejs.org/examples/webgl_lines_dashed.html
https://threejs.org/examples/webgl_lines_sphere.html
https://threejs.org/examples/webgl_lines_splines.html
https://threejs.org/examples/webgl_points_billboards.html
https://threejs.org/examples/webgl_points_billboards_colors.html
https://threejs.org/examples/webgl_points_random.html
https://threejs.org/examples/webgl_points_sprites.html
As for me, the most important thing of examples is to show Three.js features. IMO If some examples are quite similar to others and also don't show any features that others don't show we could remove.
I would remove any canvas examples that have identical or very similar WebGL versions. The examples are supposed to show best practices, and I'm not sure that using the CanvasRenderer
can ever be considered best practice these days.
So I would remove at least the canvas_lines_*
examples.
I would also remove
canvas_particles_floor
and canvas_particles_random
.
canvas_particles_waves
is really nice though, perhaps we could convert it to WebGL or leave it?
webgl_points_sprites
and canvas_particles_sprites
are demonstrating slightly different things, since in the WebGL examples the sprites are .png
images while in the canvas example they are generated dynamically as canvas elements.
webgl_lines_colors
and webgl_lines_cubes
are demonstrating very similar things, so I would remove the cubes example and keep the colors example.
Summarising, my suggestion is to remove these:
https://threejs.org/examples/canvas_lines.html
https://threejs.org/examples/canvas_lines_colors.html
https://threejs.org/examples/canvas_lines_colors_2d.html
https://threejs.org/examples/canvas_lines_dashed.html
https://threejs.org/examples/canvas_lines_sphere.html
https://threejs.org/examples/canvas_particles_floor.html
https://threejs.org/examples/canvas_particles_random.html
TBH, i would keep these examples. They are not complex, easy to maintain but still visual interesting and a welcome source of inspiration, especially for new users.
@Mugen87 to be fair, they're only 'easy to maintain' if you are already doing all the maintenance on them. Possibly a separate discussion but there are clearly some 'core' examples (like loaders/exporters) some of which as massively important. Other examples (feature set etc) are great for instruction. Yet others are a little quirky and not really functional (ray tracing, alternative renderers etc)
/ping @mrdoob for executive decision.
Just a thought for structure:
/extras/js/ (loaders etc, somewhat supported, non-core, general purpose)
/extras/examples (feature demos)
/extras/experiments (misc prototypes etc)
@mrdoob Can you please express your view on these examples? Some are great... Others, not so much.
@mrdoob Can you please express your view on these examples? Some are great... Others, not so much.
Sorry for the delay.
I agree that they are a bit redundant (even if many of these have inspired people to use them on their websites). Rather than just removing them, I would start by combining them.
These two can be combined (Both in the same scene):
https://threejs.org/examples/canvas_lines_colors.html ( combined )
https://threejs.org/examples/canvas_lines_colors_2d.html ( removed )
These two can be combined (Both in the same scene):
https://threejs.org/examples/webgl_lines_colors.html ( combined )
https://threejs.org/examples/webgl_lines_splines.html ( removed )
This one can be removed (I don't see anything new in it? Neither code, nor art wise.):
https://threejs.org/examples/webgl_lines_cubes.html ( removed )
These two can be combined (GUI to enable sizeAttenuation):
https://threejs.org/examples/webgl_points_billboards.html ( combined )
https://threejs.org/examples/webgl_points_billboards_colors.htmll ( removed )
These two can be combined (GUI to enable texture):
https://threejs.org/examples/webgl_points_random.htmll ( removed )
https://threejs.org/examples/webgl_points_sprites.html ( combined )
Closing due to lack of interest.
I'm very interested in. Examples are growing so I think we need clean up, combine, or categorize like @webprofusion-chrisc suggested.
Reopening... Thank you to everyone for the feedback!
Help implementing @mrdoob's suggestions (and replacing uses of Geometry
with BufferGeometry
) welcome.
Anyone interested in implementing some more of @mrdoob's suggestions?
Thanks, @Mugen87 !
Most helpful comment
Just a thought for structure:
/extras/js/ (loaders etc, somewhat supported, non-core, general purpose)
/extras/examples (feature demos)
/extras/experiments (misc prototypes etc)