Haxe General Notes
Haxe
- http://www.unexpected-vortices.com/temp/manual/doc/introduction/what-is-haxe.html
- https://haxe.org/manual/introduction.html
- https://github.com/vshaxe/vshaxe
- https://lib.haxe.org/documentation/using-haxelib
- https://flashdevelop.org/downloads/builds/
- https://github.com/MatthijsKamstra/haxejs/
- https://matthijskamstra.github.io/haxejs/haxejs/cheatsheet.html
// haxe --main Main --interp -> 'Hello world'class Main { static public function main():Void { trace("Hello World"); }}
Haxe Dox
Generating documentation is a three-step process:
haxelib install dox
- Document types and fields in the .hx files by annotating them with block comments.
/** Foo Bar.*/
- Compile the application or library using the Haxe compiler with appropriate parameters to generate .xml information.
-cp src-D doc-gen--macro include('pack')--no-output--each
--next-xml bin/neko.xml-neko dummy.n
--next-xml bin/flash.xml-swf dummy.swf
- Invoke Dox an point it to the .xml files generated in step 2.
haxelib run dox -i docs
Haxe 3D
OpenFL - Lime
Template Customize
<template path="templates/index.html" rename="index.html" if="html5" />
HTML scripts
Use the <dependency/>
tag to include external JS files like so: <dependency if="html5" path="dependencies/soundjs.min.js" />
or <dependency if="html5" path="dependencies/ammo.js" />
canvas = Browser.document.getElementsByTagName("canvas").item(0);
// setInterval() for jstimerID = Browser.window.setInterval(scheduler, lookahead);
Unreal Engine
Types
- https://haxe.org/manual/types.html - Types
- https://haxe.org/manual/types-basic-types.html - Basic Types
- https://haxe.org/manual/types-class-instance.html - Class Instance
- https://haxe.org/manual/types-enum-instance.htm - Enum Instance
- https://haxe.org/manual/types-anonymous-structure.html - Anonymous Structure
- https://haxe.org/manual/types-function.html - Function Type
- https://haxe.org/manual/types-dynamic.html - Dynamic
- https://haxe.org/manual/types-abstract.html - Abstract
- https://haxe.org/manual/types-monomorph.html - Monomorph
Type System
- https://haxe.org/manual/type-system-typedef.html - Typedef
- https://haxe.org/manual/type-system-type-parameters.html - Type Parameters
- https://haxe.org/manual/type-system-generic.html - Generic
- https://haxe.org/manual/type-system-variance.html - Variance
- https://haxe.org/manual/type-system-unification.html - Unification
- https://haxe.org/manual/type-system-type-inference.html - Type Inference
- https://haxe.org/manual/type-system-modules-and-paths.html - Modules and Paths
- https://haxe.org/manual/type-system-untyped.html - untyped
MetaData
- https://haxe.org/manual/cr-metadata.html - Compiler MetaData
Compiler
@:event
[cs] - Automatically added by--net-lib
on events. Has no effect on types compiled by Haxe.@:noCompletion
[all] - Prevents the compiler from suggesting completion on this field or type.@:access
(<Target path>
) [all] - Forces private access to package, type or field.- https://haxe.org/manual/lf-access-control.html - Access Control
Feathersui
Command Line Setup
haxelib install feathersuihaxelib run openfl setup
haxelib update feathersui
Create Project
haxelib run feathersui new-project HelloWorld
Run the project
openfl test html5 -debug
Build the project
openfl build html5
Feathers UI CLI command reference
haxelib run feathersui new-project <path> [options]
haxelib run feathersui new-project HelloWorld --vscodecode HelloWorld
new-project
- —vscode - The new project will include supporting files for Visual Studio Code.
- —openfl - The new project’s main class will extend
openfl.display.Sprite
instead of feathers.controls.Application - —verbose - Show additional detailed output.
help
haxelib run feathersui help <command>
# Example: Display a list of all available commands.haxelib run feathersui help
# Example: Display a list of all available options for the new-project command.haxelib run feathersui help new-project
Main.hx
import feathers.core.Application;
class MyProject extends Application { public function new() { super();
var label = new Label(); label.text = "Hello from Feathers UI and OpenFL"; this.addChild(label); }}
project.xml
<?xml version="1.0" encoding="utf-8"?><project> <meta title="My Project" package="com.example.MyProject" version="1.0.0" company="My Company"/> <app main="MyProject" path="build" file="MyProject"/> <window allow-high-dpi="true"/> <window fps="60"/> <window fps="0" if="html5"/> <source path="src"/> <haxelib name="openfl"/> <haxelib name="actuate"/> <haxelib name="feathersui"/></project>
See also
build.hxml
-cp src-main HelloWorld-swf LibraryTest.swc-dce std
$> haxe build.hxml
Lime
Lime is a flexible, lightweight layer for Haxe cross-platform developers. Lime provides a common foundation on native and dynamic targets for window and application life-cycle management, access to rendering and sound, plus many other useful features for cross-platform development.
Write in the expressive Haxe programming language, then compile to native C++, JavaScript and other technologies.
XML Format
- https://lime.software/docs/project-files/xml-format/ - Lime XML Format
Usually a simple project file is all you need to build projects using Lime, but it can be extended based on your needs. Here is a reference of what you can do.
HXP Format
- https://lime.software/docs/project-files/hxp-format/ - Lime HXP Format
The *.hxp format is based upon Haxe, it mirrors the internal project format used within Lime tools. There is a lot of flexibility and power that can come from using an *.hxp project, but be aware that as the Lime tools evolve, the specification may change slightly.
Resources
OpenGL
- https://learnopengl.com/
- https://matttuttle.com/2014/03/opengl-resources/
- http://web.archive.org/web/20140209181347/http://www.arcsynthesis.org/gltut/
Haxe child pages
- [[haxe:rtti:start|Haxe RTTI Start Page]]
Feathersui child pages