Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add three plugin #874

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIP] Add three plugin #874

wants to merge 1 commit into from

Conversation

kdxcxs
Copy link
Contributor

@kdxcxs kdxcxs commented Sep 8, 2024

Introduction

It's a plugin makes three.js works with impress.js, which allows like 3d models to be added in impress.js canvas with all other feat from three.js.

This plugin is still in a very early stage, please do not merge. It's a cool feat for me, but I'm not sure if it's suitable for impess.js, so I opened this pr for further discution. The features are not fully implemented yet, but I've wrote a simple example in examples/three/index.html.

TODO

  • Support to add 3d models by defining data sets.
  • Add util functions to allow users to control the 3d models programmatically.

Issues

  • As it's depend on three.js and tween.js, I'm not sure if it's ok for impress.js.
  • How should plugin add the three.js canvas overlay into the dom?
    • It's currently implemented by adding a div#impress-three-container manually, maybe better to insert the canvas in plugin initialization with the root dom?
  • As it's depend on three.js and tween.js, I'm not sure if it's ok for impress.js.
  • The three.js overlay is always on the top of impress canvas, this could be wrong in position.
    • We could try creating a separate canvas for each 3d models and move with dom.
  • The animation is not fully synced with css animation.

Ending

Here's still a lot not mentioned above, and I think here could be a lot changes to be made in impress.js, so I choose to contact you guys as early as possible to make it right. Or if this is plugin not what impress.js wanted, it's ok to reject and close this pr.

@janishutz
Copy link
Contributor

janishutz commented Sep 26, 2024

Can you please mark this as a draft?

Also please run npm run lint before pushing to make sure the linter is happy

@janishutz
Copy link
Contributor

@kdxcxs I have just had a bit of a look at three.js. As far as I can tell, it uses the HTML Canvas element, if I saw that correctly, am I right? If so, using it with impress should be fairly easy. That wouldn't even really require a plugin, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants