Comments (4)
You can wrap whatever you want into a composite and save it as a library item. Then, you can export it as h2dlib
format (it's a zip that contains all required resources) and import in any other project.
https://github.com/rednblackgames/HyperLap2D/wiki/Import-Export-Library-items
There might be some issues with projects that have different PPWU, should be tested a bit more :)
from hyperlap2d.
Hm. Okay, with Itemwarpper i can get the sprite ingame and animate it well.
But, physics i must add to composite to make it work. But, composite is ingame no enitiy ?
(when i only add physics to the sprite inside the composite - nothing happends ingame. so i thing i must take action the x/y pos. from the composite....but when i want to work with box2d - and the composite is no entity.... ? :D )
Edit:
Hm, should be no problem.... 🤔 i will try
Edit 2:
Nope: No entity, no components, no x/y settings....
from hyperlap2d.
Composite are entities too, root
for example is a composite, also if look at demo project level-3-skull
is a composite and you can get entity from it. Is the project exporting correctly?
Regarding box2d bodies inside composites isn't possible, becuase objects chenge their coordinates inside, so box2d cannot work properly
from hyperlap2d.
yeah, i was to fast with writing here, it works:
// test Composite entity to take action to box2d etc.
Entity testComp = root.getChild("testComp").getEntity();
// test ItemWrapper to become the child sprite animation
ItemWrapper testItem = root.getChild("testComp");
// init testSprite Entity from composite
Entity testSprite = testItem.getChild("testSprite").getEntity();
from hyperlap2d.
Related Issues (20)
- Add overloaded loadScene method to SceneLoader
- Field not found: circle (games.rednblack.editor.renderer.data.SimpleImageVO) HOT 1
- Physics body is null HOT 2
- Import too big asset throw error HOT 1
- Png seems to cause crash on simple project
- Feature Request: Support TinyVG HOT 3
- [Crash] Hyperlap crash if you change from or to monospace. HOT 1
- Changing the width and height of a primitive doesn't work HOT 1
- Feature request : Bezier Curves
- main window size HOT 3
- [Feature Request] Add a json schema file HOT 3
- The create new action interface is a bit small HOT 1
- Not working on OSX HOT 6
- particle effects start with a delay
- Deleting a polygon, then using <CTRL>-Z to undo crashes the app
- Non-ASCII characters support HOT 3
- Editor crash caused by `java.lang.ArithmeticException: / by zero`
- Crash when updating Skin Composer HOT 1
- Crash when overlapping polygon HOT 2
- Add flatpak version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperlap2d.