Babylon JS Cloner System (BCS)
A Typescript based project for sytematically duplicating Babylon meshes
Definitions:- Cloners: given one or several meshes, either clones or instances will distributed in a specific manner. If more than one mesh is provided, the meshes are distributed alternatively. Additionally, cloners can be nested, so it is possible to clone cloners. Each cloner can have several Effectors (in particular order) to influence the Scale/Position/Rotation parameter of a clone (or cloner). A sensitivity parameter controls this influence for a cloner. Following Objects are designated:
- RadialCloner: radial distribution where following parameters are recognized: input-meshlist, count, radius, offset, startangle, endangle, Effector-sensitivity for Position, Scale and Rotation, alignment-flag, orientation.
- LinearCloner: linear distribution where following parameters are recognized: input-meshlist, count, offset, growth, Effector-sensitivity for Position, Scale and Rotation. An interpolation-mode-flag determines, if the clone -parameters (Scale/Position/Rotation) are interpreted as "step" or "end"-values.
- MatrixCloner: distribution in 3D space where following parameters are recognized: input-meshlist, mcount, size.
- ObjectCloner: distribution over faces of a mesh where following parameters are recognized: input-meshlist, reference-mesh.
- RandomEffector: influences Scale/Position/Rotation of a clone with repeatable random values, controlled with an overall "strength" parameter. Not quite finished, but basically working.