-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
how to make VideoTexture? #82
Comments
Do it the same way as in ThreeJS: HTML <video
ref="aboutvideo"
controls
src="/assets/videos/about.mp4?url"
muted
autoplay
loop
/>
[...]
<Plane>
<LambertMaterial ref="aboutscreen" color="#fff" />
</Plane> JS import {VideoTexture} from 'three'
[...]
const vidtex = new VideoTexture(this.$refs.aboutvideo)
this.$refs.aboutscreen.setTexture(vidtex) |
thank you for your prompt reply, and is it right? 😂😂
|
don't need to set VideoTexture in onBeforeRender,just move them into the method |
klevron
added
documentation
Improvements or additions to documentation
and removed
enhancement
New feature or request
labels
Feb 16, 2022
This was referenced Feb 16, 2022
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
There are no VideoTexture props in Trois.
Can you add it? 😀
The text was updated successfully, but these errors were encountered: