Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Enthusiast ,
Feb 01, 2021 Feb 01, 2021

I need to use "treejs."

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

 

341.JPG

threejs

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

 

How can I use it?

Please help me.

 

 

2.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 04, 2021 Feb 04, 2021

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**

 

*gif.png

 

**

gif.png

 

 

Translate
Community Beginner ,
Jan 31, 2024 Jan 31, 2024

Hello!
I have attached the library. But the code that is here adds a separate canvas for THREE. And I would like to add 3D objects to the scene in the anime.

document.body.appendChild( renderer.domElement );
replace with something like -
exportRoot.addChild(scene);


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 01, 2024 Feb 01, 2024

I just want Animate and ThreeJS to have a common canvas

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2024 Feb 01, 2024

i'm not sure what you're doing, so you'll need to figure this out yourself, unless someone else can/wants to help

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2024 Feb 01, 2024

I don't think that's possible because both are graphic libraries that will take total control of the element and its context's drawing methods.

 

It may be better for you to overlay two canvases on top of each other.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2024 Feb 01, 2024

You may want to take a look at how to associate/transform an instance inside of Animate/CreateJS canvas to an outer element using the DOMElement class. This outer element would contain your Three.js output.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 15, 2024 Feb 15, 2024
LATEST

Thanks a lot. I'll do so

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines