Packageaway3d.materials.utils
Classpublic class Projector

Class remaps the uvs of an Object3D for a given orientation: projection strings = "front", "back", "top", "bottom", "left","right", "cylindricalX", "cylindricalY", "cylindricalZ", "spherical" or "spherical2"

Public Methods
 MethodDefined by
  
project(orientation:String, object3d:Object3D, selection:Array = null, forceBounds:Boolean = false):void
[static] Applies the mapping to the Object3D object according to string orientation
Projector
Method detail
project()method
public static function project(orientation:String, object3d:Object3D, selection:Array = null, forceBounds:Boolean = false):void

Applies the mapping to the Object3D object according to string orientation

Parameters
orientation:String — orientation String. Defines the way the map will be projected onto the Object3D. orientation value can be: "front", "back", "top", "bottom", "left", "right", "cylindricalX", "cylindricalY", "cylindricalZ", "spherical" or "spherical2" Cylindrical axis: X, 1,0,0 cylinder is done on yz plane. Y, 0,1,0 on xz plan and Z on xy. Because we use triangles, cylindrical and spherical projection have a correction to ensure no face is offsetted more than .7
 
object3d:Object3D — object3d Object3d. The Object3D to remap.
 
selection:Array (default = null) — selection Array. An array of booleans that defines if vertexes must be considered for the bounds. Applicable only if Object3D is type Mesh.
 
forceBounds:Boolean (default = false) — forceBounds. Boolean. In some cases the bounds of an object are not refreshed for perf reasons. Passing this boolean forces the calculation. Applies only when array selection is not passed.
Wiki link
Click to go to the wiki page for 'away3d.materials.utils.Projector'

Code examples

Comments