Giter Site home page Giter Site logo

three.hx's Introduction

Three.hx

HaxeThreejs type definitions.

Actions Status

Compiler Flags

  • threejs_include=path/to/three.js: Includes three.js javascript source file in generated output.
    If no path is specified three.hx/lib/three.js is used (three.min.js if -D debug is set).
  • three_jsRequire: Use jsRequire

three.hx's People

Contributors

kevinresol avatar matthijskamstra avatar tong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

three.hx's Issues

package locations

While technically not an bug, I've just noticed that the package structure is quite different between these externs and the ones at https://lib.haxe.org/p/threejs/ and threejs in general.

There are a few haxe libs out there that have a dependency on the other threejs externs, so it might be a good idea to follow the same package structure so they can be easily substituted these new externs.

threejs_include doesn't seem to work

simple example:

class MainTest {
	static function main() {
		trace("Hello, world!");
	}
}

build.hxml

-lib three.hx
-cp src
-main MainTest
-js bin/include_debug.js
-dce full
-debug
-D threejs_include

--next

-lib three.hx
-cp src
-main MainTest
-js bin/include.js
-dce full
# -debug
-D threejs_include

does not embed three.js

@:jsRequire support

Currently I add var THREE = require('three'); at the top of the generated output to make it work on my bundled setup.

or in webpack:

plugins: [
	new webpack.ProvidePlugin({
		THREE: 'three'
	})
],

haxelib

Would be great to get this on haxelib. I know there is already a threejs version on there, but it's quite an old version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.