#MOD3
3D Modifier Library for JavaScript
This is a port of the AS3dMod Modifier Library for ActionScript 3 to JavaScript.
supports: Three.js , Pre3d , J3D , Copperlicht , CubicVR.js
It is named MOD3 to signify that it has support for Three.js
It is an (almost) complete port. All Modifiers found in AS3DMod are scheduled to be ported. Also the API architecture is setup for more modifiers to be added (even custom ones).
The library has a dependency on Classy.js micro Object-Oriented framework.
###Contents
- Live Examples
- 3D Engines Support
- 3D Modifiers Support
- Source Code License
- API Reference
- Todo
- How to debug
- ChangeLog
###Source Code License
This code uses the MIT Open Source License, per requests to use the license of the original AS3dMod Modifier Library for ActionScript 3 code.
Fell free to share, modify, contribute etc..
###Live Examples
- 3D flipbook (Three.js, MOD3.js and Tween.js)
- Dancing Box (a simple blend of 3D manipulation and sound visualization)
###Support for 3D JavaScript engines
- Three.js with examples (r66)
- J3D with examples (Build 51)
- Copperlicht with examples
- CubicVR with examples
- Pre3d with examples (my pre3d examples are a liitle blurry but you'll get the picture)
###Modifiers supported (up to present)
- Pivot (note: Pivot does not work with Pre3d)
- Bend
- Twist
- Taper
- Skew
- Noise
- Wheel
- Bloat
- Break
- Perlin ( MOD3 v.0.3.4 )
- DisplaceMap ( MOD3 v.0.3.5 )
###TODO
- possible generic way to use (at least some) 3D modifiers directly in GLSL for all supported engines (??)
- support parallel modifier workers transparently [DONE partially]
- add custom modifiers except the defaults found in AS3dMod library
- make easier to apply modifiers to complex meshes/objects (which consist of submeshes) (recursion??)
- optimize (math ops, caching, modifier chain calls etc..) [DONE partially]
- port the modifiers that use Perlin Noise (using instead the simpler and faster Simplex Noise routine for JavaScript, noisejs , or simplex-noise.js) [DONE partially]
- keep up with JavaScript 3D Engines updates (will try)
###How to debug
- If the problem is in one 3D engine, while the other engines work correctly for this example/modifier, then the problem is probably with that engine's proxy classes (plugins/3DENGINENAME/Vertex.js, plugins/3DENGINENAME/Mesh.js)
- If the specific example/modifier does not work in any 3D engine, but other modifiers/examples do work, then the problem is probably with that modifier's code (modifiers/MODIFIERNAME.js)
- If no example works for any engine, then the problem is probably in the core classes, or some class throws a js error which stops the whole execution
###Changelog
- 0.4 support parallel modifiers with web workers transparently, code refactor, optimizations, examples updates
- 0.3.5 DisplaceMap modifier added, edits / optimizations
- 0.3.4 update classy.js, code refactor / optimizations, Perlin modifier added
- 0.3.2-0.3.3 update buildtools, api-reference, classy.js, Three.js revision (r66)
- ver 0.3.1 update buildtools, api-reference, use classy.js for OOP
- ver 0.3 code refactoring, extension framework, various optimizations, tidy up repo, new build scripts, project stopped
- added support for CubicVR.js 3D Engine, minor optimizations for all engines
- added support for Three.js revision (r58)
- added support for Three.js revision (r53)
URL Nikos Web Development
URL MOD3 blog post
URL WorkingClassCode