tweenjs / tweenjs/tween.js

Make it possible to change "now"

Open
#697 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
10.1k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

As a developer it would be very nice to have a way to override the internal "now" functionality.

I realize that it is possible to send it, or rather "time2, as a argument when invoking methods, but that is a very cumbersome way of doing it.

I propose a way to simply "setNow" that takes a function as a argument and overrides "now" to this.

It would make implementations that modifies the "rate" of time much more convenient to do.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a file, test, or entry point. Start by locating the existing handling for the time2 argument and the internal "now" functionality, then determine how a setNow function should interact with them. Done means the override behavior is implemented and covered by tests, including the proposed rate-of-time use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.