Skip to content

3D animation, exploded view and cross-sections

Choose a tag to compare

@github-actions github-actions released this 10 Nov 22:31
· 50 commits to main since this release

Tools for interactive 3D learning material.

model3dtools.js

  • getAnimations(id) and playAnimation(id, nameOrIndex, options) play the animations stored in a glTF file (node translation/rotation/scale; STEP, LINEAR and CUBICSPLINE), with play, pause, stop, seek(seconds) and setSpeed. seek works while paused, for a time slider.
  • explodeModel(id, amount, options) pulls parts away from their center like an assembly drawing; amount 0 to 1 works directly from a slider and 0 restores the exact positions.
  • addSection(id, options) slices the model with a plane (axis, position, flip, color) to show the inside; the cut side cannot be clicked, and the cut face is drawn solid.

model3d.js - clip plane support in the shader and in picking; fitView accepts an array of part names.

Example: 3D learning material - anatomy of a BTS tower.