Skip to content

Instantly share code, notes, and snippets.

@haxiomic
Last active August 29, 2015 14:07
Show Gist options
  • Save haxiomic/461b2ca498c0282d121b to your computer and use it in GitHub Desktop.
Save haxiomic/461b2ca498c0282d121b to your computer and use it in GitHub Desktop.
//THREE.hx r68
import js.html.*;
typedef HTMLElement = js.html.Element;
typedef HTMLCanvasElement = js.html.CanvasElement;
typedef HTMLImageElement = js.html.ImageElement;
typedef WebGLRenderingContext = js.html.webgl.RenderingContext;
/* Auto-generated using ts2hx */
@:enum @:native("THREE.CullFace") abstract CullFace(Int) {
}
@:enum @:native("THREE.FrontFaceDirection") abstract FrontFaceDirection(Int) {
}
@:enum @:native("THREE.ShadowMapType") abstract ShadowMapType(Int) {
}
@:enum @:native("THREE.Side") abstract Side(Int) {
}
@:enum @:native("THREE.Shading") abstract Shading(Int) {
}
@:enum @:native("THREE.Colors") abstract Colors(Int) {
}
@:enum @:native("THREE.Blending") abstract Blending(Int) {
}
@:enum @:native("THREE.BlendingEquation") abstract BlendingEquation(Int) {
}
@:enum @:native("THREE.BlendingDstFactor") abstract BlendingDstFactor(Int) {
}
@:enum @:native("THREE.BlendingSrcFactor") abstract BlendingSrcFactor(Int) {
}
@:enum @:native("THREE.Combine") abstract Combine(Int) {
}
@:enum @:native("THREE.Mapping") abstract Mapping(Int) {
}
@:native("THREE.MappingConstructor") typedef MappingConstructor = {
public function new():Mapping;
};
@:enum @:native("THREE.Wrapping") abstract Wrapping(Int) {
}
@:enum @:native("THREE.TextureFilter") abstract TextureFilter(Int) {
}
@:enum @:native("THREE.TextureDataType") abstract TextureDataType(Int) {
}
@:enum @:native("THREE.PixelType") abstract PixelType(Int) {
}
@:enum @:native("THREE.PixelFormat") abstract PixelFormat(Int) {
}
@:enum @:native("THREE.CompressedPixelFormat") abstract CompressedPixelFormat(Int) {
}
@:native("THREE.Camera") extern class Camera extends Object3D {
public function new():Void;
public var matrixWorldInverse : Matrix4;
public var projectionMatrix : Matrix4;
}
@:native("THREE.CubeCamera") extern class CubeCamera extends Object3D {
public function new(?near:Float, ?far:Float, ?cubeResolution:Float):Void;
public var renderTarget : WebGLRenderTargetCube;
public function updateCubeMap(renderer:Renderer, scene:Scene):Void;
}
@:native("THREE.OrthographicCamera") extern class OrthographicCamera extends Camera {
public function new(left:Float, right:Float, top:Float, bottom:Float, ?near:Float, ?far:Float):Void;
public var left : Float;
public var right : Float;
public var top : Float;
public var bottom : Float;
public var near : Float;
public var far : Float;
public function updateProjectionMatrix():Void;
}
@:native("THREE.PerspectiveCamera") extern class PerspectiveCamera extends Camera {
public function new(?fov:Float, ?aspect:Float, ?near:Float, ?far:Float):Void;
public var fov : Float;
public var aspect : Float;
public var near : Float;
public var far : Float;
public function setLens(focalLength:Float, ?frameHeight:Float):Void;
public function setViewOffset(fullWidth:Float, fullHeight:Float, x:Float, y:Float, width:Float, height:Float):Void;
public function updateProjectionMatrix():Void;
}
@:native("THREE.BufferAttribute") extern class BufferAttribute {
public function new(array:Dynamic, itemSize:Float):Void;
public var array : Array<Float>;
public var itemSize : Float;
public var length : Float;
public function set(value:Float):BufferAttribute;
public function setX(index:Float, x:Float):BufferAttribute;
public function setY(index:Float, y:Float):BufferAttribute;
public function setZ(index:Float, z:Float):BufferAttribute;
public function setXY(index:Float, x:Float, y:Float):BufferAttribute;
public function setXYZ(index:Float, x:Float, y:Float, z:Float):BufferAttribute;
public function setXYZW(index:Float, x:Float, y:Float, z:Float, w:Float):BufferAttribute;
}
@:native("THREE.Int8Attribute") extern class Int8Attribute extends BufferAttribute {
public function new(data:Dynamic, itemSize:Float):Void;
}
@:native("THREE.Uint8Attribute") extern class Uint8Attribute extends BufferAttribute {
public function new(data:Dynamic, itemSize:Float):Void;
}
@:native("THREE.Uint8ClampedAttribute") extern class Uint8ClampedAttribute extends BufferAttribute {
public function new(data:Dynamic, itemSize:Float):Void;
}
@:native("THREE.Int16Attribute") extern class Int16Attribute extends BufferAttribute {
public function new(data:Dynamic, itemSize:Float):Void;
}
@:native("THREE.Uint16Attribute") extern class Uint16Attribute extends BufferAttribute {
public function new(data:Dynamic, itemSize:Float):Void;
}
@:native("THREE.Int32Attribute") extern class Int32Attribute extends BufferAttribute {
public function new(data:Dynamic, itemSize:Float):Void;
}
@:native("THREE.Uint32Attribute") extern class Uint32Attribute extends BufferAttribute {
public function new(data:Dynamic, itemSize:Float):Void;
}
@:native("THREE.Float32Attribute") extern class Float32Attribute extends BufferAttribute {
public function new(data:Dynamic, itemSize:Float):Void;
}
@:native("THREE.Float64Attribute") extern class Float64Attribute extends BufferAttribute {
public function new(data:Dynamic, itemSize:Float):Void;
}
@:native("THREE.BufferGeometry") extern class BufferGeometry {
public function new():Void;
public var id : Float;
public var uuid : String;
public var name : String;
public var attributes : Array<BufferAttribute>;
public var drawcalls : Array<{ public var start : Float; public var count : Float; public var index : Float; }>;
public var offsets : Array<{ public var start : Float; public var count : Float; public var index : Float; }>;
public var boundingBox : BoundingBox3D;
public var boundingSphere : BoundingSphere;
@:overload(function(name:String, array:Dynamic, itemSize:Float):Dynamic { })
public function addAttribute(name:String, attribute:BufferAttribute):Dynamic;
public function getAttribute(name:String):Dynamic;
public function addDrawCall(start:Float, count:Float, index:Float):Void;
public function applyMatrix(matrix:Matrix4):Void;
public function fromGeometry(geometry:Geometry, ?settings:Dynamic):BufferGeometry;
public function computeBoundingBox():Void;
public function computeBoundingSphere():Void;
public function computeFaceNormals():Void;
public function computeVertexNormals():Void;
public function computeTangents():Void;
public function computeOffsets(indexBufferSize:Float):Void;
public function merge():Void;
public function normalizeNormals():Void;
public function reorderBuffers(indexBuffer:Float, indexMap:Array<Float>, vertexCount:Float):Void;
public function clone():BufferGeometry;
public function dispose():Void;
public function addEventListener(type:String, listener:Dynamic -> Void):Void;
public function hasEventListener(type:String, listener:Dynamic -> Void):Void;
public function removeEventListener(type:String, listener:Dynamic -> Void):Void;
public function dispatchEvent(event:{ public var type : String; public var target : Dynamic; }):Void;
}
@:native("THREE.Clock") extern class Clock {
public function new(?autoStart:Bool):Void;
public var autoStart : Bool;
public var startTime : Float;
public var oldTime : Float;
public var elapsedTime : Float;
public var running : Bool;
public function start():Void;
public function stop():Void;
public function getElapsedTime():Float;
public function getDelta():Float;
}
@:native("THREE.EventDispatcher") extern class EventDispatcher {
public function new():Void;
public function addEventListener(type:String, listener:Dynamic -> Void):Void;
public function hasEventListener(type:String, listener:Dynamic -> Void):Void;
public function removeEventListener(type:String, listener:Dynamic -> Void):Void;
public function dispatchEvent(event:{ public var type : String; public var target : Dynamic; }):Void;
}
@:native("THREE.Face3") extern class Face3 {
@:overload(function(a:Float, b:Float, c:Float, ?normal:Vector3, ?vertexColors:Array<Color>, ?materialIndex:Float):Dynamic { })
@:overload(function(a:Float, b:Float, c:Float, ?vertexNormals:Array<Vector3>, ?color:Color, ?materialIndex:Float):Dynamic { })
@:overload(function(a:Float, b:Float, c:Float, ?vertexNormals:Array<Vector3>, ?vertexColors:Array<Color>, ?materialIndex:Float):Dynamic { })
public function new(a:Float, b:Float, c:Float, ?normal:Vector3, ?color:Color, ?materialIndex:Float):Void;
public var a : Float;
public var b : Float;
public var c : Float;
public var normal : Vector3;
public var vertexNormals : Array<Vector3>;
public var color : Color;
public var vertexColors : Array<Color>;
public var vertexTangents : Array<Float>;
public var materialIndex : Float;
public function clone():Face3;
}
@:native("THREE.MorphTarget") typedef MorphTarget = {
public var name : String;
public var vertices : Array<Vector3>;
};
@:native("THREE.MorphColor") typedef MorphColor = {
public var name : String;
public var colors : Array<Color>;
};
@:native("THREE.MorphNormals") typedef MorphNormals = {
public var name : String;
public var normals : Array<Vector3>;
};
@:native("THREE.BoundingBox3D") typedef BoundingBox3D = {
public var min : Vector3;
public var max : Vector3;
};
@:native("THREE.BoundingSphere") typedef BoundingSphere = {
public var radius : Float;
};
@:native("THREE.Geometry") extern class Geometry {
public function new():Void;
public var id : Float;
public var uuid : String;
public var name : String;
public var vertices : Array<Vector3>;
public var colors : Array<Color>;
public var faces : Array<Face3>;
public var faceVertexUvs : Array<Array<Array<Vector2>>>;
public var morphTargets : Array<MorphTarget>;
public var morphColors : Array<MorphColor>;
public var morphNormals : Array<MorphNormals>;
public var skinWeights : Array<Float>;
public var skinIndices : Array<Float>;
public var lineDistances : Array<Float>;
public var boundingBox : BoundingBox3D;
public var boundingSphere : BoundingSphere;
public var hasTangents : Bool;
public var verticesNeedUpdate : Bool;
public var elementsNeedUpdate : Bool;
public var uvsNeedUpdate : Bool;
public var normalsNeedUpdate : Bool;
public var tangentsNeedUpdate : Bool;
public var colorsNeedUpdate : Bool;
public var lineDistancesNeedUpdate : Bool;
public var buffersNeedUpdate : Bool;
public var groupsNeedUpdate : Bool;
public function applyMatrix(matrix:Matrix4):Void;
public function center():Vector3;
public function computeFaceNormals():Void;
public function computeVertexNormals(?areaWeighted:Bool):Void;
public function computeMorphNormals():Void;
public function computeTangents():Void;
public function computeLineDistances():Void;
public function computeBoundingBox():Void;
public function computeBoundingSphere():Void;
public function merge(geometry:Geometry, matrix:Matrix, materialIndexOffset:Float):Void;
public function mergeVertices():Float;
public function makeGroups(usesFaceMaterial:Bool, maxVerticesInGroup:Float):Void;
public function clone():Geometry;
public function dispose():Void;
public function addEventListener(type:String, listener:Dynamic -> Void):Void;
public function hasEventListener(type:String, listener:Dynamic -> Void):Void;
public function removeEventListener(type:String, listener:Dynamic -> Void):Void;
public function dispatchEvent(event:{ public var type : String; public var target : Dynamic; }):Void;
public var isDynamic (get, set) : Bool;
private inline function get_isDynamic():Bool return untyped this['dynamic'];
private inline function set_isDynamic(v:Bool):Bool return untyped this['dynamic'] = v;
}
@:native("THREE.Object3D") extern class Object3D {
public function new():Void;
public var id : Float;
public var uuid : String;
public var name : String;
public var parent : Object3D;
public var children : Array<Object3D>;
public var up : Vector3;
public var position : Vector3;
public var rotation : Euler;
public var quaternion : Quaternion;
public var scale : Vector3;
public var renderDepth : Float;
public var rotationAutoUpdate : Bool;
public var matrix : Matrix4;
public var matrixWorld : Matrix4;
public var matrixAutoUpdate : Bool;
public var matrixWorldNeedsUpdate : Bool;
public var visible : Bool;
public var castShadow : Bool;
public var receiveShadow : Bool;
public var frustumCulled : Bool;
public var userData : Dynamic;
public var DefaultUp : Vector3;
public var eulerOrder : String;
public function applyMatrix(matrix:Matrix4):Void;
public function setRotationFromAxisAngle(axis:Vector3, angle:Float):Void;
public function setRotationFromEuler(euler:Euler):Void;
public function setRotationFromMatrix(m:Matrix4):Void;
public function setRotationFromQuaternion(q:Quaternion):Void;
public function rotateOnAxis(axis:Vector3, angle:Float):Object3D;
public function rotateX(angle:Float):Object3D;
public function rotateY(angle:Float):Object3D;
public function rotateZ(angle:Float):Object3D;
public function translateOnAxis(axis:Vector3, distance:Float):Object3D;
public function translate(distance:Float, axis:Vector3):Object3D;
public function translateX(distance:Float):Object3D;
public function translateY(distance:Float):Object3D;
public function translateZ(distance:Float):Object3D;
public function localToWorld(vector:Vector3):Vector3;
public function worldToLocal(vector:Vector3):Vector3;
public function lookAt(vector:Vector3):Void;
public function add(object:Object3D):Void;
public function remove(object:Object3D):Void;
public function raycast(raycaster:Raycaster, intersects:Dynamic):Void;
public function traverse(callback:Object3D -> Dynamic):Void;
public function getObjectById(id:String, recursive:Bool):Object3D;
public function getObjectByName(name:String, ?recursive:Bool):Object3D;
public function getChildByName(name:String, ?recursive:Bool):Object3D;
public function updateMatrix():Void;
public function updateMatrixWorld(force:Bool):Void;
public function clone(?object:Object3D, ?recursive:Bool):Object3D;
public function addEventListener(type:String, listener:Dynamic -> Void):Void;
public function hasEventListener(type:String, listener:Dynamic -> Void):Void;
public function removeEventListener(type:String, listener:Dynamic -> Void):Void;
public function dispatchEvent(event:{ public var type : String; public var target : Dynamic; }):Void;
}
@:native("THREE.Projector") extern class Projector {
public function new():Void;
public function projectVector(vector:Vector3, camera:Camera):Vector3;
public function unprojectVector(vector:Vector3, camera:Camera):Vector3;
public function pickingRay(vector:Vector3, camera:Camera):Raycaster;
public function projectScene(scene:Scene, camera:Camera, sortObjects:Bool, ?sortElements:Bool):{ public var objects : Array<Object3D>; public var sprites : Array<Object3D>; public var lights : Array<Light>; public var elements : Array<Face3>; };
}
@:native("THREE.Intersection") typedef Intersection = {
public var distance : Float;
public var point : Vector3;
public var face : Face3;
public var object : Object3D;
};
@:native("THREE.RaycasterParameters") typedef RaycasterParameters = {
@:optional
public var Sprite : Dynamic;
@:optional
public var Mesh : Dynamic;
@:optional
public var PointCloud : Dynamic;
@:optional
public var LOD : Dynamic;
@:optional
public var Line : Dynamic;
};
@:native("THREE.Raycaster") extern class Raycaster {
public function new(?origin:Vector3, ?direction:Vector3, ?near:Float, ?far:Float):Void;
public var ray : Ray;
public var near : Float;
public var far : Float;
public var params : RaycasterParameters;
public var precision : Float;
public var linePrecision : Float;
public function set(origin:Vector3, direction:Vector3):Void;
public function intersectObject(object:Object3D, ?recursive:Bool):Array<Intersection>;
public function intersectObjects(objects:Array<Object3D>, ?recursive:Bool):Array<Intersection>;
}
@:native("THREE.Light") extern class Light extends Object3D {
public function new(?hex:Float):Void;
public var color : Color;
}
@:native("THREE.AmbientLight") extern class AmbientLight extends Light {
public function new(?hex:Float):Void;
}
@:native("THREE.AreaLight") extern class AreaLight extends Light {
public function new(hex:Float, ?intensity:Float):Void;
public var normal : Vector3;
public var right : Vector3;
public var intensity : Float;
public var width : Float;
public var height : Float;
public var constantAttenuation : Float;
public var linearAttenuation : Float;
public var quadraticAttenuation : Float;
}
@:native("THREE.DirectionalLight") extern class DirectionalLight extends Light {
public function new(?hex:Float, ?intensity:Float):Void;
public var target : Object3D;
public var intensity : Float;
public var onlyShadow : Bool;
public var shadowCameraNear : Float;
public var shadowCameraFar : Float;
public var shadowCameraLeft : Float;
public var shadowCameraRight : Float;
public var shadowCameraTop : Float;
public var shadowCameraBottom : Float;
public var shadowCameraVisible : Bool;
public var shadowBias : Float;
public var shadowDarkness : Float;
public var shadowMapWidth : Float;
public var shadowMapHeight : Float;
public var shadowCascade : Bool;
public var shadowCascadeOffset : Vector3;
public var shadowCascadeCount : Float;
public var shadowCascadeBias : Array<Float>;
public var shadowCascadeWidth : Array<Float>;
public var shadowCascadeHeight : Array<Float>;
public var shadowCascadeNearZ : Array<Float>;
public var shadowCascadeFarZ : Array<Float>;
public var shadowCascadeArray : Array<DirectionalLight>;
public var shadowMap : RenderTarget;
public var shadowMapSize : Float;
public var shadowCamera : Camera;
public var shadowMatrix : Matrix4;
}
@:native("THREE.HemisphereLight") extern class HemisphereLight extends Light {
public function new(?skyColorHex:Float, ?groundColorHex:Float, ?intensity:Float):Void;
public var groundColor : Color;
public var intensity : Float;
}
@:native("THREE.PointLight") extern class PointLight extends Light {
public function new(?hex:Float, ?intensity:Float, ?distance:Float):Void;
public var intensity : Float;
public var distance : Float;
}
@:native("THREE.SpotLight") extern class SpotLight extends Light {
public function new(?hex:Float, ?intensity:Float, ?distance:Float, ?angle:Float, ?exponent:Float):Void;
public var target : Object3D;
public var intensity : Float;
public var distance : Float;
public var angle : Float;
public var exponent : Float;
public var onlyShadow : Bool;
public var shadowCameraNear : Float;
public var shadowCameraFar : Float;
public var shadowCameraFov : Float;
public var shadowCameraVisible : Bool;
public var shadowBias : Float;
public var shadowDarkness : Float;
public var shadowMapWidth : Float;
public var shadowMapHeight : Float;
public var shadowMap : RenderTarget;
public var shadowMapSize : Vector2;
public var shadowCamera : Camera;
public var shadowMatrix : Matrix4;
}
@:native("THREE.Progress") typedef Progress = {
public var total : Float;
public var loaded : Float;
};
@:native("THREE.Loader") extern class Loader {
public function new(?showStatus:Bool):Void;
public var showStatus : Bool;
public var statusDomElement : HTMLElement;
public var onLoadStart : Void -> Void;
public var onLoadProgress : Void -> Void;
public var onLoadComplete : Void -> Void;
public var crossOrigin : String;
public function addStatusElement():HTMLElement;
public function updateProgress(progress:Progress):Void;
public function extractUrlBase(url:String):String;
public function initMaterials(materials:Array<Material>, texturePath:String):Array<Material>;
public function needsTangents(materials:Array<Material>):Bool;
public function createMaterial(m:Material, texturePath:String):Bool;
public var Handlers : LoaderHandler;
}
@:native("THREE.LoaderHandler") typedef LoaderHandler = {
public var handlers : Array<Dynamic>;
public function add(regex:String, loader:Loader):Void;
public function get(file:String):Loader;
};
@:native("THREE.BufferGeometryLoader") extern class BufferGeometryLoader {
public function new(?manager:LoadingManager):Void;
public function load(url:String, onLoad:BufferGeometry -> Void, ?onProgress:Dynamic -> Void, ?onError:Dynamic -> Void):Void;
public function setCrossOrigin(crossOrigin:String):Void;
public function parse(json:Dynamic):BufferGeometry;
}
@:native("THREE.Cache") extern class Cache {
public function new():Void;
public var files : Array<Dynamic>;
public function add(key:String, file:Dynamic):Void;
public function get(key:String):Dynamic;
public function remove(key:String):Void;
public function clear():Void;
}
@:native("THREE.ImageLoader") extern class ImageLoader {
public function new(?manager:LoadingManager):Void;
public var crossOrigin : String;
public function load(url:String, ?onLoad:HTMLImageElement -> Void, ?onProgress:Dynamic -> Void, ?onError:Dynamic -> Void):HTMLImageElement;
public function setCrossOrigin(crossOrigin:String):Void;
}
@:native("THREE.JSONLoader") extern class JSONLoader extends Loader {
public function new(?showStatus:Bool):Void;
public var withCredentials : Bool;
public function load(url:String, callback:JSonLoaderResultGeometry -> Array<Material> -> Void, ?texturePath:String):Void;
public function loadAjaxJSON(context:JSONLoader, url:String, callback:Geometry -> Array<Material> -> Void, ?texturePath:String, ?callbackProgress:Progress -> Void):Void;
public function parse(json:Dynamic, ?texturePath:String):{ public var geometry : Geometry; @:optional
public var materials : Array<Material>; };
}
@:native("THREE.JSonLoaderResultGeometry") typedef JSonLoaderResultGeometry = {
>Geometry,
public var animation : AnimationData;
};
@:native("THREE.LoadingManager") extern class LoadingManager {
public function new(?onLoad:Void -> Void, ?onProgress:String -> Float -> Float -> Void, ?onError:Void -> Void):Void;
public var onLoad : Void -> Void;
public var onProgress : Dynamic -> Float -> Float -> Void;
public var onError : Void -> Void;
public function itemStart(url:String):Void;
public function itemEnd(url:String):Void;
}
@:native("THREE.MaterialLoader") extern class MaterialLoader {
public function new(?manager:LoadingManager):Void;
public function load(url:String, onLoad:Material -> Void):Void;
public function setCrossOrigin(crossOrigin:String):Void;
public function parse(json:Dynamic):Material;
}
@:native("THREE.ObjectLoader") extern class ObjectLoader {
public function new(?manager:LoadingManager):Void;
public function load(url:String, onLoad:Object3D -> Void):Void;
public function setCrossOrigin(crossOrigin:String):Void;
public function parse<T:(Object3D)>(json:Dynamic):T;
public function parseGeometries(json:Dynamic):Array<Dynamic>;
public function parseMaterials(json:Dynamic):Array<Material>;
public function parseObject<T:(Object3D)>(data:Dynamic, geometries:Array<Dynamic>, materials:Array<Material>):T;
}
@:native("THREE.TextureLoader") extern class TextureLoader {
public function new(?manager:LoadingManager):Void;
public var crossOrigin : String;
public function load(url:String, onLoad:Texture -> Void):Void;
public function setCrossOrigin(crossOrigin:String):Void;
}
@:native("THREE.XHRLoader") extern class XHRLoader {
public function new(?manager:LoadingManager):Void;
public var responseType : String;
public var crossOrigin : String;
public function load(url:String, ?onLoad:String -> Void, ?onProgress:Dynamic -> Void, ?onError:Dynamic -> Void):Void;
public function setResponseType(responseType:String):Void;
public function setCrossOrigin(crossOrigin:String):Void;
}
@:native("THREE.MaterialParameters") typedef MaterialParameters = {
@:optional
public var name : String;
@:optional
public var side : Side;
@:optional
public var opacity : Float;
@:optional
public var transparent : Bool;
@:optional
public var blending : Blending;
@:optional
public var blendSrc : BlendingDstFactor;
@:optional
public var blendDst : BlendingSrcFactor;
@:optional
public var blendEquation : BlendingEquation;
@:optional
public var depthTest : Bool;
@:optional
public var depthWrite : Bool;
@:optional
public var polygonOffset : Bool;
@:optional
public var polygonOffsetFactor : Float;
@:optional
public var polygonOffsetUnits : Float;
@:optional
public var alphaTest : Float;
@:optional
public var overdraw : Float;
@:optional
public var visible : Bool;
@:optional
public var needsUpdate : Bool;
};
@:native("THREE.Material") extern class Material {
public function new():Void;
public var id : Float;
public var uuid : String;
public var name : String;
public var side : Side;
public var opacity : Float;
public var transparent : Bool;
public var blending : Blending;
public var blendSrc : BlendingDstFactor;
public var blendDst : BlendingSrcFactor;
public var blendEquation : BlendingEquation;
public var depthTest : Bool;
public var depthWrite : Bool;
public var polygonOffset : Bool;
public var polygonOffsetFactor : Float;
public var polygonOffsetUnits : Float;
public var alphaTest : Float;
public var overdraw : Float;
public var visible : Bool;
public var needsUpdate : Bool;
public function setValues(values:Dynamic):Void;
public function clone(?material:Material):Material;
public function dispose():Void;
public function addEventListener(type:String, listener:Dynamic -> Void):Void;
public function hasEventListener(type:String, listener:Dynamic -> Void):Void;
public function removeEventListener(type:String, listener:Dynamic -> Void):Void;
public function dispatchEvent(event:{ public var type : String; public var target : Dynamic; }):Void;
}
@:native("THREE.LineBasicMaterialParameters") typedef LineBasicMaterialParameters = {
>MaterialParameters,
@:optional
public var color : Float;
@:optional
public var linewidth : Float;
@:optional
public var linecap : String;
@:optional
public var linejoin : String;
@:optional
public var vertexColors : Colors;
@:optional
public var fog : Bool;
};
@:native("THREE.LineBasicMaterial") extern class LineBasicMaterial extends Material {
public function new(?parameters:LineBasicMaterialParameters):Void;
public var color : Color;
public var linewidth : Float;
public var linecap : String;
public var linejoin : String;
public var vertexColors : Colors;
public var fog : Bool;
}
@:native("THREE.LineDashedMaterialParameters") typedef LineDashedMaterialParameters = {
>MaterialParameters,
@:optional
public var color : Float;
@:optional
public var linewidth : Float;
@:optional
public var scale : Float;
@:optional
public var dashSize : Float;
@:optional
public var gapSize : Float;
@:optional
public var vertexColors : Colors;
@:optional
public var fog : Bool;
};
@:native("THREE.LineDashedMaterial") extern class LineDashedMaterial extends Material {
public function new(?parameters:LineDashedMaterialParameters):Void;
public var color : Color;
public var linewidth : Float;
public var scale : Float;
public var dashSize : Float;
public var gapSize : Float;
public var vertexColors : Colors;
public var fog : Bool;
}
@:native("THREE.MeshBasicMaterialParameters") typedef MeshBasicMaterialParameters = {
>MaterialParameters,
@:optional
public var color : Float;
@:optional
public var map : Texture;
@:optional
public var lightMap : Texture;
@:optional
public var specularMap : Texture;
@:optional
public var alphaMap : Texture;
@:optional
public var envMap : Texture;
@:optional
public var combine : Combine;
@:optional
public var reflectivity : Float;
@:optional
public var refractionRatio : Float;
@:optional
public var fog : Bool;
@:optional
public var shading : Shading;
@:optional
public var wireframe : Bool;
@:optional
public var wireframeLinewidth : Float;
@:optional
public var wireframeLinecap : String;
@:optional
public var wireframeLinejoin : String;
@:optional
public var vertexColors : Colors;
@:optional
public var skinning : Bool;
@:optional
public var morphTargets : Bool;
};
@:native("THREE.MeshBasicMaterial") extern class MeshBasicMaterial extends Material {
public function new(?parameters:MeshBasicMaterialParameters):Void;
public var color : Color;
public var map : Texture;
public var lightMap : Texture;
public var specularMap : Texture;
public var alphaMap : Texture;
public var envMap : Texture;
public var combine : Combine;
public var reflectivity : Float;
public var refractionRatio : Float;
public var fog : Bool;
public var shading : Shading;
public var wireframe : Bool;
public var wireframeLinewidth : Float;
public var wireframeLinecap : String;
public var wireframeLinejoin : String;
public var vertexColors : Colors;
public var skinning : Bool;
public var morphTargets : Bool;
}
@:native("THREE.MeshDepthMaterialParameters") typedef MeshDepthMaterialParameters = {
>MaterialParameters,
@:optional
public var wireframe : Bool;
@:optional
public var wireframeLinewidth : Float;
};
@:native("THREE.MeshDepthMaterial") extern class MeshDepthMaterial extends Material {
public function new(?parameters:MeshDepthMaterialParameters):Void;
public var wireframe : Bool;
public var wireframeLinewidth : Float;
}
@:native("THREE.MeshFaceMaterial") extern class MeshFaceMaterial extends Material {
public function new(?materials:Array<Material>):Void;
public var materials : Array<Material>;
}
@:native("THREE.MeshLambertMaterialParameters") typedef MeshLambertMaterialParameters = {
>MaterialParameters,
@:optional
public var color : Float;
@:optional
public var ambient : Float;
@:optional
public var emissive : Float;
@:optional
public var wrapAround : Bool;
@:optional
public var wrapRGB : Vector3;
@:optional
public var map : Texture;
@:optional
public var lightMap : Texture;
@:optional
public var specularMap : Texture;
@:optional
public var alphaMap : Texture;
@:optional
public var envMap : Texture;
@:optional
public var combine : Combine;
@:optional
public var reflectivity : Float;
@:optional
public var refractionRatio : Float;
@:optional
public var fog : Bool;
@:optional
public var shading : Shading;
@:optional
public var wireframe : Bool;
@:optional
public var wireframeLinewidth : Float;
@:optional
public var wireframeLinecap : String;
@:optional
public var wireframeLinejoin : String;
@:optional
public var vertexColors : Colors;
@:optional
public var skinning : Bool;
@:optional
public var morphTargets : Bool;
@:optional
public var morphNormals : Bool;
};
@:native("THREE.MeshLambertMaterial") extern class MeshLambertMaterial extends Material {
public function new(?parameters:MeshLambertMaterialParameters):Void;
public var color : Color;
public var ambient : Color;
public var emissive : Color;
public var wrapAround : Bool;
public var wrapRGB : Vector3;
public var map : Texture;
public var lightMap : Texture;
public var specularMap : Texture;
public var alphaMap : Texture;
public var envMap : Texture;
public var combine : Combine;
public var reflectivity : Float;
public var refractionRatio : Float;
public var fog : Bool;
public var shading : Shading;
public var wireframe : Bool;
public var wireframeLinewidth : Float;
public var wireframeLinecap : String;
public var wireframeLinejoin : String;
public var vertexColors : Colors;
public var skinning : Bool;
public var morphTargets : Bool;
public var morphNormals : Bool;
}
@:native("THREE.MeshNormalMaterialParameters") typedef MeshNormalMaterialParameters = {
>MaterialParameters,
@:optional
public var shading : Shading;
@:optional
public var wireframe : Bool;
@:optional
public var wireframeLinewidth : Float;
@:optional
public var morphTargets : Bool;
};
@:native("THREE.MeshNormalMaterial") extern class MeshNormalMaterial extends Material {
public function new(?parameters:MeshNormalMaterialParameters):Void;
public var shading : Shading;
public var wireframe : Bool;
public var wireframeLinewidth : Float;
public var morphTargets : Bool;
}
@:native("THREE.MeshPhongMaterialParameters") typedef MeshPhongMaterialParameters = {
>MaterialParameters,
@:optional
public var color : Float;
@:optional
public var ambient : Float;
@:optional
public var emissive : Float;
@:optional
public var specular : Float;
@:optional
public var shininess : Float;
@:optional
public var metal : Bool;
@:optional
public var wrapAround : Bool;
@:optional
public var wrapRGB : Vector3;
@:optional
public var map : Texture;
@:optional
public var lightMap : Texture;
@:optional
public var bumpMap : Texture;
@:optional
public var bumpScale : Float;
@:optional
public var normalMap : Texture;
@:optional
public var normalScale : Vector2;
@:optional
public var specularMap : Texture;
@:optional
public var alphaMap : Texture;
@:optional
public var envMap : Texture;
@:optional
public var combine : Combine;
@:optional
public var reflectivity : Float;
@:optional
public var refractionRatio : Float;
@:optional
public var fog : Bool;
@:optional
public var shading : Shading;
@:optional
public var wireframe : Bool;
@:optional
public var wireframeLinewidth : Float;
@:optional
public var wireframeLinecap : String;
@:optional
public var wireframeLinejoin : String;
@:optional
public var vertexColors : Colors;
@:optional
public var skinning : Bool;
@:optional
public var morphTargets : Bool;
@:optional
public var morphNormals : Bool;
};
@:native("THREE.MeshPhongMaterial") extern class MeshPhongMaterial extends Material {
public function new(?parameters:MeshPhongMaterialParameters):Void;
public var color : Color;
public var ambient : Color;
public var emissive : Color;
public var specular : Color;
public var shininess : Float;
public var metal : Bool;
public var wrapAround : Bool;
public var wrapRGB : Vector3;
public var map : Texture;
public var lightMap : Texture;
public var bumpMap : Texture;
public var bumpScale : Float;
public var normalMap : Texture;
public var normalScale : Vector2;
public var specularMap : Texture;
public var alphaMap : Texture;
public var envMap : Texture;
public var combine : Combine;
public var reflectivity : Float;
public var refractionRatio : Float;
public var fog : Bool;
public var shading : Shading;
public var wireframe : Bool;
public var wireframeLinewidth : Float;
public var wireframeLinecap : String;
public var wireframeLinejoin : String;
public var vertexColors : Colors;
public var skinning : Bool;
public var morphTargets : Bool;
public var morphNormals : Bool;
}
@:native("THREE.PointCloudMaterialParameters") typedef PointCloudMaterialParameters = {
>MaterialParameters,
@:optional
public var color : Float;
@:optional
public var map : Texture;
@:optional
public var size : Float;
@:optional
public var sizeAttenuation : Bool;
@:optional
public var vertexColors : Colors;
@:optional
public var fog : Bool;
};
@:native("THREE.PointCloudMaterial") extern class PointCloudMaterial extends Material {
public function new(?parameters:PointCloudMaterialParameters):Void;
public var color : Color;
public var map : Texture;
public var size : Float;
public var sizeAttenuation : Bool;
public var vertexColors : Bool;
public var fog : Bool;
}
@:native("THREE.ParticleBasicMaterial") extern class ParticleBasicMaterial extends PointCloudMaterial {
}
@:native("THREE.ParticleSystemMaterial") extern class ParticleSystemMaterial extends PointCloudMaterial {
}
@:native("THREE.RawShaderMaterial") extern class RawShaderMaterial extends ShaderMaterial {
public function new(?parameters:ShaderMaterialParameters):Void;
}
@:native("THREE.ShaderMaterialParameters") typedef ShaderMaterialParameters = {
>MaterialParameters,
@:optional
public var defines : Dynamic;
@:optional
public var uniforms : Dynamic;
@:optional
public var attributes : Dynamic;
@:optional
public var vertexShader : String;
@:optional
public var fragmentShader : String;
@:optional
public var shading : Shading;
@:optional
public var linewidth : Float;
@:optional
public var wireframe : Bool;
@:optional
public var wireframeLinewidth : Float;
@:optional
public var fog : Bool;
@:optional
public var lights : Bool;
@:optional
public var vertexColors : Colors;
@:optional
public var skinning : Bool;
@:optional
public var morphTargets : Bool;
@:optional
public var morphNormals : Bool;
};
@:native("THREE.ShaderMaterial") extern class ShaderMaterial extends Material {
public function new(?parameters:ShaderMaterialParameters):Void;
public var defines : Dynamic;
public var uniforms : Dynamic;
public var attributes : Dynamic;
public var vertexShader : String;
public var fragmentShader : String;
public var shading : Shading;
public var linewidth : Float;
public var wireframe : Bool;
public var wireframeLinewidth : Float;
public var fog : Bool;
public var lights : Bool;
public var vertexColors : Colors;
public var skinning : Bool;
public var morphTargets : Bool;
public var morphNormals : Bool;
}
@:native("THREE.SpriteCanvasMaterialParameters") typedef SpriteCanvasMaterialParameters = {
>MaterialParameters,
@:optional
public var color : Float;
};
@:native("THREE.SpriteCanvasMaterial") extern class SpriteCanvasMaterial extends Material {
public function new(?parameters:SpriteCanvasMaterialParameters):Void;
public var color : Color;
public function program(context:Dynamic, color:Color):Void;
}
@:native("THREE.SpriteMaterialParameters") typedef SpriteMaterialParameters = {
>MaterialParameters,
@:optional
public var color : Float;
@:optional
public var map : Texture;
@:optional
public var rotation : Float;
@:optional
public var fog : Bool;
};
@:native("THREE.SpriteMaterial") extern class SpriteMaterial extends Material {
public function new(?parameters:SpriteMaterialParameters):Void;
public var color : Color;
public var map : Texture;
public var rotation : Float;
public var fog : Bool;
}
@:native("THREE.Box2") extern class Box2 {
public function new(?min:Vector2, ?max:Vector2):Void;
public var max : Vector2;
public var min : Vector2;
public function set(min:Vector2, max:Vector2):Box2;
public function setFromPoints(points:Array<Vector2>):Box2;
public function setFromCenterAndSize(center:Vector2, size:Vector2):Box2;
public function copy(box:Box2):Box2;
public function makeEmpty():Box2;
public function empty():Bool;
public function center(?optionalTarget:Vector2):Vector2;
public function size(?optionalTarget:Vector2):Vector2;
public function expandByPoint(point:Vector2):Box2;
public function expandByVector(vector:Vector2):Box2;
public function expandByScalar(scalar:Float):Box2;
public function containsPoint(point:Vector2):Bool;
public function containsBox(box:Box2):Bool;
public function getParameter(point:Vector2):Vector2;
public function isIntersectionBox(box:Box2):Bool;
public function clampPoint(point:Vector2, ?optionalTarget:Vector2):Vector2;
public function distanceToPoint(point:Vector2):Float;
public function intersect(box:Box2):Box2;
public function union(box:Box2):Box2;
public function translate(offset:Vector2):Box2;
public function equals(box:Box2):Bool;
public function clone():Box2;
}
@:native("THREE.Box3") extern class Box3 {
public function new(?min:Vector3, ?max:Vector3):Void;
public var max : Vector3;
public var min : Vector3;
public function set(min:Vector3, max:Vector3):Box3;
public function setFromPoints(points:Array<Vector3>):Box3;
public function setFromCenterAndSize(center:Vector3, size:Vector3):Box3;
public function setFromObject(object:Object3D):Box3;
public function copy(box:Box3):Box3;
public function makeEmpty():Box3;
public function empty():Bool;
public function center(?optionalTarget:Vector3):Vector3;
public function size(?optionalTarget:Vector3):Vector3;
public function expandByPoint(point:Vector3):Box3;
public function expandByVector(vector:Vector3):Box3;
public function expandByScalar(scalar:Float):Box3;
public function containsPoint(point:Vector3):Bool;
public function containsBox(box:Box3):Bool;
public function getParameter(point:Vector3):Vector3;
public function isIntersectionBox(box:Box3):Bool;
public function clampPoint(point:Vector3, ?optionalTarget:Vector3):Vector3;
public function distanceToPoint(point:Vector3):Float;
public function getBoundingSphere(?optionalTarget:Sphere):Sphere;
public function intersect(box:Box3):Box3;
public function union(box:Box3):Box3;
public function applyMatrix4(matrix:Matrix4):Box3;
public function translate(offset:Vector3):Box3;
public function equals(box:Box3):Bool;
public function clone():Box3;
}
@:native("THREE.HSL") typedef HSL = {
public var h : Float;
public var s : Float;
public var l : Float;
};
@:native("THREE.Color") extern class Color {
@:overload(function(?color:String):Dynamic { })
@:overload(function(?color:Float):Dynamic { })
@:overload(function(r:Float, g:Float, b:Float):Dynamic { })
public function new(?color:Color):Void;
public var r : Float;
public var g : Float;
public var b : Float;
@:overload(function(color:Float):Color { })
@:overload(function(color:String):Color { })
public function set(color:Color):Color;
public function setHex(hex:Float):Color;
public function setRGB(r:Float, g:Float, b:Float):Color;
public function setHSL(h:Float, s:Float, l:Float):Color;
public function setStyle(style:String):Color;
public function copy(color:Color):Color;
public function copyGammaToLinear(color:Color):Color;
public function copyLinearToGamma(color:Color):Color;
public function convertGammaToLinear():Color;
public function convertLinearToGamma():Color;
public function getHex():Float;
public function getHexString():String;
public function getHSL():HSL;
public function getStyle():String;
public function offsetHSL(h:Float, s:Float, l:Float):Color;
public function add(color:Color):Color;
public function addColors(color1:Color, color2:Color):Color;
public function addScalar(s:Float):Color;
public function multiply(color:Color):Color;
public function multiplyScalar(s:Float):Color;
public function lerp(color:Color, alpha:Float):Color;
public function equals(color:Color):Bool;
public function fromArray(rgb:Array<Float>):Color;
public function toArray():Array<Float>;
public function clone():Color;
}
@:native("THREE.ColorKeywords") extern class ColorKeywords {
public var aliceblue : Float;
public var antiquewhite : Float;
public var aqua : Float;
public var aquamarine : Float;
public var azure : Float;
public var beige : Float;
public var bisque : Float;
public var black : Float;
public var blanchedalmond : Float;
public var blue : Float;
public var blueviolet : Float;
public var brown : Float;
public var burlywood : Float;
public var cadetblue : Float;
public var chartreuse : Float;
public var chocolate : Float;
public var coral : Float;
public var cornflowerblue : Float;
public var cornsilk : Float;
public var crimson : Float;
public var cyan : Float;
public var darkblue : Float;
public var darkcyan : Float;
public var darkgoldenrod : Float;
public var darkgray : Float;
public var darkgreen : Float;
public var darkgrey : Float;
public var darkkhaki : Float;
public var darkmagenta : Float;
public var darkolivegreen : Float;
public var darkorange : Float;
public var darkorchid : Float;
public var darkred : Float;
public var darksalmon : Float;
public var darkseagreen : Float;
public var darkslateblue : Float;
public var darkslategray : Float;
public var darkslategrey : Float;
public var darkturquoise : Float;
public var darkviolet : Float;
public var deeppink : Float;
public var deepskyblue : Float;
public var dimgray : Float;
public var dimgrey : Float;
public var dodgerblue : Float;
public var firebrick : Float;
public var floralwhite : Float;
public var forestgreen : Float;
public var fuchsia : Float;
public var gainsboro : Float;
public var ghostwhite : Float;
public var gold : Float;
public var goldenrod : Float;
public var gray : Float;
public var green : Float;
public var greenyellow : Float;
public var grey : Float;
public var honeydew : Float;
public var hotpink : Float;
public var indianred : Float;
public var indigo : Float;
public var ivory : Float;
public var khaki : Float;
public var lavender : Float;
public var lavenderblush : Float;
public var lawngreen : Float;
public var lemonchiffon : Float;
public var lightblue : Float;
public var lightcoral : Float;
public var lightcyan : Float;
public var lightgoldenrodyellow : Float;
public var lightgray : Float;
public var lightgreen : Float;
public var lightgrey : Float;
public var lightpink : Float;
public var lightsalmon : Float;
public var lightseagreen : Float;
public var lightskyblue : Float;
public var lightslategray : Float;
public var lightslategrey : Float;
public var lightsteelblue : Float;
public var lightyellow : Float;
public var lime : Float;
public var limegreen : Float;
public var linen : Float;
public var magenta : Float;
public var maroon : Float;
public var mediumaquamarine : Float;
public var mediumblue : Float;
public var mediumorchid : Float;
public var mediumpurple : Float;
public var mediumseagreen : Float;
public var mediumslateblue : Float;
public var mediumspringgreen : Float;
public var mediumturquoise : Float;
public var mediumvioletred : Float;
public var midnightblue : Float;
public var mintcream : Float;
public var mistyrose : Float;
public var moccasin : Float;
public var navajowhite : Float;
public var navy : Float;
public var oldlace : Float;
public var olive : Float;
public var olivedrab : Float;
public var orange : Float;
public var orangered : Float;
public var orchid : Float;
public var palegoldenrod : Float;
public var palegreen : Float;
public var paleturquoise : Float;
public var palevioletred : Float;
public var papayawhip : Float;
public var peachpuff : Float;
public var peru : Float;
public var pink : Float;
public var plum : Float;
public var powderblue : Float;
public var purple : Float;
public var red : Float;
public var rosybrown : Float;
public var royalblue : Float;
public var saddlebrown : Float;
public var salmon : Float;
public var sandybrown : Float;
public var seagreen : Float;
public var seashell : Float;
public var sienna : Float;
public var silver : Float;
public var skyblue : Float;
public var slateblue : Float;
public var slategray : Float;
public var slategrey : Float;
public var snow : Float;
public var springgreen : Float;
public var steelblue : Float;
public var tan : Float;
public var teal : Float;
public var thistle : Float;
public var tomato : Float;
public var turquoise : Float;
public var violet : Float;
public var wheat : Float;
public var white : Float;
public var whitesmoke : Float;
public var yellow : Float;
public var yellowgreen : Float;
}
@:native("THREE.Euler") extern class Euler {
public function new(?x:Float, ?y:Float, ?z:Float, ?order:String):Void;
public var x : Float;
public var y : Float;
public var z : Float;
public var order : String;
public function set(x:Float, y:Float, z:Float, ?order:String):Euler;
public function copy(euler:Euler):Euler;
public function setFromRotationMatrix(m:Matrix4, ?order:String):Euler;
public function setFromQuaternion(q:Quaternion, ?order:String, ?update:Bool):Euler;
public function reorder(newOrder:String):Euler;
public function equals(euler:Euler):Bool;
public function fromArray(xyzo:Array<Dynamic>):Euler;
public function toArray():Array<Dynamic>;
public var onChange : Void -> Void;
public function clone():Euler;
}
@:native("THREE.Frustum") extern class Frustum {
public function new(?p0:Plane, ?p1:Plane, ?p2:Plane, ?p3:Plane, ?p4:Plane, ?p5:Plane):Void;
public var planes : Array<Plane>;
public function set(?p0:Float, ?p1:Float, ?p2:Float, ?p3:Float, ?p4:Float, ?p5:Float):Frustum;
public function copy(frustum:Frustum):Frustum;
public function setFromMatrix(m:Matrix4):Frustum;
public function intersectsObject(object:Object3D):Bool;
public function intersectsSphere(sphere:Sphere):Bool;
public function intersectsBox(box:Box3):Bool;
public function containsPoint(point:Vector3):Bool;
public function clone():Frustum;
}
@:native("THREE.Line3") extern class Line3 {
public function new(?start:Vector3, ?end:Vector3):Void;
public var start : Vector3;
public var end : Vector3;
public function set(?start:Vector3, ?end:Vector3):Line3;
public function copy(line:Line3):Line3;
public function center(?optionalTarget:Vector3):Vector3;
public function delta(?optionalTarget:Vector3):Vector3;
public function distanceSq():Float;
public function distance():Float;
public function at(t:Float, ?optionalTarget:Vector3):Vector3;
public function closestPointToPointParameter(point:Vector3, ?clampToLine:Bool):Float;
public function closestPointToPoint(point:Vector3, ?clampToLine:Bool, ?optionalTarget:Vector3):Vector3;
public function applyMatrix4(matrix:Matrix4):Line3;
public function equals(line:Line3):Bool;
public function clone():Line3;
}
@:native("THREE.Math") typedef THREEMath = {
public function generateUUID():String;
public function clamp(x:Float, a:Float, b:Float):Float;
public function clampBottom(x:Float, a:Float):Float;
public function mapLinear(x:Float, a1:Float, a2:Float, b1:Float, b2:Float):Float;
public function smoothstep(x:Float, min:Float, max:Float):Float;
public function smootherstep(x:Float, min:Float, max:Float):Float;
public function random16():Float;
public function randInt(low:Float, high:Float):Float;
public function randFloat(low:Float, high:Float):Float;
public function randFloatSpread(range:Float):Float;
public function sign(x:Float):Float;
public function degToRad(degrees:Float):Float;
public function radToDeg(radians:Float):Float;
public function isPowerOfTwo(value:Float):Bool;
};
@:native("THREE.Matrix") typedef Matrix = {
public var elements : Float32Array;
public function identity():Matrix;
public function copy(m:Matrix):Matrix;
public function multiplyScalar(s:Float):Matrix;
public function determinant():Float;
public function getInverse(matrix:Matrix, ?throwOnInvertible:Bool):Matrix;
public function transpose():Matrix;
public function clone():Matrix;
};
@:native("THREE.Matrix3") extern class Matrix3 {
@:overload(function(n11:Float, n12:Float, n13:Float, n21:Float, n22:Float, n23:Float, n31:Float, n32:Float, n33:Float):Dynamic { })
public function new():Void;
public var elements : Float32Array;
public function set(n11:Float, n12:Float, n13:Float, n21:Float, n22:Float, n23:Float, n31:Float, n32:Float, n33:Float):Matrix3;
public function identity():Matrix3;
public function copy(m:Matrix3):Matrix3;
public function applyToVector3Array(array:Array<Float>, ?offset:Float, ?length:Float):Array<Float>;
public function multiplyScalar(s:Float):Matrix3;
public function determinant():Float;
@:overload(function(matrix:Matrix4, ?throwOnInvertible:Bool):Matrix3 { })
public function getInverse(matrix:Matrix3, ?throwOnInvertible:Bool):Matrix3;
public function transpose():Matrix3;
public function flattenToArrayOffset(array:Array<Float>, offset:Float):Array<Float>;
public function getNormalMatrix(m:Matrix4):Matrix3;
public function transposeIntoArray(r:Array<Float>):Array<Float>;
public function fromArray(array:Array<Float>):Matrix3;
public function toArray():Array<Float>;
public function clone():Matrix3;
}
@:native("THREE.Matrix4") extern class Matrix4 {
public function new(?n11:Float, ?n12:Float, ?n13:Float, ?n14:Float, ?n21:Float, ?n22:Float, ?n23:Float, ?n24:Float, ?n31:Float, ?n32:Float, ?n33:Float, ?n34:Float, ?n41:Float, ?n42:Float, ?n43:Float, ?n44:Float):Void;
public var elements : Float32Array;
public function set(n11:Float, n12:Float, n13:Float, n14:Float, n21:Float, n22:Float, n23:Float, n24:Float, n31:Float, n32:Float, n33:Float, n34:Float, n41:Float, n42:Float, n43:Float, n44:Float):Matrix4;
public function identity():Matrix4;
public function copy(m:Matrix4):Matrix4;
public function copyPosition(m:Matrix4):Matrix4;
public function extractRotation(m:Matrix4):Matrix4;
public function makeRotationFromEuler(euler:Euler):Matrix4;
public function makeRotationFromQuaternion(q:Quaternion):Matrix4;
public function lookAt(eye:Vector3, target:Vector3, up:Vector3):Matrix4;
public function multiply(m:Matrix4):Matrix4;
public function multiplyMatrices(a:Matrix4, b:Matrix4):Matrix4;
public function multiplyToArray(a:Matrix4, b:Matrix4, r:Array<Float>):Matrix4;
public function multiplyScalar(s:Float):Matrix4;
public function applyToVector3Array(array:Array<Float>, ?offset:Float, ?length:Float):Array<Float>;
public function determinant():Float;
public function transpose():Matrix4;
public function flattenToArrayOffset(array:Array<Float>, offset:Float):Array<Float>;
public function setPosition(v:Vector3):Vector3;
public function getInverse(m:Matrix4, ?throwOnInvertible:Bool):Matrix4;
public function scale(v:Vector3):Matrix4;
public function getMaxScaleOnAxis():Float;
public function makeTranslation(x:Float, y:Float, z:Float):Matrix4;
public function makeRotationX(theta:Float):Matrix4;
public function makeRotationY(theta:Float):Matrix4;
public function makeRotationZ(theta:Float):Matrix4;
public function makeRotationAxis(axis:Vector3, angle:Float):Matrix4;
public function makeScale(x:Float, y:Float, z:Float):Matrix4;
public function compose(translation:Vector3, rotation:Quaternion, scale:Vector3):Matrix4;
public function decompose(?translation:Vector3, ?rotation:Quaternion, ?scale:Vector3):Array<Dynamic>;
public function makeFrustum(left:Float, right:Float, bottom:Float, top:Float, near:Float, far:Float):Matrix4;
public function makePerspective(fov:Float, aspect:Float, near:Float, far:Float):Matrix4;
public function makeOrthographic(left:Float, right:Float, top:Float, bottom:Float, near:Float, far:Float):Matrix4;
public function fromArray(array:Array<Float>):Matrix4;
public function toArray():Array<Float>;
public function clone():Matrix4;
}
@:native("THREE.Plane") extern class Plane {
public function new(?normal:Vector3, ?constant:Float):Void;
public var normal : Vector3;
public var constant : Float;
public function set(normal:Vector3, constant:Float):Plane;
public function setComponents(x:Float, y:Float, z:Float, w:Float):Plane;
public function setFromNormalAndCoplanarPoint(normal:Vector3, point:Vector3):Plane;
public function setFromCoplanarPoints(a:Vector3, b:Vector3, c:Vector3):Plane;
public function copy(plane:Plane):Plane;
public function normalize():Plane;
public function negate():Plane;
public function distanceToPoint(point:Vector3):Float;
public function distanceToSphere(sphere:Sphere):Float;
public function projectPoint(point:Vector3, ?optionalTarget:Vector3):Vector3;
public function orthoPoint(point:Vector3, ?optionalTarget:Vector3):Vector3;
public function isIntersectionLine(line:Line3):Bool;
public function intersectLine(line:Line3, ?optionalTarget:Vector3):Vector3;
public function coplanarPoint(?optionalTarget:Bool):Vector3;
public function applyMatrix4(matrix:Matrix4, ?optionalNormalMatrix:Matrix3):Plane;
public function translate(offset:Vector3):Plane;
public function equals(plane:Plane):Bool;
public function clone():Plane;
}
@:native("THREE.Quaternion") extern class Quaternion {
public function new(?x:Float, ?y:Float, ?z:Float, ?w:Float):Void;
public var x : Float;
public var y : Float;
public var z : Float;
public var w : Float;
public function set(x:Float, y:Float, z:Float, w:Float):Quaternion;
public function copy(q:Quaternion):Quaternion;
public function setFromEuler(euler:Euler, ?update:Bool):Quaternion;
public function setFromAxisAngle(axis:Vector3, angle:Float):Quaternion;
public function setFromRotationMatrix(m:Matrix4):Quaternion;
public function setFromUnitVectors(vFrom:Vector3, vTo:Vector4):Quaternion;
public function inverse():Quaternion;
public function conjugate():Quaternion;
public function dot(v:Vector3):Float;
public function lengthSq():Float;
public function length():Float;
public function normalize():Quaternion;
public function multiply(q:Quaternion):Quaternion;
public function multiplyQuaternions(a:Quaternion, b:Quaternion):Quaternion;
public function multiplyVector3(vector:Vector3):Vector3;
@:overload(function(qa:Quaternion, qb:Quaternion, qm:Quaternion, t:Float):Quaternion { })
public function slerp(qb:Quaternion, t:Float):Quaternion;
public function equals(v:Quaternion):Bool;
public function fromArray(n:Array<Float>):Quaternion;
public function toArray():Array<Float>;
public var onChange : Void -> Void;
public function clone():Quaternion;
}
@:native("THREE.Ray") extern class Ray {
public function new(?origin:Vector3, ?direction:Vector3):Void;
public var origin : Vector3;
public var direction : Vector3;
public function set(origin:Vector3, direction:Vector3):Ray;
public function copy(ray:Ray):Ray;
public function at(t:Float, ?optionalTarget:Vector3):Vector3;
public function recast(t:Float):Ray;
public function closestPointToPoint(point:Vector3, ?optionalTarget:Vector3):Vector3;
public function distanceToPoint(point:Vector3):Float;
public function distanceSqToSegment(v0:Vector3, v1:Vector3, ?optionalPointOnRay:Vector3, ?optionalPointOnSegment:Vector3):Float;
public function isIntersectionSphere(sphere:Sphere):Bool;
public function intersectSphere(sphere:Sphere, ?optionalTarget:Vector3):Vector3;
public function isIntersectionPlane(plane:Plane):Bool;
public function distanceToPlane(plane:Plane):Float;
public function intersectPlane(plane:Plane, ?optionalTarget:Vector3):Vector3;
public function isIntersectionBox(box:Box3):Bool;
public function intersectBox(box:Box3, ?optionalTarget:Vector3):Vector3;
public function intersectTriangle(a:Vector3, b:Vector3, c:Vector3, backfaceCulling:Bool, ?optionalTarget:Vector3):Vector3;
public function applyMatrix4(matrix4:Matrix4):Ray;
public function equals(ray:Ray):Bool;
public function clone():Ray;
}
@:native("THREE.Sphere") extern class Sphere {
public function new(?center:Vector3, ?radius:Float):Void;
public var center : Vector3;
public var radius : Float;
public function set(center:Vector3, radius:Float):Sphere;
public function setFromPoints(points:Array<Vector3>, ?optionalCenter:Vector3):Sphere;
public function copy(sphere:Sphere):Sphere;
public function empty():Bool;
public function containsPoint(point:Vector3):Bool;
public function distanceToPoint(point:Vector3):Float;
public function intersectsSphere(sphere:Sphere):Bool;
public function clampPoint(point:Vector3, ?optionalTarget:Vector3):Vector3;
public function getBoundingBox(?optionalTarget:Box3):Box3;
public function applyMatrix4(matrix:Matrix4):Sphere;
public function translate(offset:Vector3):Sphere;
public function equals(sphere:Sphere):Bool;
public function clone():Sphere;
}
@:native("THREE.SplineControlPoint") typedef SplineControlPoint = {
public var x : Float;
public var y : Float;
public var z : Float;
};
@:native("THREE.Spline") extern class Spline {
public function new(points:Array<SplineControlPoint>):Void;
public var points : Array<SplineControlPoint>;
public function initFromArray(a:Array<Array<Float>>):Void;
public function getPoint(k:Float):SplineControlPoint;
public function getControlPointsArray():Array<Array<Float>>;
public function getLength(?nSubDivisions:Float):{ public var chunks : Array<Float>; public var total : Float; };
public function reparametrizeByArcLength(samplingCoef:Float):Void;
}
@:native("THREE.Triangle") extern class Triangle {
public function new(?a:Vector3, ?b:Vector3, ?c:Vector3):Void;
public var a : Vector3;
public var b : Vector3;
public var c : Vector3;
public function set(a:Vector3, b:Vector3, c:Vector3):Triangle;
public function setFromPointsAndIndices(points:Array<Vector3>, i0:Float, i1:Float, i2:Float):Triangle;
public function copy(triangle:Triangle):Triangle;
public function area():Float;
public function midpoint(?optionalTarget:Vector3):Vector3;
@:overload(function(a:Vector3, b:Vector3, c:Vector3, ?optionalTarget:Vector3):Vector3 { })
public function normal(?optionalTarget:Vector3):Vector3;
public function plane(?optionalTarget:Vector3):Plane;
@:overload(function(point:Vector3, a:Vector3, b:Vector3, c:Vector3, optionalTarget:Vector3):Vector3 { })
public function barycoordFromPoint(point:Vector3, ?optionalTarget:Vector3):Vector3;
@:overload(function(point:Vector3, a:Vector3, b:Vector3, c:Vector3):Bool { })
public function containsPoint(point:Vector3):Bool;
public function equals(triangle:Triangle):Bool;
public function clone():Triangle;
}
@:native("THREE.Vector") typedef Vector = {
public function setComponent(index:Float, value:Float):Void;
public function getComponent(index:Float):Float;
public function copy(v:Vector):Vector;
public function add(v:Vector):Vector;
public function addVectors(a:Vector, b:Vector):Vector;
public function sub(v:Vector):Vector;
public function subVectors(a:Vector, b:Vector):Vector;
public function multiplyScalar(s:Float):Vector;
public function divideScalar(s:Float):Vector;
public function negate():Vector;
public function dot(v:Vector):Float;
public function lengthSq():Float;
public function length():Float;
public function normalize():Vector;
@:optional
public function distanceTo(v:Vector):Float;
@:optional
public function distanceToSquared(v:Vector):Float;
public function setLength(l:Float):Vector;
public function lerp(v:Vector, alpha:Float):Vector;
public function equals(v:Vector):Bool;
public function clone():Vector;
};
@:native("THREE.Vector2") extern class Vector2 {
public function new(?x:Float, ?y:Float):Void;
public var x : Float;
public var y : Float;
public function set(x:Float, y:Float):Vector2;
public function setX(x:Float):Vector2;
public function setY(y:Float):Vector2;
public function setComponent(index:Float, value:Float):Void;
public function getComponent(index:Float):Float;
public function copy(v:Vector2):Vector2;
public function add(v:Vector2):Vector2;
public function addVectors(a:Vector2, b:Vector2):Vector2;
public function addScalar(s:Float):Vector2;
public function sub(v:Vector2):Vector2;
public function subVectors(a:Vector2, b:Vector2):Vector2;
public function multiply(v:Vector2):Vector2;
public function multiplyScalar(s:Float):Vector2;
public function divide(v:Vector2):Vector2;
public function divideScalar(s:Float):Vector2;
public function min(v:Vector2):Vector2;
public function max(v:Vector2):Vector2;
public function clamp(min:Vector2, max:Vector2):Vector2;
public function clampScalar(min:Float, max:Float):Vector2;
public function floor():Vector2;
public function ceil():Vector2;
public function round():Vector2;
public function roundToZero():Vector2;
public function negate():Vector2;
public function dot(v:Vector2):Float;
public function lengthSq():Float;
public function length():Float;
public function normalize():Vector2;
public function distanceTo(v:Vector2):Float;
public function distanceToSquared(v:Vector2):Float;
public function setLength(l:Float):Vector2;
public function lerp(v:Vector2, alpha:Float):Vector2;
public function equals(v:Vector2):Bool;
public function fromArray(xy:Array<Float>):Vector2;
public function toArray():Array<Float>;
public function clone():Vector2;
}
@:native("THREE.Vector3") extern class Vector3 {
public function new(?x:Float, ?y:Float, ?z:Float):Void;
public var x : Float;
public var y : Float;
public var z : Float;
public function set(x:Float, y:Float, z:Float):Vector3;
public function setX(x:Float):Vector3;
public function setY(y:Float):Vector3;
public function setZ(z:Float):Vector3;
public function setComponent(index:Float, value:Float):Void;
public function getComponent(index:Float):Float;
public function copy(v:Vector3):Vector3;
public function add(a:Dynamic):Vector3;
public function addScalar(s:Float):Vector3;
public function addVectors(a:Vector3, b:Vector3):Vector3;
public function sub(a:Vector3):Vector3;
public function subVectors(a:Vector3, b:Vector3):Vector3;
public function multiply(v:Vector3):Vector3;
public function multiplyScalar(s:Float):Vector3;
public function multiplyVectors(a:Vector3, b:Vector3):Vector3;
public function applyEuler(euler:Euler):Vector3;
public function applyAxisAngle(axis:Vector3, angle:Float):Vector3;
public function applyMatrix3(m:Matrix3):Vector3;
public function applyMatrix4(m:Matrix4):Vector3;
public function applyProjection(m:Matrix4):Vector3;
public function applyQuaternion(q:Quaternion):Vector3;
public function transformDirection(m:Matrix4):Vector3;
public function divide(v:Vector3):Vector3;
public function divideScalar(s:Float):Vector3;
public function min(v:Vector3):Vector3;
public function max(v:Vector3):Vector3;
public function clamp(min:Vector3, max:Vector3):Vector3;
public function clampScalar(min:Float, max:Float):Vector3;
public function floor():Vector3;
public function ceil():Vector3;
public function round():Vector3;
public function roundToZero():Vector3;
public function negate():Vector3;
public function dot(v:Vector3):Float;
public function lengthSq():Float;
public function length():Float;
public function lengthManhattan():Float;
public function normalize():Vector3;
public function setLength(l:Float):Vector3;
public function lerp(v:Vector3, alpha:Float):Vector3;
public function cross(a:Vector3):Vector3;
public function crossVectors(a:Vector3, b:Vector3):Vector3;
public function projectOnVector(v:Vector3):Vector3;
public function projectOnPlane(planeNormal:Vector3):Vector3;
public function reflect(vector:Vector3):Vector3;
public function angleTo(v:Vector3):Float;
public function distanceTo(v:Vector3):Float;
public function distanceToSquared(v:Vector3):Float;
public function setFromMatrixPosition(m:Matrix4):Vector3;
public function setFromMatrixScale(m:Matrix4):Vector3;
public function setFromMatrixColumn(index:Float, matrix:Matrix4):Vector3;
public function equals(v:Vector3):Bool;
public function fromArray(xyz:Array<Float>):Vector3;
public function toArray():Array<Float>;
public function clone():Vector3;
}
@:native("THREE.Vector4") extern class Vector4 {
public function new(?x:Float, ?y:Float, ?z:Float, ?w:Float):Void;
public var x : Float;
public var y : Float;
public var z : Float;
public var w : Float;
public function set(x:Float, y:Float, z:Float, w:Float):Vector4;
public function setX(x:Float):Vector4;
public function setY(y:Float):Vector4;
public function setZ(z:Float):Vector4;
public function setW(w:Float):Vector4;
public function setComponent(index:Float, value:Float):Void;
public function getComponent(index:Float):Float;
public function copy(v:Vector4):Vector4;
public function add(v:Vector4):Vector4;
public function addScalar(s:Float):Vector4;
public function addVectors(a:Vector4, b:Vector4):Vector4;
public function sub(v:Vector4):Vector4;
public function subVectors(a:Vector4, b:Vector4):Vector4;
public function multiplyScalar(s:Float):Vector4;
public function applyMatrix4(m:Matrix4):Vector4;
public function divideScalar(s:Float):Vector4;
public function setAxisAngleFromQuaternion(q:Quaternion):Vector4;
public function setAxisAngleFromRotationMatrix(m:Matrix3):Vector4;
public function min(v:Vector4):Vector4;
public function max(v:Vector4):Vector4;
public function clamp(min:Vector4, max:Vector4):Vector4;
public function clampScalar(min:Float, max:Float):Vector4;
public function floor():Vector4;
public function ceil():Vector4;
public function round():Vector4;
public function roundToZero():Vector4;
public function negate():Vector4;
public function dot(v:Vector4):Float;
public function lengthSq():Float;
public function length():Float;
public function lengthManhattan():Float;
public function normalize():Vector4;
public function setLength(l:Float):Vector4;
public function lerp(v:Vector4, alpha:Float):Vector4;
public function equals(v:Vector4):Bool;
public function fromArray(xyzw:Array<Float>):Array<Float>;
public function toArray():Array<Float>;
public function clone():Vector4;
}
@:native("THREE.Bone") extern class Bone extends Object3D {
public function new(belongsToSkin:SkinnedMesh):Void;
public var skin : SkinnedMesh;
public var accumulatedRotWeight : Float;
public var accumulatedPosWeight : Float;
public var accumulatedSclWeight : Float;
}
@:native("THREE.Line") extern class Line extends Object3D {
@:overload(function(?geometry:Geometry, ?material:LineBasicMaterial, ?type:Float):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:ShaderMaterial, ?type:Float):Dynamic { })
@:overload(function(?geometry:BufferGeometry, ?material:LineDashedMaterial, ?type:Float):Dynamic { })
@:overload(function(?geometry:BufferGeometry, ?material:LineBasicMaterial, ?type:Float):Dynamic { })
@:overload(function(?geometry:BufferGeometry, ?material:ShaderMaterial, ?type:Float):Dynamic { })
public function new(?geometry:Geometry, ?material:LineDashedMaterial, ?type:Float):Void;
public var geometry : Geometry;
public var material : LineBasicMaterial;
public var type : LineType;
}
@:enum @:native("THREE.LineType") abstract LineType(Int) {
}
@:native("THREE.LOD") extern class LOD extends Object3D {
public function new():Void;
public var objects : Array<Dynamic>;
public function addLevel(object:Object3D, ?distance:Float):Void;
public function getObjectForDistance(distance:Float):Object3D;
public function update(camera:Camera):Void;
}
@:native("THREE.Mesh") extern class Mesh extends Object3D {
@:overload(function(?geometry:BufferGeometry, ?material:Material):Dynamic { })
public function new(?geometry:Geometry, ?material:Material):Void;
public var geometry : Geometry;
public var material : Material;
public function updateMorphTargets():Void;
public function getMorphTargetIndexByName(name:String):Float;
}
@:native("THREE.MorphAnimMesh") extern class MorphAnimMesh extends Mesh {
@:overload(function(?geometry:Geometry, ?material:MeshDepthMaterial):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:MeshFaceMaterial):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:MeshLambertMaterial):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:MeshNormalMaterial):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:MeshPhongMaterial):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:ShaderMaterial):Dynamic { })
public function new(?geometry:Geometry, ?material:MeshBasicMaterial):Void;
public var duration : Float;
public var mirroredLoop : Bool;
public var time : Float;
public var lastKeyframe : Float;
public var currentKeyframe : Float;
public var direction : Float;
public var directionBackwards : Bool;
public var startKeyframe : Float;
public var endKeyframe : Float;
public var length : Float;
public function setFrameRange(start:Float, end:Float):Void;
public function setDirectionForward():Void;
public function setDirectionBackward():Void;
public function parseAnimations():Void;
public function setAnimationLabel(label:String, start:Float, end:Float):Void;
public function playAnimation(label:String, fps:Float):Void;
public function updateAnimation(delta:Float):Void;
public function interpolateTargets(a:Float, b:Float, t:Float):Void;
}
@:native("THREE.PointCloud") extern class PointCloud extends Object3D {
@:overload(function(geometry:Geometry, ?material:ShaderMaterial):Dynamic { })
@:overload(function(geometry:BufferGeometry, ?material:PointCloudMaterial):Dynamic { })
@:overload(function(geometry:BufferGeometry, ?material:ShaderMaterial):Dynamic { })
public function new(geometry:Geometry, ?material:PointCloudMaterial):Void;
public var geometry : Geometry;
public var material : Material;
public var sortParticles : Bool;
}
@:native("THREE.Skeleton") extern class Skeleton {
public function new(bones:Array<Bone>, ?boneInverses:Array<Matrix4>, ?useVertexTexture:Bool):Void;
public var useVertexTexture : Bool;
public var identityMatrix : Matrix4;
public var bones : Array<Bone>;
public var boneTextureWidth : Float;
public var boneTextureHeight : Float;
public var boneMatrices : Float32Array;
public var boneTexture : DataTexture;
public var boneInverses : Array<Matrix4>;
public function calculateInverses(bone:Bone):Void;
public function pose():Void;
public function update():Void;
}
@:native("THREE.SkinnedMesh") extern class SkinnedMesh extends Mesh {
@:overload(function(?geometry:Geometry, ?material:MeshDepthMaterial, ?useVertexTexture:Bool):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:MeshFaceMaterial, ?useVertexTexture:Bool):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:MeshLambertMaterial, ?useVertexTexture:Bool):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:MeshNormalMaterial, ?useVertexTexture:Bool):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:MeshPhongMaterial, ?useVertexTexture:Bool):Dynamic { })
@:overload(function(?geometry:Geometry, ?material:ShaderMaterial, ?useVertexTexture:Bool):Dynamic { })
public function new(?geometry:Geometry, ?material:MeshBasicMaterial, ?useVertexTexture:Bool):Void;
public var bindMode : String;
public var bindMatrix : Matrix4;
public var bindMatrixInverse : Matrix4;
public function bind(skeleton:Skeleton, ?bindMatrix:Matrix4):Void;
public function pose():Void;
public function normalizeSkinWeights():Void;
public var skeleton : Skeleton;
}
@:native("THREE.Sprite") extern class Sprite extends Object3D {
public function new(?material:Material):Void;
public var geometry : BufferGeometry;
public var material : SpriteMaterial;
}
@:native("THREE.Renderer") typedef Renderer = {
public function render(scene:Scene, camera:Camera):Void;
public function setSize(width:Float, height:Float, ?updateStyle:Bool):Void;
public var domElement : HTMLCanvasElement;
};
@:native("THREE.CanvasRendererParameters") typedef CanvasRendererParameters = {
@:optional
public var canvas : HTMLCanvasElement;
@:optional
public var devicePixelRatio : Float;
};
@:native("THREE.CanvasRenderer") extern class CanvasRenderer {
public function new(?parameters:CanvasRendererParameters):Void;
public var domElement : HTMLCanvasElement;
public var devicePixelRatio : Float;
public var autoClear : Bool;
public var sortObjects : Bool;
public var sortElements : Bool;
public var info : { public var render : { public var vertices : Float; public var faces : Float; }; };
public function supportsVertexTextures():Void;
public function setFaceCulling():Void;
public function setSize(width:Float, height:Float, ?updateStyle:Bool):Void;
public function setViewport(x:Float, y:Float, width:Float, height:Float):Void;
public function setScissor():Void;
public function enableScissorTest():Void;
@:overload(function(color:String, ?opacity:Float):Void { })
@:overload(function(color:Float, ?opacity:Float):Void { })
public function setClearColor(color:Color, ?opacity:Float):Void;
public function setClearColorHex(hex:Float, ?alpha:Float):Void;
public function getClearColor():Color;
public function getClearAlpha():Float;
public function getMaxAnisotropy():Float;
public function clear():Void;
public function clearColor():Void;
public function clearDepth():Void;
public function clearStencil():Void;
public function render(scene:Scene, camera:Camera):Void;
}
@:native("THREE.RendererPlugin") typedef RendererPlugin = {
public function init(renderer:WebGLRenderer):Void;
public function render(scene:Scene, camera:Camera, currentWidth:Float, currentHeight:Float):Void;
};
@:native("THREE.WebGLRendererParameters") typedef WebGLRendererParameters = {
@:optional
public var canvas : HTMLCanvasElement;
@:optional
public var precision : String;
@:optional
public var alpha : Bool;
@:optional
public var premultipliedAlpha : Bool;
@:optional
public var antialias : Bool;
@:optional
public var stencil : Bool;
@:optional
public var preserveDrawingBuffer : Bool;
@:optional
public var clearColor : Float;
@:optional
public var clearAlpha : Float;
@:optional
public var devicePixelRatio : Float;
};
@:native("THREE.WebGLRenderer") extern class WebGLRenderer {
public function new(?parameters:WebGLRendererParameters):Void;
public var domElement : HTMLCanvasElement;
public var context : Dynamic;
public var devicePixelRatio : Float;
public var autoClear : Bool;
public var autoClearColor : Bool;
public var autoClearDepth : Bool;
public var autoClearStencil : Bool;
public var sortObjects : Bool;
public var gammaInput : Bool;
public var gammaOutput : Bool;
public var shadowMapEnabled : Bool;
public var shadowMapAutoUpdate : Bool;
public var shadowMapType : ShadowMapType;
public var shadowMapCullFace : CullFace;
public var shadowMapDebug : Bool;
public var shadowMapCascade : Bool;
public var maxMorphTargets : Float;
public var maxMorphNormals : Float;
public var autoScaleCubemaps : Bool;
public var renderPluginsPre : Array<RendererPlugin>;
public var renderPluginsPost : Array<RendererPlugin>;
public var info : { public var memory : { public var programs : Float; public var geometries : Float; public var textures : Float; }; public var render : { public var calls : Float; public var vertices : Float; public var faces : Float; public var points : Float; }; };
public var shadowMapPlugin : ShadowMapPlugin;
public function getContext():WebGLRenderingContext;
public function supportsVertexTextures():Bool;
public function supportsFloatTextures():Bool;
public function supportsStandardDerivatives():Bool;
public function supportsCompressedTextureS3TC():Bool;
public function getMaxAnisotropy():Float;
public function getPrecision():String;
public function setSize(width:Float, height:Float, ?updateStyle:Bool):Void;
public function setViewport(?x:Float, ?y:Float, ?width:Float, ?height:Float):Void;
public function setScissor(x:Float, y:Float, width:Float, height:Float):Void;
public function enableScissorTest(enable:Bool):Void;
@:overload(function(color:String, ?alpha:Float):Void { })
@:overload(function(color:Float, ?alpha:Float):Void { })
public function setClearColor(color:Color, ?alpha:Float):Void;
public function setClearColorHex(hex:Float, alpha:Float):Void;
public function getClearColor():Color;
public function getClearAlpha():Float;
public function clear(?color:Bool, ?depth:Bool, ?stencil:Bool):Void;
public function clearColor():Void;
public function clearDepth():Void;
public function clearStencil():Void;
public function clearTarget(renderTarget:WebGLRenderTarget, color:Bool, depth:Bool, stencil:Bool):Void;
public function addPostPlugin(plugin:RendererPlugin):Void;
public function addPrePlugin(plugin:RendererPlugin):Void;
public function updateShadowMap(scene:Scene, camera:Camera):Void;
public function renderBufferImmediate(object:Object3D, program:Dynamic, material:Material):Void;
public function renderBufferDirect(camera:Camera, lights:Array<Light>, fog:Fog, material:Material, geometryGroup:Dynamic, object:Object3D):Void;
public function renderBuffer(camera:Camera, lights:Array<Light>, fog:Fog, material:Material, geometryGroup:Dynamic, object:Object3D):Void;
public function render(scene:Scene, camera:Camera, ?renderTarget:RenderTarget, ?forceClear:Bool):Void;
public function renderImmediateObject(camera:Camera, lights:Array<Light>, fog:Fog, material:Material, object:Object3D):Void;
public function initMaterial(material:Material, lights:Array<Light>, fog:Fog, object:Object3D):Void;
public function setFaceCulling(?cullFace:CullFace, ?frontFace:FrontFaceDirection):Void;
public function setMaterialFaces(material:Material):Void;
public function setDepthTest(depthTest:Bool):Void;
public function setDepthWrite(depthWrite:Bool):Void;
public function setBlending(blending:Blending, blendEquation:BlendingEquation, blendSrc:BlendingSrcFactor, blendDst:BlendingDstFactor):Void;
public function setTexture(texture:Texture, slot:Float):Void;
public function setRenderTarget(renderTarget:RenderTarget):Void;
}
@:native("THREE.RenderTarget") typedef RenderTarget = { };
@:native("THREE.WebGLRenderTargetOptions") typedef WebGLRenderTargetOptions = {
@:optional
public var wrapS : Wrapping;
@:optional
public var wrapT : Wrapping;
@:optional
public var magFilter : TextureFilter;
@:optional
public var minFilter : TextureFilter;
@:optional
public var anisotropy : Float;
@:optional
public var format : Float;
@:optional
public var type : TextureDataType;
@:optional
public var depthBuffer : Bool;
@:optional
public var stencilBuffer : Bool;
};
@:native("THREE.WebGLRenderTarget") extern class WebGLRenderTarget {
public function new(width:Float, height:Float, ?options:WebGLRenderTargetOptions):Void;
public var width : Float;
public var height : Float;
public var wrapS : Wrapping;
public var wrapT : Wrapping;
public var magFilter : TextureFilter;
public var minFilter : TextureFilter;
public var anisotropy : Float;
public var offset : Vector2;
public var repeat : Vector2;
public var format : Float;
public var type : Float;
public var depthBuffer : Bool;
public var stencilBuffer : Bool;
public var generateMipmaps : Bool;
public var shareDepthFrom : Dynamic;
public function clone():WebGLRenderTarget;
public function dispose():Void;
public function addEventListener(type:String, listener:Dynamic -> Void):Void;
public function hasEventListener(type:String, listener:Dynamic -> Void):Void;
public function removeEventListener(type:String, listener:Dynamic -> Void):Void;
public function dispatchEvent(event:{ public var type : String; public var target : Dynamic; }):Void;
}
@:native("THREE.WebGLRenderTargetCube") extern class WebGLRenderTargetCube extends WebGLRenderTarget {
public function new(width:Float, height:Float, ?options:WebGLRenderTargetOptions):Void;
public var activeCubeFace : Float;
}
@:native("THREE.RenderableFace") extern class RenderableFace {
public function new():Void;
public var id : Float;
public var v1 : RenderableVertex;
public var v2 : RenderableVertex;
public var v3 : RenderableVertex;
public var normalModel : Vector3;
public var vertexNormalsModel : Array<Vector3>;
public var vertexNormalsLength : Float;
public var color : Color;
public var material : Material;
public var uvs : Array<Array<Vector2>>;
public var z : Float;
}
@:native("THREE.RenderableLine") extern class RenderableLine {
public function new():Void;
public var id : Float;
public var v1 : RenderableVertex;
public var v2 : RenderableVertex;
public var vertexColors : Array<Color>;
public var material : Material;
public var z : Float;
}
@:native("THREE.RenderableObject") extern class RenderableObject {
public function new():Void;
public var id : Float;
public var object : Dynamic;
public var z : Float;
}
@:native("THREE.RenderableSprite") extern class RenderableSprite {
public function new():Void;
public var id : Float;
public var object : Dynamic;
public var x : Float;
public var y : Float;
public var z : Float;
public var rotation : Float;
public var scale : Vector2;
public var material : Material;
}
@:native("THREE.RenderableVertex") extern class RenderableVertex {
public function new():Void;
public var position : Vector3;
public var positionWorld : Vector3;
public var positionScreen : Vector4;
public var visible : Bool;
public function copy(vertex:RenderableVertex):Void;
}
@:native("THREE.ShaderChunk") typedef ShaderChunk = {
public var alphamap_fragment : String;
public var alphamap_pars_fragment : String;
public var alphatest_fragment : String;
public var bumpmap_pars_fragment : String;
public var color_fragment : String;
public var color_pars_fragment : String;
public var color_pars_vertex : String;
public var color_vertex : String;
public var default_vertex : String;
public var defaultnormal_vertex : String;
public var envmap_fragment : String;
public var envmap_pars_fragment : String;
public var envmap_pars_vertex : String;
public var envmap_vertex : String;
public var fog_fragment : String;
public var fog_pars_fragment : String;
public var lightmap_fragment : String;
public var lightmap_pars_fragment : String;
public var lightmap_pars_vertex : String;
public var lightmap_vertex : String;
public var lights_lambert_pars_vertex : String;
public var lights_lambert_vertex : String;
public var lights_phong_fragment : String;
public var lights_phong_pars_fragment : String;
public var lights_phong_pars_vertex : String;
public var lights_phong_vertex : String;
public var linear_to_gamma_fragment : String;
public var logdepthbuf_fragment : String;
public var logdepthbuf_pars_fragment : String;
public var logdepthbuf_pars_vertex : String;
public var logdepthbuf_vertex : String;
public var map_fragment : String;
public var map_pars_fragment : String;
public var map_pars_vertex : String;
public var map_particle_fragment : String;
public var map_particle_pars_fragment : String;
public var map_vertex : String;
public var morphnormal_vertex : String;
public var morphtarget_pars_vertex : String;
public var morphtarget_vertex : String;
public var normalmap_pars_fragment : String;
public var shadowmap_fragment : String;
public var shadowmap_pars_fragment : String;
public var shadowmap_pars_vertex : String;
public var shadowmap_vertex : String;
public var skinbase_vertex : String;
public var skinning_pars_vertex : String;
public var skinning_vertex : String;
public var skinnormal_vertex : String;
public var specularmap_fragment : String;
public var specularmap_pars_fragment : String;
public var worldpos_vertex : String;
};
@:native("THREE.Shader") typedef Shader = {
public var uniforms : Dynamic;
public var vertexShader : String;
public var fragmentShader : String;
};
@:native("THREE.WebGLProgram") extern class WebGLProgram {
public function new(renderer:WebGLRenderer, code:String, material:ShaderMaterial, parameters:WebGLRendererParameters):Void;
}
@:native("THREE.WebGLShader") extern class WebGLShader {
public function new(gl:Dynamic, type:String, string:String):Void;
}
@:native("THREE.IFog") typedef IFog = {
public var name : String;
public var color : Color;
public function clone():IFog;
};
@:native("THREE.Fog") extern class Fog {
public function new(hex:Float, ?near:Float, ?far:Float):Void;
public var name : String;
public var color : Color;
public var near : Float;
public var far : Float;
public function clone():Fog;
}
@:native("THREE.FogExp2") extern class FogExp2 {
public function new(hex:Float, ?density:Float):Void;
public var name : String;
public var color : Color;
public var density : Float;
public function clone():FogExp2;
}
@:native("THREE.Scene") extern class Scene extends Object3D {
public function new():Void;
public var fog : IFog;
public var overrideMaterial : Material;
public var autoUpdate : Bool;
}
@:native("THREE.CompressedTexture") extern class CompressedTexture extends Texture {
public function new(mipmaps:Array<ImageData>, width:Float, height:Float, ?format:PixelFormat, ?type:TextureDataType, ?mapping:Mapping, ?wrapS:Wrapping, ?wrapT:Wrapping, ?magFilter:TextureFilter, ?minFilter:TextureFilter, ?anisotropy:Float):Void;
}
@:native("THREE.CubeTexture") extern class CubeTexture extends Texture {
public function new(images:Array<Dynamic>, ?mapping:Mapping, ?wrapS:Wrapping, ?wrapT:Wrapping, ?magFilter:TextureFilter, ?minFilter:TextureFilter, ?format:PixelFormat, ?type:TextureDataType, ?anisotropy:Float):Void;
public var images : Array<Dynamic>;
}
@:native("THREE.DataTexture") extern class DataTexture extends Texture {
public function new(data:ImageData, width:Float, height:Float, format:PixelFormat, type:TextureDataType, mapping:Mapping, wrapS:Wrapping, wrapT:Wrapping, magFilter:TextureFilter, minFilter:TextureFilter, ?anisotropy:Float):Void;
}
@:native("THREE.Texture") extern class Texture {
@:overload(function(image:HTMLCanvasElement, ?mapping:Mapping, ?wrapS:Wrapping, ?wrapT:Wrapping, ?magFilter:TextureFilter, ?minFilter:TextureFilter, ?format:PixelFormat, ?type:TextureDataType, ?anisotropy:Float):Dynamic { })
@:overload(function(image:HTMLImageElement, ?mapping:MappingConstructor, ?wrapS:Wrapping, ?wrapT:Wrapping, ?magFilter:TextureFilter, ?minFilter:TextureFilter, ?format:PixelFormat, ?type:TextureDataType, ?anisotropy:Float):Dynamic { })
@:overload(function(image:HTMLCanvasElement, ?mapping:MappingConstructor, ?wrapS:Wrapping, ?wrapT:Wrapping, ?magFilter:TextureFilter, ?minFilter:TextureFilter, ?format:PixelFormat, ?type:TextureDataType, ?anisotropy:Float):Dynamic { })
public function new(image:Dynamic, ?mapping:Mapping, ?wrapS:Wrapping, ?wrapT:Wrapping, ?magFilter:TextureFilter, ?minFilter:TextureFilter, ?format:PixelFormat, ?type:TextureDataType, ?anisotropy:Float):Void;
public var id : Float;
public var uuid : String;
public var name : String;
public var image : Dynamic;
public var mipmaps : Array<ImageData>;
public var mapping : Mapping;
public var wrapS : Wrapping;
public var wrapT : Wrapping;
public var magFilter : TextureFilter;
public var minFilter : TextureFilter;
public var anisotropy : Float;
public var format : PixelFormat;
public var type : TextureDataType;
public var offset : Vector2;
public var repeat : Vector2;
public var generateMipmaps : Bool;
public var premultiplyAlpha : Bool;
public var flipY : Bool;
public var unpackAlignment : Float;
public var needsUpdate : Bool;
public var onUpdate : Void -> Void;
public var DEFAULT_IMAGE : Dynamic;
public var DEFAULT_MAPPING : Dynamic;
public function clone():Texture;
public function update():Void;
public function dispose():Void;
public function addEventListener(type:String, listener:Dynamic -> Void):Void;
public function hasEventListener(type:String, listener:Dynamic -> Void):Void;
public function removeEventListener(type:String, listener:Dynamic -> Void):Void;
public function dispatchEvent(event:{ public var type : String; public var target : Dynamic; }):Void;
}
@:native("THREE.TypefaceData") typedef TypefaceData = {
public var familyName : String;
public var cssFontWeight : String;
public var cssFontStyle : String;
};
@:native("THREE.KeyFrame") typedef KeyFrame = {
public var pos : Array<Float>;
public var rot : Array<Float>;
public var scl : Array<Float>;
public var time : Float;
};
@:native("THREE.KeyFrames") typedef KeyFrames = {
public var keys : Array<KeyFrame>;
public var parent : Float;
};
@:native("THREE.AnimationData") typedef AnimationData = {
public var JIT : Float;
public var fps : Float;
public var hierarchy : Array<KeyFrames>;
public var length : Float;
public var name : String;
};
@:native("THREE.Animation") extern class Animation {
public function new(root:Mesh, data:AnimationData):Void;
public var root : Mesh;
public var data : AnimationData;
public var hierarchy : Array<Bone>;
public var currentTime : Float;
public var timeScale : Float;
public var isPlaying : Bool;
public var loop : Bool;
public var weight : Float;
public var keyTypes : Array<String>;
public var interpolationType : Float;
public function play(?startTime:Float, ?weight:Float):Void;
public function stop():Void;
public function reset():Void;
public function update(deltaTimeMS:Float):Void;
public function getNextKeyWith(type:String, h:Float, key:Float):KeyFrame;
public function getPrevKeyWith(type:String, h:Float, key:Float):KeyFrame;
}
@:native("THREE.KeyFrameAnimation") extern class KeyFrameAnimation {
public function new(data:Dynamic):Void;
public var root : Mesh;
public var data : Dynamic;
public var hierarchy : Array<KeyFrames>;
public var currentTime : Float;
public var timeScale : Float;
public var isPlaying : Bool;
public var isPaused : Bool;
public var loop : Bool;
public function play(?startTime:Float):Void;
public function stop():Void;
public function update(delta:Float):Void;
public function getNextKeyWith(type:String, h:Float, key:Float):KeyFrame;
public function getPrevKeyWith(type:String, h:Float, key:Float):KeyFrame;
}
@:native("THREE.MorphAnimation") extern class MorphAnimation {
public function new(mesh:Mesh):Void;
public var mesh : Mesh;
public var frames : Float;
public var currentTime : Float;
public var duration : Float;
public var loop : Bool;
public var isPlaying : Bool;
public function play():Void;
public function pause():Void;
public function update(deltaTimeMS:Float):Void;
}
@:native("THREE.Curve") extern class Curve {
public function getPoint(t:Float):Vector;
public function getPointAt(u:Float):Vector;
public function getPoints(?divisions:Float):Array<Vector>;
public function getSpacedPoints(?divisions:Float):Array<Vector>;
public function getLength():Float;
public function getLengths(?divisions:Float):Array<Float>;
public function updateArcLengths():Void;
public function getUtoTmapping(u:Float, distance:Float):Float;
public function getTangent(t:Float):Vector;
public function getTangentAt(u:Float):Vector;
public var Utils : { public function tangentQuadraticBezier(t:Float, p0:Float, p1:Float, p2:Float):Float; public function tangentCubicBezier(t:Float, p0:Float, p1:Float, p2:Float, p3:Float):Float; public function tangentSpline(t:Float, p0:Float, p1:Float, p2:Float, p3:Float):Float; public function interpolate(p0:Float, p1:Float, p2:Float, p3:Float, t:Float):Float; };
public function create(constructorFunc:Dynamic, getPointFunc:Dynamic):Dynamic;
}
@:native("THREE.BoundingBox") typedef BoundingBox = {
public var minX : Float;
public var minY : Float;
public var maxX : Float;
public var maxY : Float;
public var centroid : Vector;
};
@:native("THREE.CurvePath") extern class CurvePath extends Curve {
public function new():Void;
public var curves : Array<Curve>;
public var bends : Array<Path>;
public var autoClose : Bool;
public function add(curve:Curve):Void;
public function checkConnection():Bool;
public function closePath():Void;
public function getCurveLengths():Array<Float>;
public function getBoundingBox():BoundingBox;
public function createPointsGeometry(divisions:Float):Geometry;
public function createSpacedPointsGeometry(divisions:Float):Geometry;
public function createGeometry(points:Array<Vector2>):Geometry;
public function addWrapPath(bendpath:Path):Void;
public function getTransformedPoints(segments:Float, ?bends:Array<Path>):Array<Vector2>;
public function getTransformedSpacedPoints(segments:Float, ?bends:Array<Path>):Array<Vector2>;
public function getWrapPoints(oldPts:Array<Vector2>, path:Path):Array<Vector2>;
}
@:native("THREE.Gyroscope") extern class Gyroscope extends Object3D {
public function new():Void;
public var translationWorld : Vector3;
public var translationObject : Vector3;
public var quaternionWorld : Quaternion;
public var quaternionObject : Quaternion;
public var scaleWorld : Vector3;
public var scaleObject : Vector3;
}
@:enum @:native("THREE.PathActions") abstract PathActions(Int) {
public var MOVE_TO = 0;
public var LINE_TO = 1;
public var QUADRATIC_CURVE_TO = 2;
public var BEZIER_CURVE_TO = 3;
public var CSPLINE_THRU = 4;
public var ARC = 5;
public var ELLIPSE = 6;
}
@:native("THREE.PathAction") typedef PathAction = {
public var action : PathActions;
public var args : Dynamic;
};
@:native("THREE.Path") extern class Path extends CurvePath {
public function new(?points:Array<Vector2>):Void;
public var actions : Array<PathAction>;
public function fromPoints(vectors:Array<Vector2>):Void;
public function moveTo(x:Float, y:Float):Void;
public function lineTo(x:Float, y:Float):Void;
public function quadraticCurveTo(aCPx:Float, aCPy:Float, aX:Float, aY:Float):Void;
public function bezierCurveTo(aCP1x:Float, aCP1y:Float, aCP2x:Float, aCP2y:Float, aX:Float, aY:Float):Void;
public function splineThru(pts:Array<Vector2>):Void;
public function arc(aX:Float, aY:Float, aRadius:Float, aStartAngle:Float, aEndAngle:Float, aClockwise:Bool):Void;
public function absarc(aX:Float, aY:Float, aRadius:Float, aStartAngle:Float, aEndAngle:Float, aClockwise:Bool):Void;
public function ellipse(aX:Float, aY:Float, xRadius:Float, yRadius:Float, aStartAngle:Float, aEndAngle:Float, aClockwise:Bool):Void;
public function absellipse(aX:Float, aY:Float, xRadius:Float, yRadius:Float, aStartAngle:Float, aEndAngle:Float, aClockwise:Bool):Void;
public function toShapes():Array<Shape>;
}
@:native("THREE.Shape") extern class Shape extends Path {
public function new(?points:Array<Vector2>):Void;
public var holes : Array<Path>;
public function extrude(?options:Dynamic):ExtrudeGeometry;
public function makeGeometry(?options:Dynamic):ShapeGeometry;
public function getPointsHoles(divisions:Float):Array<Array<Vector2>>;
public function getSpacedPointsHoles(divisions:Float):Array<Array<Vector2>>;
public function extractAllPoints(divisions:Float):{ public var shape : Array<Vector2>; public var holes : Array<Array<Vector2>>; };
public function extractPoints(divisions:Float):Array<Vector2>;
public function extractAllSpacedPoints(divisions:Vector2):{ public var shape : Array<Vector2>; public var holes : Array<Array<Vector2>>; };
}
@:native("THREE.ArcCurve") extern class ArcCurve extends EllipseCurve {
public function new(aX:Float, aY:Float, aRadius:Float, aStartAngle:Float, aEndAngle:Float, aClockwise:Bool):Void;
}
@:native("THREE.ClosedSplineCurve3") extern class ClosedSplineCurve3 extends Curve {
public function new(?points:Array<Vector3>):Void;
public var points : Array<Vector3>;
}
@:native("THREE.CubicBezierCurve") extern class CubicBezierCurve extends Curve {
public function new(v0:Vector2, v1:Vector2, v2:Vector2, v3:Vector2):Void;
public var v0 : Vector2;
public var v1 : Vector2;
public var v2 : Vector2;
public var v3 : Vector2;
}
@:native("THREE.CubicBezierCurve3") extern class CubicBezierCurve3 extends Curve {
public function new(v0:Vector3, v1:Vector3, v2:Vector3, v3:Vector3):Void;
public var v0 : Vector3;
public var v1 : Vector3;
public var v2 : Vector3;
public var v3 : Vector3;
}
@:native("THREE.EllipseCurve") extern class EllipseCurve extends Curve {
public function new(aX:Float, aY:Float, xRadius:Float, yRadius:Float, aStartAngle:Float, aEndAngle:Float, aClockwise:Bool):Void;
public var aX : Float;
public var aY : Float;
public var xRadius : Float;
public var yRadius : Float;
public var aStartAngle : Float;
public var aEndAngle : Float;
public var aClockwise : Bool;
}
@:native("THREE.LineCurve") extern class LineCurve extends Curve {
public function new(v1:Vector2, v2:Vector2):Void;
public var v1 : Vector2;
public var v2 : Vector2;
}
@:native("THREE.LineCurve3") extern class LineCurve3 extends Curve {
public function new(v1:Vector3, v2:Vector3):Void;
public var v1 : Vector3;
public var v2 : Vector3;
}
@:native("THREE.QuadraticBezierCurve") extern class QuadraticBezierCurve extends Curve {
public function new(v0:Vector2, v1:Vector2, v2:Vector2):Void;
public var v0 : Vector2;
public var v1 : Vector2;
public var v2 : Vector2;
}
@:native("THREE.QuadraticBezierCurve3") extern class QuadraticBezierCurve3 extends Curve {
public function new(v0:Vector3, v1:Vector3, v2:Vector3):Void;
public var v0 : Vector3;
public var v1 : Vector3;
public var v2 : Vector3;
}
@:native("THREE.SplineCurve") extern class SplineCurve extends Curve {
public function new(?points:Array<Vector2>):Void;
public var points : Array<Vector2>;
}
@:native("THREE.SplineCurve3") extern class SplineCurve3 extends Curve {
public function new(?points:Array<Vector3>):Void;
public var points : Array<Vector3>;
}
@:native("THREE.BoxGeometry") extern class BoxGeometry extends Geometry {
public function new(width:Float, height:Float, depth:Float, ?widthSegments:Float, ?heightSegments:Float, ?depthSegments:Float):Void;
public var parameters : { public var width : Float; public var height : Float; public var depth : Float; public var widthSegments : Float; public var heightSegments : Float; public var depthSegments : Float; };
public var widthSegments : Float;
public var heightSegments : Float;
public var depthSegments : Float;
}
@:native("THREE.CircleGeometry") extern class CircleGeometry extends Geometry {
public function new(?radius:Float, ?segments:Float, ?thetaStart:Float, ?thetaLength:Float):Void;
public var parameters : { public var radius : Float; public var segments : Float; public var thetaStart : Float; public var thetaLength : Float; };
public var radius : Float;
public var segments : Float;
public var thetaStart : Float;
public var thetaLength : Float;
}
@:native("THREE.CubeGeometry") extern class CubeGeometry extends BoxGeometry {
}
@:native("THREE.CylinderGeometry") extern class CylinderGeometry extends Geometry {
public function new(?radiusTop:Float, ?radiusBottom:Float, ?height:Float, ?radiusSegments:Float, ?heightSegments:Float, ?openEnded:Bool):Void;
public var parameters : { public var radiusTop : Float; public var radiusBottom : Float; public var height : Float; public var radialSegments : Float; public var heightSegments : Float; public var openEnded : Bool; };
public var radiusTop : Float;
public var radiusBottom : Float;
public var height : Float;
public var radialSegments : Float;
public var heightSegments : Float;
public var openEnded : Bool;
}
@:native("THREE.ExtrudeGeometry") extern class ExtrudeGeometry extends Geometry {
@:overload(function(?shapes:Array<Shape>, ?options:Dynamic):Dynamic { })
public function new(?shape:Shape, ?options:Dynamic):Void;
public function addShapeList(shapes:Array<Shape>, ?options:Dynamic):Void;
public function addShape(shape:Shape, ?options:Dynamic):Void;
}
@:native("THREE.IcosahedronGeometry") extern class IcosahedronGeometry extends PolyhedronGeometry {
public function new(radius:Float, detail:Float):Void;
public var parameters : { public var radius : Float; public var detail : Float; };
public var radius : Float;
public var detail : Float;
}
@:native("THREE.LatheGeometry") extern class LatheGeometry extends Geometry {
public function new(points:Array<Vector3>, ?segments:Float, ?phiStart:Float, ?phiLength:Float):Void;
}
@:native("THREE.OctahedronGeometry") extern class OctahedronGeometry extends PolyhedronGeometry {
public function new(radius:Float, detail:Float):Void;
public var parameters : { public var radius : Float; public var detail : Float; };
public var radius : Float;
public var detail : Float;
}
@:native("THREE.ParametricGeometry") extern class ParametricGeometry extends Geometry {
public function new(func:Float -> Float -> Vector3, slices:Float, stacks:Float, ?useTris:Bool):Void;
}
@:native("THREE.PlaneGeometry") extern class PlaneGeometry extends Geometry {
public function new(width:Float, height:Float, ?widthSegments:Float, ?heightSegments:Float):Void;
public var parameters : { public var width : Float; public var height : Float; public var widthSegments : Float; public var heightSegments : Float; };
public var width : Float;
public var height : Float;
public var widthSegments : Float;
public var heightSegments : Float;
}
@:native("THREE.PolyhedronGeometry") extern class PolyhedronGeometry extends Geometry {
public function new(vertices:Array<Vector3>, faces:Array<Face3>, ?radius:Float, ?detail:Float):Void;
}
@:native("THREE.RingGeometry") extern class RingGeometry extends Geometry {
public function new(?innerRadius:Float, ?outerRadius:Float, ?thetaSegments:Float, ?phiSegments:Float, ?thetaStart:Float, ?thetaLength:Float):Void;
}
@:native("THREE.ShapeGeometry") extern class ShapeGeometry extends Geometry {
@:overload(function(shapes:Array<Shape>, ?options:Dynamic):Dynamic { })
public function new(shape:Shape, ?options:Dynamic):Void;
public function addShapeList(shapes:Array<Shape>, options:Dynamic):ShapeGeometry;
public function addShape(shape:Shape, ?options:Dynamic):Void;
}
@:native("THREE.SphereGeometry") extern class SphereGeometry extends Geometry {
public function new(radius:Float, ?widthSegments:Float, ?heightSegments:Float, ?phiStart:Float, ?phiLength:Float, ?thetaStart:Float, ?thetaLength:Float):Void;
public var parameters : { public var radius : Float; public var widthSegments : Float; public var heightSegments : Float; public var phiStart : Float; public var phiLength : Float; public var thetaStart : Float; public var thetaLength : Float; };
public var radius : Float;
public var widthSegments : Float;
public var heightSegments : Float;
public var phiStart : Float;
public var phiLength : Float;
public var thetaStart : Float;
public var thetaLength : Float;
}
@:native("THREE.TetrahedronGeometry") extern class TetrahedronGeometry extends PolyhedronGeometry {
public function new(?radius:Float, ?detail:Float):Void;
}
@:native("THREE.TextGeometryParameters") typedef TextGeometryParameters = {
@:optional
public var size : Float;
@:optional
public var height : Float;
@:optional
public var curveSegments : Float;
@:optional
public var font : String;
@:optional
public var weight : String;
@:optional
public var style : String;
@:optional
public var bevelEnabled : Bool;
@:optional
public var bevelThickness : Float;
@:optional
public var bevelSize : Float;
};
@:native("THREE.TextGeometry") extern class TextGeometry extends ExtrudeGeometry {
public function new(text:String, ?TextGeometryParameters:TextGeometryParameters):Void;
}
@:native("THREE.TorusGeometry") extern class TorusGeometry extends Geometry {
public function new(?radius:Float, ?tube:Float, ?radialSegments:Float, ?tubularSegments:Float, ?arc:Float):Void;
public var parameters : { public var radius : Float; public var tube : Float; public var radialSegments : Float; public var tubularSegments : Float; public var arc : Float; };
public var radius : Float;
public var tube : Float;
public var radialSegments : Float;
public var tubularSegments : Float;
public var arc : Float;
}
@:native("THREE.TorusKnotGeometry") extern class TorusKnotGeometry extends Geometry {
public function new(?radius:Float, ?tube:Float, ?radialSegments:Float, ?tubularSegments:Float, ?p:Float, ?q:Float, ?heightScale:Float):Void;
public var parameters : { public var radius : Float; public var tube : Float; public var radialSegments : Float; public var tubularSegments : Float; public var p : Float; public var q : Float; public var heightScale : Float; };
public var radius : Float;
public var tube : Float;
public var radialSegments : Float;
public var tubularSegments : Float;
public var p : Float;
public var q : Float;
public var heightScale : Float;
}
@:native("THREE.TubeGeometry") extern class TubeGeometry extends Geometry {
public function new(path:Path, ?segments:Float, ?radius:Float, ?radiusSegments:Float, ?closed:Bool):Void;
public var parameters : { public var path : Path; public var segments : Float; public var radius : Float; public var radialSegments : Float; public var closed : Bool; };
public var path : Path;
public var segments : Float;
public var radius : Float;
public var radialSegments : Float;
public var closed : Bool;
public var tangents : Array<Vector3>;
public var normals : Array<Vector3>;
public var binormals : Array<Vector3>;
public function FrenetFrames(path:Path, segments:Float, closed:Bool):Void;
}
@:native("THREE.ArrowHelper") extern class ArrowHelper extends Object3D {
public function new(dir:Vector3, ?origin:Vector3, ?length:Float, ?hex:Float, ?headLength:Float, ?headWidth:Float):Void;
public var line : Line;
public var cone : Mesh;
public function setDirection(dir:Vector3):Void;
public function setLength(length:Float, ?headLength:Float, ?headWidth:Float):Void;
public function setColor(hex:Float):Void;
}
@:native("THREE.AxisHelper") extern class AxisHelper extends Line {
public function new(?size:Float):Void;
}
@:native("THREE.BoundingBoxHelper") extern class BoundingBoxHelper extends Mesh {
public function new(object:Object3D, ?hex:Float):Void;
public var object : Object3D;
public var box : Array<Box3>;
public function update():Void;
}
@:native("THREE.BoxHelper") extern class BoxHelper extends Line {
public function new(?object:Object3D):Void;
public function update(?object:Object3D):Void;
}
@:native("THREE.CameraHelper") extern class CameraHelper extends Line {
public function new(camera:Camera):Void;
public var camera : Camera;
public var pointMap : { };
public function update():Void;
}
@:native("THREE.DirectionalLightHelper") extern class DirectionalLightHelper extends Object3D {
public function new(light:Light, ?size:Float):Void;
public var light : Light;
public var lightPlane : Line;
public var targetLine : Line;
public function dispose():Void;
public function update():Void;
}
@:native("THREE.EdgesHelper") extern class EdgesHelper extends Line {
public function new(object:Object3D, ?hex:Float):Void;
}
@:native("THREE.FaceNormalsHelper") extern class FaceNormalsHelper extends Line {
public function new(object:Object3D, ?size:Float, ?hex:Float, ?linewidth:Float):Void;
public var object : Object3D;
public var size : Float;
public var normalMatrix : Matrix3;
public function update(?object:Object3D):Void;
}
@:native("THREE.GridHelper") extern class GridHelper extends Line {
public function new(size:Float, step:Float):Void;
public var color1 : Color;
public var color2 : Color;
public function setColors(colorCenterLine:Float, colorGrid:Float):Void;
}
@:native("THREE.HemisphereLightHelper") extern class HemisphereLightHelper extends Object3D {
public function new(light:Light, sphereSize:Float, arrowLength:Float, domeSize:Float):Void;
public var light : Light;
public var colors : Array<Color>;
public var lightSphere : Mesh;
public function dispose():Void;
public function update():Void;
}
@:native("THREE.PointLightHelper") extern class PointLightHelper extends Object3D {
public function new(light:Light, sphereSize:Float):Void;
public var light : Light;
public function dispose():Void;
public function update():Void;
}
@:native("THREE.SkeletonHelper") extern class SkeletonHelper extends Line {
public function new(bone:Object3D):Void;
public var bones : Array<Bone>;
public var root : Object3D;
public function getBoneList(object:Object3D):Array<Bone>;
public function update():Void;
}
@:native("THREE.SpotLightHelper") extern class SpotLightHelper extends Object3D {
public function new(light:Light, sphereSize:Float, arrowLength:Float):Void;
public var light : Light;
public var cone : Mesh;
public function dispose():Void;
public function update():Void;
}
@:native("THREE.VertexNormalsHelper") extern class VertexNormalsHelper extends Line {
public function new(object:Object3D, ?size:Float, ?hex:Float, ?linewidth:Float):Void;
public var object : Object3D;
public var size : Float;
public var normalMatrix : Matrix3;
public function update(?object:Object3D):Void;
}
@:native("THREE.VertexTangentsHelper") extern class VertexTangentsHelper extends Line {
public function new(object:Object3D, ?size:Float, ?hex:Float, ?linewidth:Float):Void;
public var object : Object3D;
public var size : Float;
public function update(?object:Object3D):Void;
}
@:native("THREE.WireframeHelper") extern class WireframeHelper extends Line {
public function new(object:Object3D, ?hex:Float):Void;
}
@:native("THREE.ImmediateRenderObject") extern class ImmediateRenderObject extends Object3D {
public function new():Void;
public function render(renderCallback:Dynamic):Void;
}
@:native("THREE.LensFlareProperty") typedef LensFlareProperty = {
public var texture : Texture;
public var size : Float;
public var distance : Float;
public var x : Float;
public var y : Float;
public var z : Float;
public var scale : Float;
public var rotation : Float;
public var opacity : Float;
public var color : Color;
public var blending : Blending;
};
@:native("THREE.LensFlare") extern class LensFlare extends Object3D {
public function new(?texture:Texture, ?size:Float, ?distance:Float, ?blending:Blending, ?color:Color):Void;
public var lensFlares : Array<LensFlareProperty>;
public var positionScreen : Vector3;
public var customUpdateCallback : LensFlare -> Void;
public function updateLensFlares():Void;
}
@:native("THREE.MorphBlendMeshAnimation") typedef MorphBlendMeshAnimation = {
public var startFrame : Float;
public var endFrame : Float;
public var length : Float;
public var fps : Float;
public var duration : Float;
public var lastFrame : Float;
public var currentFrame : Float;
public var active : Bool;
public var time : Float;
public var direction : Float;
public var weight : Float;
public var directionBackwards : Bool;
public var mirroredLoop : Bool;
};
@:native("THREE.MorphBlendMesh") extern class MorphBlendMesh extends Mesh {
public function new(geometry:Geometry, material:Material):Void;
public var animationsMap : { };
public var animationsList : Array<MorphBlendMeshAnimation>;
public function createAnimation(name:String, start:Float, end:Float, fps:Float):Void;
public function autoCreateAnimations(fps:Float):Void;
public function setAnimationDirectionForward(name:String):Void;
public function setAnimationDirectionBackward(name:String):Void;
public function setAnimationFPS(name:String, fps:Float):Void;
public function setAnimationDuration(name:String, duration:Float):Void;
public function setAnimationWeight(name:String, weight:Float):Void;
public function setAnimationTime(name:String, time:Float):Void;
public function getAnimationTime(name:String):Float;
public function getAnimationDuration(name:String):Float;
public function playAnimation(name:String):Void;
public function stopAnimation(name:String):Void;
public function update(delta:Float):Void;
}
@:native("THREE.DepthPassPlugin") extern class DepthPassPlugin {
public function new():Void;
public var enabled : Bool;
public var renderTarget : RenderTarget;
public function init(renderer:Renderer):Void;
public function render(scene:Scene, camera:Camera):Void;
public function update(scene:Scene, camera:Camera):Void;
}
@:native("THREE.LensFlarePlugin") extern class LensFlarePlugin {
public function new():Void;
public function init(renderer:Renderer):Void;
public function render(scene:Scene, camera:Camera, viewportWidth:Float, viewportHeight:Float):Void;
}
@:native("THREE.ShadowMapPlugin") extern class ShadowMapPlugin {
public function new():Void;
public function init(renderer:Renderer):Void;
public function render(scene:Scene, camera:Camera):Void;
public function update(scene:Scene, camera:Camera):Void;
}
@:native("THREE.SpritePlugin") extern class SpritePlugin {
public function new():Void;
public function init(renderer:Renderer):Void;
public function render(scene:Scene, camera:Camera, viewportWidth:Float, viewportHeight:Float):Void;
}
extern class THREE {
public static var REVISION : String;
public static var CullFaceNone : CullFace;
public static var CullFaceBack : CullFace;
public static var CullFaceFront : CullFace;
public static var CullFaceFrontBack : CullFace;
public static var FrontFaceDirectionCW : FrontFaceDirection;
public static var FrontFaceDirectionCCW : FrontFaceDirection;
public static var BasicShadowMap : ShadowMapType;
public static var PCFShadowMap : ShadowMapType;
public static var PCFSoftShadowMap : ShadowMapType;
public static var FrontSide : Side;
public static var BackSide : Side;
public static var DoubleSide : Side;
public static var NoShading : Shading;
public static var FlatShading : Shading;
public static var SmoothShading : Shading;
public static var NoColors : Colors;
public static var FaceColors : Colors;
public static var VertexColors : Colors;
public static var NoBlending : Blending;
public static var NormalBlending : Blending;
public static var AdditiveBlending : Blending;
public static var SubtractiveBlending : Blending;
public static var MultiplyBlending : Blending;
public static var CustomBlending : Blending;
public static var AddEquation : BlendingEquation;
public static var SubtractEquation : BlendingEquation;
public static var ReverseSubtractEquation : BlendingEquation;
public static var ZeroFactor : BlendingDstFactor;
public static var OneFactor : BlendingDstFactor;
public static var SrcColorFactor : BlendingDstFactor;
public static var OneMinusSrcColorFactor : BlendingDstFactor;
public static var SrcAlphaFactor : BlendingDstFactor;
public static var OneMinusSrcAlphaFactor : BlendingDstFactor;
public static var DstAlphaFactor : BlendingDstFactor;
public static var OneMinusDstAlphaFactor : BlendingDstFactor;
public static var DstColorFactor : BlendingSrcFactor;
public static var OneMinusDstColorFactor : BlendingSrcFactor;
public static var SrcAlphaSaturateFactor : BlendingSrcFactor;
public static var MultiplyOperation : Combine;
public static var MixOperation : Combine;
public static var AddOperation : Combine;
public static var UVMapping : MappingConstructor;
public static var CubeReflectionMapping : MappingConstructor;
public static var CubeRefractionMapping : MappingConstructor;
public static var SphericalReflectionMapping : MappingConstructor;
public static var SphericalRefractionMapping : MappingConstructor;
public static var RepeatWrapping : Wrapping;
public static var ClampToEdgeWrapping : Wrapping;
public static var MirroredRepeatWrapping : Wrapping;
public static var NearestFilter : TextureFilter;
public static var NearestMipMapNearestFilter : TextureFilter;
public static var NearestMipMapLinearFilter : TextureFilter;
public static var LinearFilter : TextureFilter;
public static var LinearMipMapNearestFilter : TextureFilter;
public static var LinearMipMapLinearFilter : TextureFilter;
public static var UnsignedByteType : TextureDataType;
public static var ByteType : TextureDataType;
public static var ShortType : TextureDataType;
public static var UnsignedShortType : TextureDataType;
public static var IntType : TextureDataType;
public static var UnsignedIntType : TextureDataType;
public static var FloatType : TextureDataType;
public static var UnsignedShort4444Type : PixelType;
public static var UnsignedShort5551Type : PixelType;
public static var UnsignedShort565Type : PixelType;
public static var AlphaFormat : PixelFormat;
public static var RGBFormat : PixelFormat;
public static var RGBAFormat : PixelFormat;
public static var LuminanceFormat : PixelFormat;
public static var LuminanceAlphaFormat : PixelFormat;
public static var RGB_S3TC_DXT1_Format : CompressedPixelFormat;
public static var RGBA_S3TC_DXT1_Format : CompressedPixelFormat;
public static var RGBA_S3TC_DXT3_Format : CompressedPixelFormat;
public static var RGBA_S3TC_DXT5_Format : CompressedPixelFormat;
public static var Math : THREEMath;
public static var LineStrip : LineType;
public static var LinePieces : LineType;
public static var ShaderChunk : ShaderChunk;
public static var ShaderLib : { public var basic : Shader; public var lambert : Shader; public var phong : Shader; public var particle_basic : Shader; public var dashed : Shader; public var depth : Shader; public var normal : Shader; public var normalmap : Shader; public var cube : Shader; public var depthRGBA : Shader; };
public static var UniformsLib : { public var common : Dynamic; public var bump : Dynamic; public var normalmap : Dynamic; public var fog : Dynamic; public var lights : Dynamic; public var particle : Dynamic; public var shadowmap : Dynamic; };
public static var UniformsUtils : { public function merge(uniforms:Array<Dynamic>):Dynamic; public function clone(uniforms_src:Dynamic):Dynamic; };
public static var FontUtils : { public var faces : { }; public var face : String; public var weight : String; public var style : String; public var size : Float; public var divisions : Float; public function getFace():Face3; public function loadFace(data:TypefaceData):TypefaceData; public function drawText(text:String):{ public var paths : Array<Path>; public var offset : Float; }; public function extractGlyphPoints(c:String, face:Face3, scale:Float, offset:Float, path:Path):{ public var offset : Float; public var path : Path; }; public function generateShapes(text:String, ?parameters:{ @:optional
public var size : Float; @:optional
public var curveSegments : Float; @:optional
public var font : String; @:optional
public var weight : String; @:optional
public var style : String; }):Array<Shape>; public var Triangulate : { public function area(contour:Array<Vector2>):Float; }; };
public static var GeometryUtils : { @:overload(function(geometry1:Geometry, object2:Geometry, ?materialIndexOffset:Float):Void { })
public function merge(geometry1:Geometry, object2:Mesh, ?materialIndexOffset:Float):Void; public function center(geometry:Geometry):Vector3; };
public static var ImageUtils : { public var crossOrigin : String; public function loadTexture(url:String, ?mapping:Mapping, ?onLoad:Texture -> Void, ?onError:String -> Void):Texture; public function loadTextureCube(array:Array<String>, ?mapping:Mapping, ?onLoad:Texture -> Void, ?onError:String -> Void):Texture; public function getNormalMap(image:HTMLImageElement, ?depth:Float):HTMLCanvasElement; public function generateDataTexture(width:Float, height:Float, color:Color):DataTexture; };
public static var SceneUtils : { public function createMultiMaterialObject(geometry:Geometry, materials:Array<Material>):Object3D; public function detach(child:Object3D, parent:Object3D, scene:Scene):Void; public function attach(child:Object3D, scene:Scene, parent:Object3D):Void; };
public static var AnimationHandler : { public var LINEAR : Float; public var CATMULLROM : Float; public var CATMULLROM_FORWARD : Float; public var animations : Array<Dynamic>; public function init(data:Animation):Void; public function parse(root:Mesh):Array<Object3D>; public function play(animation:Animation):Void; public function stop(animation:Animation):Void; public function update(deltaTimeMS:Float):Void; };
public static var ShaderFlares : { public var lensFlareVertexTexture : { public var vertexShader : String; public var fragmentShader : String; }; public var lensFlare : { public var vertexShader : String; public var fragmentShader : String; }; };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment