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] Video extension #934
Conversation
with add extraInitializationFromInitialInstance custom size now supported
problem with access to object pixi on scene
action condition expression
I'll check this this week-end or before if possible :) |
I've done heavy changes in master branch to support translation. See if you can merge master in this branch. This should not conflict with the changes you've made here. |
For localization in GD5
I've changed t("") to _("") and merge the master.
|
Yes, t and _ are functions (not magic macro like in C++).. so if you rename a function name, you must also rename its name in the arguments of the createExtension function ;) If you see "emsc" anywhere in GD, this means that some extension is badly broken and can be corrupting the memory of the app. It's almost always because the declaration of the extension is wrong somewhere (here, the usage of an undeclared function it seems). Let me know if it's better! |
Pending further instructions on the code, I work on an example with controls. |
Sorry had to review others PRs. This one and tweens are next in my list!
…On Wed, 20 Feb 2019, 03:33 Bouh ***@***.*** wrote:
Pending further instructions on the code, I work on an example with
controls.
Video player with subtitles handled in events with Events Functions
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#934 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABOIgoILxiNmyg4CjwZRIzMI-sEHnd9mks5vPLPxgaJpZM4a8GoP>
.
|
this._pixiObject = new PIXI.Sprite(this._textureVideo); | ||
|
||
this._pixiObject._texture.baseTexture.source.pause(); | ||
} |
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.
If this._pixiObject
is already defined, this means that the renderer is being "recycled" (when objects are destroyed, they are removed from the scene, put in a cache but not deleted, and then reused to avoid creating/deleting a lot of objects). So the renderer constructor might be called with an existing video - in which case you must reset it to initial value.
else {
this._pixiObject._texture.baseTexture.source.currentTime = 0;
this._pixiObject._texture.baseTexture.source.pause();
}
this._pixiObject.rotation = gdjs.toRad(this._object.angle); | ||
}; | ||
|
||
gdjs.VideoRuntimeObjectPixiRenderer.prototype.updateOpacity = function(number) { |
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.
updateXXX
means "read from this._object and update XXX"
setXXX
means "I give you some arguments, and you update XXX with it".
Here you're giving an argument, but the method is called updateOpacity.
So either you rename it to setOpacity
, or read opacity from this._object for consistency :)
To stay consistent with the other methods, maybe keep "updateOpacity" but read opacity from object.
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.
You'll also have to divide by 255 then:
this._pixiObject.alpha = this._object._opacity / 255
As stated in another comment, it's usually highly discouraged to access to a property with an underscore. BUT renderers are a special case and can "read inside" their object.
…rash * Show instance variables in InstancePropertiesEditor * Display parent variables (not editable) and overriden variables in italic. * Also Fix (existing) crashes when deleting variables. This was wrongly written: * no recursive search (`contains` 2nd argument not passed) * comparing a VariableAndName with a gdVariable made no sense.
And trying callback
Ooops git is not really my friend. |
I think we should merge master into this, because otherwise the files changed tab is polluted with changes not related to the extension. |
And trying callback
@Bouh You somehow rebased or got the commit from master and add them to your branch. Have you rebased them instead of merging them? Anyway, I've fixed your branch. For your interest, here it's the procedure
What you need to do now on your side is to pull this branch again. You might need to delete your local branch, then git pull it again. (because your branch is now different than this one on your repository that I fixed). Apart from that, there is: |
Nah you've still imported all the outdated commits :/ |
I can clean your branch again, but you'll have not to merge anything like you did in it. Instead, delete your local branch and get it back from your repository |
Sorry, I can delete my local branch video_extention now ? and I pull from Bouh/video_extention |
Yes i've made a rebase some days ago. |
Or better ! I've copy my branch and reset just before the rebase and i've paste my own code of extention in one commit. See here |
This one still seems broken, because it contains commits like this one: You can see that this commit is "wrong" because GitHub says that I authored and that you commited. This means that you rebased your branch and changed the history (which is fine usually, but not here because there was a merge of master before - keep reading). If you look at the hash on the right (471d7c2), it is different than the hash on the "official" master branch: Hash should stay the same, otherwise git consider them as different commits. Note that rebasing is fine, as long as you're only doing rebases :) As soon as you merge master into your branch, your branch is not clean anymore and can't rebased. If you do a merge THEN a rebase, you end up rebasing your commits AND the commits of master on the top of master.. creating issues :) Next time you need to get updates from master, I'll say "Please merge master in your branch or rebase your branch on top of master". (The advantage of rebase is that you keep a clean history, without merge commit like this:
Yeah that sounds like a good idea :) So now you can open a new PR with this branch. You need to merge master in your branch to get the latest updates :) Final note, don't worry about all these "merge commits". When I'm merging PR, I'll "squash" all your commits (including the merges) into a single one, so that all the video extension is in a single, clean commit. |
See here i've merged if it's ok i open the new PR with it. |
Yup this is fine 👍 When opening the PR you can see that the commits that are listed are only yours :) |
Closing this PR as there is a new one open :) |
The declarations of the events are made and all events work
I need help for :
You can see with this Keywords my notes or todos :
//FIXME
//TODO
//NOTE
Here an video for run this project with all events video
And this icon if the file is not found : missing_video24.png