File loader for the OBJ file format.
note: Multiple objects support and autoload mtls are supported since Away v 2.1.
Class tested with the following 3D apps:
- Strata CX mac 5.5
- Biturn ver 0.87b4 PC
- LightWave 3D OBJ Export v2.1 PC
- Max2Obj Version 4.0 PC
- AC3D 6.2.025 mac
- geometry supported tags: f,v,vt, g are being used
- geometry unsupported tags:vn,ka, kd r g b, kd, ks r g b,ks,ke r g b,ke,d alpha,d,tr alpha,tr,ns s,ns,illum n,illum,map_Ka,map_Bump
- mtl unsupported tags: kd,ka,ks,ns,tr
export from apps as polygon group or mesh as .obj file.
public function Obj(data:String, urlbase:String = "", init:Object = null)
Parameters
| data:String — The binary data of a loaded file.
|
|
| urlbase:String (default = " ") — The url of the .obj file, required to compose the url mtl adres and be able access the bitmap sources relative to mtl location.
|
|
| init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
####INIT####
See also
public static function load(url:String, init:Object = null):Object3DLoader
Loads and parses a obj file into a 3d mesh object.
Parameters
| url:String — The url location of the file to load.
|
|
| init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
Returns
| Object3DLoader —
A 3d loader object that can be used as a placeholder in a scene while the file is loading.
|
public static function parse(data:*, init:Object = null, loader:Object3DLoader = null):Object3D
Creates a 3d mesh object from the raw ascii data of a obj file.
Parameters
| data:* — The ascii data of a loaded file.
|
|
| init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
|
| loader:Object3DLoader (default = null ) — [optional] Not intended for direct use.
|
Returns
| Object3D —
A 3d mesh object representation of the obj file.
|
Click to go to the wiki page for ####WIKI####