Jump to content

WUKONG Playground Plugin


Pryme8
 Share

Recommended Posts

INTRODUCING WUKONG!
In order to increase productivity and give you more resources at your fingertips I am proud to present WUKONG!  This plugin will extend your babylon.js playground and add useful features for creation of babylon.js common objects and methods.

This is the first release so it is limited on what I have as far as objects available, but that list will be growing very rapidly as I make my way through the API.
You have the option to include code hints for the inserted items Parameters, Members, and Methods. Many more Macros and Objects will be added soon.

to include in your playground simply add the line:
$.getScript("http://pryme8.github.io/WUKONG/WUKONG.js");

before your scene function and hit run and WUKONG does the rest!

to keep up to date follow:
https://github.com/Pryme8/WUKONG

This plugin is not supported or maintained by BABYLON.JS and is the sole rights of its author (me ^_^).

for a working example go to:http://www.babylonjs-playground.com/#5FLDS#0
and just look for the WUKONG button.

/h for Variable hints, /mb for member hints, /md for methods hints!  Just check on which hints you want to Copy with your Prefab.

When you click on a Highlighted Prefab it will be added to your clipboard simply go to the line you wish to add it to and paste (ctrl-v).

Please let me know what features you want added, and what compatibility issues that arise in different browsers.

Thank you and have a nice day!

***UPDATE***
Current Support List:
Numbers : Vector3, Color3 (I need to add a lot more of these...)
Basics: CreateBox, CreateSphere, CreatePlane, CreateDisc, CreateCylinder, CreateTorus, CreateTorusKnot, Lines (BasicLine, more to come), CreateRibbon, CreateTube, DisplaySettings(SideOrentation)
Cameras: FreeStandard, ArcRotateStandard, TouchStandard, DeviceOStandard, FollowStandard, VirtualJoyStandard, GamepadStandard, FreeAnaglyph, ArcRotateAnaglyph
Lights: PointLight, DirectionalLight, SpotLight, HemisphericLight

lots more to come soon... like I said any requests please let me know.

Link to comment
Share on other sites

Hey, neat feature, P8!  I don't do much dev in the playground, and when I do, I use its built-in Intelli-Sense system.  I wouldn't mind having "Wukong" on the context menu of my home text editors, though.

I guess... the slowest-feeling thing that I need to enter into the PG... is standard materials.  I wouldn't mind having a macro that contains a standard material constructor followed by a random colored material.diffuseColor line.  Playground land is SO gray, it seems.  :)

"not supported or maintained by BABYLON.JS".  Who is "BABYLON.JS"?  Last I checked, "BABYLON.JS" includes every living thing on the planet, and even rocks and dirt (non-living things).  And my suggestion of adding standardMaterial IS supporting WangChung... errr... Wukong, so, your statement has now gone sour.  :D  If you decide to start selling Wingwong... err... Woocow... errr... Wukong, I get .2 cents each time someone uses the StandardMaterial macro, right?  heh.

You capitalists... sigh.  I need to shoot every last one of you. haha  Ya'll know that you CAUSE the cost-of-living that you continuously battle to stay ahead-of, right?

Enough anti-cap.  Thanks for working on TEAM stuff, P8... if this IS a project to help team.  I smell a price tag, though.  There's a cap nearby.  ;)

Link to comment
Share on other sites

I will add that for you when I get home, I'll do a set of standard colors and start in the materials and procedurals.  Then add the meshxxx support.  Soon I'll add some more advance prefabs soon as well.  If there is something you do t want to wait for you can post a reply on here in the format of:


 
CreateBox : {
data :{
string: "BABYLON.Mesh.CreateBox('box', 6.0, scene, false, BABYLON.Mesh.DEFAULTSIDE);",
hints : "//Box(id, scene, size, canBeRegenerated, mesh, side)",
members : "//Members - size : number, side : number",
methods : "//Methods - copy(id) -> Geometry, serialize() -> any, static Parse(parsedBox, scene) -> Box"
}
}
 
or or a more advanced one looks like:
 

 
BasicLine : {
data :{
string: "BABYLON.Mesh.CreateLines('lines', [ \r\n <BR />"+
     "new BABYLON.Vector3(-10, 0, 0), \r\n <BR />"+
    "new BABYLON.Vector3(10, 0, 0), \r\n <BR />"+
     "new BABYLON.Vector3(0, 0, -10), \r\n <BR />"+
     "new BABYLON.Vector3(0, 0, 10) \r\n <BR />"+
"], scene);",
hints : "//LinesMesh(name, scene, parent, source, doNotCloneChildren)",
members : "//Members - color : Color3, material : Material, isPickable : boolean, checkCollisions : boolean",
methods : "//Methods - intersects(ray, fastCheck) -> any, dispose(doNotRecurse) -> void, clone(name, newParent, doNotCloneChildren) -> LinesMesh"
},
}
},
 
 
if anyone want to help populate prefabs it would be a super help, it's not like it's hard is just meticulous to copy and paste stuff over from the API for the methods and members :/ which if they have none I have been setting the hint to say they have none, cause if you set it to null it does not process at all even if the hint is asked for which is good for things like if we add a random color one, cause your prolly going to pasting that inline I would assume and not on its own line so any hints would mess that up.
 
and I'll never be trying to monetize this I just wanna make it easier for people to access all the features in the engine without contstantly having to look stuff up.  
 
What is inteli-sense?
 
Link to comment
Share on other sites

:)  IntelliSense is the little boxes that pop-open when you are typing things in the playground editor.  It helps you do tab-based 'completion' and gives you hints about the needed parameters for various constructors and calls.  It does what your system does... but somewhat differently.  It is ON by default... in the standard playground.  You might have raced right past it, so fast that you didn't see it wave to you.  :)

By the way, don't add StandardMaterial "for me", add it for mankind.  ;)

I once built a retarded thing called 'fastMat'... http://www.html5gamedevs.com/topic/2571-the-wingnut-chronicles/?page=28#comment-100471 but BABYLON.Tools.getHexColor() disappeared, and then the demo died... and I haven't determined who gets spanked for that, yet.

Ya got good "thooze", P8!   (enthusiasm).  I bet you wear-out two keyboards per year, eh?  *nod*   :)

Link to comment
Share on other sites

Haha, my life's been hell seince my injury last year,. I had a accident and a huge life changing event and was out of work for 5 months so finicalally I got beat to death, so now I'm in recovery mode and trying to make up ground, which half of my motivation is learning new things, if I stop learning and creating I get depressed so gotta keep moving.

ahh so intelli is an Ajax auto complete gotcha, yea never noticed it I'm glad you said something cause that was the next thing j was gonna hash out on WUKONG.

 

thanks for your input bro I appreciate it a whole bunch, and will have the materials an color stuff added sometime today.

btw if you were wondering what WUKONG means : https://en.m.wikipedia.org/wiki/Sun_Wukong

Link to comment
Share on other sites

wow, I realized why nothing was working for me like it was for anyone else, evidently Aurora (firefox dev) is the worst browser to use the playground with none of the features that are on chrome show up, so I did not have line error hints, autocomplete or the dynamic ability that it has on chrome... the autocomplete kinda invalidates WUKONG, but yea what ever ill use to to deploy more advanced macros.

Still I kinda feel like a dummy now.... o_O.  i guess at least it forced me to actually memorize certain things though.

maybe one thing I could include in WUKONG is if you do some sort of alternative click, it will bring you to that elements api page.

Link to comment
Share on other sites

Good morning, P8!  That's interesting and unexpected news... about Aurora.  You are certainly not a dummy, not even close.  Aurora threw you a curve ball.  Although you might back-off on Wukong dev a bit, don't delete it and keep it published, if possible.  It has LOTS of potential... to teach others how to build similar PG modifications.  Heck, your jQuery.getScript command in the top line... is hot hot hot all by itself!  You also have a flat database within Wukong, and you are able to present it in a drill-able tree menu.  That's hot, too.  Not many know how to do that.  Essentially, you have INVENTED the playground plugin... quite an accomplishment, I'd say.

If possible, document how you did it, and/or heavily comment its code.  I've seen MANY MANY times when abandoned projects of one person... are GOLD to another person... for re-purposing (such as your quick-link to the API idea).  Personally, I think the whole project is quite cool... and that playground has DEFINITELY been put into my "best playgrounds" bookmarks folder.  Wukong time was not wasted time.  You added a pull-down menu to the playground!  That alone... is very cool... and yours looks really nice and is not intrusive to the other GUI at all.  It's purpose might be abandoned, but its "how did he do that?" is a big, bright star in the sky.

Sorry to hear about your accident.  I hope the physical and financial issues can be put behind you as quickly and easily as possible.  As fast and smart as YOU are, I suspect you'll be getting some 6-figure offers in no time.  WebGL is hot, and you are very good at it.  Make sure you come back and visit us after you have become a rich and powerful superstar.  :)

Keep up the excellent work and ideas, P8.  I've watched you just BLAST into the physics... and you have every potential to become "the man" for BabylonJS physics things.  Physics superstars are the biggest superstars of all.  Look at forum user Sam Girardin.  He started off rag-dolling and studying crowd path-finding, and now he's a multi-billionaire, drives one of his three Ferrari's... loaded with gorgeous women, owns 12 different graphics companies, and is developing a new physics engine called Energy.js.  P8, you are headed in that very same direction.  Be well, talk soon.

Link to comment
Share on other sites

You just made me blush so hard :). Thanks man for the support and the really really nice words!  And just so you know I would not know any of these things about Babylon if it was not for guys like you.  Heck I find myself just sitting and reading your script sometimes.  Your a legend! Thanks wing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...