module Mittsu

parameters = {

color: <hex>,
opacity: <float>,
map: Mittsu::Texture.new( <Image> ),

light_map: Mittsu::Texture.new( <Image> ),

specular_map: Mittsu::Texture.new( <Image> ),

alpha_map: Mittsu::Texture.new( <Image> ),

env_map: Mittsu::TextureCube.new( [posx, negx, posy, negy, posz, negz] ),
combine: Mittsu::Multiply,
reflectivity: <float>,
refraction_ratio: <float>,

shading: Mittsu::SmoothShading,
blending: Mittsu::NormalBlending,
depth_test: <bool>,
depth_write: <bool>,

wireframe: <boolean>,
wireframe_linewidth: <float>,

vertex_colors: Mittsu::NoColors / Mittsu::VertexColors / Mittsu::FaceColors,

skinning: <bool>,
morph_targets: <bool>,

fog: <bool>

}

parameters = {

color: <hex>,
emissive: <hex>,
specular: <hex>,
shininess: <float>,
opacity: <float>,

map: Texture.new(<Image>),

lightMap: Texture.new(<Image>),

bumpMap: Texture.new(<Image>),
bumpScale: <float>,

normalMap: Texture.new(<Image>),
normalScale: <Vector2>,

specularMap: Texture.new(<Image>),

alphaMap: Texture.new(<Image>),

envMap: TextureCube.new([posx, negx, posy, negy, posz, negz]),
combine: Multiply,
reflectivity: <float>,
refractionRatio: <float>,

shading: SmoothShading,
blending: NormalBlending,
depthTest: <bool>,
depthWrite: <bool>,

wireframe: <boolean>,
wireframeLinewidth: <float>,

vertexColors: NoColors / VertexColors / FaceColors,

skinning: <bool>,
morphTargets: <bool>,
morphNormals: <bool>,

    fog: <bool>

}

parameters = {

color: <hex>,
opacity: <float>,
map: new THREE.Texture( <Image> ),

size: <float>,
sizeAttenuation: <bool>,

blending: THREE.NormalBlending,
depthTest: <bool>,
depthWrite: <bool>,

vertexColors: <bool>,

fog: <bool>

}

@author alteredq / alteredqualia.com/

parameters = {
  defines: { "label" : "value" },
  uniforms: { "parameter1": { type: "f", value: 1.0 }, "parameter2": { type: "i" value2: 2 } },

  fragmentShader: <string>,
  vertexShader: <string>,

  shading: THREE.SmoothShading,
  blending: THREE.NormalBlending,
  depthTest: <bool>,
  depthWrite: <bool>,

  wireframe: <boolean>,
  wireframeLinewidth: <float>,

  lights: <bool>,

  vertexColors: THREE.NoColors / THREE.VertexColors / THREE.FaceColors,

  skinning: <bool>,
  morphTargets: <bool>,
  morphNormals: <bool>,

      fog: <bool>
}

@author alteredq / alteredqualia.com/

parameters = {

color: <hex>,
opacity: <float>,
map: new THREE.Texture( <Image> ),

blending: THREE.NormalBlending,
depthTest: <bool>,
depthWrite: <bool>,

     uvOffset: new THREE.Vector2(),
     uvScale: new THREE.Vector2(),

fog: <bool>

}

Constants

AddEquation

custom blending equations (numbers start from 100 not to clash with other

mappings to OpenGL constants defined in texture.rb)
AddOperation
AdditiveBlending
AlphaFormat

Pixel formats

BackSide
BasicShadowMap

SHADOWING TYPES

ByteType
ClampToEdgeWrapping
ColorKeywords
CubeReflectionMapping
CubeRefractionMapping
CullFaceBack
CullFaceFront
CullFaceFrontBack
CullFaceNone

GL STATE CONSTANTS

CustomBlending
DEBUG
DefaultLoadingManager
DoubleSide
DstAlphaFactor
DstColorFactor

ZeroFactor = 200 OneFactor = 201 SrcAlphaFactor = 204 OneMinusSrcAlphaFactor = 205 DstAlphaFactor = 206 OneMinusDstAlphaFactor = 207

EquirectangularReflectionMapping
EquirectangularRefractionMapping
FaceColors
FlatShading
FloatType
FrontFaceDirectionCCW
FrontFaceDirectionCW
FrontSide

side

HalfFloatType
IntType
LinePieces
LineStrip
LinearFilter
LinearMipMapLinearFilter
LinearMipMapNearestFilter
LuminanceAlphaFormat
LuminanceFormat
MOUSE_LEFT
MOUSE_MIDDLE
MOUSE_RIGHT
MaxEquation
MinEquation
MirroredRepeatWrapping
MixOperation
MultiplyBlending
MultiplyOperation

TEXTURE CONSTANTS

NearestFilter

Filters

NearestMipMapLinearFilter
NearestMipMapNearestFilter
NoBlending

blending modes

NoColors

colors

NoShading

shading

NormalBlending
OneFactor
OneMinusDstAlphaFactor
OneMinusDstColorFactor
OneMinusSrcAlphaFactor
OneMinusSrcColorFactor
PCFShadowMap
PCFSoftShadowMap
RGBAFormat
RGBA_PVRTC_2BPPV1_Format
RGBA_PVRTC_4BPPV1_Format
RGBA_S3TC_DXT1_Format
RGBA_S3TC_DXT3_Format
RGBA_S3TC_DXT5_Format
RGBEFormat

RGBEFormat handled as RGBAFormat in shaders

RGBFormat
RGB_PVRTC_2BPPV1_Format
RGB_PVRTC_4BPPV1_Format

PVRTC compressed texture formats

RGB_S3TC_DXT1_Format

DDS / ST3C Compressed texture formats

RepeatWrapping

Wrapping modes

ReverseSubtractEquation
ShortType
SmoothShading
SphericalReflectionMapping
SrcAlphaFactor
SrcAlphaSaturateFactor
SrcColorFactor
SubtractEquation
SubtractiveBlending
UVMapping

Mapping modes

UnsignedByteType

Data types

UnsignedIntType
UnsignedShort4444Type

UnsignedByteType = 1009

UnsignedShort5551Type
UnsignedShort565Type
UnsignedShortType
VERSION
VertexColors
ZeroFactor

custom blending destination factors

Public Class Methods

debug?() click to toggle source
# File lib/mittsu/utils.rb, line 4
def self.debug?
  DEBUG
end
env() click to toggle source
# File lib/mittsu/utils.rb, line 8
def self.env
  ENV["MITTSU_ENV"]
end
test?() click to toggle source
# File lib/mittsu/utils.rb, line 12
def self.test?
  env == 'test'
end