Giter Club home page Giter Club logo

Comments (7)

willeastcott avatar willeastcott commented on May 28, 2024

If you remove that, you get:

C:\dev\engine>npm run lint

> [email protected] lint
> eslint --ext .js,.mjs extras scripts src test utils rollup.config.mjs


C:\dev\engine\scripts\animation\tween.js
  200:22  error  'TWEEN' is not defined  no-undef
  202:22  error  'TWEEN' is not defined  no-undef
  273:31  error  'TWEEN' is not defined  no-undef
  315:9   error  'TWEEN' is not defined  no-undef

✖ 4 problems (4 errors, 0 warnings)

from engine.

LeXXik avatar LeXXik commented on May 28, 2024

I don't think that is a correct class? TWEEN is the original Tween.js:
https://github.com/tweenjs/tween.js

While PlayCanvas is (or at least it should be) using own one, which is Tween:
https://github.com/playcanvas/playcanvas-tween/

from engine.

willeastcott avatar willeastcott commented on May 28, 2024

tweenInstances[idx] = new TWEEN.Tween(startValue)

That script is using the original Tween.js.

from engine.

LeXXik avatar LeXXik commented on May 28, 2024

Why does it use a third party library, when the engine has own tool that does the same?

from engine.

willeastcott avatar willeastcott commented on May 28, 2024

Because:

  • The playcanvas-tween library is a separate repo and IMHO, it is 'bad' in that it hacks/modifies the Entity and AppBase APIs.
  • Tween.js is awesome! Why not use it? Why re-invent the wheel? So I added a nice, clean Tween.js wrapper script for people to use that doesn't hack engine internals.

from engine.

LeXXik avatar LeXXik commented on May 28, 2024

I have nothing against Tween.js, I also think it is awesome :) Maybe it is time to consider deprecating playcanvas-tween then?

from engine.

willeastcott avatar willeastcott commented on May 28, 2024

I think we should...

from engine.

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.