mittsu 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +3 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +7 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/examples/01_-_Default1noCulling.png +0 -0
- data/examples/01_scene_example.rb +14 -0
- data/examples/02_box_mesh_example.rb +30 -0
- data/examples/02_sphere_mesh_example.rb +30 -0
- data/examples/03_complex_object_example.rb +52 -0
- data/examples/04_ambient_light_example.rb +33 -0
- data/examples/04_dir_light_example.rb +36 -0
- data/examples/04_hemi_light_example.rb +30 -0
- data/examples/04_point_light_example.rb +50 -0
- data/examples/04_spot_light_example.rb +44 -0
- data/examples/05_earth_example.rb +42 -0
- data/examples/05_earth_moon_example.rb +46 -0
- data/examples/05_texture_example.rb +32 -0
- data/examples/06_cube_texture_example.rb +36 -0
- data/examples/06_skybox_example.rb +60 -0
- data/examples/07_earth_normal_example.rb +36 -0
- data/examples/08_shadow_example.rb +87 -0
- data/examples/09_line_example.rb +52 -0
- data/examples/10_obj_loader_example.rb +68 -0
- data/examples/11_character_input_example.rb +18 -0
- data/examples/11_continuous_keyboard_input_example.rb +35 -0
- data/examples/11_keyboard_input_example.rb +43 -0
- data/examples/12_mouse_click_example.rb +38 -0
- data/examples/12_mouse_motion_example.rb +35 -0
- data/examples/12_mouse_scroll_example.rb +36 -0
- data/examples/12_orbit_zoom_example.rb +68 -0
- data/examples/13_joystick_example.rb +80 -0
- data/examples/cubemap/tron_bk.png +0 -0
- data/examples/cubemap/tron_dn.png +0 -0
- data/examples/cubemap/tron_ft.png +0 -0
- data/examples/cubemap/tron_lf.png +0 -0
- data/examples/cubemap/tron_rt.png +0 -0
- data/examples/cubemap/tron_up.png +0 -0
- data/examples/earth.png +0 -0
- data/examples/earth_normal.png +0 -0
- data/examples/example_helper.rb +2 -0
- data/examples/male-02-1noCulling.png +0 -0
- data/examples/male02.mtl +54 -0
- data/examples/male02.obj +13888 -0
- data/examples/moon.png +0 -0
- data/examples/orig_02_-_Defaul1noCulling.png +0 -0
- data/examples/texture.png +0 -0
- data/lib/mittsu.rb +15 -0
- data/lib/mittsu/cameras.rb +4 -0
- data/lib/mittsu/cameras/camera.rb +34 -0
- data/lib/mittsu/cameras/cube_camera.rb +74 -0
- data/lib/mittsu/cameras/orthographic_camera.rb +53 -0
- data/lib/mittsu/cameras/perspective_camera.rb +115 -0
- data/lib/mittsu/constants.rb +160 -0
- data/lib/mittsu/core.rb +10 -0
- data/lib/mittsu/core/buffer_attribute.rb +87 -0
- data/lib/mittsu/core/buffer_geometry.rb +694 -0
- data/lib/mittsu/core/clock.rb +44 -0
- data/lib/mittsu/core/dynamic_buffer_attribute.rb +16 -0
- data/lib/mittsu/core/event_dispatcher.rb +39 -0
- data/lib/mittsu/core/face3.rb +30 -0
- data/lib/mittsu/core/geometry.rb +596 -0
- data/lib/mittsu/core/hash_array.rb +36 -0
- data/lib/mittsu/core/hash_object.rb +19 -0
- data/lib/mittsu/core/object_3d.rb +421 -0
- data/lib/mittsu/core/raycaster.rb +78 -0
- data/lib/mittsu/extras.rb +3 -0
- data/lib/mittsu/extras/geometries.rb +2 -0
- data/lib/mittsu/extras/geometries/box_geometry.rb +108 -0
- data/lib/mittsu/extras/geometries/sphere_geometry.rb +88 -0
- data/lib/mittsu/extras/helpers.rb +1 -0
- data/lib/mittsu/extras/helpers/camera_helper.rb +155 -0
- data/lib/mittsu/extras/image.rb +3 -0
- data/lib/mittsu/extras/image_utils.rb +80 -0
- data/lib/mittsu/lights.rb +7 -0
- data/lib/mittsu/lights/ambient_light.rb +16 -0
- data/lib/mittsu/lights/area_light.rb +24 -0
- data/lib/mittsu/lights/directional_light.rb +131 -0
- data/lib/mittsu/lights/hemisphere_light.rb +29 -0
- data/lib/mittsu/lights/light.rb +21 -0
- data/lib/mittsu/lights/point_light.rb +27 -0
- data/lib/mittsu/lights/spot_light.rb +104 -0
- data/lib/mittsu/loaders.rb +7 -0
- data/lib/mittsu/loaders/cache.rb +53 -0
- data/lib/mittsu/loaders/file_loader.rb +22 -0
- data/lib/mittsu/loaders/image_loader.rb +32 -0
- data/lib/mittsu/loaders/loader.rb +212 -0
- data/lib/mittsu/loaders/loading_manager.rb +17 -0
- data/lib/mittsu/loaders/mtl_loader.rb +242 -0
- data/lib/mittsu/loaders/obj_mtl_loader.rb +225 -0
- data/lib/mittsu/materials.rb +7 -0
- data/lib/mittsu/materials/line_basic_material.rb +39 -0
- data/lib/mittsu/materials/material.rb +156 -0
- data/lib/mittsu/materials/mesh_basic_material.rb +122 -0
- data/lib/mittsu/materials/mesh_face_material.rb +30 -0
- data/lib/mittsu/materials/mesh_lambert_material.rb +126 -0
- data/lib/mittsu/materials/mesh_phong_material.rb +152 -0
- data/lib/mittsu/materials/shader_material.rb +108 -0
- data/lib/mittsu/math.rb +105 -0
- data/lib/mittsu/math/box2.rb +135 -0
- data/lib/mittsu/math/box3.rb +194 -0
- data/lib/mittsu/math/color.rb +252 -0
- data/lib/mittsu/math/color_keywords.rb +151 -0
- data/lib/mittsu/math/euler.rb +182 -0
- data/lib/mittsu/math/frustum.rb +106 -0
- data/lib/mittsu/math/line3.rb +76 -0
- data/lib/mittsu/math/matrix3.rb +163 -0
- data/lib/mittsu/math/matrix4.rb +581 -0
- data/lib/mittsu/math/plane.rb +128 -0
- data/lib/mittsu/math/quaternion.rb +309 -0
- data/lib/mittsu/math/ray.rb +292 -0
- data/lib/mittsu/math/sphere.rb +91 -0
- data/lib/mittsu/math/spline.rb +128 -0
- data/lib/mittsu/math/triangle.rb +121 -0
- data/lib/mittsu/math/vector2.rb +238 -0
- data/lib/mittsu/math/vector3.rb +491 -0
- data/lib/mittsu/math/vector4.rb +414 -0
- data/lib/mittsu/objects.rb +3 -0
- data/lib/mittsu/objects/group.rb +8 -0
- data/lib/mittsu/objects/line.rb +143 -0
- data/lib/mittsu/objects/mesh.rb +243 -0
- data/lib/mittsu/renderers.rb +1 -0
- data/lib/mittsu/renderers/glfw_window.rb +216 -0
- data/lib/mittsu/renderers/opengl/opengl_debug.rb +38 -0
- data/lib/mittsu/renderers/opengl/opengl_program.rb +402 -0
- data/lib/mittsu/renderers/opengl/opengl_shader.rb +58 -0
- data/lib/mittsu/renderers/opengl/opengl_state.rb +207 -0
- data/lib/mittsu/renderers/opengl/plugins/shadow_map_plugin.rb +416 -0
- data/lib/mittsu/renderers/opengl_render_target.rb +87 -0
- data/lib/mittsu/renderers/opengl_renderer.rb +3376 -0
- data/lib/mittsu/renderers/shaders/shader_chunk.rb +12 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/alphamap_fragment.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/alphamap_pars_fragment.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/alphatest_fragment.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/bumpmap_pars_fragment.glsl +40 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/color_fragment.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/color_pars_fragment.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/color_pars_vertex.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/color_vertex.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/common.glsl +60 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/default_vertex.glsl +15 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/defaultnormal_vertex.glsl +21 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/envmap_fragment.glsl +62 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/envmap_pars_fragment.glsl +21 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/envmap_pars_vertex.glsl +7 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/envmap_vertex.glsl +17 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl +26 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/fog_pars_fragment.glsl +15 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lightmap_fragment.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lightmap_pars_fragment.glsl +6 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lightmap_pars_vertex.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lightmap_vertex.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_lambert_pars_vertex.glsl +43 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_lambert_vertex.glsl +196 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_phong_fragment.glsl +243 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_phong_pars_fragment.glsl +58 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_phong_pars_vertex.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_phong_vertex.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/linear_to_gamma_fragment.glsl +2 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_fragment.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_pars_fragment.glsl +12 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_pars_vertex.glsl +11 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_vertex.glsl +15 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/map_fragment.glsl +9 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/map_pars_fragment.glsl +11 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/map_pars_vertex.glsl +6 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/map_particle_fragment.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/map_particle_pars_fragment.glsl +6 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/map_vertex.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/morphnormal_vertex.glsl +12 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/morphtarget_pars_vertex.glsl +13 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/morphtarget_vertex.glsl +20 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/normalmap_pars_fragment.glsl +27 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/shadowmap_fragment.glsl +217 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/shadowmap_pars_fragment.glsl +19 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/shadowmap_pars_vertex.glsl +6 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/shadowmap_vertex.glsl +9 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/skinbase_vertex.glsl +8 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/skinning_pars_vertex.glsl +47 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/skinning_vertex.glsl +20 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/skinnormal_vertex.glsl +20 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/specularmap_fragment.glsl +12 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/specularmap_pars_fragment.glsl +5 -0
- data/lib/mittsu/renderers/shaders/shader_chunk/worldpos_vertex.glsl +17 -0
- data/lib/mittsu/renderers/shaders/shader_lib.rb +420 -0
- data/lib/mittsu/renderers/shaders/uniforms_lib.rb +107 -0
- data/lib/mittsu/renderers/shaders/uniforms_utils.rb +31 -0
- data/lib/mittsu/scenes.rb +1 -0
- data/lib/mittsu/scenes/scene.rb +27 -0
- data/lib/mittsu/textures.rb +5 -0
- data/lib/mittsu/textures/compressed_texture.rb +30 -0
- data/lib/mittsu/textures/cube_texture.rb +19 -0
- data/lib/mittsu/textures/data_texture.rb +17 -0
- data/lib/mittsu/textures/texture.rb +92 -0
- data/lib/mittsu/textures/video_texture.rb +17 -0
- data/lib/mittsu/version.rb +4 -0
- data/mittsu.gemspec +31 -0
- metadata +357 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
require 'mittsu/math'
|
2
|
+
require 'mittsu/core/hash_object'
|
3
|
+
|
4
|
+
module Mittsu
|
5
|
+
class Uniform < HashObject
|
6
|
+
attr_accessor :type, :value, :needs_update
|
7
|
+
|
8
|
+
def initialize(type, value)
|
9
|
+
super()
|
10
|
+
@type, @value = type, value
|
11
|
+
@needs_update = nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def clone
|
15
|
+
new_value = case self.value
|
16
|
+
when Color, Vector2, Vector3, Vector4, Matrix4#, Texture # TODO: when Texture exists
|
17
|
+
self.value.clone
|
18
|
+
when Array
|
19
|
+
self.value.dup
|
20
|
+
else
|
21
|
+
self.value
|
22
|
+
end
|
23
|
+
Uniform.new(self.type, new_value)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
UniformsLib = {
|
28
|
+
common: {
|
29
|
+
'diffuse' => Uniform.new(:c, Color.new(0xeeeeee)),
|
30
|
+
'opacity' => Uniform.new(:f, 1.0),
|
31
|
+
|
32
|
+
'map' => Uniform.new(:t, nil),
|
33
|
+
'offsetRepeat' => Uniform.new(:v4, Vector4.new(0.0, 0.0, 1.0, 1.0)),
|
34
|
+
|
35
|
+
'lightMap' => Uniform.new(:t, nil),
|
36
|
+
'specularMap' => Uniform.new(:t, nil),
|
37
|
+
'alphaMap' => Uniform.new(:t, nil),
|
38
|
+
|
39
|
+
'envMap' => Uniform.new(:t, nil),
|
40
|
+
'flipEnvMap' => Uniform.new(:f, -1.0),
|
41
|
+
'reflectivity' => Uniform.new(:f, 1.0),
|
42
|
+
'refractionRatio' => Uniform.new(:f, 0.98),
|
43
|
+
|
44
|
+
'morphTargetInfluences' => Uniform.new(:f, 0.0)
|
45
|
+
},
|
46
|
+
|
47
|
+
bump: {
|
48
|
+
'bumpMap' => Uniform.new(:t, nil),
|
49
|
+
'bumpScale' => Uniform.new(:f, 1.0)
|
50
|
+
},
|
51
|
+
|
52
|
+
normal_map: {
|
53
|
+
'normalMap' => Uniform.new(:t, nil),
|
54
|
+
'normalScale' => Uniform.new(:v2, Vector2.new(1.0, 1.0))
|
55
|
+
},
|
56
|
+
|
57
|
+
fog: {
|
58
|
+
'fogDensity' => Uniform.new(:f, 0.00025),
|
59
|
+
'fogNear' => Uniform.new(:f, 1.0),
|
60
|
+
'fogFar' => Uniform.new(:f, 2000.0),
|
61
|
+
'fogColor' => Uniform.new(:c, Color.new(0xffffff))
|
62
|
+
},
|
63
|
+
|
64
|
+
lights: {
|
65
|
+
'ambientLightColor' => Uniform.new(:fv, []),
|
66
|
+
|
67
|
+
'directionalLightDirection' => Uniform.new(:fv, []),
|
68
|
+
'directionalLightColor' => Uniform.new(:fv, []),
|
69
|
+
|
70
|
+
'hemisphereLightDirection' => Uniform.new(:fv, []),
|
71
|
+
'hemisphereLightSkyColor' => Uniform.new(:fv, []),
|
72
|
+
'hemisphereLightGroundColor' => Uniform.new(:fv, []),
|
73
|
+
|
74
|
+
'pointLightColor' => Uniform.new(:fv, []),
|
75
|
+
'pointLightPosition' => Uniform.new(:fv, []),
|
76
|
+
'pointLightDistance' => Uniform.new(:fv1, []),
|
77
|
+
'pointLightDecay' => Uniform.new(:fv1, []),
|
78
|
+
|
79
|
+
'spotLightColor' => Uniform.new(:fv, []),
|
80
|
+
'spotLightPosition' => Uniform.new(:fv, []),
|
81
|
+
'spotLightDirection' => Uniform.new(:fv, []),
|
82
|
+
'spotLightDistance' => Uniform.new(:fv, []),
|
83
|
+
'spotLightAngleCos' => Uniform.new(:fv, []),
|
84
|
+
'spotLightExponent' => Uniform.new(:fv, []),
|
85
|
+
'spotLightDecay' => Uniform.new(:fv, [])
|
86
|
+
},
|
87
|
+
|
88
|
+
particle: {
|
89
|
+
'psColor' => Uniform.new(:c, Color.new(0xeeeeee)),
|
90
|
+
'opacity' => Uniform.new(:f, 1.0),
|
91
|
+
'size' => Uniform.new(:f, 1.0),
|
92
|
+
'scale' => Uniform.new(:f, 1.0),
|
93
|
+
'map' => Uniform.new(:t, nil),
|
94
|
+
'offsetRepeat' => Uniform.new(:v4, Vector4.new(0.0, 0.0, 1.0, 1.0))
|
95
|
+
},
|
96
|
+
|
97
|
+
shadow_map: {
|
98
|
+
'shadowMap' => Uniform.new(:tv, []),
|
99
|
+
'shadowMapSize' => Uniform.new(:v2v, []),
|
100
|
+
|
101
|
+
'shadowBias' => Uniform.new(:fv1, []),
|
102
|
+
'shadowDarkness' => Uniform.new(:fv1, []),
|
103
|
+
|
104
|
+
'shadowMatrix' => Uniform.new(:m4v, [])
|
105
|
+
}
|
106
|
+
}
|
107
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Mittsu
|
2
|
+
module UniformsUtils
|
3
|
+
def self.merge(uniforms)
|
4
|
+
merged = {}
|
5
|
+
|
6
|
+
uniforms.each do |uniform|
|
7
|
+
tmp = UniformsUtils.clone(uniform)
|
8
|
+
|
9
|
+
next if tmp.nil?
|
10
|
+
|
11
|
+
tmp.each do |(p, tmp_p)|
|
12
|
+
merged[p] = tmp_p
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
merged
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.clone(uniforms_src)
|
20
|
+
return if uniforms_src.nil?
|
21
|
+
|
22
|
+
uniforms_dst = {}
|
23
|
+
|
24
|
+
uniforms_src.each do |(u, uniform_src)|
|
25
|
+
uniforms_dst[u] = uniform_src.clone
|
26
|
+
end
|
27
|
+
|
28
|
+
uniforms_dst
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'mittsu/scenes/scene'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'mittsu'
|
2
|
+
|
3
|
+
module Mittsu
|
4
|
+
class Scene < Object3D
|
5
|
+
|
6
|
+
attr_accessor :fog, :override_material, :auto_update
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
super
|
10
|
+
|
11
|
+
@type = 'Scene'
|
12
|
+
|
13
|
+
@auto_update = true
|
14
|
+
end
|
15
|
+
|
16
|
+
def clone(object = Scene.new)
|
17
|
+
super
|
18
|
+
|
19
|
+
object.fog = fog unless fog.nil?
|
20
|
+
object.override_material = override_material unless override_material.nil?
|
21
|
+
|
22
|
+
object.auto_update = auto_update
|
23
|
+
object.matrix_auto_update = matrix_auto_update
|
24
|
+
object
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'mittsu/textures/texture'
|
2
|
+
|
3
|
+
module Mittsu
|
4
|
+
class CompressedTexture < Texture
|
5
|
+
attr_accessor :mipmaps
|
6
|
+
|
7
|
+
def initialize(mipmaps = nil, width = nil, height = nil, format = RGBAFormat, type = UnsignedByteType, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, anisotropy = 1)
|
8
|
+
super(null, mapping, wrap_s, wrap_t, mag_filter, min_filter, format, type, anisotropy)
|
9
|
+
|
10
|
+
@image = { width: width, height: height }
|
11
|
+
@mipmaps = mipmaps
|
12
|
+
|
13
|
+
# no flipping for cube textures
|
14
|
+
# (also flipping doesn't work for compressed textures )
|
15
|
+
|
16
|
+
@flip_y = false
|
17
|
+
|
18
|
+
# can't generate mipmaps for compressed textures
|
19
|
+
# mips must be embedded in DDS files
|
20
|
+
|
21
|
+
@generate_mipmaps = false
|
22
|
+
end
|
23
|
+
|
24
|
+
def clone
|
25
|
+
texture = CompressedTexture.new
|
26
|
+
super(texture)
|
27
|
+
texture
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'mittsu/textures/texture'
|
2
|
+
|
3
|
+
module Mittsu
|
4
|
+
class CubeTexture < Texture
|
5
|
+
attr_accessor :images
|
6
|
+
|
7
|
+
def initialize(images = nil, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1)
|
8
|
+
super(images, mapping, wrap_s, wrap_t, mag_filter, min_filter, format, type, anisotropy)
|
9
|
+
|
10
|
+
@images = images
|
11
|
+
end
|
12
|
+
|
13
|
+
def clone(texture = CubeTexture.new)
|
14
|
+
super(texture)
|
15
|
+
texture.images = @images
|
16
|
+
texture
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'mittsu/textures/texture'
|
2
|
+
|
3
|
+
module Mittsu
|
4
|
+
class DataTexture < Texture
|
5
|
+
def initialize(data = nil, width = nil, height = nil, format = RGBAFormat, type = UnsignedByteType, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, anisotropy = 1)
|
6
|
+
super(null, mapping, wrap_s, wrap_t, mag_filter, min_filter, format, type, anisotropy)
|
7
|
+
|
8
|
+
@image = { data: data, width: width, height: height }
|
9
|
+
end
|
10
|
+
|
11
|
+
def clone
|
12
|
+
texture = DataTexture.new
|
13
|
+
super(texture)
|
14
|
+
texture
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require 'securerandom'
|
2
|
+
require 'mittsu/math'
|
3
|
+
require 'mittsu/core/event_dispatcher'
|
4
|
+
require 'mittsu/constants'
|
5
|
+
require 'mittsu/core/hash_object'
|
6
|
+
|
7
|
+
module Mittsu
|
8
|
+
class Texture < HashObject
|
9
|
+
include EventDispatcher
|
10
|
+
|
11
|
+
DEFAULT_IMAGE = nil
|
12
|
+
DEFAULT_MAPPING = UVMapping
|
13
|
+
|
14
|
+
attr_reader :id, :uuid, :type
|
15
|
+
|
16
|
+
attr_accessor :image, :name, :source_file, :mipmaps, :offset, :repeat, :generate_mipmaps, :premultiply_alpha, :filp_y, :unpack_alignment, :on_update, :mipmaps, :mapping, :wrap_s, :wrap_t, :mag_filter, :min_filter, :anisotropy, :format, :type
|
17
|
+
|
18
|
+
def initialize(image = DEFAULT_IMAGE, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1)
|
19
|
+
super()
|
20
|
+
|
21
|
+
@id = (@@id ||= 1).tap { @@id += 1 }
|
22
|
+
@uuid = SecureRandom.uuid
|
23
|
+
|
24
|
+
@name = ''
|
25
|
+
@source_file = ''
|
26
|
+
|
27
|
+
@image = image
|
28
|
+
@mipmaps = []
|
29
|
+
|
30
|
+
@mapping = mapping
|
31
|
+
@wrap_s, @wrap_t = wrap_s, wrap_t
|
32
|
+
@mag_filter, @min_filter = mag_filter, min_filter
|
33
|
+
@anisotropy = anisotropy
|
34
|
+
@format, @type = format, type
|
35
|
+
|
36
|
+
@offset = Vector2.new(0.0, 0.0)
|
37
|
+
@repeat = Vector2.new(1.0, 1.0)
|
38
|
+
|
39
|
+
@generate_mipmaps = true
|
40
|
+
@premultiply_alpha = false
|
41
|
+
@filp_y = true
|
42
|
+
@unpack_alignment = 4 # valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)
|
43
|
+
|
44
|
+
@_needs_update = false
|
45
|
+
@on_update = nil
|
46
|
+
end
|
47
|
+
|
48
|
+
def needs_update?
|
49
|
+
@_needs_update
|
50
|
+
end
|
51
|
+
|
52
|
+
def needs_update=(value)
|
53
|
+
update if value
|
54
|
+
@_needs_update = value
|
55
|
+
end
|
56
|
+
|
57
|
+
def clone(texture = Texture.new)
|
58
|
+
texture.image = @image
|
59
|
+
texture.mipmaps = @mipmaps.dup
|
60
|
+
|
61
|
+
texture.mapping = @mapping
|
62
|
+
|
63
|
+
texture.wrap_s = @wrap_s
|
64
|
+
texture.wrap_t = @wrap_t
|
65
|
+
|
66
|
+
texture.mag_filter = @mag_filter
|
67
|
+
texture.min_filter = @min_filter
|
68
|
+
|
69
|
+
texture.anisotropy = @anisotropy
|
70
|
+
|
71
|
+
texture.format = @format
|
72
|
+
texture.type = @type
|
73
|
+
|
74
|
+
texture.offset.copy(@offset)
|
75
|
+
texture.repeat.copy(@repeat)
|
76
|
+
|
77
|
+
texture.generate_mipmaps = @generate_mipmaps
|
78
|
+
texture.premultiply_alpha = @premultiply_alpha
|
79
|
+
texture.flip_y = @flip_y
|
80
|
+
|
81
|
+
texture
|
82
|
+
end
|
83
|
+
|
84
|
+
def update
|
85
|
+
dispatch_event type: :update
|
86
|
+
end
|
87
|
+
|
88
|
+
def dispose
|
89
|
+
dispatch_event type: :dispose
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'mittsu/textures/texture'
|
2
|
+
|
3
|
+
module Mittsu
|
4
|
+
class VideoTexture < Texture
|
5
|
+
def initialize(video = nil, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1)
|
6
|
+
super(video, mapping, wrap_s, wrap_t, mag_filter, min_filter, format, type, anisotropy)
|
7
|
+
|
8
|
+
@generate_mipmaps = false
|
9
|
+
|
10
|
+
# TODO: update ???
|
11
|
+
# requestAnimationFrame( update );
|
12
|
+
# if ( video.readyState === video.HAVE_ENOUGH_DATA ) {
|
13
|
+
# scope.needsUpdate = true;
|
14
|
+
# }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/mittsu.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mittsu/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "mittsu"
|
8
|
+
spec.version = Mittsu::VERSION
|
9
|
+
spec.authors = ["Daniel Smith"]
|
10
|
+
spec.email = ["jellymann@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{THREE.js for Ruby}
|
13
|
+
spec.description = %q{A direct port of THREE.js from JavaScript/WebGL to Ruby/OpenGL}
|
14
|
+
spec.homepage = "https://github.com/jellymann/mittsu"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_runtime_dependency 'opengl-bindings', "~> 1.5"
|
23
|
+
spec.add_runtime_dependency 'ffi', "~> 1.9"
|
24
|
+
spec.add_runtime_dependency 'rmagick', "~> 2.15"
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency 'minitest', '~> 5.7'
|
29
|
+
spec.add_development_dependency 'pry', '~> 0.10'
|
30
|
+
spec.add_development_dependency 'benchmark-ips', '~> 2.3'
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,357 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mittsu
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Smith
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: opengl-bindings
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: ffi
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.9'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.9'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rmagick
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.15'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.15'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.9'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.9'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.7'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '5.7'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.10'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.10'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: benchmark-ips
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.3'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.3'
|
125
|
+
description: A direct port of THREE.js from JavaScript/WebGL to Ruby/OpenGL
|
126
|
+
email:
|
127
|
+
- jellymann@gmail.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".gitignore"
|
133
|
+
- ".travis.yml"
|
134
|
+
- CODE_OF_CONDUCT.md
|
135
|
+
- Gemfile
|
136
|
+
- LICENSE.txt
|
137
|
+
- README.md
|
138
|
+
- Rakefile
|
139
|
+
- bin/console
|
140
|
+
- bin/setup
|
141
|
+
- examples/01_-_Default1noCulling.png
|
142
|
+
- examples/01_scene_example.rb
|
143
|
+
- examples/02_box_mesh_example.rb
|
144
|
+
- examples/02_sphere_mesh_example.rb
|
145
|
+
- examples/03_complex_object_example.rb
|
146
|
+
- examples/04_ambient_light_example.rb
|
147
|
+
- examples/04_dir_light_example.rb
|
148
|
+
- examples/04_hemi_light_example.rb
|
149
|
+
- examples/04_point_light_example.rb
|
150
|
+
- examples/04_spot_light_example.rb
|
151
|
+
- examples/05_earth_example.rb
|
152
|
+
- examples/05_earth_moon_example.rb
|
153
|
+
- examples/05_texture_example.rb
|
154
|
+
- examples/06_cube_texture_example.rb
|
155
|
+
- examples/06_skybox_example.rb
|
156
|
+
- examples/07_earth_normal_example.rb
|
157
|
+
- examples/08_shadow_example.rb
|
158
|
+
- examples/09_line_example.rb
|
159
|
+
- examples/10_obj_loader_example.rb
|
160
|
+
- examples/11_character_input_example.rb
|
161
|
+
- examples/11_continuous_keyboard_input_example.rb
|
162
|
+
- examples/11_keyboard_input_example.rb
|
163
|
+
- examples/12_mouse_click_example.rb
|
164
|
+
- examples/12_mouse_motion_example.rb
|
165
|
+
- examples/12_mouse_scroll_example.rb
|
166
|
+
- examples/12_orbit_zoom_example.rb
|
167
|
+
- examples/13_joystick_example.rb
|
168
|
+
- examples/cubemap/tron_bk.png
|
169
|
+
- examples/cubemap/tron_dn.png
|
170
|
+
- examples/cubemap/tron_ft.png
|
171
|
+
- examples/cubemap/tron_lf.png
|
172
|
+
- examples/cubemap/tron_rt.png
|
173
|
+
- examples/cubemap/tron_up.png
|
174
|
+
- examples/earth.png
|
175
|
+
- examples/earth_normal.png
|
176
|
+
- examples/example_helper.rb
|
177
|
+
- examples/male-02-1noCulling.png
|
178
|
+
- examples/male02.mtl
|
179
|
+
- examples/male02.obj
|
180
|
+
- examples/moon.png
|
181
|
+
- examples/orig_02_-_Defaul1noCulling.png
|
182
|
+
- examples/texture.png
|
183
|
+
- lib/mittsu.rb
|
184
|
+
- lib/mittsu/cameras.rb
|
185
|
+
- lib/mittsu/cameras/camera.rb
|
186
|
+
- lib/mittsu/cameras/cube_camera.rb
|
187
|
+
- lib/mittsu/cameras/orthographic_camera.rb
|
188
|
+
- lib/mittsu/cameras/perspective_camera.rb
|
189
|
+
- lib/mittsu/constants.rb
|
190
|
+
- lib/mittsu/core.rb
|
191
|
+
- lib/mittsu/core/buffer_attribute.rb
|
192
|
+
- lib/mittsu/core/buffer_geometry.rb
|
193
|
+
- lib/mittsu/core/clock.rb
|
194
|
+
- lib/mittsu/core/dynamic_buffer_attribute.rb
|
195
|
+
- lib/mittsu/core/event_dispatcher.rb
|
196
|
+
- lib/mittsu/core/face3.rb
|
197
|
+
- lib/mittsu/core/geometry.rb
|
198
|
+
- lib/mittsu/core/hash_array.rb
|
199
|
+
- lib/mittsu/core/hash_object.rb
|
200
|
+
- lib/mittsu/core/object_3d.rb
|
201
|
+
- lib/mittsu/core/raycaster.rb
|
202
|
+
- lib/mittsu/extras.rb
|
203
|
+
- lib/mittsu/extras/geometries.rb
|
204
|
+
- lib/mittsu/extras/geometries/box_geometry.rb
|
205
|
+
- lib/mittsu/extras/geometries/sphere_geometry.rb
|
206
|
+
- lib/mittsu/extras/helpers.rb
|
207
|
+
- lib/mittsu/extras/helpers/camera_helper.rb
|
208
|
+
- lib/mittsu/extras/image.rb
|
209
|
+
- lib/mittsu/extras/image_utils.rb
|
210
|
+
- lib/mittsu/lights.rb
|
211
|
+
- lib/mittsu/lights/ambient_light.rb
|
212
|
+
- lib/mittsu/lights/area_light.rb
|
213
|
+
- lib/mittsu/lights/directional_light.rb
|
214
|
+
- lib/mittsu/lights/hemisphere_light.rb
|
215
|
+
- lib/mittsu/lights/light.rb
|
216
|
+
- lib/mittsu/lights/point_light.rb
|
217
|
+
- lib/mittsu/lights/spot_light.rb
|
218
|
+
- lib/mittsu/loaders.rb
|
219
|
+
- lib/mittsu/loaders/cache.rb
|
220
|
+
- lib/mittsu/loaders/file_loader.rb
|
221
|
+
- lib/mittsu/loaders/image_loader.rb
|
222
|
+
- lib/mittsu/loaders/loader.rb
|
223
|
+
- lib/mittsu/loaders/loading_manager.rb
|
224
|
+
- lib/mittsu/loaders/mtl_loader.rb
|
225
|
+
- lib/mittsu/loaders/obj_mtl_loader.rb
|
226
|
+
- lib/mittsu/materials.rb
|
227
|
+
- lib/mittsu/materials/line_basic_material.rb
|
228
|
+
- lib/mittsu/materials/material.rb
|
229
|
+
- lib/mittsu/materials/mesh_basic_material.rb
|
230
|
+
- lib/mittsu/materials/mesh_face_material.rb
|
231
|
+
- lib/mittsu/materials/mesh_lambert_material.rb
|
232
|
+
- lib/mittsu/materials/mesh_phong_material.rb
|
233
|
+
- lib/mittsu/materials/shader_material.rb
|
234
|
+
- lib/mittsu/math.rb
|
235
|
+
- lib/mittsu/math/box2.rb
|
236
|
+
- lib/mittsu/math/box3.rb
|
237
|
+
- lib/mittsu/math/color.rb
|
238
|
+
- lib/mittsu/math/color_keywords.rb
|
239
|
+
- lib/mittsu/math/euler.rb
|
240
|
+
- lib/mittsu/math/frustum.rb
|
241
|
+
- lib/mittsu/math/line3.rb
|
242
|
+
- lib/mittsu/math/matrix3.rb
|
243
|
+
- lib/mittsu/math/matrix4.rb
|
244
|
+
- lib/mittsu/math/plane.rb
|
245
|
+
- lib/mittsu/math/quaternion.rb
|
246
|
+
- lib/mittsu/math/ray.rb
|
247
|
+
- lib/mittsu/math/sphere.rb
|
248
|
+
- lib/mittsu/math/spline.rb
|
249
|
+
- lib/mittsu/math/triangle.rb
|
250
|
+
- lib/mittsu/math/vector2.rb
|
251
|
+
- lib/mittsu/math/vector3.rb
|
252
|
+
- lib/mittsu/math/vector4.rb
|
253
|
+
- lib/mittsu/objects.rb
|
254
|
+
- lib/mittsu/objects/group.rb
|
255
|
+
- lib/mittsu/objects/line.rb
|
256
|
+
- lib/mittsu/objects/mesh.rb
|
257
|
+
- lib/mittsu/renderers.rb
|
258
|
+
- lib/mittsu/renderers/glfw_window.rb
|
259
|
+
- lib/mittsu/renderers/opengl/opengl_debug.rb
|
260
|
+
- lib/mittsu/renderers/opengl/opengl_program.rb
|
261
|
+
- lib/mittsu/renderers/opengl/opengl_shader.rb
|
262
|
+
- lib/mittsu/renderers/opengl/opengl_state.rb
|
263
|
+
- lib/mittsu/renderers/opengl/plugins/shadow_map_plugin.rb
|
264
|
+
- lib/mittsu/renderers/opengl_render_target.rb
|
265
|
+
- lib/mittsu/renderers/opengl_renderer.rb
|
266
|
+
- lib/mittsu/renderers/shaders/shader_chunk.rb
|
267
|
+
- lib/mittsu/renderers/shaders/shader_chunk/alphamap_fragment.glsl
|
268
|
+
- lib/mittsu/renderers/shaders/shader_chunk/alphamap_pars_fragment.glsl
|
269
|
+
- lib/mittsu/renderers/shaders/shader_chunk/alphatest_fragment.glsl
|
270
|
+
- lib/mittsu/renderers/shaders/shader_chunk/bumpmap_pars_fragment.glsl
|
271
|
+
- lib/mittsu/renderers/shaders/shader_chunk/color_fragment.glsl
|
272
|
+
- lib/mittsu/renderers/shaders/shader_chunk/color_pars_fragment.glsl
|
273
|
+
- lib/mittsu/renderers/shaders/shader_chunk/color_pars_vertex.glsl
|
274
|
+
- lib/mittsu/renderers/shaders/shader_chunk/color_vertex.glsl
|
275
|
+
- lib/mittsu/renderers/shaders/shader_chunk/common.glsl
|
276
|
+
- lib/mittsu/renderers/shaders/shader_chunk/default_vertex.glsl
|
277
|
+
- lib/mittsu/renderers/shaders/shader_chunk/defaultnormal_vertex.glsl
|
278
|
+
- lib/mittsu/renderers/shaders/shader_chunk/envmap_fragment.glsl
|
279
|
+
- lib/mittsu/renderers/shaders/shader_chunk/envmap_pars_fragment.glsl
|
280
|
+
- lib/mittsu/renderers/shaders/shader_chunk/envmap_pars_vertex.glsl
|
281
|
+
- lib/mittsu/renderers/shaders/shader_chunk/envmap_vertex.glsl
|
282
|
+
- lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
|
283
|
+
- lib/mittsu/renderers/shaders/shader_chunk/fog_pars_fragment.glsl
|
284
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lightmap_fragment.glsl
|
285
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lightmap_pars_fragment.glsl
|
286
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lightmap_pars_vertex.glsl
|
287
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lightmap_vertex.glsl
|
288
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lights_lambert_pars_vertex.glsl
|
289
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lights_lambert_vertex.glsl
|
290
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lights_phong_fragment.glsl
|
291
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lights_phong_pars_fragment.glsl
|
292
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lights_phong_pars_vertex.glsl
|
293
|
+
- lib/mittsu/renderers/shaders/shader_chunk/lights_phong_vertex.glsl
|
294
|
+
- lib/mittsu/renderers/shaders/shader_chunk/linear_to_gamma_fragment.glsl
|
295
|
+
- lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_fragment.glsl
|
296
|
+
- lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_pars_fragment.glsl
|
297
|
+
- lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_pars_vertex.glsl
|
298
|
+
- lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_vertex.glsl
|
299
|
+
- lib/mittsu/renderers/shaders/shader_chunk/map_fragment.glsl
|
300
|
+
- lib/mittsu/renderers/shaders/shader_chunk/map_pars_fragment.glsl
|
301
|
+
- lib/mittsu/renderers/shaders/shader_chunk/map_pars_vertex.glsl
|
302
|
+
- lib/mittsu/renderers/shaders/shader_chunk/map_particle_fragment.glsl
|
303
|
+
- lib/mittsu/renderers/shaders/shader_chunk/map_particle_pars_fragment.glsl
|
304
|
+
- lib/mittsu/renderers/shaders/shader_chunk/map_vertex.glsl
|
305
|
+
- lib/mittsu/renderers/shaders/shader_chunk/morphnormal_vertex.glsl
|
306
|
+
- lib/mittsu/renderers/shaders/shader_chunk/morphtarget_pars_vertex.glsl
|
307
|
+
- lib/mittsu/renderers/shaders/shader_chunk/morphtarget_vertex.glsl
|
308
|
+
- lib/mittsu/renderers/shaders/shader_chunk/normalmap_pars_fragment.glsl
|
309
|
+
- lib/mittsu/renderers/shaders/shader_chunk/shadowmap_fragment.glsl
|
310
|
+
- lib/mittsu/renderers/shaders/shader_chunk/shadowmap_pars_fragment.glsl
|
311
|
+
- lib/mittsu/renderers/shaders/shader_chunk/shadowmap_pars_vertex.glsl
|
312
|
+
- lib/mittsu/renderers/shaders/shader_chunk/shadowmap_vertex.glsl
|
313
|
+
- lib/mittsu/renderers/shaders/shader_chunk/skinbase_vertex.glsl
|
314
|
+
- lib/mittsu/renderers/shaders/shader_chunk/skinning_pars_vertex.glsl
|
315
|
+
- lib/mittsu/renderers/shaders/shader_chunk/skinning_vertex.glsl
|
316
|
+
- lib/mittsu/renderers/shaders/shader_chunk/skinnormal_vertex.glsl
|
317
|
+
- lib/mittsu/renderers/shaders/shader_chunk/specularmap_fragment.glsl
|
318
|
+
- lib/mittsu/renderers/shaders/shader_chunk/specularmap_pars_fragment.glsl
|
319
|
+
- lib/mittsu/renderers/shaders/shader_chunk/worldpos_vertex.glsl
|
320
|
+
- lib/mittsu/renderers/shaders/shader_lib.rb
|
321
|
+
- lib/mittsu/renderers/shaders/uniforms_lib.rb
|
322
|
+
- lib/mittsu/renderers/shaders/uniforms_utils.rb
|
323
|
+
- lib/mittsu/scenes.rb
|
324
|
+
- lib/mittsu/scenes/scene.rb
|
325
|
+
- lib/mittsu/textures.rb
|
326
|
+
- lib/mittsu/textures/compressed_texture.rb
|
327
|
+
- lib/mittsu/textures/cube_texture.rb
|
328
|
+
- lib/mittsu/textures/data_texture.rb
|
329
|
+
- lib/mittsu/textures/texture.rb
|
330
|
+
- lib/mittsu/textures/video_texture.rb
|
331
|
+
- lib/mittsu/version.rb
|
332
|
+
- mittsu.gemspec
|
333
|
+
homepage: https://github.com/jellymann/mittsu
|
334
|
+
licenses:
|
335
|
+
- MIT
|
336
|
+
metadata: {}
|
337
|
+
post_install_message:
|
338
|
+
rdoc_options: []
|
339
|
+
require_paths:
|
340
|
+
- lib
|
341
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
342
|
+
requirements:
|
343
|
+
- - ">="
|
344
|
+
- !ruby/object:Gem::Version
|
345
|
+
version: '0'
|
346
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
347
|
+
requirements:
|
348
|
+
- - ">="
|
349
|
+
- !ruby/object:Gem::Version
|
350
|
+
version: '0'
|
351
|
+
requirements: []
|
352
|
+
rubyforge_project:
|
353
|
+
rubygems_version: 2.5.1
|
354
|
+
signing_key:
|
355
|
+
specification_version: 4
|
356
|
+
summary: THREE.js for Ruby
|
357
|
+
test_files: []
|