Skip to content

Three.js-based Animations #29194

@jcamp0x2a

Description

@jcamp0x2a
mannequin

Add to Sage the ability to produce interactive 3D animations that can be explored by translating, rotating, and zooming as the animation progresses. Previously, an animation would need to be re-generated each time a different viewpoint was desired.

To that end, this ticket implements the following:

  1. an .interactive() method on existing Animation objects that produces a new 3D graphics object containing all of the original frames of animation with additional animation metadata (keyframe assignments) attached that a supported viewer could use to depict the animation.

  2. changes to the Three.js viewer to support keyframe animation of points, lines, texts, and surfaces when animation metadata is present including optional graphical controls allowing the user to play/pause, adjust playback position, control playback speed, and toggle looping.

  3. support for saving a 3D graphics object directly to an HTML file that uses the Three.js viewer, bypassing the need to open it in a browser first and use the "Save as HTML" menu option.

  4. support for saving an animation to an HTML file using features 1 and 3 listed above.

CC: @paulmasson @egourgoulhon @slel

Component: graphics

Keywords: threejs animation

Author: Joshua Campbell

Branch/Commit: 8af227d

Reviewer: Paul Masson

Issue created by migration from https://trac.sagemath.org/ticket/29194

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions