Three.js: Examples cleanup

Created on 25 Feb 2018  路  12Comments  路  Source: mrdoob/three.js

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)

All 12 comments

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

https://threejs.org/examples/webgl_lines_cubes.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 !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danieljack picture danieljack  路  3Comments

yqrashawn picture yqrashawn  路  3Comments

Horray picture Horray  路  3Comments

konijn picture konijn  路  3Comments

akshaysrin picture akshaysrin  路  3Comments