Class GLGE.MaterialLayer
Extends
GLGE.Animatable.
The material layer describes how to apply this layer to the material
Defined in: glge.js.
Constructor Attributes | Constructor Name and Description |
---|---|
GLGE.MaterialLayer(texture, mapto, mapinput, scale, offset)
|
Method Attributes | Method Name and Description |
---|---|
Gets the layers texture X displacment offset, useful for animation
|
|
Gets the layers texture Y displacment offset, useful for animation
|
|
Gets the layers texture X displacment offset, useful for animation
|
|
Gets the layers texture X displacment scale, useful for animation
|
|
Gets the layers texture Y displacment scale, useful for animation
|
|
Gets the layers texture X displacment scale, useful for animation
|
|
Gets the texture coordinate system
|
|
getMapto()
Gets the flag representing the way the layer maps to the material
|
|
Gets the layers texture offset
|
|
Gets the layers texture X offset
|
|
Gets the layers texture Y offset
|
|
Gets the layers texture Z offset
|
|
getScale()
Gets the layers texture scale
|
|
Gets the layers texture X scale
|
|
Gets the layers texture Y scale
|
|
Gets the layers texture Z offset
|
|
Gets the textures used by the layer
|
|
setDOffsetX(value)
Sets the layers texture X displacment offset, useful for animation
|
|
setDOffsetY(value)
Sets the layers texture Y displacment offset, useful for animation
|
|
setDOffsetZ(value)
Sets the layers texture Z displacment offset, useful for animation
|
|
setDScaleX(value)
Sets the layers texture X displacment scale, useful for animation
|
|
setDScaleY(value)
Sets the layers texture Y displacment scale, useful for animation
|
|
setDScaleZ(value)
Sets the layers texture Z displacment scale, useful for animation
|
|
setMapinput(value)
Sets the texture coordinate system
|
|
setMapto(value)
Sets the flag for how this layer maps to the material
|
|
setOffsetX(value)
Sets the layers texture X offset
|
|
setOffsetY(value)
Sets the layers texture Y offset
|
|
setOffsetZ(value)
Sets the layers texture Z offset
|
|
setScaleX(value)
Sets the layers texture X scale
|
|
setScaleY(value)
Sets the layers texture Y scale
|
|
setScaleZ(value)
Sets the layers texture Z scale
|
|
setTexture(value)
Sets the textures used by the layer
|
- Methods borrowed from class GLGE.Animatable:
- animate, getAnimation, getFrameRate, setAnimation, setFrameRate
Class Detail
GLGE.MaterialLayer(texture, mapto, mapinput, scale, offset)
- Parameters:
- {number} texture
- the texture index to apply to the layer
- {number} mapto
- how to map this layer on to the material see M_XXXXX constants
- {number} mapinput
- the UV layer to map to, UV1 or UV2
- {Object} scale
- how much scaling the texture eg {x: 10, y:10, z:1}
- {Object} offset
- how much to offset the texture eg {x: 10, y:10, z:1}
- See:
- GLGE.Material
Method Detail
{Number}
getDOffsetX()
Gets the layers texture X displacment offset, useful for animation
- Returns:
- {Number} the current offset
{Number}
getDOffsetY()
Gets the layers texture Y displacment offset, useful for animation
- Returns:
- {Number} the current offset
{Number}
getDOffsetZ()
Gets the layers texture X displacment offset, useful for animation
- Returns:
- {Number} the current offset
{Number}
getDScaleX()
Gets the layers texture X displacment scale, useful for animation
- Returns:
- {Number} the current scale
{Number}
getDScaleY()
Gets the layers texture Y displacment scale, useful for animation
- Returns:
- {Number} the current scale
{Number}
getDScaleZ()
Gets the layers texture X displacment scale, useful for animation
- Returns:
- {Number} the current scale
{Number}
getMapinput()
Gets the texture coordinate system
- Returns:
- {Number} The current mapping
{Number}
getMapto()
Gets the flag representing the way the layer maps to the material
- Returns:
- {Number} The flags currently set for this layer
{object}
getOffset()
Gets the layers texture offset
- Returns:
- {object} the current offset
{Number}
getOffsetX()
Gets the layers texture X offset
- Returns:
- {Number} the current offset
{Number}
getOffsetY()
Gets the layers texture Y offset
- Returns:
- {Number} the current offset
{Number}
getOffsetZ()
Gets the layers texture Z offset
- Returns:
- {Number} the current offset
{object}
getScale()
Gets the layers texture scale
- Returns:
- {object} the current scale
{Number}
getScaleX()
Gets the layers texture X scale
- Returns:
- {Number} the current scale
{Number}
getScaleY()
Gets the layers texture Y scale
- Returns:
- {Number} the current scale
{Number}
getScaleZ()
Gets the layers texture Z offset
- Returns:
- {Number} the current offset
{GLGE.Texture}
getTexture()
Gets the textures used by the layer
- Returns:
- {GLGE.Texture} The current shininess of the material
setDOffsetX(value)
Sets the layers texture X displacment offset, useful for animation
- Parameters:
- {Number} value
- the amount to offset the texture
setDOffsetY(value)
Sets the layers texture Y displacment offset, useful for animation
- Parameters:
- {Number} value
- the amount to offset the texture
setDOffsetZ(value)
Sets the layers texture Z displacment offset, useful for animation
- Parameters:
- {Number} value
- the amount to offset the texture
setDScaleX(value)
Sets the layers texture X displacment scale, useful for animation
- Parameters:
- {Number} value
- the amount to scale the texture
setDScaleY(value)
Sets the layers texture Y displacment scale, useful for animation
- Parameters:
- {Number} value
- the amount to scale the texture
setDScaleZ(value)
Sets the layers texture Z displacment scale, useful for animation
- Parameters:
- {Number} value
- the amount to scale the texture
setMapinput(value)
Sets the texture coordinate system
- Parameters:
- {Number} value
- the mapping to use
setMapto(value)
Sets the flag for how this layer maps to the material
- Parameters:
- {Number} value
- the flags to set for this layer
setOffsetX(value)
Sets the layers texture X offset
- Parameters:
- {Number} value
- the amount to offset the texture
setOffsetY(value)
Sets the layers texture Y offset
- Parameters:
- {Number} value
- the amount to offset the texture
setOffsetZ(value)
Sets the layers texture Z offset
- Parameters:
- {Number} value
- the amount to offset the texture
setScaleX(value)
Sets the layers texture X scale
- Parameters:
- {Number} value
- the amount to scale the texture
setScaleY(value)
Sets the layers texture Y scale
- Parameters:
- {Number} value
- the amount to scale the texture
setScaleZ(value)
Sets the layers texture Z scale
- Parameters:
- {Number} value
- the amount to scale the texture
setTexture(value)
Sets the textures used by the layer
- Parameters:
- {GLGE.Texture} value
- the teture to associate with this layer