-
Notifications
You must be signed in to change notification settings - Fork 15
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
adds the emissive attribute to the m-video element #184
Conversation
@@ -232,6 +240,11 @@ export class Video extends TransformableElement { | |||
const video = document.createElement("video"); | |||
const material = this.mesh.material; | |||
const videoTexture = new THREE.VideoTexture(video); | |||
if (this.props.emissive > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use the same code to apply the emissiveness changes on both attribute update and when the material is initially created here (the code here ~matches updateMaterialEmissiveIntensity
)
@@ -246,6 +254,9 @@ export class Video extends TransformableElement { | |||
material, | |||
videoTexture, | |||
}; | |||
if (this.props.emissive > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can remove this condition to make it clearer that the side-effects on the material can be applied either way
This PR adds the
emissive
attribute for the<m-video>
tag onmml-web
. This allows the user to specify the emissive strength of the video (how much perceived light it will emit).What kind of changes does your PR introduce? (check at least one)
Does your PR introduce a breaking change? (check one)
If yes, please describe its impact and migration path for existing applications:
Does your PR fulfill the following requirements?
2024-07-04.15-23-07.mp4