Code Monkey home page Code Monkey logo

Comments (4)

mikedotalmond avatar mikedotalmond commented on June 4, 2024

Has anyone made a start on this or thought about it any more? I'd like to help add this feature.

from flambe.

aduros avatar aduros commented on June 4, 2024

That would be a big help, Mike! I haven't started it, but I was thinking it should look something like:

  • A labelPassed :Signal<String> on MovieSprite that gets emitted during an update when a label is crossed. Useful for letting artists insert "points of interest" that the coder can hook up to do different things (like playing sound effects in sync with the movie)
  • A findLabel(name :String) :Float on MovieSymbol, for looking up the time position of a label, or -1 if it doesn't exist.
  • A way to enumerate all the labels on MovieSymbol?

from flambe.

mikedotalmond avatar mikedotalmond commented on June 4, 2024

Ok, that sounds good to me. I'll have a crack at it!

Could I change the frame index to an Int? Hmm, I guess it's needed somewhere for frame interpolation when playing at different rates though...

Perhaps when fetching a position based on a frame-label you should only be given the frame index as an Int - labels will always be on whole-frames I suppose. It could then use a Map<String,Int> for labels and frame indices to make lookups pretty straightforward after the map is populated. That would also make finding when a frame label is passed pretty straightforward.

Since Flump uses named layers for movies, I though we could specify to use a layer named 'labels', specifically for frame-labels. I checked that Flump exports empty layers that have labels on keyframes, it does and Flame parses them fine. But I'm not sure if that's a particular waste of resources internally for Flambe to have movie layers with no symbols, or if they are just ignored as far as display is concerned.

from flambe.

mikedotalmond avatar mikedotalmond commented on June 4, 2024

Made a start...

mikedotalmond@e2b8b4c

It works for me on a minimal test with a few animations and frame labels, but it definitely needs a bit more testing :)

from flambe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.