Giter Club home page Giter Club logo

Comments (8)

shakiba avatar shakiba commented on May 12, 2024 1

Ah, ok. Please keep me updated about your work, I'm interested to see how it works.

from planck.js.

shakiba avatar shakiba commented on May 12, 2024 1

Awesome! :) I'm glad it worked for you. I will add it to a new demo list in near future.

from planck.js.

shakiba avatar shakiba commented on May 12, 2024

Cool! Does it require specifying static types for methods' arguments and return?

from planck.js.

NicolasVereenoghe avatar NicolasVereenoghe commented on May 12, 2024

They are already defined into the externs :
sometimes I had to create some new "typedef" that conform to yours :
https://github.com/NicolasVereenoghe/git.vega.pixi4/blob/master/haxe/lib/planck%2Cjs/0%2C1%2C34/src/planck/World.hx#L10-L29

... or sometimes they are just externs of yours :
https://github.com/NicolasVereenoghe/git.vega.pixi4/blob/master/haxe/lib/planck%2Cjs/0%2C1%2C34/src/planck/collision/Distance.hx#L14-L43

For now I've just checked the instances are created (World, Body .... Transform ...) and filled correctly. I followed the provided index.js file and tryed to deal with code that is exposed (not all protected members, not the Solver class, I believe the latter can remain hidden for now)

More testing is needed, I work for a client and I will test it this week ....

from planck.js.

shakiba avatar shakiba commented on May 12, 2024

That's interesting and very helpful! Do you know how does it compare to TypeScript types? Because someone asked me about it before.

from planck.js.

NicolasVereenoghe avatar NicolasVereenoghe commented on May 12, 2024

Sorry, I dont have expertise with TypeScript

from planck.js.

NicolasVereenoghe avatar NicolasVereenoghe commented on May 12, 2024

Hello,

My work is still in progress, and for now the planckjs seems to run properly with the Haxe externs.
I cannot show a demo because it's for a client. It's a mini game where you need to complete a level by adding blocks, so that a ball can travel to a goal.

From my first post, I had to adjust the externs to be compliant with your code, I updated them into my framework repository (see previous links). I copy my "commit comments" here :
. optional Body::createFixture parameters
. optional parameters for Fixture constructor
. added FixtureDef::shape field
. adjusted signature for World::on and World::off events registration functions
. added constants for world events labels (WORLD_REMOVE_BODY,WORLD_REMOVE_JOINT,WORLD_REMOVE_FIXTURE,WORLD_CONTACT_BEGIN,WORLD_CONTACT_END,WORLD_CONTACT_PRE,WORLD_CONTACT_POST)
. warning : you have to explicitly set a body as dynamic, even if its fixtures have a non 0 density

I continue the testings :)

from planck.js.

NicolasVereenoghe avatar NicolasVereenoghe commented on May 12, 2024

Hello, here a game demo extracted from my work for my client. I think I can share this :
https://github.com/NicolasVereenoghe/vega.labo.pampamplanck

The game is redeveloped from former Flash Box2D sources. Mechanics are very simple. It conforms to the original game. No issues for now, just some adjustments to adapt to the last Box2D API.

from planck.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.