When comparing Three.js vs ZIM, the Slant community recommends Three.js for most people. In the question“What are the best JavaScript drawing libraries?” Three.js is ranked 14th while ZIM is ranked 29th. The most important reason people chose Three.js is:
**Effects**: Anaglyph, cross-eyed and parallax barrier. **Scenes**: add and remove objects at run-time; fog **Cameras**: perspective and orthographic; controllers: trackball, FPS, path and more **Animation**: armatures, forward kinematics, inverse kinematics, morph and keyframe **Lights**: ambient, direction, point and spot lights; shadows: cast and receive **Materials**: Lambert, Phong, Standard, smooth shading, textures, PBR and more **Shaders**: access to full OpenGL Shading Language (GLSL) capabilities: lens flare, depth pass and extensive post-processing library **Objects**: meshes, particles, sprites, lines, ribbons, bones and more - all with Level of detail **Geometry**: plane, cube, sphere, torus, 3D text and more; modifiers: lathe, extrude and tube **Data loaders**: binary, image, JSON and scene **Utilities**: full set of time and 3D math functions including frustum, matrix, quaternion, UVs and more **Export and import**: utilities to create Three.js-compatible JSON files from within: Blender, openCTM, FBX, Max, and OBJ **Support**: API documentation, public forum **Examples**: Over 150 files of coding examples plus fonts, models, textures, sounds and other support files
Ranked in these QuestionsQuestion Ranking
Pros
Pro Feature rich
Effects: Anaglyph, cross-eyed and parallax barrier.
Scenes: add and remove objects at run-time; fog
Cameras: perspective and orthographic; controllers: trackball, FPS, path and more
Animation: armatures, forward kinematics, inverse kinematics, morph and keyframe
Lights: ambient, direction, point and spot lights; shadows: cast and receive
Materials: Lambert, Phong, Standard, smooth shading, textures, PBR and more
Shaders: access to full OpenGL Shading Language (GLSL) capabilities: lens flare, depth pass and extensive post-processing library
Objects: meshes, particles, sprites, lines, ribbons, bones and more - all with Level of detail
Geometry: plane, cube, sphere, torus, 3D text and more; modifiers: lathe, extrude and tube
Data loaders: binary, image, JSON and scene
Utilities: full set of time and 3D math functions including frustum, matrix, quaternion, UVs and more
Export and import: utilities to create Three.js-compatible JSON files from within: Blender, openCTM, FBX, Max, and OBJ
Support: API documentation, public forum
Examples: Over 150 files of coding examples plus fonts, models, textures, sounds and other support files
Pro Well documented
The documentation is detailed, providing clear explanations and code samples of the various features. There are also hundreds of examples available.
Pro Helpful and friendly community
Thanks to the recently introduced forum, it is easy to find a community of helpful developers.
Pro Support for physically based rendering
With the introduction of the new MeshStandardMaterial, three.js support physically based rendering (PBR) out of the box allowing for real life quality material and lighting.
Pro Support for most industry standard file formats
Three.js has importers for most of the industry standard files format (obj, mtl, fbx, 3ds, gltf, collada, babylon, playcanvas, stl, vrml, draco and many more), making it easy to author assets in your favourite modelling software and import them for use them in three.js.
Pro Actively developed
Three.js has great project health, with activity on Github daily for bug fixes and new features.
Pro Fallback canvas rendering
Three.js offers a canvas renderer as a fallback when WebGL is not available.
Pro Support for special effects and postprocessing
Three.js support many special effects and post-processing filters including particles, lensflare, sprites, real time reflection and refraction and even area based lighting.
Pro Hundreds of officially maintained plugins, extensions, control systems, importers, exporters and special effects
The core of the three.js system is kept to a minimum to reduce file size, however there are also hundreds of extensions maintained in the offical repo on github, along with many free textures, fonts and models. You can find them all here.
Pro Plenty of tutorials and examples
Three.js official documentation provides plenty of well-written examples with a wide variety of tutorials written by the community available that you can find by doing a google search.
Pro ZIM lets you write less code
Here is a chart of examples showing ZIM at 37% less code the developer writes when compared to other frameworks such as PixiJS, Flutter, CreateJS, PaperJS, P5js, Phaser and the DOM.
Pro ZIM supports chaining
It is quite common in ZIM to not even store an object in a variable as chaining is available for almost all methods and there are short chainable methods for most properties.
new Circle().center().drag();
new Rectangle()
.loc(100,100)
.alp(0) // alpha
.animate({x:200, alpha:1}, .5);
Pro ZIM has dynamic parameters
new Tile(new Circle(20, series(red, blue, green), 10, 10).center();
// tiles 10x10 circles with colors is series of red, blue or green
new Emitter([new Circle(), new Rectangle()]).center();
// emits random circles and rectangles
interval({min:1, max:3}, ()=>{});
// each interval is between 1 and 3 seconds
So passing in a series lets you pick in order, passing in an array lets you pick randomly, passing in a min/max range picks from the range, passing in a function picks the result of the function. These can be applied to all styles too.
Pro ZIM has Style on the Canvas
Style = {
color:red,
Button:{
color:blue;
}
}
new Circle().center(); // red
new Button().center(); // blue
Pro The ZIM DUO technique of providing regular parameters or a configuration object literal is very handy.
For instance:
new Rectangle(100,100,undefined,undefined,undefined,20).center();
or
new Rectangle({width:100, height:100, corner:20}).center();
Cons
Con Lack of versioning system means that the API changes frequently
Three.js releases a new revision about once a month, and the API can change at any time. This means that a lot of third party help found online is out of date.
Con Weak visual tools
Three.js has its own editor but it has been weakly developed. It does not support a lot of engine features.