OpenFL 8.0.2 released

Can work:

var object:Dynamic = {};
if (object != null)
    trace(name, object);

Can not work:

var object:Dynamic = {};
if (object)
    trace(name, object);

I found these two judgments, the following one will never be established in C++. This discovery comes from the code of Starling2.3.3’s AssetManager:

if (object)
      addObject(name, object);

Is this the one you’re looking at?

Yes, at the same time I found out that Starling’s C++ version is far from the Openfl native version.

Far in what way? Very different? Better, worse? More features, less features?

More is the performance difference, Starling’s performance will be very weak on the Android platform of C + +, drawing 4 or 5 will consume a lot of CPU.

I understand that DOMElement is the new method, I just can’t figure out how to implement it, particularly without more complete documentation.

If I simply replace DOMSprite with DOMElement it throws an error when trying to use with IFrameElement…

js.html.DOMElement does not have a constructor

Emmm, I am using Android Studio to modify some information, such as AndroidMainifest.xml and the main activity of the code, as long as I run a Command + Shift + B compiler, everything will disappear. How to correctly modify or extend your own Android project?

Do you mean that the OpenFL native output is much slower than the C++ version of Starling (I forget what it is called) or that it is faster? Android is very different than desktop in performance, but there already are large projects using OpenFL Starling/C++ successfully :slight_smile:

It sounds like there is an import conflict, perhaps you could use the in keyword for your imports

import openfl.display.DOMElement in OpenFLDOMElement;
import js.html.DOMElement;


var element = new OpenFLDOMElement ();

You can also use openfl.display.DOMElement instead of using an import

You would have to override your template.

Lime and OpenFL have templates directories. This works like a class path. You can add your own templates directory, and the tools will allow you to override individual files from OpenFL or Lime, such as your AndroidManifest.xml.

Add <template path="templates" /> to your project.xml, and a “templates” directory (you can also put it in a different place in your project structure, if you prefer).

Look at the Lime templates directory structure and mirror it in your own, until you override the file you want. For example, “templates/android/”

I’m very sorry, I mean Openfl’s native performance will be faster, Starling is slow.:grin:

Thank you!:rofl::rofl:

Excellent, yes that works, didn’t spot import openfl.display.DOMElement as an option, was still working with the js route :slight_smile:

7 posts were split to a new topic: How to use HaxeUI?

A post was split to a new topic: Java to Haxe communication

Was Neko ridiculously sped up? I think I am getting 3x the fps when testing my project.

Why HTML5 fonts are particularly vague?Is there a way to make it look clear?:disappointed_relieved:

If you were using Tilemap or drawTriangles, then yes

I believe this is a general HTML5 issue. We use webfonts, and canvas text APIs to render. You could use bitmap fonts, or perhaps there are other ways to make it behave better, like generating a different version of a webfont, or disabling CSS scaling of your project in your output HTML. There should be other topics here on the forums as well about <window allow-high-dpi="true" />

This is very useful.:grinning: