-
Notifications
You must be signed in to change notification settings - Fork 753
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
Features that I am currently missing #225
Comments
My only concern would be that treating 0 Opacity = hidden could be dangerous/ break existing code. My use case (and a common use case) for opacity 0 is for hit detection / intersection testing. In your use case: you could override setOpacity to automatically set the node to hidden. Have you every thought about writing an ActionScript to KineticJS tutorial? -- it'd be an interesting read and maybe help convert more Flash developers to KineticJS |
OK, fair enough. Well, I am not a Flash developer, I've used Flash only once to create a small game for university subject. I needed those functions in my current project, so I implemented them based on my own ideas, but if you want to get some ideas about porting Flash to JS I would recommend EaselJS, since it is a one-to-one port of Flash's object model to Canvas. It also has some cool features like blur filter, but it is still not as good as Kinetic. |
Wow that's pretty in depth, thanks! My thoughts:
Thanks for all of your suggestions!! |
thx for the quick reply! getAbsolutePosition- did not notice that, thx! I am using setListening extensively, so I would be really glad to shortcut it, lack of others I can accept =) |
Hello, I am currently trying to use KineticJS in combination with CocoonJS, and as you say, it doesn't work. I tried adding the changes mihhail-lapushkin suggested above, but it still doesn't work. In that code, it says "State.prototype", and yes I have tried that as well as "Stage.prototype", since I assumed it was a typo. Do you happen to have any more, or updated, information on how to get it working? Grateful for any help or pointers in this. |
Hi, with version 1.3 only this is needed: check out my project: it is a real working game for cocoonjs |
Thanks for taking the time to reply! Beautiful game. I have looked at it, but only scratching the surface so far. I tried the code you sent. I run the code snippet when window.onload triggers, so Kinetic should already be loaded. The app works fine in Chrome, but not in the CocoonJS Launcher App on iOS. I am using the latest version 1.3. I attach a screenshot here. You are welcome to email me directly at per <at> quested <dot> net, if you wish, to keep this thread on topic. |
sorry, did not understand what you meant by "per quested net" yeah, I've had your problem also when I've used the full version of kineticjs, but for mobile I use a custom build, which excludes lots of the stuff I don't need, so I did not address this issue so much |
All suggestions are resolved. I added proportional feature to TODO list. I will close the issue. If need, please, create separate issues for features, bugs. |
Hi,
While working on a project using KineticJS I've collected a bunch of extensions that I've created for myself. Would be nice to include them into the library.
Convenience methods for Containers
toLocal and toGlobal methods (like in ActionScript)
Here is my code for Container:
toGlobal can also be added to Nodes without arguments.
Shortcuts for setListening
Like with setVisible, setListening can also have convenient shortcuts.
For example:
stopListening [-]
cancelListening [-]
supressListening [-]
dontListen [-]
listen [+]
Image proportion sync
Add automatic image proportion sync on resize. Either as an on/off property of Image or as a separate class like I did:
0 Opacity = hidden
Treat 0 opacity as a hidden Node i.e. don't draw it. Now I have to hide the Node after fading out to save those precious CPU ticks on useless drawing.
Accelerated canvas environment support
As you maybe know currently some companies are making Accelerated canvases for mobile environments (directCanvas and CocoonJS). Those environments don't have all features of HTML and that's why KineticJS does not work out of the box.
I use CocoonJS and for KineticJS to work I've made following changed to Stage:
Basically what is needed is to:
The text was updated successfully, but these errors were encountered: