Docs for Version: 1.0a
Show:
Extends MObject
Module: aexolGL

Aex class - Aex objects hold the modelView Matrix

Constructor

Aex

(
  • [options]
)
Aex

Parameters:

  • [options] Object optional

    {Dict} Dictionary of options when creating Aex object

Returns:

Aex:

Returns Aex Object

Example:

 var aex = new Aex({
                                     uniforms:{
                                         tiling:[2.0,2.0]
                                     }
                                 })

Methods

addChilds

(
  • mobject
)

Inherited from MObject:

Sets parent on MObject and unbinds current parent in RenderTree

Parameters:

  • mobject MObject

    mobject object to add as a child to RenderTree

centerPivot

()

Centers pivot of an Aex to parent Mesh

draw

()

Draw the Aex inside draw function of your Scene

move

(
  • x
  • y
  • z
  • r
)

Move object

Parameters:

  • x Object
    • x axis
  • y Object
    • y axis
  • z Object
    • z axis
  • r Object
    • relative transform

Example:

 var aex = new Aex()
                                             aex.move(0,1,2)

remove

()

Inherited from MObject:

Removes MObject from RenderTree

rotate

(
  • x
  • y
  • z
  • r
)

Rotate object

Parameters:

  • x Object
    • angle around x axis
  • y Object
    • angle around y axis
  • z Object
    • angle around z axis
  • r Object
    • relative transform

Example:

 var aex = new Aex()
                                             aex.rotate(0,1,2)

rotateAroundPoint

(
  • center
  • angle
  • x
  • y
  • z
)

Rotate object around point

Parameters:

  • center Vector

    pivot point location

  • angle Object
    • rotation in degrees
  • x Object
    • usage of x axis
  • y Object
    • usage of y axis
  • z Object
    • usage of z axis

Example:

 var aex = new Aex()
                                             aex.rotateAroundPoint(new Vector(0,1,1),90,0,1,0)

scale

(
  • x
  • y
  • z
  • r
)

Scale object

Parameters:

  • x Object
    • x axis
  • y Object
    • y axis
  • z Object
    • z axis
  • r Object
    • relative transform

Example:

 var aex = new Aex()
                                             aex.scale(0,1,2)

setModelView

()

Sets aex modelview and Normal matrix. Internal function done after transformations as move, rotate etc..

setParent

(
  • parent
)

Inherited from MObject:

Sets parent on MObject and unbinds current parent in RenderTree. Usually this is done inside GameObject, but you have also possibility to construct RenderTree by yourself.

Parameters:

Example:

world = new Scene() gshader = new basicShader() someMaterial = new Material({}) gshader.setParent(world) someMaterial.setParent(world)

setUniforms

()

Force set shader uniforms

Example:

 var aex = new Aex()
                                             aex.setUniforms()

Properties

position

Vector

Position of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.position = new Vector(1.0,2.0,3.0)

rotation

Vector

Rotation of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.rotation = new Vector(0.0,90.0,0.0)

rotX

Float

x Rotation of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.rotX = 20.0

rotY

Float

y Rotation of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.rotY = 20.0

rotZ

Float

z Rotation of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.rotZ = 20.0

scaleX

Float

x scale of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.scaleX = 2.0

scaleY

Float

y scale of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.scaleY = 2.0

scaleZ

Float

z scale of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.scaleZ = 2.0

x

Float

x Position of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.x = 20.0

y

Float

y Position of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.y = 20.0

z

Float

z Position of object

Example:

world = new Scene()
                                            game = new Aex()
                                            game.z = 20.0