Skip to content

Feature suggestion: Animated filter option #286

Description

@HeyItsBATMAN

At some point during designing filter options (#113), I remember talking about having a checkbox next to "Downloadable" entities for "Animated" entities. Now that the AnimationController is in testing, it might make sense to think about this again?

Implementation Suggestion

The @gltf-transform packages allow reading glTF and glb files to read their scene graph. This also allows reading their animation list. We could use this identify uploaded files which contain animations.

Since Kompakkt/Kompressor already has this package installed, it would be an option to add it there.

The server would need to check all uploaded entities for animations, but this can be done in the background, to save on processing power (or more accurately, run a job which asks Kompressor if a 3D model has animations).

@Grizzly127 @ZetOE do you think this would be a nice addition?

Example code used for testing
import { Document, NodeIO } from "@gltf-transform/core";
import { ALL_EXTENSIONS } from "@gltf-transform/extensions";
import draco3d from "draco3dgltf";

const io = new NodeIO().registerExtensions(ALL_EXTENSIONS).registerDependencies({
  "draco3d.decoder": await draco3d.createDecoderModule(), // Optional.
  "draco3d.encoder": await draco3d.createEncoderModule(), // Optional.
});

// Read from URL.
const document = await io.readBinary(
  await Bun.file("/home/kai/Models/B005_KleinesTheater_A_2K_v03.glb").bytes(),
);

console.log(document.getRoot().listAnimations().at(0));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions