Tiny fractalgenerator with haxeui 2

to test out haxeui 2 i wrote these little app:


It’s amazingly slow on mobile, but it works :smiley:

This is pretty cool! It would be an awesome effect for a game.

games later ; ) -> here is src -> https://github.com/maitag/haxe-shaderfun
(libs using: haxeui2 and peote-view)

@itzikiap mobile like walk on Maudlin Street (^_^) ?


Why no one helps haxe UI with samples and demos ???
babylone hx comes :sunflower:

So i took the liberty of moving the UI code to a self contained custom component - its actually a pretty good example of where (and how) to use custom components. So instead of all these “main.findComponent” calls in Main just have the macro build the custom component and create correctly typed member variables for you.

So the custom component now looks like: https://github.com/ianharrigan/haxe-shaderfun/blob/master/src/UI.hx - which is nice and simple. And the main UI work (including binding for slider value labels) is handled inside the UI mark up: https://github.com/ianharrigan/haxe-shaderfun/blob/master/assets/ui/ui.xml.

Now using the custom component is as simple as:

Screen.instance.addComponent(new UI());

And of course, you could also now use it in other UI defs, eg:

<ui />

You can also create multiple instances of it now since its a self contained component. The full PR is here if anyone is interested: https://github.com/maitag/haxe-shaderfun/pull/1

And the output result is: https://dl.dropboxusercontent.com/u/26678671/shader-fun/index.html

Ive also cleaned up the UI a little and made it a little darker etc… :slight_smile:

But great work @maitag! Thanks for sharing! :slight_smile:

PS: you will need an updated haxeui-core as i found a bug. :wink:

excellent :smiley:
with custom components and script-bindings everything looks much better now

many thanks!

1 Like