Class: Material

Raphael3d. Material

represents material

new Material(diffuseColor, ambientColor, transparency)

Material implementation
This:
Parameters:
Name Type Argument Description
diffuseColor string <optional>
diffuse color of material (under full light)
ambientColor string <optional>
ambientColor of material (under no light)
transparency number <optional>
transparency of the material
Properties:
Name Type Description
diffuseColor Raphael3d.MaterialColor diffuse color of material (under full light)
ambientColor Raphael3d.MaterialColor ambientColor of material (under no light)
transparency number transparency of the material
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2829

Methods

<static> create(diffuseColor, ambientColor, transparency) → {Raphael3d.Material}

Creates new Material object. See Raphael3d.Material for arguments
Parameters:
Name Type Argument Description
diffuseColor string <optional>
ambientColor string <optional>
transparency number <optional>
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2847
Returns:
new Material object
Type
Raphael3d.Material

computeColor(relLight) → {string}

Computes actual color according to given relative light
Parameters:
Name Type Argument Description
relLight number <optional>
relative light (0 = no light, ambientColor, 1 = full light, diffuseColor)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2855
Returns:
computed color
Type
string