How do I use CocoonJS? - javascript

I made a game using Construct 2, I first try to use PhoneGap build to make the app but I realized at PhoneGap game are extremely slow. So I heard that CocoonJS can solve this problem. I tried to to make a CocoonJS game by exporting within Construct 2 but you are required to purchase the update. I also tried exporting to HTML Game and uploading to CocoonJS and testing on a iPhone where all I got was a black screen. I don't quite understand what format the game need to be in. What kind of struture is needed. If any has been in my situation or know how to solve it please help. I am no a really short deadline.

For CocoonJS:
When exporting from Construct 2 with the CocoonJS option it packages it in a .zip file. So try putting your files in a .zip and try that. If you're getting a black screen after that you may not have packaged the .zip correctly, make sure the index.html isn't buried inside another folder in the .zip file.
For more information, check this out: http://wiki.ludei.com/cocoonjs:launcherapp

Related

Copied/Exported VueJS Project is much smaller than the original

I did finish my VueJS Applet project the other day and have to send in the code for grading aswell as to the customer.
Now when I copy the folder where the project lies under
.../vue-js-projects/PROJECTNAME
to another place to zip it together with evrerything else the copied file is much smaller.
The original in it's folder is like 200MB whereas the copied one is only about 20MB so 10% the size.
Is this because I'm using an IDE (Webstorm) which creates lot's of local stuff that is not needed when exporting or is there a "right" way to export a vue project.(I'm talking abbut the whole project not just the built ../dist directory)
Thanks alot in advance
Consider version control - github, bitbucket or whatever you like.
.gitignore file will help you to leave unnecessary files locally.
Most of version control platforms offers .zip download, so you dont need to worry about file sizes, some bug fixes, adjustments or whatever.

JS works until I bring it into a foundation Framework

I am working on a project where I want to make it look as if a shutter of a camera is opening and closing... I was able to get this to work in a regular html/css/js file structure however when I trie to bring/ incorporate it into Foundations Responsive Frameworks I was not able to get it to work. There are no errors in the console and checked to make sure everything is linked correctly. ... I have attached both folders in the link, the working folder that is not in a framework and the broken folder that I am trying to use foundations framework..
https://drive.google.com/folderview?id=0B4EHdofHefLHZjZpczBybE1xWGs&usp=sharing
Thank you in advance for any feedback/help.
-Jake
Unfortunately, I cannot fix it.
Fortunately, I did figure out the problem.
The jquery.shutter.css is not loading properly. Here is my attempt at your project in React.
When I take your working example and delete the jquery.shutter.css file, I get the exact same result as the React version which has no error message. I gave it a good try and cannot fix it without more time. I hope knowing the problem helps you.
Note: Unfortunately Google will not let me upload a JSON file so you will have to change package.txt to package.json and install using Node

Delete unused files and folders in an existing project

I recently started working on this php project that had some previous developers.
These dev's made a bit of a mess of things, resulting in a huge amount of different files, in PHP as well as javascript files and stylesheets.
I'd like to reduce the amount of files and folders, since they're now over 17k and 5.4k respectively.
Is there a way I could flag unused files for deletion?
Perhaps while navigating the site, e.g. whitelisting files that are being used?
Any help would be greatly appreciated!
I think sometimes its quicker to write things from scratch rather than work with "Megamoth" but if you need to keep it running you probably need to put it into some kind of version control system.
I recommend Git
http://en.wikipedia.org/wiki/Git_%28software%29
https://git-scm.com/
and just start refractoring it.
Version control system will keep your old code so you will be sure that you don't loose anything while deleting or changing your code and you will be able to jump from one version to another very quickly.

How can I reverse engineer my JavaScript files with js/uml?

Goal
My goal is to get an UML model out of my JavaScript project (consisting of several .js files) and store it as XMI.
How far I've come
I searched the internet and found out js/uml is the first place to go.
I've managed it to get the js/uml plugin running with Eclipse 3.7.1 (Win32) and a local installation of my pre-downloaded additional plugins:
mdt-uml2tools-Update-incubation-I201103290512.zip (installs required org.eclipse.uml2.diagram.clazz 0.10.0)
jsuml-eclipse-0.8.4.zip (only works with Eclipse 3.7.1 (Indigo))
I loaded the provided example project jsuml-example-yui-0.8.4.zip into Eclipse and added all my .js files to this project also.
Problem
Now I'm stuck and do not get it how to call the reverse engineering of my .js files. I can call 'New'->'Other'->'UML 2.1 Diagrams'->'Class Diagram' from the project's context menu, but I don't get the following steps of that assistant dialog, nor do I get it if this is the right way at all. Please, could you help me with an easy understandable click tutorial? The js/uml homepage does not explain it well enough IMHO. Thanks for your help in advance.
Someone adapted UML for web artifact, its called the "WAE" extension of UML. This way you can see not only your javascript files but the html and css. If you work with node.js, i created a module that generate class diagram for javascript/node/html/css. Its called wavi. For javascript, function,variable are automatically recognized. You can use it for documenting your application.
https://www.npmjs.org/package/wavi
Well, I think I have come quite close.
There's a command-line tool called Code2Flow. which uses GaphViz to generate graphs for Python and JavaScript sources.
I tried it, it does generate the graphs but somehow i can't make to do right.
I hope this will help you or someone.

wierd js / canvas issue - code example doesn't work locally

Here is the best js graph drawing thing - http://thejit.org/static/v20/Jit/Examples/Other/example2.html
It is so impressive, that I wanted to play with it a bit, but after downloading all the files, it isn't working.
So I did put this html (with all other files) page on web server (jetty) but still no result:
Opening file with Chrome, with properly added --allow-file-access-from-file doesn't fix the issue either
Obviously I am doing something wrong, but I have no idea what, so I will be very grateful for any input.
Somehow html file provided in .zip download from download page is different than html file downloaded directly from online example page (this one uses obfuscated (sic!) javascript file named jit-yc.js in place of 'normal' and WELL DOCUMENTED jit.js:) ).
So, if anyone would like to try JIT (there ins't much competition in good graph drawing tools - http://arborjs.org/ seems the only one)- using official download link is the only valid way ;)

Categories

Resources