Jump to content

CannonJS & DynamicFloatArray compile failure


Recommended Posts

@JCPalmer I did the DynamicFloatArray class and this is actually a good thing that you reported it because the line shouldn't compile!

I don't know why Visual Studio doesn't issue and error, I'm using the latest version of TypeScript. (btw the error is I try to set a property without a setter... I already noticed that it doesn't issue building error, which is kind of scary)

I'm going to fix the issue and submit the change, sorry for the inconvenience.

Link to comment
Share on other sites

This class was removed from the library because it wasn't used that much.

I was replaced by the class StringDictionary which in TypeScript is generic on the value it old and with a key that must be a string, which let us use an Associative Array of JavaScript, which is the fastest way to create a map/dictionary.

I've changed the pg, the only thing you have to replace is .item() by get().


So the issue is not related, by the way.



Link to comment
Share on other sites

Thanks for the info and edits, @Nockawa.  Unfortunately, it is not working (as best I can tell).  No colored rings when the virtual joystick is turned-on.

In that PG, the VJ is supposed to turn-on for about 20 secs... then shut off.  The VJ IS working for that first 20 seconds, but no colored rings.  Thoughts?  (thx)

Link to comment
Share on other sites

hehe.  Somehow, I knew you were going to say that.  Would you be willing to watch a video?


The video uses a virtualJoysticksCamera, which has 2 VJ's.  The PG demo above uses just one (no vj cam).  We were testing VJ's for controlling an object.

Here's a small still-pic, too.   http://david.blob.core.windows.net/babylonjs/VJCBabylon.jpg


Link to comment
Share on other sites

Did you make the change to the framework?  I noticed that VJ source code uses dictionary, too, now.  https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.virtualJoystick.js#L30

Who approved it/merged it?  Someone needs to hang for this.  Untested PR's?  tsk tsk.  heh  (just having fun)

I think this demo from the main BJS website... uses VJ's.  I don't see the rings, currently, though.

VJ has been an active subject, lately.  Davrous could be doing experiments on VJ's at this time.  So... you know... I hope we're not colliding with other efforts.  I am in no hurry to get this smartCollection issue fixed... except... we are doing experiments on VJ's at this time.  The more working playground examples, the better.  :)  20 sec timer is very important... or else the PG editor becomes unusable, because there is another canvas atop the entire screen... called the vjcanvas.... where those cyan and yellow rings get drawn.

The vjcanvas COULD be sized/positioned properly to fit the playground render canvas nicely (without covering the editor and html gui)... but we're still working-on how to do that.

Link to comment
Share on other sites

Yeah, I heard about this from @Deltakosh in some other thread.  He sounds excited about it... and, to be frank, I love everything that you do.  You are a codin' and inventin' big-dog... I love it.  I'm very glad that you are willing to hang-around with us.  Don't ever leave, ok?

What I heard... is that your new system is going to make text handling... much easier to deal-with.  I'm all for that, too.  Let's see, wrap the context2D object in a better api, interface it wonderfully with the dynamic 2d buffer that the engine currently uses for displaceMaps/heightMaps... then... um...  I have no idea.  :D  I'm a dreamer, not a coder/designer.  :)  But speculating is great fun.

Anyway, sorry for derailing the topic, there, momentarily... and thanks for the excellent fast bug fix, Nockawa!  When you launch a thread telling about the new 2D system, I'll be there... probably drooling and wanting to steal all your code/creativity.  :)

Link to comment
Share on other sites

Don't be sorry, that was indeed my mistake, I asked to remove this class, so i'm supposed to be the guy to deal with issues that come from it.

I mostly dev in TypeScript and still don't understand very well the resulted code in JS and especially if it's going to silently fail or not. If the PG was in TypeScript, compilation would have been failed and the fix would have been easy to find.

The thing to remember is when converting from SmartCollection to StringDictionary is:

  • The key can only be a string
  • the .items() must be replaced by .get()
  • .foreach now takes two args in the function: key, value. before it were only value.

Concerning the 2D Engine, yes I'm also pretty excited about it, I spent a lots of hours to ensure the perf and flexibility would be optimal. The first release won't be very stable for complex scenario and there won't be a lot of primitive to deal with, but the whole 2D Engine is good, I spent a lot of time on it.
There's a preview doc here: https://github.com/nockawa/Documentation/blob/master/content/overviews/Standard/Using_The_Canvas2D.md

It's far from being completed, it's too raw right now, but I'll improve it before submitting the PR.

You can also follow the development of the feature here: https://trello.com/b/eKMKhCFc/version-2-4

And yes, don't I plan to run away ! :)

Link to comment
Share on other sites

That... is fantastic.  AND... you're a fine docs writer, too!  YAY! 

We're going to have Phaser... as an extension to BJS!  :D

Well, it LOOKS powerful enough to be Phaser (a nearby 2D game dev system).

Good luck on continued dev, Nockawa.  It looks beefy.  Thanks for showing us a preview, and for integrating it into the framework.  Hopefully, I will be able to speak intelligently about it, someday.  :) 

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.

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.


  • Recently Browsing   0 members

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