Skip to main content
chenjil43641795
Legend
Feb 2, 2021 7:44 AM UTC
Answered

ancc2020,2021, How to use other js (treejs)

I need to use "treejs."

But when I added to ANIMATE CC, I couldn't use it.

 

threejs

https://github.com/mrdoob/three.js/

 

How can I use it?

Please help me.

 

 

    This topic is closed to new replies. Start a new post to keep the conversation going.
    kglad
    kgladCorrect answer
    Community Expert
    Feb 4, 2021 4:36 PM UTC

    nodejs record


    1.  download three.js-dev.zip from GitHub - mrdoob/three.js: JavaScript 3D library.

    2.  unzip the files

    3.  start a new animate project and save it

    4.  open the include scripts panel use the add icon to navigate to and include Three.min.js in the build folder*

    5.  add the sample code to frame 1**

     

    *

     

    **

     

     

    30 replies

    kglad
    Community Expert
    Community Expert
    Feb 2, 2021 10:47 AM UTC

    it might not be ready to use until frame 2 (or you use some other delay) of your main timeline plays (assuming you added it correctly in the global script panel).

    Translate
    chenjil43641795
    Legend
    Feb 2, 2021 10:53 AM UTC

    I only add to the global script panel.

    No code was written.

    The browser displays an error.

    I've experimented with all versions"treejs"

    treejs is not available.

     

    Translate
    kglad
    Community Expert
    Community Expert
    Feb 2, 2021 11:00 AM UTC

    then you have an incorrect name and/or path in the script panel.

     

    p.s. it's pretty suspicious that you reference three.js (which is a js library) and you reference tree.js (and it's not clear what that is other than a probable typo).

    Translate