LayaBox / LayaAIR - Dynamic Physic 2D and 3D

Hello everyone :upside_down_face: ;
I could see that “Laya” went through some updates - AS3 AIR…

  • Is it possible to use/import the “Laya” 2D and 3D class in “Adobe Animate” to use the physics features?
  • Does anyone here use these features in Adobe Animate?
  1. https://ldc2.layabox.com/doc/?language=en&nav=en-as-0-3-0

  2. https://layaair2.ldc2.layabox.com/demo2/?language=en&category=2d&group=Physics&name=Slingshot

// Example:
import laya.display.Sprite;
import laya.display.Stage;
import laya.renders.Render;
import laya.utils.Browser;
import laya.webgl.WebGL;
import laya.d3.physics.PhysicsCollider;
import laya.d3.physics.Rigidbody3D;
import laya.d3.physics.shape.BoxColliderShape;
import laya.d3.physics.shape.CapsuleColliderShape;
import laya.d3.physics.shape.SphereColliderShape;

I don’t know, never used this

I guess if you really really really need to publish on the web from ActionScript and SWF assets, … but it does not look very solid to be honest

from a quick overview I would say

  • they dev it first in AS3 and apparently they want to ditch it for JS/TS
    eg. https://github.com/layabox/LayaAir_Discard

    This is old LayaAir veriosn writetten by ActionScript 3.0 ,now LayaAir is using TypeScript as the Engine Script

  • they tried to mix-match JS/AS API eg. https://github.com/layabox/LayaAir

    LayaAir use WebGL1.0/WebGL2.0 as graphic API and written by TypeScript. LayaAir is designed for high performance games and support TypeScript, JavaScript and ActionScript 3.0 programming language.

  • they have IDE, which is probably good (but mainly depends on how all of this is stable to work with)
  • life will be surely easier for you if you can communicate with them in Chinese

their translated about page says

Layabox is a Chinese game engine provider brand created by Soyou Network Technology (Beijing) Co., Ltd. Its second-generation engine, LayaAir, is an open source engine based on the HTML5 protocol. Performance and 3D are the core competitiveness of the engine. At the same time support ActionScript3, JavaScript, TypeScript three development languages, and at the same time develop APP (Android and iOS), HTML5, WeChat mini games, QQ play one game platform and other game engine. In addition to supporting 2D \ 3D \ VR \ AR game development, the engine can also be used in application software, advertising, marketing, education and other fields.

It also has development tool chains such as LayaAirIDE, which supports developers to visually edit UI, animation, code writing, packaging, multi-platform publishing, etc., and provides developers with rich development and support tools.

The company’s founder Xie Chenghong is the founder of the page game platform Cola Bar, which was established in 2000, and has 18 years of engine development experience. At present, large enterprises such as Tencent, Sanqi Mutual Entertainment, Blue Harbor Interactive, Butterfly Interactive, Junhai Games, Xianhai Network, Mutual Love Interaction, Forgame, Ming Dynasty Interactive, Seventh Avenue, Electric Soul Network, and Kaixin.com have adopted Layabox Engine for developing game products.

hummm ok …

for a little dig in the sources, their “tool chains” is mainly an API that can cross-compile from AS3 to JS with something similar (or identical?) to Apache Royale, but looking at the sources euh … well… does not look super clean and super complete, and if hairy things happen, ah what is saying this Chinese comment ?

personally it feels I would go faster writing the code from scratch, but again never worked with their API and sources, so maybe they are doing something “magic” but it was not obvious in their code base

Ok… Thanks for all the tips. :wink:

I have never used “LayaAIR” either, I am actually trying to include interactive 3D in Adobe Animate, and doing some research found several things:

For example:
https://project-awesome.org/robinrodricks/awesome-actionscript3

But LayaAIR seemed to me a good option for 3D in partnership with ActionScript 3.0 as Away3D has been stopped longer. I also didn’t find information about 3D and Dynamic Physic in Apache Royale.

Would you have any tips for developing 3D Dynamic Physic on AS3?

It really depends on what you try to do 3D wise and where do you plan to publish?

The idea was to test adventure mini games for Android/PlayStore using 3D AS3/AIR.

so the posts and contents are old but should still work

these old stuff imho would work better than LayaAIR, because it target directly AIR without having to adapt to an HTML5 export

now 3D is a tricky thing, Stage3D can do a lot but it is mainly a middleware, you need a framework/environment/IDE on top of it to be somewhat confortable

Flare3D can be a framework, maybe some tools can be used to “view the 3D scene”, but it is not a a 3D editor/animator

so I would say LayaAIR could worth it, only if it provide some kind of IDE that allow to setup the 3D scene/environment faster etc.

otherwise anything for AS3 like Flare3D, Away3D, etc. for small/mini should do

1 Like

Thank you very much! :wink:
I will test and see what I can do.