├── .gitignore ├── README.md ├── _compile ├── build.py ├── closure-compiler-v20191111.jar ├── code.json ├── common.js ├── lab - Copie.json └── lab.json ├── assets ├── models │ ├── basic.sea │ ├── cone.sea │ ├── cyl.sea │ ├── gltf │ │ ├── DamagedHelmet │ │ │ ├── DamagedHelmet.bin │ │ │ ├── DamagedHelmet.gltf │ │ │ ├── Default_AO.jpg │ │ │ ├── Default_albedo.jpg │ │ │ ├── Default_emissive.jpg │ │ │ ├── Default_metalRoughness.jpg │ │ │ └── Default_normal.jpg │ │ ├── Nefertiti.glb │ │ └── botSkinned │ │ │ ├── AvatarBotA_Head_Tex_Combined.png │ │ │ ├── AvatarBotA_Tex_Combined.png │ │ │ ├── Bot_Skinned.gltf │ │ │ └── buffer.bin │ ├── heros.sea │ ├── male_female.sea │ ├── museum │ │ ├── bacchus.sea │ │ ├── bear.sea │ │ ├── boxer.sea │ │ ├── boy.sea │ │ ├── bressant.sea │ │ ├── bust.sea │ │ ├── david.sea │ │ ├── discobolus.sea │ │ ├── dogs.sea │ │ ├── dragon.sea │ │ ├── fisherman.sea │ │ ├── frost.sea │ │ ├── hunter.sea │ │ ├── magdalene.sea │ │ ├── mars.sea │ │ ├── mercury.sea │ │ ├── nefertiti.sea │ │ ├── neptune.sea │ │ ├── nymph.sea │ │ ├── nymphea.sea │ │ ├── pan.sea │ │ ├── panthere.sea │ │ ├── polyhymnia.sea │ │ ├── puke.sea │ │ ├── rhino.sea │ │ ├── venus.sea │ │ ├── wakeup.sea │ │ └── zephyr.sea │ └── tree.sea ├── shaders │ ├── basic_sky_f.fs │ ├── sky_f.fs │ └── sky_v.vs └── textures │ ├── check.jpg │ ├── cone.png │ ├── envmap │ ├── alley.jpg │ ├── arches.jpg │ ├── bridge.jpg │ ├── castle.jpg │ ├── cave.jpg │ ├── church.jpg │ ├── colors.jpg │ ├── downtown.jpg │ ├── factory.jpg │ ├── freez.jpg │ ├── gallery.jpg │ ├── green.jpg │ ├── japan.jpg │ ├── lake.jpg │ ├── loft.jpg │ ├── milkyway.jpg │ ├── mini │ │ ├── alley.jpg │ │ ├── arches.jpg │ │ ├── bridge.jpg │ │ ├── castle.jpg │ │ ├── cave.jpg │ │ ├── church.jpg │ │ ├── colors.jpg │ │ ├── downtown.jpg │ │ ├── factory.jpg │ │ ├── freez.jpg │ │ ├── gallery.jpg │ │ ├── green.jpg │ │ ├── japan.jpg │ │ ├── lake.jpg │ │ ├── loft.jpg │ │ ├── milkyway.jpg │ │ ├── mit.jpg │ │ ├── night.jpg │ │ ├── outside.jpg │ │ ├── parking.jpg │ │ ├── photo.jpg │ │ ├── pisa.jpg │ │ ├── place.jpg │ │ ├── red.jpg │ │ ├── river.jpg │ │ ├── road.jpg │ │ ├── rock.jpg │ │ ├── room.jpg │ │ ├── snow.jpg │ │ ├── stars.jpg │ │ ├── street.jpg │ │ ├── studio.jpg │ │ ├── sunset.jpg │ │ ├── theatre.jpg │ │ ├── tokyo.jpg │ │ ├── tonight.jpg │ │ ├── tunnel.jpg │ │ ├── veranda.jpg │ │ └── yellow.jpg │ ├── mit.jpg │ ├── night.jpg │ ├── outside.jpg │ ├── parking.jpg │ ├── photo.jpg │ ├── pisa.jpg │ ├── place.jpg │ ├── red.jpg │ ├── river.jpg │ ├── road.jpg │ ├── rock.jpg │ ├── room.jpg │ ├── snow.jpg │ ├── stars.jpg │ ├── street.jpg │ ├── studio.jpg │ ├── sunset.jpg │ ├── theatre.jpg │ ├── tokyo.jpg │ ├── tonight.jpg │ ├── tunnel.jpg │ ├── veranda.jpg │ └── yellow.jpg │ ├── grid.png │ ├── heros_c.jpg │ ├── logo.png │ ├── logo.svg │ ├── museum │ ├── bacchus_ao.jpg │ ├── bacchus_n.jpg │ ├── bear_ao.jpg │ ├── bear_n.jpg │ ├── boxer_ao.jpg │ ├── boxer_n.jpg │ ├── boy_ao.jpg │ ├── boy_n.jpg │ ├── bressant_ao.jpg │ ├── bressant_n.jpg │ ├── bust_ao.jpg │ ├── bust_n.jpg │ ├── david_ao.jpg │ ├── david_n.jpg │ ├── discobolus_ao.jpg │ ├── discobolus_n.jpg │ ├── dogs_ao.jpg │ ├── dogs_n.jpg │ ├── dragon_ao.jpg │ ├── dragon_n.jpg │ ├── fisherman_ao.jpg │ ├── fisherman_n.jpg │ ├── frost_ao.jpg │ ├── frost_n.jpg │ ├── hunter_ao.jpg │ ├── hunter_n.jpg │ ├── magdalene_ao.jpg │ ├── magdalene_n.jpg │ ├── mars_ao.jpg │ ├── mars_n.jpg │ ├── mercury_ao.jpg │ ├── mercury_n.jpg │ ├── nefertiti_ao.jpg │ ├── nefertiti_n.jpg │ ├── neptune_ao.jpg │ ├── neptune_n.jpg │ ├── nymph_ao.jpg │ ├── nymph_n.jpg │ ├── nymphea_ao.jpg │ ├── nymphea_n.jpg │ ├── pan_ao.jpg │ ├── pan_n.jpg │ ├── panthere_ao.jpg │ ├── panthere_n.jpg │ ├── polyhymnia_ao.jpg │ ├── polyhymnia_n.jpg │ ├── puke_ao.jpg │ ├── puke_n.jpg │ ├── rhino_ao.jpg │ ├── rhino_n.jpg │ ├── venus_ao.jpg │ ├── venus_n.jpg │ ├── wakeup_ao.jpg │ ├── wakeup_n.jpg │ ├── zephyr_ao.jpg │ └── zephyr_n.jpg │ ├── road │ ├── road_c.jpg │ └── road_n.jpg │ ├── sky │ ├── lens0.png │ ├── lens1.png │ ├── lensMoon.png │ ├── lensSun.png │ └── noise.png │ ├── spherical │ ├── black.jpg │ ├── blue.jpg │ ├── brush.jpg │ ├── ceramic.jpg │ ├── chrome.jpg │ ├── env.jpg │ ├── env0.jpg │ ├── env1.jpg │ ├── env9.jpg │ ├── glow.jpg │ ├── metal.jpg │ ├── plastic.jpg │ ├── red.jpg │ ├── sky.jpg │ ├── smooth.jpg │ └── wireframe.jpg │ ├── terrain │ ├── crater.jpg │ ├── crater_n.jpg │ ├── dirty.jpg │ ├── dirty_ao.jpg │ ├── dirty_m.jpg │ ├── dirty_n.jpg │ ├── dirty_r.jpg │ ├── grass.jpg │ ├── grass_b.jpg │ ├── grass_n.jpg │ ├── old │ │ ├── crater_n.jpg │ │ ├── grass_n.jpg │ │ ├── rock_n.jpg │ │ ├── sand_n.jpg │ │ └── water_n.jpg │ ├── rock.jpg │ ├── rock_n.jpg │ ├── sand.jpg │ ├── sand_n.jpg │ ├── snow.jpg │ ├── snow │ │ ├── freez.jpg │ │ ├── freez_d.jpg │ │ ├── freez_n.jpg │ │ ├── freez_orm.jpg │ │ ├── glass.jpg │ │ ├── glass_n.jpg │ │ ├── glass_orm.jpg │ │ ├── snow.jpg │ │ ├── snow_n.jpg │ │ ├── snow_orm.jpg │ │ ├── snow_rock.jpg │ │ ├── snow_rock_n.jpg │ │ └── snow_rock_orm.jpg │ ├── underwater_sand_by_dabbex30-d9irnog.jpg │ ├── water.jpg │ └── water_n.jpg │ └── tree.png ├── build ├── code.hex ├── code.js ├── code.min.js ├── extract.js ├── lab.hex ├── lab.js └── lab.min.js ├── css └── lab.css ├── favicon.ico ├── index.html ├── index_geometry.html ├── index_landscape.html ├── index_morph.html ├── index_pmrem.html ├── index_skinning.html ├── index_terrain.html ├── index_test.html ├── museum.html ├── package.json ├── src ├── SimplexNoise.js ├── controls │ ├── OrbitControls.js │ ├── OrbitControlsExtra - Copie.js │ ├── OrbitControlsExtra.js │ └── TransformControls.js ├── editor.js ├── externs_code.js ├── externs_lab.js ├── fixWarning.js ├── geometries │ ├── Capsule.js │ ├── ChamferBox.js │ ├── ChamferCyl.js │ ├── ConvexGeometry.js │ ├── ConvexGeometry_o.js │ ├── ConvexObjectBreaker.js │ ├── CylinderGeometry.js │ ├── GeometryTools.js │ ├── QuickHull.js │ ├── SphereBox.js │ ├── SphereGeometry.js │ ├── TorusGeometry.js │ └── Tubular.js ├── gui.js ├── helpers │ ├── CarHelper.js │ └── PointHelper.js ├── intro.js ├── libs │ ├── codemirror.js │ ├── codemirrorAdd │ │ ├── active-line.js │ │ ├── glsl.js │ │ ├── javascript.js │ │ ├── match-highlighter.js │ │ └── matchbrackets.js │ ├── draco_decoder.js │ ├── esprima.js │ ├── jshint.js │ ├── jshint.min.js │ ├── o3dgc.js │ ├── saveAs.js │ ├── sea3d.js │ ├── stats.min.js │ ├── three.js │ ├── tween.js │ └── uil.js ├── loaders │ ├── BVHLoader.js │ ├── DDSLoader.js │ ├── DRACOLoader.js │ ├── GLTFLoader.js │ ├── RGBELoader.js │ └── ShaderLoader.js ├── logo.js ├── lth │ ├── BVHLoader_Add.js │ ├── CubeCamera_Add.js │ ├── SkeletonHelper_Add.js │ ├── SkeletonPhysics.js │ ├── Skeleton_Add.js │ ├── SkinnedMesh_Add.js │ └── SpotLight_Add.js ├── materials.js ├── math.js ├── objects │ ├── CubeCamera.js │ ├── Instance.js │ ├── InstanceSkin - Copie.js │ ├── Instance_.js │ ├── Lensflare.js │ ├── Planet.js │ ├── Reflector.js │ ├── ReflectorRTT.js │ ├── Reflector_.js │ └── Terrain.js ├── particle.js ├── pmrem │ └── PMREMGenerator.js ├── pool.js ├── row.js ├── shaders │ ├── Diamond.js │ ├── ShaderTranslucent.js │ ├── TranslucentShader.js │ ├── shaderHack.js │ └── shadowPCSS.js ├── sky.js ├── textures.js ├── tools │ └── imgTool.js ├── user.js └── view.js ├── test_Gltf.html ├── test_UIL.html ├── test_colors.html ├── test_editor.html ├── test_shadow_mapping.html └── test_spotlights.html /.gitignore: -------------------------------------------------------------------------------- 1 | examples/ 2 | prepa/ 3 | desktop.ini 4 | index_dev.html 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

main source for all my repro in .lab

4 | use three.js for 3d view and sea3d for 3d model.
5 | with some custom's cool stuff ...
6 | for code i use codemirror and esprima
7 |

-------------------------------------------------------------------------------- /_compile/build.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | 5 | if sys.version_info < (2, 7): 6 | print("This script requires at least Python 2.7.") 7 | print("Please, update to a newer version: http://www.python.org/download/releases/") 8 | exit() 9 | 10 | import argparse 11 | import json 12 | import os 13 | import shutil 14 | import tempfile 15 | 16 | def make_parent_directories_if_needed(filepath): 17 | parent_directory = os.path.dirname(os.path.realpath(filepath)) 18 | try: 19 | os.makedirs(parent_directory) 20 | except OSError: 21 | pass # nothing to do 22 | 23 | def main(argv=None): 24 | 25 | parser = argparse.ArgumentParser() 26 | parser.add_argument('--include', action='append', required=True) 27 | parser.add_argument('--externs', action='append', default=['common.js']) 28 | parser.add_argument('--amd', action='store_true', default=False) 29 | parser.add_argument('--minify', action='store_true', default=False) 30 | parser.add_argument('--output', default='') 31 | parser.add_argument('--sourcemaps', action='store_true', default=False) 32 | 33 | args = parser.parse_args() 34 | 35 | output = args.output 36 | make_parent_directories_if_needed(output) # necessary 37 | 38 | # merge 39 | 40 | print(' * Building ' + output) 41 | 42 | # enable sourcemaps support 43 | 44 | if args.sourcemaps: 45 | sourcemap = output + '.map' 46 | sourcemapping = '\n//@ sourceMappingURL=' + sourcemap 47 | sourcemapargs = ' --create_source_map ' + sourcemap + ' --source_map_format=V3' 48 | else: 49 | sourcemap = sourcemapping = sourcemapargs = '' 50 | 51 | fd, path = tempfile.mkstemp() 52 | tmp = open(path, 'w') 53 | sources = [] 54 | 55 | if args.amd: 56 | tmp.write('( function ( root, factory ) {\n\n\tif ( typeof define === \'function\' && define.amd ) {\n\n\t\tdefine( [ \'exports\' ], factory );\n\n\t} else if ( typeof exports === \'object\' ) {\n\n\t\tfactory( exports );\n\n\t} else {\n\n\t\tfactory( root );\n\n\t}\n\n}( this, function ( exports ) {\n\n') 57 | 58 | for include in args.include: 59 | with open( include + '.json','r') as f: 60 | files = json.load(f) 61 | for filename in files: 62 | filename = '../' + filename; 63 | sources.append(filename) 64 | with open(filename, 'r') as f: 65 | tmp.write(f.read()) 66 | tmp.write('\n') 67 | 68 | if args.amd: 69 | tmp.write('exports.UIL = UIL;\n\n} ) );') 70 | 71 | tmp.close() 72 | 73 | # save 74 | 75 | if args.minify is False: 76 | shutil.copy(path, output) 77 | os.chmod(output, 0o664); # temp files would usually get 0600 78 | 79 | else: 80 | 81 | externs = ' --externs '.join(args.externs) 82 | source = ' '.join(sources) 83 | cmd = 'java -jar closure-compiler-v20191111.jar --warning_level=VERBOSE --jscomp_off=globalThis --externs %s --jscomp_off=checkTypes --language_in=ECMASCRIPT5_STRICT --js %s --js_output_file %s %s' % (externs, source, output, sourcemapargs) 84 | os.system(cmd) 85 | 86 | # header 87 | 88 | with open(output,'r') as f: text = f.read() 89 | with open(output,'w') as f: f.write(text + sourcemapping) 90 | 91 | os.close(fd) 92 | os.remove(path) 93 | 94 | 95 | if __name__ == "__main__": 96 | main() -------------------------------------------------------------------------------- /_compile/closure-compiler-v20191111.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/_compile/closure-compiler-v20191111.jar -------------------------------------------------------------------------------- /_compile/code.json: -------------------------------------------------------------------------------- 1 | [ 2 | "src/externs_code.js", 3 | "src/libs/uil.js", 4 | "src/libs/codemirror.js", 5 | "src/libs/codemirrorAdd/glsl.js", 6 | "src/libs/codemirrorAdd/javascript.js", 7 | "src/libs/codemirrorAdd/active-line.js", 8 | "src/libs/codemirrorAdd/matchbrackets.js", 9 | "src/libs/codemirrorAdd/match-highlighter.js", 10 | "src/libs/esprima.js", 11 | "src/libs/saveAs.js", 12 | "src/gui.js", 13 | "src/editor.js" 14 | ] -------------------------------------------------------------------------------- /_compile/common.js: -------------------------------------------------------------------------------- 1 | var console; 2 | var JSON; -------------------------------------------------------------------------------- /_compile/lab - Copie.json: -------------------------------------------------------------------------------- 1 | [ 2 | "src/externs_lab.js", 3 | "src/libs/three.js", 4 | "src/libs/o3dgc.js", 5 | "src/libs/sea3d.js", 6 | "src/libs/tween.js", 7 | "src/controls/OrbitControls.js", 8 | "src/controls/OrbitControlsExtra.js", 9 | "src/loaders/BVHLoader.js", 10 | "src/geometries/GeometryTools.js", 11 | "src/geometries/CapsuleBufferGeometry.js", 12 | "src/geometries/ConvexGeometry.js", 13 | "src/geometries/Tubular.js", 14 | "src/objects/Planet.js", 15 | "src/objects/Terrain.js", 16 | "src/objects/Lensflare.js", 17 | "src/objects/SuperSky.js", 18 | "src/helpers/CarHelper.js", 19 | "src/helpers/PointHelper.js", 20 | "src/intro.js", 21 | "src/user.js", 22 | "src/SimplexNoise.js", 23 | "src/math.js", 24 | "src/pool.js", 25 | "src/View.js" 26 | ] -------------------------------------------------------------------------------- /_compile/lab.json: -------------------------------------------------------------------------------- 1 | [ 2 | "src/externs_lab.js", 3 | "src/libs/tween.js", 4 | "src/libs/three.js", 5 | "src/libs/sea3d.js", 6 | "src/controls/OrbitControls.js", 7 | "src/controls/OrbitControlsExtra.js", 8 | "src/controls/TransformControls.js", 9 | "src/loaders/BVHLoader.js", 10 | "src/loaders/RGBELoader.js", 11 | "src/loaders/ShaderLoader.js", 12 | "src/loaders/DDSLoader.js", 13 | "src/loaders/GLTFLoader.js", 14 | "src/pmrem/PMREMGenerator.js", 15 | "src/geometries/GeometryTools.js", 16 | "src/geometries/Capsule.js", 17 | "src/geometries/ChamferBox.js", 18 | "src/geometries/ChamferCyl.js", 19 | "src/geometries/SphereBox.js", 20 | "src/geometries/SphereGeometry.js", 21 | "src/geometries/CylinderGeometry.js", 22 | "src/geometries/TorusGeometry.js", 23 | "src/geometries/ConvexGeometry.js", 24 | "src/geometries/ConvexObjectBreaker.js", 25 | "src/geometries/QuickHull.js", 26 | "src/geometries/Tubular.js", 27 | "src/objects/Planet.js", 28 | "src/objects/Terrain.js", 29 | "src/objects/Lensflare.js", 30 | "src/objects/Instance.js", 31 | "src/shaders/Diamond.js", 32 | "src/helpers/CarHelper.js", 33 | "src/helpers/PointHelper.js", 34 | "src/lth/BVHLoader_Add.js", 35 | "src/lth/Skeleton_Add.js", 36 | "src/lth/SkinnedMesh_Add.js", 37 | "src/lth/CubeCamera_Add.js", 38 | "src/tools/imgTool.js", 39 | "src/intro.js", 40 | "src/user.js", 41 | "src/SimplexNoise.js", 42 | "src/math.js", 43 | "src/pool.js", 44 | "src/sky.js", 45 | "src/textures.js", 46 | "src/materials.js", 47 | "src/logo.js", 48 | "src/view.js" 49 | ] -------------------------------------------------------------------------------- /assets/models/basic.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/basic.sea -------------------------------------------------------------------------------- /assets/models/cone.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/cone.sea -------------------------------------------------------------------------------- /assets/models/cyl.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/cyl.sea -------------------------------------------------------------------------------- /assets/models/gltf/DamagedHelmet/DamagedHelmet.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/DamagedHelmet/DamagedHelmet.bin -------------------------------------------------------------------------------- /assets/models/gltf/DamagedHelmet/DamagedHelmet.gltf: -------------------------------------------------------------------------------- 1 | { 2 | "accessors" : [ 3 | { 4 | "bufferView" : 0, 5 | "componentType" : 5123, 6 | "count" : 46356, 7 | "max" : [ 8 | 14555 9 | ], 10 | "min" : [ 11 | 0 12 | ], 13 | "type" : "SCALAR" 14 | }, 15 | { 16 | "bufferView" : 1, 17 | "componentType" : 5126, 18 | "count" : 14556, 19 | "max" : [ 20 | 0.9424954056739807, 21 | 0.8128451108932495, 22 | 0.900973916053772 23 | ], 24 | "min" : [ 25 | -0.9474585652351379, 26 | -1.18715500831604, 27 | -0.9009949564933777 28 | ], 29 | "type" : "VEC3" 30 | }, 31 | { 32 | "bufferView" : 2, 33 | "componentType" : 5126, 34 | "count" : 14556, 35 | "max" : [ 36 | 1.0, 37 | 1.0, 38 | 1.0 39 | ], 40 | "min" : [ 41 | -1.0, 42 | -1.0, 43 | -1.0 44 | ], 45 | "type" : "VEC3" 46 | }, 47 | { 48 | "bufferView" : 3, 49 | "componentType" : 5126, 50 | "count" : 14556, 51 | "max" : [ 52 | 0.9999759793281555, 53 | 1.998665988445282 54 | ], 55 | "min" : [ 56 | 0.002448640065267682, 57 | 1.0005531199858524 58 | ], 59 | "type" : "VEC2" 60 | } 61 | ], 62 | "asset" : { 63 | "generator" : "Khronos Blender glTF 2.0 exporter", 64 | "version" : "2.0" 65 | }, 66 | "bufferViews" : [ 67 | { 68 | "buffer" : 0, 69 | "byteLength" : 92712, 70 | "byteOffset" : 0, 71 | "target" : 34963 72 | }, 73 | { 74 | "buffer" : 0, 75 | "byteLength" : 174672, 76 | "byteOffset" : 92712, 77 | "target" : 34962 78 | }, 79 | { 80 | "buffer" : 0, 81 | "byteLength" : 174672, 82 | "byteOffset" : 267384, 83 | "target" : 34962 84 | }, 85 | { 86 | "buffer" : 0, 87 | "byteLength" : 116448, 88 | "byteOffset" : 442056, 89 | "target" : 34962 90 | } 91 | ], 92 | "buffers" : [ 93 | { 94 | "byteLength" : 558504, 95 | "uri" : "DamagedHelmet.bin" 96 | } 97 | ], 98 | "images" : [ 99 | { 100 | "uri" : "Default_albedo.jpg" 101 | }, 102 | { 103 | "uri" : "Default_metalRoughness.jpg" 104 | }, 105 | { 106 | "uri" : "Default_emissive.jpg" 107 | }, 108 | { 109 | "uri" : "Default_AO.jpg" 110 | }, 111 | { 112 | "uri" : "Default_normal.jpg" 113 | } 114 | ], 115 | "materials" : [ 116 | { 117 | "emissiveFactor" : [ 118 | 1.0, 119 | 1.0, 120 | 1.0 121 | ], 122 | "emissiveTexture" : { 123 | "index" : 2 124 | }, 125 | "name" : "Material_MR", 126 | "normalTexture" : { 127 | "index" : 4 128 | }, 129 | "occlusionTexture" : { 130 | "index" : 3 131 | }, 132 | "pbrMetallicRoughness" : { 133 | "baseColorTexture" : { 134 | "index" : 0 135 | }, 136 | "metallicRoughnessTexture" : { 137 | "index" : 1 138 | } 139 | } 140 | } 141 | ], 142 | "meshes" : [ 143 | { 144 | "name" : "mesh_helmet_LP_13930damagedHelmet", 145 | "primitives" : [ 146 | { 147 | "attributes" : { 148 | "NORMAL" : 2, 149 | "POSITION" : 1, 150 | "TEXCOORD_0" : 3 151 | }, 152 | "indices" : 0, 153 | "material" : 0 154 | } 155 | ] 156 | } 157 | ], 158 | "nodes" : [ 159 | { 160 | "mesh" : 0, 161 | "name" : "node_damagedHelmet_-6514", 162 | "rotation" : [ 163 | 0.7071068286895752, 164 | 0.0, 165 | -0.0, 166 | 0.7071068286895752 167 | ] 168 | } 169 | ], 170 | "samplers" : [ 171 | {} 172 | ], 173 | "scene" : 0, 174 | "scenes" : [ 175 | { 176 | "name" : "Scene", 177 | "nodes" : [ 178 | 0 179 | ] 180 | } 181 | ], 182 | "textures" : [ 183 | { 184 | "sampler" : 0, 185 | "source" : 0 186 | }, 187 | { 188 | "sampler" : 0, 189 | "source" : 1 190 | }, 191 | { 192 | "sampler" : 0, 193 | "source" : 2 194 | }, 195 | { 196 | "sampler" : 0, 197 | "source" : 3 198 | }, 199 | { 200 | "sampler" : 0, 201 | "source" : 4 202 | } 203 | ] 204 | } 205 | -------------------------------------------------------------------------------- /assets/models/gltf/DamagedHelmet/Default_AO.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/DamagedHelmet/Default_AO.jpg -------------------------------------------------------------------------------- /assets/models/gltf/DamagedHelmet/Default_albedo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/DamagedHelmet/Default_albedo.jpg -------------------------------------------------------------------------------- /assets/models/gltf/DamagedHelmet/Default_emissive.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/DamagedHelmet/Default_emissive.jpg -------------------------------------------------------------------------------- /assets/models/gltf/DamagedHelmet/Default_metalRoughness.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/DamagedHelmet/Default_metalRoughness.jpg -------------------------------------------------------------------------------- /assets/models/gltf/DamagedHelmet/Default_normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/DamagedHelmet/Default_normal.jpg -------------------------------------------------------------------------------- /assets/models/gltf/Nefertiti.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/Nefertiti.glb -------------------------------------------------------------------------------- /assets/models/gltf/botSkinned/AvatarBotA_Head_Tex_Combined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/botSkinned/AvatarBotA_Head_Tex_Combined.png -------------------------------------------------------------------------------- /assets/models/gltf/botSkinned/AvatarBotA_Tex_Combined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/botSkinned/AvatarBotA_Tex_Combined.png -------------------------------------------------------------------------------- /assets/models/gltf/botSkinned/buffer.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/gltf/botSkinned/buffer.bin -------------------------------------------------------------------------------- /assets/models/heros.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/heros.sea -------------------------------------------------------------------------------- /assets/models/male_female.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/male_female.sea -------------------------------------------------------------------------------- /assets/models/museum/bacchus.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/bacchus.sea -------------------------------------------------------------------------------- /assets/models/museum/bear.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/bear.sea -------------------------------------------------------------------------------- /assets/models/museum/boxer.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/boxer.sea -------------------------------------------------------------------------------- /assets/models/museum/boy.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/boy.sea -------------------------------------------------------------------------------- /assets/models/museum/bressant.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/bressant.sea -------------------------------------------------------------------------------- /assets/models/museum/bust.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/bust.sea -------------------------------------------------------------------------------- /assets/models/museum/david.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/david.sea -------------------------------------------------------------------------------- /assets/models/museum/discobolus.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/discobolus.sea -------------------------------------------------------------------------------- /assets/models/museum/dogs.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/dogs.sea -------------------------------------------------------------------------------- /assets/models/museum/dragon.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/dragon.sea -------------------------------------------------------------------------------- /assets/models/museum/fisherman.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/fisherman.sea -------------------------------------------------------------------------------- /assets/models/museum/frost.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/frost.sea -------------------------------------------------------------------------------- /assets/models/museum/hunter.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/hunter.sea -------------------------------------------------------------------------------- /assets/models/museum/magdalene.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/magdalene.sea -------------------------------------------------------------------------------- /assets/models/museum/mars.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/mars.sea -------------------------------------------------------------------------------- /assets/models/museum/mercury.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/mercury.sea -------------------------------------------------------------------------------- /assets/models/museum/nefertiti.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/nefertiti.sea -------------------------------------------------------------------------------- /assets/models/museum/neptune.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/neptune.sea -------------------------------------------------------------------------------- /assets/models/museum/nymph.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/nymph.sea -------------------------------------------------------------------------------- /assets/models/museum/nymphea.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/nymphea.sea -------------------------------------------------------------------------------- /assets/models/museum/pan.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/pan.sea -------------------------------------------------------------------------------- /assets/models/museum/panthere.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/panthere.sea -------------------------------------------------------------------------------- /assets/models/museum/polyhymnia.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/polyhymnia.sea -------------------------------------------------------------------------------- /assets/models/museum/puke.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/puke.sea -------------------------------------------------------------------------------- /assets/models/museum/rhino.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/rhino.sea -------------------------------------------------------------------------------- /assets/models/museum/venus.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/venus.sea -------------------------------------------------------------------------------- /assets/models/museum/wakeup.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/wakeup.sea -------------------------------------------------------------------------------- /assets/models/museum/zephyr.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/museum/zephyr.sea -------------------------------------------------------------------------------- /assets/models/tree.sea: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/models/tree.sea -------------------------------------------------------------------------------- /assets/shaders/basic_sky_f.fs: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define GOLDEN 1.61803398875 4 | 5 | vec4 ToRGBE( in vec4 value ) { 6 | 7 | float maxComponent = max( max( value.r, value.g ), value.b ); 8 | float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 ); 9 | return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 ); 10 | //return vec4( value.brg, ( 3.0 + 128.0 ) / 256.0 ); 11 | } 12 | 13 | vec4 toHDR( in vec4 c ) { 14 | 15 | vec3 v = c.rgb; 16 | v = pow( abs(v), vec3( GOLDEN ));// exposure and gamma increase to match HDR 17 | return ToRGBE( vec4(v.r, v.g, v.b, 1.0) ); 18 | 19 | } 20 | /* 21 | vec4 HdrEncode(vec3 value) { 22 | //value = value / 65536.0; 23 | vec3 exponent = clamp(ceil(log2(value)), -128.0, 127.0); 24 | float commonExponent = max(max(exponent.r, exponent.g), exponent.b); 25 | float range = exp2(commonExponent); 26 | vec3 mantissa = clamp(value / range, 0.0, 1.0); 27 | return vec4(mantissa, (commonExponent + 128.0)/256.0); 28 | 29 | }*/ 30 | 31 | uniform sampler2D map; 32 | uniform int decode; 33 | uniform int isHdr; 34 | uniform int rev; 35 | varying vec2 vUv; 36 | 37 | void main() { 38 | int flip = isHdr; 39 | vec2 uVx = vec2( rev == 1 ? 0.5 - vUv.x : vUv.x, flip == 1 ? 1.0 - vUv.y : vUv.y ); 40 | vec4 c = texture2D( map, uVx ); 41 | vec4 color = isHdr == 1 ? c : toHDR( c ); 42 | gl_FragColor = decode == 1 ? RGBEToLinear( color ) : color; 43 | } -------------------------------------------------------------------------------- /assets/shaders/sky_v.vs: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | varying vec3 worldPosition; 3 | 4 | void main() { 5 | 6 | vUv = uv; 7 | worldPosition = ( modelMatrix * vec4( position, 1.0 )).xyz; 8 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 9 | 10 | } -------------------------------------------------------------------------------- /assets/textures/check.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/check.jpg -------------------------------------------------------------------------------- /assets/textures/cone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/cone.png -------------------------------------------------------------------------------- /assets/textures/envmap/alley.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/alley.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/arches.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/arches.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/bridge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/bridge.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/castle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/castle.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/cave.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/cave.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/church.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/church.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/colors.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/colors.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/downtown.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/downtown.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/factory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/factory.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/freez.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/freez.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/gallery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/gallery.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/green.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/green.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/japan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/japan.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/lake.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/lake.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/loft.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/loft.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/milkyway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/milkyway.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/alley.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/alley.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/arches.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/arches.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/bridge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/bridge.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/castle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/castle.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/cave.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/cave.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/church.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/church.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/colors.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/colors.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/downtown.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/downtown.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/factory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/factory.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/freez.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/freez.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/gallery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/gallery.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/green.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/green.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/japan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/japan.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/lake.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/lake.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/loft.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/loft.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/milkyway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/milkyway.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/mit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/mit.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/night.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/night.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/outside.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/outside.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/parking.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/parking.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/photo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/photo.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/pisa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/pisa.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/place.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/place.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/red.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/red.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/river.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/river.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/road.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/road.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/rock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/rock.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/room.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/room.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/snow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/snow.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/stars.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/stars.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/street.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/street.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/studio.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/studio.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/sunset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/sunset.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/theatre.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/theatre.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/tokyo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/tokyo.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/tonight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/tonight.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/tunnel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/tunnel.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/veranda.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/veranda.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mini/yellow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mini/yellow.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/mit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/mit.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/night.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/night.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/outside.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/outside.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/parking.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/parking.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/photo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/photo.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/pisa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/pisa.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/place.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/place.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/red.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/red.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/river.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/river.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/road.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/road.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/rock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/rock.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/room.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/room.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/snow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/snow.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/stars.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/stars.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/street.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/street.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/studio.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/studio.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/sunset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/sunset.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/theatre.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/theatre.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/tokyo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/tokyo.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/tonight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/tonight.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/tunnel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/tunnel.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/veranda.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/veranda.jpg -------------------------------------------------------------------------------- /assets/textures/envmap/yellow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/envmap/yellow.jpg -------------------------------------------------------------------------------- /assets/textures/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/grid.png -------------------------------------------------------------------------------- /assets/textures/heros_c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/heros_c.jpg -------------------------------------------------------------------------------- /assets/textures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/logo.png -------------------------------------------------------------------------------- /assets/textures/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | 50 | 51 | 52 | 53 | 56 | 57 | 58 | 59 | 62 | 63 | 64 | 69 | 70 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /assets/textures/museum/bacchus_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/bacchus_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/bacchus_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/bacchus_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/bear_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/bear_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/bear_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/bear_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/boxer_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/boxer_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/boxer_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/boxer_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/boy_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/boy_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/boy_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/boy_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/bressant_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/bressant_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/bressant_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/bressant_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/bust_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/bust_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/bust_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/bust_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/david_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/david_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/david_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/david_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/discobolus_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/discobolus_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/discobolus_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/discobolus_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/dogs_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/dogs_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/dogs_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/dogs_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/dragon_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/dragon_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/dragon_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/dragon_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/fisherman_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/fisherman_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/fisherman_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/fisherman_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/frost_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/frost_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/frost_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/frost_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/hunter_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/hunter_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/hunter_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/hunter_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/magdalene_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/magdalene_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/magdalene_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/magdalene_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/mars_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/mars_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/mars_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/mars_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/mercury_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/mercury_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/mercury_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/mercury_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/nefertiti_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/nefertiti_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/nefertiti_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/nefertiti_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/neptune_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/neptune_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/neptune_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/neptune_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/nymph_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/nymph_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/nymph_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/nymph_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/nymphea_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/nymphea_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/nymphea_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/nymphea_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/pan_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/pan_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/pan_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/pan_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/panthere_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/panthere_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/panthere_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/panthere_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/polyhymnia_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/polyhymnia_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/polyhymnia_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/polyhymnia_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/puke_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/puke_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/puke_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/puke_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/rhino_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/rhino_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/rhino_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/rhino_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/venus_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/venus_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/venus_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/venus_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/wakeup_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/wakeup_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/wakeup_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/wakeup_n.jpg -------------------------------------------------------------------------------- /assets/textures/museum/zephyr_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/zephyr_ao.jpg -------------------------------------------------------------------------------- /assets/textures/museum/zephyr_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/museum/zephyr_n.jpg -------------------------------------------------------------------------------- /assets/textures/road/road_c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/road/road_c.jpg -------------------------------------------------------------------------------- /assets/textures/road/road_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/road/road_n.jpg -------------------------------------------------------------------------------- /assets/textures/sky/lens0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/sky/lens0.png -------------------------------------------------------------------------------- /assets/textures/sky/lens1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/sky/lens1.png -------------------------------------------------------------------------------- /assets/textures/sky/lensMoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/sky/lensMoon.png -------------------------------------------------------------------------------- /assets/textures/sky/lensSun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/sky/lensSun.png -------------------------------------------------------------------------------- /assets/textures/sky/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/sky/noise.png -------------------------------------------------------------------------------- /assets/textures/spherical/black.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/black.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/blue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/blue.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/brush.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/brush.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/ceramic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/ceramic.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/chrome.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/chrome.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/env.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/env.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/env0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/env0.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/env1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/env1.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/env9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/env9.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/glow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/glow.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/metal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/metal.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/plastic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/plastic.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/red.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/red.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/sky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/sky.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/smooth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/smooth.jpg -------------------------------------------------------------------------------- /assets/textures/spherical/wireframe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/spherical/wireframe.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/crater.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/crater.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/crater_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/crater_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/dirty.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/dirty.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/dirty_ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/dirty_ao.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/dirty_m.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/dirty_m.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/dirty_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/dirty_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/dirty_r.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/dirty_r.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/grass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/grass.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/grass_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/grass_b.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/grass_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/grass_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/old/crater_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/old/crater_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/old/grass_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/old/grass_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/old/rock_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/old/rock_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/old/sand_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/old/sand_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/old/water_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/old/water_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/rock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/rock.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/rock_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/rock_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/sand.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/sand.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/sand_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/sand_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/freez.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/freez.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/freez_d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/freez_d.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/freez_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/freez_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/freez_orm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/freez_orm.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/glass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/glass.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/glass_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/glass_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/glass_orm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/glass_orm.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/snow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/snow.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/snow_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/snow_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/snow_orm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/snow_orm.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/snow_rock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/snow_rock.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/snow_rock_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/snow_rock_n.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/snow/snow_rock_orm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/snow/snow_rock_orm.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/underwater_sand_by_dabbex30-d9irnog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/underwater_sand_by_dabbex30-d9irnog.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/water.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/water.jpg -------------------------------------------------------------------------------- /assets/textures/terrain/water_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/terrain/water_n.jpg -------------------------------------------------------------------------------- /assets/textures/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/assets/textures/tree.png -------------------------------------------------------------------------------- /build/code.hex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/build/code.hex -------------------------------------------------------------------------------- /build/lab.hex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/build/lab.hex -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/favicon.ico -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | lab 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 50 | 51 | -------------------------------------------------------------------------------- /index_geometry.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | lab - geometry 6 | 7 | 8 | 9 | 10 | 11 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 201 | 202 | -------------------------------------------------------------------------------- /index_morph.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Lab terrain 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 233 | 234 | -------------------------------------------------------------------------------- /index_pmrem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | lab dev 6 | 7 | 8 | 9 | 10 | 11 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 169 | 170 | -------------------------------------------------------------------------------- /index_skinning.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Lab terrain 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 241 | 242 | -------------------------------------------------------------------------------- /index_terrain.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Lab terrain 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 218 | 219 | -------------------------------------------------------------------------------- /index_test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Lab test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 170 | 171 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lab", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts":{ 6 | "build": "npm run code && npm run lab", 7 | "code": "cd _compile && python build.py --include code --output ../build/code.js && python build.py --include code --minify --output ../build/code.min.js", 8 | "lab": "cd _compile && python build.py --include lab --output ../build/lab.js && python build.py --include lab --minify --output ../build/lab.min.js" 9 | }, 10 | "author": "lth <3dflashlo@gmail.com>", 11 | "license": "MIT" 12 | } 13 | -------------------------------------------------------------------------------- /src/externs_code.js: -------------------------------------------------------------------------------- 1 | var view, demos, user; 2 | var UIL, exports, define, module, performance; 3 | var CodeMirror, getComputedStyle, require, requirejs, esprima; 4 | var global; -------------------------------------------------------------------------------- /src/externs_lab.js: -------------------------------------------------------------------------------- 1 | var demos, editor, unPause; 2 | var process, exports, define, module, atob, DracoDecoderModule; 3 | var THREE, WebGL2RenderingContext, XRWebGLLayer, TextDecoder, performance, ImageBitmap, createImageBitmap, fetch, WeakMap, OffscreenCanvas, XRDevice; 4 | var __THREE_DEVTOOLS__; 5 | var WebGL2ComputeRenderingContext; 6 | var Map; 7 | var Promise; -------------------------------------------------------------------------------- /src/fixWarning.js: -------------------------------------------------------------------------------- 1 | var fixWarning = function () { 2 | 3 | var s = THREE.ShaderChunk.bsdfs; 4 | s = s.replace( 'pow( lightDistance, decayExponent )', 'pow( abs(lightDistance), decayExponent ) * sign(lightDistance)' ); 5 | s = s.replace( 'return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );', ['float LL = saturate( -lightDistance / cutoffDistance + 1.0 );', 'return pow( abs(LL), decayExponent ) * sign(LL);'].join('\n') ); 6 | s = s.replace( 'pow( dotNH, shininess );', 'pow( abs(dotNH), shininess ) * sign(dotNH);' ); 7 | s = s.replace( 'pow(sin2h, invAlpha * 0.5) / (2.0 * PI);', '( pow( abs(sin2h), invAlpha * 0.5) * sign(sin2h) ) / (2.0 * PI);' ); 8 | THREE.ShaderChunk.bsdfs = s; 9 | 10 | s = THREE.ShaderChunk.encodings_pars_fragment; 11 | s = s.replace( 'pow( value.rgb, vec3( gammaFactor ) )', 'pow( abs(value.rgb), vec3( gammaFactor ) )' ); 12 | s = s.replace( 'pow( value.rgb, vec3( 1.0 / gammaFactor ) )', 'pow( abs(value.rgb), vec3( 1.0 / gammaFactor ) )' ); 13 | s = s.replace( 'pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) )', 'pow( abs(value.rgb * 0.9478672986 + vec3( 0.0521327014 )), vec3( 2.4 ) )' ); 14 | s = s.replace( 'pow( value.rgb, vec3( 0.41666 )', 'pow( abs(value.rgb), vec3( 0.41666 )' ); 15 | THREE.ShaderChunk.encodings_pars_fragment = s; 16 | 17 | s = THREE.ShaderChunk.lights_physical_pars_fragment; 18 | s = s.replace( 'pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 )', 'pow( abs(1.0 - dotNL), 5.0 ) * pow( abs(1.0 - roughness), 2.0 )' ); 19 | s = s.replace( 'pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) )', 'pow( abs(dotNV + ambientOcclusion), exp2( - 16.0 * roughness - 1.0 ) )' ); 20 | THREE.ShaderChunk.lights_physical_pars_fragment = s; 21 | 22 | s = THREE.ShaderChunk.tonemapping_pars_fragment; 23 | s = s.replace( 'pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );', 'pow( abs(( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 )), vec3( 2.2 ) );' ); 24 | THREE.ShaderChunk.tonemapping_pars_fragment = s; 25 | 26 | s = THREE.ShaderChunk.cube_uv_reflection_fragment; 27 | s = s.replace( 'pow(0.559 * variance, 0.25);', 'pow( abs(0.559 * variance), 0.25);' ); 28 | THREE.ShaderChunk.cube_uv_reflection_fragment = s; 29 | 30 | }; -------------------------------------------------------------------------------- /src/geometries/Capsule.js: -------------------------------------------------------------------------------- 1 | // The total height is height+2*radius, so the height is just the height between the center of each 'sphere' of the capsule caps 2 | 3 | THREE.Capsule = function( radius, height, radialSegs, heightSegs ) { 4 | 5 | THREE.BufferGeometry.call( this ); 6 | 7 | this.type = 'Capsule'; 8 | 9 | radius = radius || 1; 10 | height = height || 1; 11 | 12 | var pi = Math.PI; 13 | 14 | radialSegs = Math.floor( radialSegs ) || 12; 15 | var sHeight = Math.floor( radialSegs * 0.5 ); 16 | 17 | heightSegs = Math.floor( heightSegs ) || 1; 18 | var o0 = Math.PI * 2; 19 | var o1 = Math.PI * 0.5; 20 | var g = new THREE.Geometry(); 21 | var m0 = new THREE.CylinderGeometry( radius, radius, height, radialSegs, heightSegs, true ); 22 | 23 | var mr = new THREE.Matrix4(); 24 | var m1 = new THREE.SphereGeometry( radius, radialSegs, sHeight, 0, o0, 0, o1); 25 | var m2 = new THREE.SphereGeometry( radius, radialSegs, sHeight, 0, o0, o1, o1); 26 | var mtx0 = new THREE.Matrix4().makeTranslation( 0,0,0 ); 27 | // if(radialSegs===6) mtx0.makeRotationY( 30 * THREE.Math.DEG2RAD ); 28 | var mtx1 = new THREE.Matrix4().makeTranslation(0, height*0.5,0); 29 | var mtx2 = new THREE.Matrix4().makeTranslation(0, -height*0.5,0); 30 | mr.makeRotationZ( pi ); 31 | g.merge( m0, mtx0.multiply(mr) ); 32 | g.merge( m1, mtx1); 33 | g.merge( m2, mtx2); 34 | 35 | g.mergeVertices(); 36 | g.computeVertexNormals(); 37 | 38 | m0.dispose(); 39 | m1.dispose(); 40 | m2.dispose(); 41 | 42 | this.fromGeometry( g ); 43 | 44 | g.dispose(); 45 | 46 | } 47 | 48 | THREE.Capsule.prototype = Object.create( THREE.BufferGeometry.prototype ); 49 | THREE.Capsule.prototype.constructor = THREE.Capsule; -------------------------------------------------------------------------------- /src/geometries/ChamferBox.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | THREE.ChamferBox = function( width, height, depth, filet, widthSegs, heightSegs, depthSegs, filetSegs ) { 4 | 5 | THREE.BufferGeometry.call( this ); 6 | 7 | this.type = 'ChamferBox'; 8 | 9 | width = width || 1; 10 | height = height || 1; 11 | depth = depth || 1; 12 | filet = filet || 0.1; 13 | 14 | // segments 15 | 16 | widthSegs = Math.floor( widthSegs ) || 1; 17 | heightSegs = Math.floor( heightSegs ) || 1; 18 | depthSegs = Math.floor( depthSegs ) || 1; 19 | filetSegs = Math.floor( filetSegs ) || 3; 20 | 21 | var pi = Math.PI; 22 | var p90 = pi * 0.5; 23 | var twoFilet = filet * 2; 24 | 25 | var midWidth = width * 0.5; 26 | var midHeight = height * 0.5; 27 | var midDepth = depth * 0.5; 28 | 29 | var mr = new THREE.Matrix4(); 30 | var mt = new THREE.Matrix4(); 31 | var mp = new THREE.Matrix4(); 32 | 33 | var g = new THREE.Geometry(); 34 | var f = new THREE.PlaneGeometry( width-twoFilet, height-twoFilet, widthSegs, heightSegs ); 35 | var c1 = new THREE.CylinderGeometry( filet, filet, width-twoFilet, filetSegs ,widthSegs, true, 0, p90 ); 36 | var c2 = new THREE.CylinderGeometry( filet, filet, height-twoFilet, filetSegs ,heightSegs, true, 0, p90 ); 37 | var c3 = new THREE.SphereGeometry( filet, filetSegs, filetSegs, 0, p90, 0, -p90 ); 38 | 39 | // front 40 | 41 | mt.makeTranslation( 0, midWidth - filet, 0 ); 42 | mr.makeRotationX( p90 ); 43 | c1.merge( c3, mt.multiply(mr)); 44 | 45 | mt.makeTranslation( 0, -midWidth + filet, 0 ); 46 | mr.makeRotationX( p90 ); 47 | mp.makeRotationY( -p90 ); 48 | c1.merge( c3, mt.multiply(mr).multiply(mp) ); 49 | 50 | mt.makeTranslation( midWidth - filet, 0, -filet ); 51 | 52 | f.merge( c2, mt); 53 | mt.makeTranslation( -midWidth + filet, 0, -filet ); 54 | mr.makeRotationZ( pi ); 55 | f.merge( c2, mt.multiply(mr)); 56 | mr.makeRotationZ( p90 ); 57 | mt.makeTranslation( 0, midHeight - filet, -filet ); 58 | f.merge( c1, mt.multiply(mr)); 59 | mt.makeTranslation( 0, -midHeight + filet, -filet ); 60 | mr.makeRotationZ( -p90 ); 61 | f.merge( c1, mt.multiply(mr)); 62 | 63 | mt.makeTranslation( 0, 0, midDepth ); 64 | g.merge( f, mt ); 65 | 66 | // back 67 | 68 | mt.makeTranslation( 0, 0, -midDepth ); 69 | mr.makeRotationY( pi ); 70 | g.merge( f, mt.multiply(mr) ); 71 | 72 | // side left 73 | 74 | f.dispose(); 75 | c1.dispose(); 76 | 77 | f = new THREE.PlaneGeometry( depth-twoFilet, height-twoFilet, depthSegs, heightSegs ); 78 | c1 = new THREE.CylinderGeometry( filet, filet, depth-twoFilet, filetSegs, depthSegs, true, 0, p90 ); 79 | 80 | mt.makeTranslation( 0, -(midHeight - filet), -filet, 0 ); 81 | mr.makeRotationZ( -p90 ); 82 | 83 | f.merge( c1, mt.multiply(mr)); 84 | mt.makeTranslation( 0, midHeight - filet, -filet, 0 ); 85 | mr.makeRotationZ( p90 ); 86 | f.merge( c1, mt.multiply(mr)); 87 | 88 | mt.makeTranslation( -midWidth, 0, 0 ); 89 | mr.makeRotationY( -p90 ); 90 | g.merge( f, mt.multiply(mr) ); 91 | 92 | // side right 93 | 94 | mt.makeTranslation( midWidth, 0, 0 ); 95 | mr.makeRotationY( p90 ); 96 | g.merge( f, mt.multiply(mr) ); 97 | 98 | // top 99 | 100 | f.dispose(); 101 | f = new THREE.PlaneGeometry( width-twoFilet, depth-twoFilet, widthSegs, depthSegs ); 102 | 103 | mt.makeTranslation( 0, midHeight, 0); 104 | mr.makeRotationX( -p90 ); 105 | g.merge( f, mt.multiply(mr) ); 106 | 107 | // bottom 108 | 109 | mt.makeTranslation( 0, -midHeight, 0); 110 | mr.makeRotationX( p90 ); 111 | g.merge( f, mt.multiply(mr) ); 112 | 113 | // clear 114 | 115 | f.dispose(); 116 | c1.dispose(); 117 | c2.dispose(); 118 | c3.dispose(); 119 | 120 | // final geometry 121 | 122 | g.mergeVertices(); 123 | g.computeVertexNormals(); 124 | 125 | this.fromGeometry( g ); 126 | g.dispose(); 127 | 128 | } 129 | 130 | THREE.ChamferBox.prototype = Object.create( THREE.BufferGeometry.prototype ); 131 | THREE.ChamferBox.prototype.constructor = THREE.ChamferBox; -------------------------------------------------------------------------------- /src/geometries/ChamferCyl.js: -------------------------------------------------------------------------------- 1 | 2 | THREE.ChamferCyl = function( radiusTop, radiusBottom, height, filet, radialSegs, heightSegs, filetSegs ) { 3 | 4 | THREE.BufferGeometry.call( this ); 5 | 6 | this.type = 'ChamferCyl'; 7 | 8 | radiusTop = radiusTop !== undefined ? radiusTop : 1; 9 | radiusBottom = radiusBottom !== undefined ? radiusBottom : 1; 10 | height = height || 1; 11 | filet = filet || 0.2; 12 | 13 | radialSegs = Math.floor( radialSegs ) || 24; 14 | heightSegs = Math.floor( heightSegs ) || 1; 15 | filetSegs = Math.floor( filetSegs ) || 3; 16 | 17 | var mr = new THREE.Matrix4(); 18 | var mt = new THREE.Matrix4(); 19 | ///var my = new THREE.Matrix4(); 20 | 21 | var pi = Math.PI; 22 | var p90 = pi * 0.5; 23 | var twoPi = pi * 2; 24 | 25 | var start = 0;//(twoPi / radialSegs); 26 | 27 | var g = new THREE.CylinderGeometry( radiusTop, radiusBottom, height-(filet*2), radialSegs, heightSegs, true, start ); 28 | 29 | // top 30 | 31 | var c1 = new THREE.TorusGeometry( radiusTop-filet, filet, filetSegs, radialSegs, twoPi, 0, p90 ); 32 | var c2 = new THREE.CircleGeometry( radiusTop-filet, radialSegs ); 33 | 34 | mt.makeTranslation( 0,0, filet ); 35 | c1.merge( c2, mt ); 36 | 37 | mr.makeTranslation( 0,0,( (height*0.5) - filet) ); 38 | mt.makeRotationX( -p90 ); 39 | g.merge( c1, mt.multiply(mr) ); 40 | 41 | // bottom 42 | 43 | c1.dispose(); 44 | c2.dispose(); 45 | 46 | c1 = new THREE.TorusGeometry( radiusBottom-filet, filet, filetSegs, radialSegs, twoPi, 0, p90 ); 47 | c2 = new THREE.CircleGeometry( radiusBottom-filet, radialSegs ); 48 | 49 | mt.makeTranslation( 0,0, filet ); 50 | c1.merge( c2, mt ); 51 | 52 | mr.makeTranslation( 0,0,( (height*0.5) - filet) ); 53 | mt.makeRotationX( p90 ); 54 | g.merge( c1, mt.multiply(mr) ); 55 | 56 | // clear 57 | 58 | c1.dispose(); 59 | c2.dispose(); 60 | 61 | // final geometry 62 | 63 | g.mergeVertices(); 64 | g.computeVertexNormals(); 65 | 66 | this.fromGeometry( g ); 67 | 68 | g.dispose(); 69 | 70 | } 71 | 72 | THREE.ChamferCyl.prototype = Object.create( THREE.BufferGeometry.prototype ); 73 | THREE.ChamferCyl.prototype.constructor = THREE.ChamferCyl; -------------------------------------------------------------------------------- /src/geometries/ConvexGeometry.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Mugen87 / https://github.com/Mugen87 3 | */ 4 | 5 | ( function () { 6 | 7 | // ConvexGeometry 8 | 9 | function ConvexGeometry( points ) { 10 | 11 | THREE.Geometry.call( this ); 12 | 13 | this.fromBufferGeometry( new ConvexBufferGeometry( points ) ); 14 | this.mergeVertices(); 15 | 16 | } 17 | 18 | ConvexGeometry.prototype = Object.create( THREE.Geometry.prototype ); 19 | ConvexGeometry.prototype.constructor = ConvexGeometry; 20 | 21 | // ConvexBufferGeometry 22 | 23 | function ConvexBufferGeometry( points ) { 24 | 25 | THREE.BufferGeometry.call( this ); 26 | 27 | // buffers 28 | 29 | var vertices = []; 30 | var normals = []; 31 | 32 | // execute QuickHull 33 | 34 | if ( THREE.QuickHull === undefined ) { 35 | 36 | console.error( 'THREE.ConvexBufferGeometry: ConvexBufferGeometry relies on THREE.QuickHull' ); 37 | 38 | } 39 | 40 | var quickHull = new THREE.QuickHull().setFromPoints( points ); 41 | 42 | // generate vertices and normals 43 | 44 | var faces = quickHull.faces; 45 | 46 | for ( var i = 0; i < faces.length; i ++ ) { 47 | 48 | var face = faces[ i ]; 49 | var edge = face.edge; 50 | 51 | // we move along a doubly-connected edge list to access all face points (see HalfEdge docs) 52 | 53 | do { 54 | 55 | var point = edge.head().point; 56 | 57 | vertices.push( point.x, point.y, point.z ); 58 | normals.push( face.normal.x, face.normal.y, face.normal.z ); 59 | 60 | edge = edge.next; 61 | 62 | } while ( edge !== face.edge ); 63 | 64 | } 65 | 66 | // build geometry 67 | 68 | this.setAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) ); 69 | this.setAttribute( 'normal', new THREE.Float32BufferAttribute( normals, 3 ) ); 70 | 71 | } 72 | 73 | ConvexBufferGeometry.prototype = Object.create( THREE.BufferGeometry.prototype ); 74 | ConvexBufferGeometry.prototype.constructor = ConvexBufferGeometry; 75 | 76 | // export 77 | 78 | THREE.ConvexGeometry = ConvexGeometry; 79 | THREE.ConvexBufferGeometry = ConvexBufferGeometry; 80 | 81 | } )(); 82 | -------------------------------------------------------------------------------- /src/geometries/ConvexGeometry_o.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author qiao / https://github.com/qiao 3 | * @fileoverview This is a convex hull generator using the incremental method. 4 | * The complexity is O(n^2) where n is the number of vertices. 5 | * O(nlogn) algorithms do exist, but they are much more complicated. 6 | * 7 | * Benchmark: 8 | * 9 | * Platform: CPU: P7350 @2.00GHz Engine: V8 10 | * 11 | * Num Vertices Time(ms) 12 | * 13 | * 10 1 14 | * 20 3 15 | * 30 19 16 | * 40 48 17 | * 50 107 18 | */ 19 | 20 | THREE.ConvexGeometry = function( vertices ) { 21 | 22 | THREE.Geometry.call( this ); 23 | 24 | var faces = [ [ 0, 1, 2 ], [ 0, 2, 1 ] ]; 25 | 26 | for ( var i = 3; i < vertices.length; i ++ ) { 27 | 28 | addPoint( i ); 29 | 30 | } 31 | 32 | 33 | function addPoint( vertexId ) { 34 | 35 | var vertex = vertices[ vertexId ].clone(); 36 | 37 | var mag = vertex.length(); 38 | vertex.x += mag * randomOffset(); 39 | vertex.y += mag * randomOffset(); 40 | vertex.z += mag * randomOffset(); 41 | 42 | var hole = []; 43 | 44 | for ( var f = 0; f < faces.length; ) { 45 | 46 | var face = faces[ f ]; 47 | 48 | // for each face, if the vertex can see it, 49 | // then we try to add the face's edges into the hole. 50 | if ( visible( face, vertex ) ) { 51 | 52 | for ( var e = 0; e < 3; e ++ ) { 53 | 54 | var edge = [ face[ e ], face[ ( e + 1 ) % 3 ] ]; 55 | var boundary = true; 56 | 57 | // remove duplicated edges. 58 | for ( var h = 0; h < hole.length; h ++ ) { 59 | 60 | if ( equalEdge( hole[ h ], edge ) ) { 61 | 62 | hole[ h ] = hole[ hole.length - 1 ]; 63 | hole.pop(); 64 | boundary = false; 65 | break; 66 | 67 | } 68 | 69 | } 70 | 71 | if ( boundary ) { 72 | 73 | hole.push( edge ); 74 | 75 | } 76 | 77 | } 78 | 79 | // remove faces[ f ] 80 | faces[ f ] = faces[ faces.length - 1 ]; 81 | faces.pop(); 82 | 83 | } else { 84 | 85 | // not visible 86 | 87 | f ++; 88 | 89 | } 90 | 91 | } 92 | 93 | // construct the new faces formed by the edges of the hole and the vertex 94 | for ( var h = 0; h < hole.length; h ++ ) { 95 | 96 | faces.push( [ 97 | hole[ h ][ 0 ], 98 | hole[ h ][ 1 ], 99 | vertexId 100 | ] ); 101 | 102 | } 103 | 104 | } 105 | 106 | /** 107 | * Whether the face is visible from the vertex 108 | */ 109 | function visible( face, vertex ) { 110 | 111 | var va = vertices[ face[ 0 ] ]; 112 | var vb = vertices[ face[ 1 ] ]; 113 | var vc = vertices[ face[ 2 ] ]; 114 | 115 | var n = normal( va, vb, vc ); 116 | 117 | // distance from face to origin 118 | var dist = n.dot( va ); 119 | 120 | return n.dot( vertex ) >= dist; 121 | 122 | } 123 | 124 | /** 125 | * Face normal 126 | */ 127 | function normal( va, vb, vc ) { 128 | 129 | var cb = new THREE.Vector3(); 130 | var ab = new THREE.Vector3(); 131 | 132 | cb.subVectors( vc, vb ); 133 | ab.subVectors( va, vb ); 134 | cb.cross( ab ); 135 | 136 | cb.normalize(); 137 | 138 | return cb; 139 | 140 | } 141 | 142 | /** 143 | * Detect whether two edges are equal. 144 | * Note that when constructing the convex hull, two same edges can only 145 | * be of the negative direction. 146 | */ 147 | function equalEdge( ea, eb ) { 148 | 149 | return ea[ 0 ] === eb[ 1 ] && ea[ 1 ] === eb[ 0 ]; 150 | 151 | } 152 | 153 | /** 154 | * Create a random offset between -1e-6 and 1e-6. 155 | */ 156 | function randomOffset() { 157 | 158 | return ( Math.random() - 0.5 ) * 2 * 1e-6; 159 | 160 | } 161 | 162 | 163 | /** 164 | * XXX: Not sure if this is the correct approach. Need someone to review. 165 | */ 166 | function vertexUv( vertex ) { 167 | 168 | var mag = vertex.length(); 169 | return new THREE.Vector2( vertex.x / mag, vertex.y / mag ); 170 | 171 | } 172 | 173 | // Push vertices into `this.vertices`, skipping those inside the hull 174 | var id = 0; 175 | var newId = new Array( vertices.length ); // map from old vertex id to new id 176 | 177 | for ( var i = 0; i < faces.length; i ++ ) { 178 | 179 | var face = faces[ i ]; 180 | 181 | for ( var j = 0; j < 3; j ++ ) { 182 | 183 | if ( newId[ face[ j ] ] === undefined ) { 184 | 185 | newId[ face[ j ] ] = id ++; 186 | this.vertices.push( vertices[ face[ j ] ] ); 187 | 188 | } 189 | 190 | face[ j ] = newId[ face[ j ] ]; 191 | 192 | } 193 | 194 | } 195 | 196 | // Convert faces into instances of THREE.Face3 197 | for ( var i = 0; i < faces.length; i ++ ) { 198 | 199 | this.faces.push( new THREE.Face3( 200 | faces[ i ][ 0 ], 201 | faces[ i ][ 1 ], 202 | faces[ i ][ 2 ] 203 | ) ); 204 | 205 | } 206 | 207 | // Compute UVs 208 | for ( var i = 0; i < this.faces.length; i ++ ) { 209 | 210 | var face = this.faces[ i ]; 211 | 212 | this.faceVertexUvs[ 0 ].push( [ 213 | vertexUv( this.vertices[ face.a ] ), 214 | vertexUv( this.vertices[ face.b ] ), 215 | vertexUv( this.vertices[ face.c ] ) 216 | ] ); 217 | 218 | } 219 | 220 | this.computeFaceNormals(); 221 | this.computeVertexNormals(); 222 | 223 | }; 224 | 225 | THREE.ConvexGeometry.prototype = Object.create( THREE.Geometry.prototype ); 226 | THREE.ConvexGeometry.prototype.constructor = THREE.ConvexGeometry; 227 | -------------------------------------------------------------------------------- /src/geometries/SphereBox.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | THREE.SphereBox = function( radius, widthSegs, heightSegs, depthSegs ) { 4 | 5 | THREE.BufferGeometry.call( this ); 6 | 7 | this.type = 'SphereBox'; 8 | 9 | radius = radius || 1; 10 | 11 | // segments 12 | 13 | widthSegs = Math.floor( widthSegs ) || 10; 14 | heightSegs = Math.floor( heightSegs ) || 10; 15 | depthSegs = Math.floor( depthSegs ) || 10; 16 | 17 | 18 | 19 | var g = new THREE.BoxGeometry( 1,1,1, widthSegs, heightSegs, depthSegs ), v; 20 | 21 | for ( var i = 0, l = g.vertices.length; i < l; i ++ ) { 22 | 23 | v = g.vertices[ i ]; 24 | v.normalize().multiplyScalar( radius ); 25 | 26 | } 27 | 28 | // final geometry 29 | 30 | g.mergeVertices(); 31 | g.computeVertexNormals(); 32 | 33 | this.fromGeometry( g ); 34 | g.dispose(); 35 | 36 | } 37 | 38 | THREE.SphereBox.prototype = Object.create( THREE.BufferGeometry.prototype ); 39 | THREE.SphereBox.prototype.constructor = THREE.SphereBox; -------------------------------------------------------------------------------- /src/geometries/SphereGeometry.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author mrdoob / http://mrdoob.com/ 3 | * @author benaadams / https://twitter.com/ben_a_adams 4 | * @author Mugen87 / https://github.com/Mugen87 5 | */ 6 | 7 | // SphereGeometry 8 | 9 | THREE.SphereGeometry = function ( radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength ) { 10 | 11 | THREE.Geometry.call( this ); 12 | 13 | this.type = 'SphereGeometry'; 14 | 15 | this.parameters = { 16 | radius: radius, 17 | widthSegments: widthSegments, 18 | heightSegments: heightSegments, 19 | phiStart: phiStart, 20 | phiLength: phiLength, 21 | thetaStart: thetaStart, 22 | thetaLength: thetaLength 23 | }; 24 | 25 | this.fromBufferGeometry( new THREE.SphereBufferGeometry( radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength ) ); 26 | this.mergeVertices(); 27 | 28 | } 29 | 30 | THREE.SphereGeometry.prototype = Object.create( THREE.Geometry.prototype ); 31 | THREE.SphereGeometry.prototype.constructor = THREE.SphereGeometry; 32 | 33 | // SphereBufferGeometry 34 | 35 | THREE.SphereBufferGeometry = function ( radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength ) { 36 | 37 | THREE.BufferGeometry.call( this ); 38 | 39 | this.type = 'SphereBufferGeometry'; 40 | 41 | this.parameters = { 42 | radius: radius, 43 | widthSegments: widthSegments, 44 | heightSegments: heightSegments, 45 | phiStart: phiStart, 46 | phiLength: phiLength, 47 | thetaStart: thetaStart, 48 | thetaLength: thetaLength 49 | }; 50 | 51 | radius = radius || 1; 52 | 53 | //widthSegments = Math.max( 3, Math.floor( widthSegments ) || 8 ); 54 | //heightSegments = Math.max( 2, Math.floor( heightSegments ) || 6 ); 55 | 56 | widthSegments = Math.floor( widthSegments ) || 8; 57 | heightSegments = Math.floor( heightSegments ) || 6; 58 | 59 | phiStart = phiStart !== undefined ? phiStart : 0; 60 | phiLength = phiLength !== undefined ? phiLength : Math.PI * 2; 61 | 62 | thetaStart = thetaStart !== undefined ? thetaStart : 0; 63 | thetaLength = thetaLength !== undefined ? thetaLength : Math.PI; 64 | 65 | var thetaEnd = Math.min( thetaStart + thetaLength, Math.PI ); 66 | 67 | var ix, iy; 68 | 69 | var index = 0; 70 | var grid = []; 71 | 72 | var vertex = new THREE.Vector3(); 73 | var normal = new THREE.Vector3(); 74 | 75 | // buffers 76 | 77 | var indices = []; 78 | var vertices = []; 79 | var normals = []; 80 | var uvs = []; 81 | 82 | // generate vertices, normals and uvs 83 | 84 | for ( iy = 0; iy <= heightSegments; iy ++ ) { 85 | 86 | var verticesRow = []; 87 | 88 | var v = iy / heightSegments; 89 | 90 | // special case for the poles 91 | 92 | var uOffset = 0; 93 | 94 | if ( iy == 0 && thetaStart == 0 ) { 95 | 96 | uOffset = 0.5 / widthSegments; 97 | 98 | } else if ( iy == heightSegments && thetaEnd == Math.PI ) { 99 | 100 | uOffset = - 0.5 / widthSegments; 101 | 102 | } 103 | 104 | for ( ix = 0; ix <= widthSegments; ix ++ ) { 105 | 106 | var u = ix / widthSegments; 107 | 108 | // vertex 109 | 110 | vertex.x = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength ); 111 | vertex.y = radius * Math.cos( thetaStart + v * thetaLength ); 112 | vertex.z = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength ); 113 | 114 | vertices.push( vertex.x, vertex.y, vertex.z ); 115 | 116 | // normal 117 | 118 | normal.copy( vertex ).normalize(); 119 | normals.push( normal.x, normal.y, normal.z ); 120 | 121 | // uv 122 | 123 | uvs.push( u + uOffset, 1 - v ); 124 | 125 | verticesRow.push( index ++ ); 126 | 127 | } 128 | 129 | grid.push( verticesRow ); 130 | 131 | } 132 | 133 | // indices 134 | 135 | for ( iy = 0; iy < heightSegments; iy ++ ) { 136 | 137 | for ( ix = 0; ix < widthSegments; ix ++ ) { 138 | 139 | var a = grid[ iy ][ ix + 1 ]; 140 | var b = grid[ iy ][ ix ]; 141 | var c = grid[ iy + 1 ][ ix ]; 142 | var d = grid[ iy + 1 ][ ix + 1 ]; 143 | 144 | if ( iy !== 0 || thetaStart > 0 ) indices.push( a, b, d ); 145 | if ( iy !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( b, c, d ); 146 | 147 | } 148 | 149 | } 150 | 151 | // build geometry 152 | 153 | this.setIndex( indices ); 154 | this.setAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) ); 155 | this.setAttribute( 'normal', new THREE.Float32BufferAttribute( normals, 3 ) ); 156 | this.setAttribute( 'uv', new THREE.Float32BufferAttribute( uvs, 2 ) ); 157 | 158 | } 159 | 160 | THREE.SphereBufferGeometry.prototype = Object.create( THREE.BufferGeometry.prototype ); 161 | THREE.SphereBufferGeometry.prototype.constructor = THREE.SphereBufferGeometry; 162 | -------------------------------------------------------------------------------- /src/geometries/TorusGeometry.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author oosmoxiecode 3 | * @author mrdoob / http://mrdoob.com/ 4 | * @author Mugen87 / https://github.com/Mugen87 5 | */ 6 | 7 | // TorusGeometry 8 | 9 | THREE.TorusGeometry = function ( radius, tube, radialSegments, tubularSegments, arc, thetaStart, thetaLength ) { 10 | 11 | THREE.Geometry.call( this ); 12 | 13 | this.type = 'TorusGeometry'; 14 | 15 | this.parameters = { 16 | radius: radius, 17 | tube: tube, 18 | radialSegments: radialSegments, 19 | tubularSegments: tubularSegments, 20 | arc: arc 21 | }; 22 | 23 | this.fromBufferGeometry( new THREE.TorusBufferGeometry( radius, tube, radialSegments, tubularSegments, arc, thetaStart, thetaLength ) ); 24 | this.mergeVertices(); 25 | 26 | } 27 | 28 | THREE.TorusGeometry.prototype = Object.create( THREE.Geometry.prototype ); 29 | THREE.TorusGeometry.prototype.constructor = THREE.TorusGeometry; 30 | 31 | // TorusBufferGeometry 32 | 33 | THREE.TorusBufferGeometry = function ( radius, tube, radialSegments, tubularSegments, arc, thetaStart, thetaLength ) { 34 | 35 | THREE.BufferGeometry.call( this ); 36 | 37 | this.type = 'TorusBufferGeometry'; 38 | 39 | this.parameters = { 40 | radius: radius, 41 | tube: tube, 42 | radialSegments: radialSegments, 43 | tubularSegments: tubularSegments, 44 | arc: arc 45 | }; 46 | 47 | radius = radius || 1; 48 | tube = tube || 0.4; 49 | radialSegments = Math.floor( radialSegments ) || 8; 50 | tubularSegments = Math.floor( tubularSegments ) || 6; 51 | arc = arc || Math.PI * 2; 52 | 53 | thetaStart = thetaStart !== undefined ? thetaStart : 0; 54 | thetaLength = thetaLength !== undefined ? thetaLength : Math.PI; 55 | 56 | // buffers 57 | 58 | var indices = []; 59 | var vertices = []; 60 | var normals = []; 61 | var uvs = []; 62 | 63 | // helper variables 64 | 65 | var center = new THREE.Vector3(); 66 | var vertex = new THREE.Vector3(); 67 | var normal = new THREE.Vector3(); 68 | 69 | var j, i; 70 | 71 | // generate vertices, normals and uvs 72 | 73 | for ( j = 0; j <= radialSegments; j ++ ) { 74 | 75 | for ( i = 0; i <= tubularSegments; i ++ ) { 76 | 77 | var u = i / tubularSegments * arc; 78 | //var v = j / radialSegments * Math.PI * 2; 79 | 80 | var v = (j / radialSegments) * thetaLength + thetaStart; 81 | 82 | 83 | // vertex 84 | 85 | vertex.x = ( radius + tube * Math.cos( v ) ) * Math.cos( u ); 86 | vertex.y = ( radius + tube * Math.cos( v ) ) * Math.sin( u ); 87 | vertex.z = tube * Math.sin( v ); 88 | 89 | vertices.push( vertex.x, vertex.y, vertex.z ); 90 | 91 | // normal 92 | 93 | center.x = radius * Math.cos( u ); 94 | center.y = radius * Math.sin( u ); 95 | normal.subVectors( vertex, center ).normalize(); 96 | 97 | normals.push( normal.x, normal.y, normal.z ); 98 | 99 | // uv 100 | 101 | uvs.push( i / tubularSegments ); 102 | uvs.push( j / radialSegments ); 103 | 104 | } 105 | 106 | } 107 | 108 | // generate indices 109 | 110 | for ( j = 1; j <= radialSegments; j ++ ) { 111 | 112 | for ( i = 1; i <= tubularSegments; i ++ ) { 113 | 114 | // indices 115 | 116 | var a = ( tubularSegments + 1 ) * j + i - 1; 117 | var b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1; 118 | var c = ( tubularSegments + 1 ) * ( j - 1 ) + i; 119 | var d = ( tubularSegments + 1 ) * j + i; 120 | 121 | // faces 122 | 123 | indices.push( a, b, d ); 124 | indices.push( b, c, d ); 125 | 126 | } 127 | 128 | } 129 | 130 | // build geometry 131 | 132 | this.setIndex( indices ); 133 | this.setAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) ); 134 | this.setAttribute( 'normal', new THREE.Float32BufferAttribute( normals, 3 ) ); 135 | this.setAttribute( 'uv', new THREE.Float32BufferAttribute( uvs, 2 ) ); 136 | 137 | } 138 | 139 | THREE.TorusBufferGeometry.prototype = Object.create( THREE.BufferGeometry.prototype ); 140 | THREE.TorusBufferGeometry.prototype.constructor = THREE.TorusBufferGeometry; -------------------------------------------------------------------------------- /src/gui.js: -------------------------------------------------------------------------------- 1 | /** _ _____ _ _ 2 | * | | |_ _| |_| | 3 | * | |_ _| | | _ | 4 | * |___|_|_| |_| |_| 5 | * @author lo.th / http://lo-th.github.io/labs/ 6 | * UI editor 7 | */ 8 | 9 | 'use strict'; 10 | 11 | var gui = ( function () { 12 | 13 | var ui = null; 14 | 15 | gui = { 16 | 17 | init: function ( parent, option ) { 18 | 19 | ui = new UIL.Gui({ parent:parent, css:'left:0px; right: auto; ', size:240, color:'no', h:22, close:false }); 20 | 21 | if( option.withFps ){ 22 | var fps = ui.add('fps', { height:30 }); 23 | fps.show(); 24 | } 25 | 26 | this.add( option ); 27 | 28 | }, 29 | 30 | add: function ( o ){ 31 | 32 | var params = o.base; 33 | var f = o.function, b; 34 | 35 | for( var u in params ) { 36 | 37 | //{ min:-1, max:1, stype:0, precision:1, stype :2 } 38 | 39 | // console.log(u, o[u]) 40 | 41 | if( o[u] ) ui.add( params, u, o[u] ).onChange( f ); 42 | 43 | } 44 | 45 | }, 46 | 47 | dispose: function () { 48 | 49 | ui.dispose(); 50 | 51 | }, 52 | 53 | resize : function ( r ) { 54 | 55 | ui.setWidth( r-10 ); 56 | 57 | }, 58 | 59 | 60 | 61 | } 62 | 63 | return gui; 64 | 65 | 66 | 67 | 68 | })(); -------------------------------------------------------------------------------- /src/helpers/CarHelper.js: -------------------------------------------------------------------------------- 1 | THREE.CarHelper = function ( p, center, deep ) { 2 | 3 | var s = 0.2; 4 | var d = -deep * 0.6; 5 | 6 | this.py = p[1] - center[1]; 7 | 8 | var vertices = new Float32Array( [ 9 | -s, 0, 0, s, 0, 0, 10 | 0, 0, 0, 0, s*2, 0, 11 | 0, 0, -s, 0, 0, s, 12 | 13 | p[0]-d, this.py, p[2], p[0]-d, this.py+1, p[2], 14 | -p[0]+d, this.py, p[2], -p[0]+d, this.py+1, p[2], 15 | -p[0]+d, this.py,-p[2], -p[0]+d, this.py+1, -p[2], 16 | p[0]-d, this.py, -p[2], p[0]-d, this.py+1, -p[2], 17 | 18 | p[0]-d, this.py, p[2], -p[0]+d, this.py, p[2], 19 | p[0]-d, this.py, -p[2], -p[0]+d, this.py, -p[2], 20 | ] ); 21 | 22 | var colors = new Float32Array( [ 23 | 1, 1, 0, 1, 1, 0, 24 | 1, 1, 0, 0, 1, 0, 25 | 1, 1, 0, 1, 1, 0, 26 | 27 | 1,1,0, 1,1,0, 28 | 1,1,0, 1,1,0, 29 | 1,1,0, 1,1,0, 30 | 1,1,0, 1,1,0, 31 | 32 | 1,1,0, 1,1,0, 33 | 1,1,0, 1,1,0, 34 | ] ); 35 | 36 | this.geometry = new THREE.BufferGeometry(); 37 | this.geometry.setAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) ); 38 | this.geometry.setAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) ); 39 | 40 | this.positions = this.geometry.attributes.position.array; 41 | 42 | this.material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors, name:'helper' } ); 43 | 44 | THREE.LineSegments.call( this, this.geometry, this.material ); 45 | 46 | }; 47 | 48 | THREE.CarHelper.prototype = Object.create( THREE.LineSegments.prototype ); 49 | THREE.CarHelper.prototype.constructor = THREE.CarHelper; 50 | 51 | THREE.CarHelper.prototype.dispose = function () { 52 | 53 | this.geometry.dispose(); 54 | this.material.dispose(); 55 | 56 | }; 57 | 58 | THREE.CarHelper.prototype.updateSuspension = function ( s0, s1, s2, s3 ) { 59 | 60 | this.positions[22] = this.py-s0; 61 | this.positions[28] = this.py-s1; 62 | this.positions[34] = this.py-s2; 63 | this.positions[40] = this.py-s3; 64 | 65 | this.geometry.attributes.position.needsUpdate = true; 66 | 67 | }; -------------------------------------------------------------------------------- /src/helpers/PointHelper.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | THREE.PointHelper = function ( size, color ) { 4 | 5 | size = size || 1; 6 | 7 | var sx = size * 0.5; 8 | var mx = size * 0.1; 9 | 10 | var vertices = [ 11 | -sx, 0, 0, sx, 0, 0, 12 | 0, -sx, 0, 0, sx, 0, 13 | 0, 0, -sx, 0, 0, sx, 14 | 15 | 16 | -mx, mx, mx, mx, mx, mx, 17 | -mx, -mx, mx, mx, -mx, mx, 18 | -mx, -mx, -mx, mx, -mx, -mx, 19 | -mx, mx, -mx, mx, mx, -mx, 20 | 21 | mx,-mx, mx, mx,mx, mx, 22 | -mx,-mx, mx, -mx,mx, mx, 23 | -mx,-mx, -mx, -mx,mx, -mx, 24 | mx,-mx, -mx, mx,mx, -mx, 25 | 26 | mx, mx,-mx, mx, mx,mx, 27 | -mx,mx,-mx, -mx, mx,mx, 28 | -mx, -mx,-mx, -mx, -mx,mx, 29 | mx, -mx,-mx, mx, -mx,mx, 30 | 31 | 32 | ]; 33 | 34 | /*var colors = [ 35 | 1, 0, 0, 1, 0.6, 0, 36 | 0, 1, 0, 0.6, 1, 0, 37 | 0, 0, 1, 0, 0.6, 1 38 | ];*/ 39 | 40 | var geometry = new THREE.BufferGeometry(); 41 | geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) ); 42 | //geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); 43 | 44 | var material = new THREE.LineBasicMaterial( { color: color } ); 45 | 46 | THREE.LineSegments.call( this, geometry, material ); 47 | 48 | } 49 | 50 | THREE.PointHelper.prototype = Object.create( THREE.LineSegments.prototype ); 51 | THREE.PointHelper.prototype.constructor = THREE.PointHelper; -------------------------------------------------------------------------------- /src/intro.js: -------------------------------------------------------------------------------- 1 | var intro = ( function () { 2 | 3 | intro = function () {}; 4 | 5 | var parent; 6 | var content; 7 | var txt; 8 | var alpha = { n:1 }; 9 | var isDisplay = false; 10 | var tween = null; 11 | 12 | intro.init = function ( text, Parent ) { 13 | 14 | if( isDisplay ) return; 15 | 16 | parent = Parent || document.body; 17 | 18 | content = document.createElement( 'img' ); 19 | content.style.cssText = "position:absolute; margin:0; padding:0; top:50%; left:50%; width:300px; height:220px; margin-left:-150px; margin-top:-110px; display:block; pointer-events:none; "; 20 | content.src = 'assets/textures/logo.png'; 21 | parent.appendChild( content ); 22 | 23 | txt = document.createElement( 'div' ); 24 | txt.style.cssText = "font-family: Monospace; color: #AAA; font-size: 12px; text-align:center; position:absolute; margin:0; padding:0; top:50%; left:50%; width:400px; height:20px; margin-left:-200px; margin-top:110px; display:block; pointer-events:none; font-size: 12px;"; 25 | txt.textContent = text || 'loading...'; 26 | parent.appendChild( txt ); 27 | 28 | isDisplay = true; 29 | 30 | }; 31 | 32 | intro.clear = function () { 33 | 34 | if( !isDisplay ) return; 35 | 36 | if( tween !== null ){ TWEEN.remove( tween ); alpha = { n:1 } } 37 | 38 | tween = new TWEEN.Tween( alpha ).to( {n:0}, 2000 ) 39 | .easing( TWEEN.Easing.Quadratic.Out ) 40 | .onUpdate( function() { intro.opacity ( alpha.n ); } ) 41 | .onComplete( function () { intro.dispose(); } ) 42 | .start(); 43 | 44 | }; 45 | 46 | intro.opacity = function ( a ) { 47 | 48 | content.style.opacity = a; 49 | txt.style.opacity = a; 50 | 51 | } 52 | 53 | intro.dispose = function () { 54 | 55 | parent.removeChild( content ); 56 | parent.removeChild( txt ); 57 | isDisplay = false; 58 | 59 | } 60 | 61 | intro.message = function ( str ) { 62 | 63 | txt.innerHTML = str; 64 | 65 | } 66 | 67 | return intro; 68 | 69 | })(); -------------------------------------------------------------------------------- /src/libs/codemirrorAdd/active-line.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | var WRAP_CLASS = "CodeMirror-activeline"; 14 | var BACK_CLASS = "CodeMirror-activeline-background"; 15 | var GUTT_CLASS = "CodeMirror-activeline-gutter"; 16 | 17 | CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) { 18 | var prev = old == CodeMirror.Init ? false : old; 19 | if (val == prev) return 20 | if (prev) { 21 | cm.off("beforeSelectionChange", selectionChange); 22 | clearActiveLines(cm); 23 | delete cm.state.activeLines; 24 | } 25 | if (val) { 26 | cm.state.activeLines = []; 27 | updateActiveLines(cm, cm.listSelections()); 28 | cm.on("beforeSelectionChange", selectionChange); 29 | } 30 | }); 31 | 32 | function clearActiveLines(cm) { 33 | for (var i = 0; i < cm.state.activeLines.length; i++) { 34 | cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS); 35 | cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS); 36 | cm.removeLineClass(cm.state.activeLines[i], "gutter", GUTT_CLASS); 37 | } 38 | } 39 | 40 | function sameArray(a, b) { 41 | if (a.length != b.length) return false; 42 | for (var i = 0; i < a.length; i++) 43 | if (a[i] != b[i]) return false; 44 | return true; 45 | } 46 | 47 | function updateActiveLines(cm, ranges) { 48 | var active = []; 49 | for (var i = 0; i < ranges.length; i++) { 50 | var range = ranges[i]; 51 | var option = cm.getOption("styleActiveLine"); 52 | if (typeof option == "object" && option.nonEmpty ? range.anchor.line != range.head.line : !range.empty()) 53 | continue 54 | var line = cm.getLineHandleVisualStart(range.head.line); 55 | if (active[active.length - 1] != line) active.push(line); 56 | } 57 | if (sameArray(cm.state.activeLines, active)) return; 58 | cm.operation(function() { 59 | clearActiveLines(cm); 60 | for (var i = 0; i < active.length; i++) { 61 | cm.addLineClass(active[i], "wrap", WRAP_CLASS); 62 | cm.addLineClass(active[i], "background", BACK_CLASS); 63 | cm.addLineClass(active[i], "gutter", GUTT_CLASS); 64 | } 65 | cm.state.activeLines = active; 66 | }); 67 | } 68 | 69 | function selectionChange(cm, sel) { 70 | updateActiveLines(cm, sel.ranges); 71 | } 72 | }); 73 | -------------------------------------------------------------------------------- /src/libs/saveAs.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 2 | var saveAs = saveAs || function(e) { 3 | "use strict"; 4 | if (typeof e === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) { 5 | return 6 | } 7 | var t = e.document, 8 | n = function() { 9 | return e.URL || e.webkitURL || e 10 | }, 11 | r = t.createElementNS("http://www.w3.org/1999/xhtml", "a"), 12 | o = "download" in r, 13 | a = function(e) { 14 | var t = new MouseEvent("click"); 15 | e.dispatchEvent(t) 16 | }, 17 | i = /constructor/i.test(e.HTMLElement) || e.safari, 18 | f = /CriOS\/[\d]+/.test(navigator.userAgent), 19 | u = function(t) { 20 | (e.setImmediate || e.setTimeout)(function() { 21 | throw t 22 | }, 0) 23 | }, 24 | s = "application/octet-stream", 25 | d = 1e3 * 40, 26 | c = function(e) { 27 | var t = function() { 28 | if (typeof e === "string") { 29 | n().revokeObjectURL(e) 30 | } else { 31 | e.remove() 32 | } 33 | }; 34 | setTimeout(t, d) 35 | }, 36 | l = function(e, t, n) { 37 | t = [].concat(t); 38 | var r = t.length; 39 | while (r--) { 40 | var o = e["on" + t[r]]; 41 | if (typeof o === "function") { 42 | try { 43 | o.call(e, n || e) 44 | } catch (a) { 45 | u(a) 46 | } 47 | } 48 | } 49 | }, 50 | p = function(e) { 51 | if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)) { 52 | return new Blob([String.fromCharCode(65279), e], { 53 | type: e.type 54 | }) 55 | } 56 | return e 57 | }, 58 | v = function(t, u, d) { 59 | if (!d) { 60 | t = p(t) 61 | } 62 | var v = this, 63 | w = t.type, 64 | m = w === s, 65 | y, h = function() { 66 | l(v, "writestart progress write writeend".split(" ")) 67 | }, 68 | S = function() { 69 | if ((f || m && i) && e.FileReader) { 70 | var r = new FileReader; 71 | r.onloadend = function() { 72 | var t = f ? r.result : r.result.replace(/^data:[^;]*;/, "data:attachment/file;"); 73 | var n = e.open(t, "_blank"); 74 | if (!n) e.location.href = t; 75 | t = undefined; 76 | v.readyState = v.DONE; 77 | h() 78 | }; 79 | r.readAsDataURL(t); 80 | v.readyState = v.INIT; 81 | return 82 | } 83 | if (!y) { 84 | y = n().createObjectURL(t) 85 | } 86 | if (m) { 87 | e.location.href = y 88 | } else { 89 | var o = e.open(y, "_blank"); 90 | if (!o) { 91 | e.location.href = y 92 | } 93 | } 94 | v.readyState = v.DONE; 95 | h(); 96 | c(y) 97 | }; 98 | v.readyState = v.INIT; 99 | if (o) { 100 | y = n().createObjectURL(t); 101 | setTimeout(function() { 102 | r.href = y; 103 | r.download = u; 104 | a(r); 105 | h(); 106 | c(y); 107 | v.readyState = v.DONE 108 | }); 109 | return 110 | } 111 | S() 112 | }, 113 | w = v.prototype, 114 | m = function(e, t, n) { 115 | return new v(e, t || e.name || "download", n) 116 | }; 117 | if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) { 118 | return function(e, t, n) { 119 | t = t || e.name || "download"; 120 | if (!n) { 121 | e = p(e) 122 | } 123 | return navigator.msSaveOrOpenBlob(e, t) 124 | } 125 | } 126 | w.abort = function() {}; 127 | w.readyState = w.INIT = 0; 128 | w.WRITING = 1; 129 | w.DONE = 2; 130 | w.error = w.onwritestart = w.onprogress = w.onwrite = w.onabort = w.onerror = w.onwriteend = null; 131 | return m 132 | }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content); 133 | /*if (typeof module !== "undefined" && module.exports) { 134 | module.exports.saveAs = saveAs 135 | } else if (typeof define !== "undefined" && define !== null && define.amd !== null) { 136 | define("FileSaver.js", function() { 137 | return saveAs 138 | }) 139 | }*/ -------------------------------------------------------------------------------- /src/libs/stats.min.js: -------------------------------------------------------------------------------- 1 | // stats.js - http://github.com/mrdoob/stats.js 2 | var Stats=function(){function h(a){c.appendChild(a.dom);return a}function k(a){for(var d=0;de+1E3&&(r.update(1E3*a/(c-e),100),e=c,a=0,t)){var d=performance.memory;t.update(d.usedJSHeapSize/1048576,d.jsHeapSizeLimit/1048576)}return c},update:function(){g=this.end()},domElement:c,setMode:k}}; 4 | Stats.Panel=function(h,k,l){var c=Infinity,g=0,e=Math.round,a=e(window.devicePixelRatio||1),r=80*a,f=48*a,t=3*a,u=2*a,d=3*a,m=15*a,n=74*a,p=30*a,q=document.createElement("canvas");q.width=r;q.height=f;q.style.cssText="width:80px;height:48px";var b=q.getContext("2d");b.font="bold "+9*a+"px Helvetica,Arial,sans-serif";b.textBaseline="top";b.fillStyle=l;b.fillRect(0,0,r,f);b.fillStyle=k;b.fillText(h,t,u);b.fillRect(d,m,n,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d,m,n,p);return{dom:q,update:function(f, 5 | v){c=Math.min(c,f);g=Math.max(g,f);b.fillStyle=l;b.globalAlpha=1;b.fillRect(0,0,r,m);b.fillStyle=k;b.fillText(e(f)+" "+h+" ("+e(c)+"-"+e(g)+")",t,u);b.drawImage(q,d+a,m,n-a,p,d,m,n-a,p);b.fillRect(d+n-a,m,a,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d+n-a,m,a,e((1-f/v)*p))}}};"object"===typeof module&&(module.exports=Stats); 6 | -------------------------------------------------------------------------------- /src/loaders/ShaderLoader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author lo.th / https://github.com/lo-th 3 | */ 4 | 5 | 6 | THREE.ShaderLoader = function ShaderLoader( manager ) { 7 | 8 | this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager; 9 | this.loader = new THREE.FileLoader( this.manager ); 10 | this.loader.setResponseType('text'); 11 | this.shader = {}; 12 | 13 | } 14 | 15 | THREE.ShaderLoader.prototype = { 16 | 17 | constructor: THREE.ShaderLoader, 18 | 19 | load: function ( url, onLoad, onProgress, onError ) { 20 | 21 | this.urls = []; 22 | if ( typeof url === 'string' || url instanceof String ) this.urls.push( url ); 23 | else this.urls = this.urls.concat( url ); 24 | 25 | this.onLoad = onLoad || function(){}; 26 | this.onProgress = onProgress; 27 | this.onError = onError; 28 | 29 | this.loadOne(); 30 | 31 | }, 32 | 33 | loadOne: function () { 34 | 35 | var url = this.urls[0]; 36 | var name = url.substring( url.lastIndexOf('/')+1, url.lastIndexOf('.') ); 37 | 38 | var scope = this; 39 | 40 | this.loader.setPath( scope.path ); 41 | this.loader.load( url, function ( text ) { 42 | 43 | scope.shader[ name ] = text; 44 | scope.next(); 45 | 46 | }, scope.onProgress, scope.onError ); 47 | 48 | }, 49 | 50 | next: function () { 51 | 52 | this.urls.shift(); 53 | 54 | if( this.urls.length === 0 ) this.onLoad(); 55 | else this.loadOne(); 56 | 57 | }, 58 | 59 | setPath: function ( value ) { 60 | 61 | this.path = value; 62 | return this; 63 | 64 | }, 65 | 66 | }; 67 | -------------------------------------------------------------------------------- /src/logo.js: -------------------------------------------------------------------------------- 1 | var logo = ( function () { 2 | 3 | 'use strict'; 4 | 5 | var bottomLogo; 6 | var logoSvg; 7 | var selectColor = '#D4B87B'; 8 | 9 | logo = { 10 | 11 | init: function () { 12 | 13 | 14 | bottomLogo = document.createElement( 'a' ); 15 | bottomLogo.href = "https://github.com/lo-th"; 16 | bottomLogo.target = "_blank"; 17 | bottomLogo.style.cssText = 'position:absolute; width:60px; height:30px; left:10px; bottom:13px; pointer-events:auto; cursor:pointer;' 18 | bottomLogo.innerHTML = this.icon( '3TH', '#CCCCCC' ); 19 | document.body.appendChild( bottomLogo ); 20 | 21 | logoSvg = document.getElementById( '3TH' ); 22 | //bottomLogo.addEventListener('click', window.location.assign('https://github.com/lo-th' );, false ); 23 | bottomLogo.addEventListener('mouseover', function(){ logoSvg.setAttributeNS(null,"fill",selectColor) }, false ); 24 | bottomLogo.addEventListener('mouseout', function(){ logoSvg.setAttributeNS(null,"fill",'#CCCCCC') }, false ); 25 | 26 | }, 27 | 28 | icon: function ( type, color, w, ww ){ 29 | 30 | w = w || 40; 31 | var h = w; 32 | ww = ww || 40; 33 | color = color || '#DEDEDE'; 34 | var viewBox = '0 0 '+ww+' '+ww; 35 | var extra = ""; 36 | 37 | if(type === '3TH'){ 38 | viewBox = '0 0 100 50'; 39 | w = 60;//60; 40 | h = 30;//30; 41 | extra = "" 42 | } 43 | 44 | var t = [""+extra+""]; 45 | switch(type){ 46 | 47 | case '3TH': 48 | t[1]="" 54 | break; 55 | 56 | case 'NEXT': 57 | //t[1]=""; 58 | t[1]=""; 59 | break; 60 | case 'PREV': 61 | //t[1]=""; 62 | t[1]=""; 63 | break; 64 | 65 | } 66 | t[2] = ""; 67 | return t.join("\n"); 68 | 69 | }, 70 | 71 | } 72 | 73 | return logo; 74 | 75 | })(); -------------------------------------------------------------------------------- /src/lth/CubeCamera_Add.js: -------------------------------------------------------------------------------- 1 | THREE.CubeCamera.prototype.getPixel = function ( renderer, scene, w, h, face, nFaces, gl2 ){ 2 | 3 | w = w || 2; 4 | h = h || 2; 5 | gl2 = gl2 || false; 6 | nFaces = nFaces || 6; 7 | face = face || 0; 8 | 9 | var inv255 = 1/256; 10 | 11 | var pixelRender = new THREE.WebGLRenderTarget( w, h, { encoding: THREE.RGBEEncoding, minFilter: THREE.NearestFilter, magFilter: THREE.NearestFilter, format: THREE.RGBAFormat, type: gl2 ? THREE.UnsignedByteType : THREE.FloatType } ); 12 | //pixelRender.texture.generateMipmaps = false; 13 | var px = w * h * 4; 14 | 15 | 16 | var pixel = [], read; 17 | 18 | if ( this.parent === null ) this.updateMatrixWorld(); 19 | 20 | var currentRenderTarget = renderer.getRenderTarget(); 21 | 22 | var color = new THREE.Color(); 23 | 24 | for ( var i = face; i < nFaces; i ++ ) { 25 | 26 | read = gl2 ? new Uint8Array( px ) : new Float32Array( px ); 27 | 28 | renderer.setRenderTarget( pixelRender, i ); 29 | renderer.render( scene, this.children[i] ); 30 | renderer.readRenderTargetPixels( pixelRender, 0, 0, w, h, read ); 31 | 32 | if( !gl2 ){ 33 | 34 | var j = read.length; 35 | while(j--) read[j] *= inv255; 36 | 37 | } else { 38 | 39 | var j = w * h, n, a; 40 | while(j--){ 41 | 42 | n = j*4 43 | a = Math.pow( 2, read[n+3] - 128 ); 44 | read[n+0] *= a; 45 | read[n+1] *= a; 46 | read[n+2] *= a; 47 | read[n+3] = 255; 48 | 49 | } 50 | } 51 | 52 | pixel.push( read ); 53 | 54 | } 55 | 56 | renderer.setRenderTarget( currentRenderTarget ); 57 | 58 | return pixel 59 | 60 | } -------------------------------------------------------------------------------- /src/lth/SkeletonHelper_Add.js: -------------------------------------------------------------------------------- 1 | 2 | //----------------------- 3 | // skeleton referency 4 | //----------------------- 5 | 6 | THREE.SkeletonHelper.prototype.setColor = function ( c1, c2 ) { 7 | 8 | var geometry = this.geometry; 9 | var lng = geometry.getAttribute( 'color' ).count; 10 | var color = geometry.getAttribute( 'color' ).array; 11 | 12 | var n = 0, m = 0; 13 | 14 | for ( var i = 0; i < lng; i ++ ) { 15 | 16 | n = i*3; 17 | 18 | if( m === 0 ){ 19 | color[n] = c1.r; 20 | color[n+1] = c1.g; 21 | color[n+2] = c1.b; 22 | } else { 23 | color[n] = c2.r; 24 | color[n+1] = c2.g; 25 | color[n+2] = c2.b; 26 | } 27 | 28 | m++; 29 | 30 | if( m === 2 ) m = 0; 31 | 32 | } 33 | 34 | geometry.getAttribute( 'color' ).needsUpdate = true; 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/lth/Skeleton_Add.js: -------------------------------------------------------------------------------- 1 | var _offsetMatrix = new THREE.Matrix4(); 2 | var _identityMatrix = new THREE.Matrix4(); 3 | 4 | //----------------------- 5 | // skeleton referency 6 | //----------------------- 7 | 8 | THREE.Skeleton.prototype.setReference = function ( ref ) { 9 | 10 | this.reference_skeleton = ref; 11 | 12 | var bone, name; 13 | 14 | for ( var i = 0, il = this.bones.length; i < il; i ++ ) { 15 | 16 | bone = this.bones[i]; 17 | name = bone.name; 18 | bone.userData.idr = -1; 19 | 20 | for ( var j = 0, jl = ref.bones.length; j < jl; j ++ ) { 21 | 22 | if( !ref.bones[j].userData.phyMtx ){ 23 | ref.bones[j].userData.isPhysics = false; 24 | ref.bones[j].userData.phyMtx = new THREE.Matrix4(); 25 | } 26 | 27 | if( name === ref.bones[j].name ){ 28 | 29 | bone.userData.idr = j; 30 | 31 | } 32 | 33 | } 34 | 35 | 36 | } 37 | 38 | } 39 | 40 | //----------------------- 41 | // 42 | // T pose 43 | // 44 | //----------------------- 45 | 46 | THREE.Skeleton.prototype.setTPose = function ( offsets ) { 47 | 48 | this.reference_position = []; 49 | 50 | //var parent; 51 | var tmpOffsets = {}; 52 | var o, b, i, lng = this.bones.length; 53 | var fingerName; 54 | 55 | var fingerGroup = ['Tho','Thu','Ind','Mid','Rin','Pin']; 56 | 57 | for( i = 0; i < offsets.length; i++ ){ 58 | 59 | o = offsets[i]; 60 | tmpOffsets[ o[0] ] = new THREE.Matrix4().makeRotationFromEuler( new THREE.Euler( THREE.Math.degToRad( o[1] ), THREE.Math.degToRad( o[2] ), THREE.Math.degToRad( o[3] ) ) ); 61 | 62 | } 63 | 64 | for ( i = 0; i < lng; i ++ ) { 65 | 66 | b = this.bones[ i ]; 67 | 68 | if( tmpOffsets[ b.name ] ){ 69 | 70 | b.matrix.multiply( tmpOffsets[ b.name ] ); 71 | b.matrix.decompose( b.position, b.quaternion, b.scale ); 72 | b.updateMatrixWorld( true ); 73 | 74 | } 75 | 76 | // reset Hand finger 77 | 78 | fingerName = b.name.substring( 1, 4 ) 79 | 80 | if( fingerGroup.indexOf(fingerName) !== -1 ){ 81 | b.quaternion.setFromEuler(new THREE.Euler(0,0,0)); 82 | } 83 | 84 | this.reference_position.push( b.position.clone() ); 85 | 86 | } 87 | 88 | this.calculateInverses(); 89 | 90 | } 91 | 92 | THREE.Skeleton.prototype.resetPosition = function () { 93 | 94 | var i = this.bones.length; 95 | 96 | while ( i-- ) { 97 | 98 | this.bones[ i ].position.copy( this.reference_position[i] ); 99 | 100 | } 101 | 102 | } 103 | 104 | THREE.Skeleton.prototype.setScalling = function () { 105 | 106 | var o, b, i, lng = this.bones.length; 107 | var parent; 108 | 109 | this.resetPosition(); 110 | 111 | for ( i = 0; i < lng; i ++ ) { 112 | 113 | b = this.bones[ i ]; 114 | parent = b.parent || null; 115 | 116 | if( parent !== null && parent.scalling ){ 117 | 118 | b.position.multiply( parent.scalling ); 119 | b.updateMatrixWorld( true ); 120 | 121 | } 122 | 123 | } 124 | 125 | this.calculateInverses(); 126 | 127 | } 128 | 129 | 130 | //----------------------- 131 | // 132 | // force local scalling 133 | // 134 | //----------------------- 135 | 136 | THREE.Skeleton.prototype.update = function () { 137 | 138 | var bones = this.bones; 139 | var boneInverses = this.boneInverses; 140 | var boneMatrices = this.boneMatrices; 141 | var boneTexture = this.boneTexture; 142 | 143 | var bone, refBone; 144 | 145 | // flatten bone matrices to array 146 | 147 | for ( var i = 0, il = bones.length; i < il; i ++ ) { 148 | 149 | bone = bones[ i ]; 150 | 151 | // compute the offset between the current and the original transform 152 | 153 | var matrix = bone ? bone.matrixWorld : _identityMatrix; 154 | 155 | // reference skeleton update 156 | 157 | if( this.reference_skeleton ){ 158 | if( bone.userData.idr !== -1 ){ 159 | 160 | refBone = this.reference_skeleton.bones[ bone.userData.idr ]; 161 | matrix = refBone.userData.isPhysics ? refBone.userData.phyMtx : refBone.matrixWorld; 162 | 163 | } else if ( bone.parent.userData.idr !== -1 ) { // extra bones 164 | 165 | matrix.copy( this.reference_skeleton.bones[ bone.parent.userData.idr ].matrixWorld ); 166 | matrix.multiply( bone.matrix ); 167 | 168 | } 169 | } else { 170 | // apply physics 171 | if( bone.userData.isPhysics ){ 172 | matrix = bone.userData.phyMtx; 173 | 174 | 175 | } 176 | else if( bone.parent.userData.isPhysics ){ 177 | matrix.copy( bone.parent.userData.phyMtx ); 178 | matrix.multiply( bone.matrix ); 179 | 180 | var children = bone.children; 181 | 182 | for ( var k = 0, l = children.length; k < l; k ++ ) { 183 | 184 | if( !children[ k ].userData.isPhysics ) children[ k ].updateWorldMatrix( false, true ); 185 | 186 | } 187 | } 188 | } 189 | 190 | // bones scalling 191 | 192 | if( bone.scalling !== undefined ){ 193 | 194 | matrix.scale( bone.scalling ); 195 | 196 | } 197 | 198 | // default 199 | 200 | _offsetMatrix.multiplyMatrices( matrix, boneInverses[ i ] ); 201 | _offsetMatrix.toArray( boneMatrices, i * 16 ); 202 | 203 | } 204 | 205 | if ( boneTexture !== undefined ) { 206 | 207 | boneTexture.needsUpdate = true; 208 | 209 | } 210 | 211 | } 212 | 213 | //})(); -------------------------------------------------------------------------------- /src/lth/SkinnedMesh_Add.js: -------------------------------------------------------------------------------- 1 | THREE.SEA3D.SkinnedMesh.prototype.resetAnim = function () { 2 | 3 | this.anim = { name:'', time:0, frame:0, end:0 } 4 | 5 | }; 6 | 7 | THREE.SEA3D.SkinnedMesh.prototype.getAnim = function () { 8 | 9 | if( !this.anim ) this.resetAnim(); 10 | 11 | var animation = this.currentAnimation; 12 | if( !animation ) { this.resetAnim(); return; } 13 | 14 | if( !animation.clip.frameTime ) animation.clip.frameTime = animation.duration / (animation.clip.tracks[0].times.length -1); 15 | 16 | this.anim.name = animation.name; 17 | this.anim.time = animation.clip.frameTime; 18 | var f = 1 / this.anim.time; 19 | this.anim.frame = Math.round( this.currentAnimationAction.time * f ); 20 | this.anim.end = Math.round( animation.clip.duration * f ); 21 | 22 | return this.anim; 23 | 24 | }; 25 | 26 | THREE.SEA3D.SkinnedMesh.prototype.playFrame = function ( f, max ) { 27 | 28 | var animation = this.currentAnimation; 29 | if( !animation ) { return; } 30 | var name = animation.name; 31 | var frameTime 32 | if(max) frameTime = animation.duration / max; 33 | else frameTime = animation.clip.frameTime; 34 | var offset = f * frameTime; 35 | this.play( name, 0, offset, 1 ); 36 | this.pauseAll(); 37 | 38 | }; -------------------------------------------------------------------------------- /src/objects/CubeCamera.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Camera for rendering cube maps 4 | * - renders scene into axis-aligned cube 5 | * 6 | * @author alteredq / http://alteredqualia.com/ 7 | */ 8 | 9 | THREE.CubeCamera = function ( near, far, cubeResolution, options ) { 10 | 11 | THREE.Object3D.call( this ); 12 | 13 | this.type = 'CubeCamera'; 14 | 15 | this.cam = []; 16 | var vup = [ [0,-1,0], [0,-1,0], [0,0,1], [0,0,-1], [0,-1,0], [0,-1,0] ]; 17 | var look = [ [1,0,0], [-1,0,0], [0,1,0], [0,-1,0], [0,0,1], [0,0,-1] ]; 18 | 19 | var c, v = new THREE.Vector3(); 20 | 21 | for ( var i = 0; i<6; i++ ){ 22 | 23 | c = new THREE.PerspectiveCamera( 90, 1, near, far ); 24 | c.up.fromArray( vup[i] ); 25 | c.lookAt( v.fromArray( look[i] ) ); 26 | this.add( c ); 27 | this.cam.push(c); 28 | 29 | } 30 | 31 | options = options || { format: THREE.RGBFormat, magFilter: THREE.LinearFilter, minFilter: THREE.LinearFilter }; 32 | 33 | this.renderTarget = new THREE.WebGLRenderTargetCube( cubeResolution, cubeResolution, options ); 34 | this.renderTarget.texture.name = "CubeCamera"; 35 | 36 | } 37 | 38 | THREE.CubeCamera.prototype = Object.assign( Object.create( THREE.Object3D.prototype ), { 39 | 40 | constructor: THREE.CubeCamera, 41 | 42 | update: function ( renderer, scene ) { 43 | 44 | if ( this.parent === null ) this.updateMatrixWorld(); 45 | 46 | var currentRenderTarget = renderer.getRenderTarget(); 47 | 48 | var renderTarget = this.renderTarget; 49 | var generateMipmaps = renderTarget.texture.generateMipmaps; 50 | 51 | renderTarget.texture.generateMipmaps = false; 52 | 53 | for ( var i = 0; i < 6; i ++ ) { 54 | 55 | if(i===5) renderTarget.texture.generateMipmaps = generateMipmaps; 56 | renderer.setRenderTarget( renderTarget, i ); 57 | renderer.render( scene, this.cam[i] ); 58 | 59 | } 60 | 61 | renderer.setRenderTarget( currentRenderTarget ); 62 | 63 | }, 64 | 65 | clear: function ( renderer, color, depth, stencil ) { 66 | 67 | var currentRenderTarget = renderer.getRenderTarget(); 68 | 69 | var renderTarget = this.renderTarget; 70 | 71 | for ( var i = 0; i < 6; i ++ ) { 72 | 73 | renderer.setRenderTarget( renderTarget, i ); 74 | renderer.clear( color, depth, stencil ); 75 | 76 | } 77 | 78 | renderer.setRenderTarget( currentRenderTarget ); 79 | 80 | }, 81 | 82 | getPixel: function ( renderer, scene, w, h, face, nFaces, gl2 ){ 83 | 84 | w = w || 2; 85 | h = h || 2; 86 | gl2 = gl2 || false; 87 | nFaces = nFaces || 6; 88 | face = face || 0; 89 | 90 | var inv255 = 1/256; 91 | 92 | var pixelRender = new THREE.WebGLRenderTarget( w, h, { encoding: THREE.RGBEEncoding, minFilter: THREE.NearestFilter, magFilter: THREE.NearestFilter, format: THREE.RGBAFormat, type: gl2 ? THREE.UnsignedByteType : THREE.FloatType } ); 93 | //pixelRender.texture.generateMipmaps = false; 94 | var px = w * h * 4; 95 | 96 | 97 | var pixel = [], read; 98 | 99 | if ( this.parent === null ) this.updateMatrixWorld(); 100 | 101 | var currentRenderTarget = renderer.getRenderTarget(); 102 | 103 | var color = new THREE.Color(); 104 | 105 | for ( var i = face; i < nFaces; i ++ ) { 106 | 107 | read = gl2 ? new Uint8Array( px ) : new Float32Array( px ); 108 | 109 | renderer.setRenderTarget( pixelRender, i ); 110 | renderer.render( scene, this.cam[i] ); 111 | renderer.readRenderTargetPixels( pixelRender, 0, 0, w, h, read ); 112 | 113 | if( !gl2 ){ 114 | 115 | var j = read.length; 116 | while(j--) read[j] *= inv255; 117 | 118 | } else { 119 | 120 | var j = w * h, n, a; 121 | while(j--){ 122 | 123 | n = j*4 124 | a = Math.pow( 2, read[n+3] - 128 ); 125 | read[n+0] *= a; 126 | read[n+1] *= a; 127 | read[n+2] *= a; 128 | read[n+3] = 255; 129 | 130 | } 131 | } 132 | 133 | pixel.push( read ); 134 | 135 | } 136 | 137 | renderer.setRenderTarget( currentRenderTarget ); 138 | 139 | return pixel 140 | 141 | }, 142 | 143 | }); 144 | -------------------------------------------------------------------------------- /src/objects/Planet.js: -------------------------------------------------------------------------------- 1 | function Planet( o, mat ) { 2 | 3 | o = o == undefined ? {} : o; 4 | 5 | this.radius = o.radius !== undefined ? o.radius : 100; 6 | this.resolution = o.resolution !== undefined ? o.resolution : 10; 7 | 8 | this.isBuffer = o.isBuffer || false; 9 | 10 | this.data = { 11 | level: o.level || [1,0.25], 12 | frequency: o.frequency || [0.1,0.5], 13 | expo: o.expo || 2, 14 | height: o.height || 4, 15 | } 16 | 17 | 18 | this.uvx = [2,2]; 19 | 20 | this.material = view.material({ 21 | 22 | name:'planet', 23 | normalScale:[1,1], 24 | vertexColors: THREE.VertexColors, 25 | map:{ url:'terrain/crater.jpg', repeat:this.uvx }, 26 | normalMap:{ url:'terrain/crater_n.jpg', repeat:this.uvx }, 27 | 28 | }); 29 | 30 | 31 | 32 | this.makeGeometry(); 33 | 34 | //this.update(); 35 | 36 | 37 | THREE.Mesh.call( this, this.geometry, this.material ); 38 | 39 | this.name = o.name || 'planet'; 40 | 41 | this.castShadow = true; 42 | this.receiveShadow = true; 43 | 44 | view.getMat()[this.name] = this.material; 45 | 46 | }; 47 | 48 | Planet.prototype = Object.assign( Object.create( THREE.Mesh.prototype ), { 49 | 50 | constructor: Planet, 51 | 52 | makeGeometry: function () { 53 | 54 | this.geo = new THREE.BoxGeometry( 1, 1, 1, this.resolution, this.resolution, this.resolution ); 55 | var i = this.geo.vertices.length, v; 56 | 57 | while( i-- ) { 58 | 59 | v = this.geo.vertices[ i ]; 60 | v.normalize(); 61 | v.multiplyScalar( this.radius ); 62 | 63 | } 64 | 65 | this.lng = this.geo.vertices.length; 66 | 67 | this.update(); 68 | 69 | }, 70 | 71 | update: function(){ 72 | 73 | if( this.geometry ) this.geometry.dispose(); 74 | 75 | 76 | var i = this.lng, v, c, f, w = new THREE.Vector3() 77 | 78 | while(i--){ 79 | 80 | v = this.geo.vertices[i]; 81 | 82 | c = Math.noise( v, this.data ); 83 | 84 | c = Math.pow( c, this.data.expo ); 85 | 86 | c = c>1 ? 1:c; 87 | c = c<0 ? 0:c; 88 | 89 | w.copy(v); 90 | v.add( w.normalize().multiplyScalar( c * this.data.height ) ); 91 | 92 | this.geo.colors[i] = new THREE.Color(c,c,c*0.2); 93 | 94 | } 95 | 96 | this.geo.computeVertexNormals(); 97 | 98 | i = this.geo.faces.length; 99 | 100 | while(i--){ 101 | 102 | f = this.geo.faces[i] 103 | f.vertexColors = [this.geo.colors[f.a],this.geo.colors[f.b],this.geo.colors[f.c]] 104 | 105 | } 106 | 107 | this.geo.colorsNeedUpdate = true; 108 | 109 | if( this.isBuffer ) this.geometry = new THREE.BufferGeometry().fromGeometry( this.geo ); 110 | else this.geometry = this.geo; 111 | 112 | /* 113 | 114 | this.colors = this.geometry.attributes.color.array//new Float32Array( this.lng2 * 3 ); 115 | var lng2 = this.colors.length/3; 116 | //this.geometry.addAttribute( 'color', new THREE.BufferAttribute( this.colors, 3 ) ); 117 | console.log('result ' + lng2) 118 | //this.geometry.addAttribute( 'color', new THREE.BufferAttribute( this.colors, 3 ) ); 119 | 120 | i = this.lng2 121 | while(i--){ 122 | 123 | //h = scale+H[i]; 124 | n = i * 3; 125 | h = 0.5; 126 | this.colors[n] = h; 127 | this.colors[n+1] = 0//h; 128 | this.colors[n+2] = 0;//h; 129 | } 130 | 131 | // this.geometry.attributes.position.needsUpdate = true; 132 | this.geometry.attributes.color.needsUpdate = true; 133 | */ 134 | 135 | //this.geometry.computeVertexNormals(); 136 | 137 | }, 138 | 139 | dispose: function () { 140 | 141 | this.geometry.dispose(); 142 | this.material.dispose(); 143 | 144 | }, 145 | 146 | setEnvMap: function ( map ) { 147 | 148 | this.material.envMap = map; 149 | }, 150 | 151 | 152 | }); -------------------------------------------------------------------------------- /src/objects/ReflectorRTT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * RTT version 3 | */ 4 | 5 | THREE.ReflectorRTT = function ( geometry, options ) { 6 | 7 | THREE.Reflector.call( this, geometry, options ); 8 | 9 | this.geometry.setDrawRange( 0, 0 ); // avoid rendering geometry 10 | 11 | }; 12 | 13 | THREE.ReflectorRTT.prototype = Object.create( THREE.Reflector.prototype ); 14 | -------------------------------------------------------------------------------- /src/particle.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lo-th/lab/5e8949f3202a952df2269e80f40a93f362cf22aa/src/particle.js -------------------------------------------------------------------------------- /src/row.js: -------------------------------------------------------------------------------- 1 | 2 | // ROW map 3 | 4 | export var row = ( function () { 5 | 6 | var map = new Map(); //Empty Map 7 | 8 | row = { 9 | 10 | has: function ( name ) { 11 | 12 | return map.has( name );// true or false 13 | 14 | }, 15 | 16 | get: function ( name ) { 17 | 18 | return map.get( name ); 19 | 20 | }, 21 | 22 | set: function ( name, value ) { 23 | 24 | map.set( name, value ); 25 | 26 | }, 27 | 28 | delete: function ( name ) { 29 | 30 | return map.delete( name );// true or false 31 | 32 | }, 33 | 34 | clear: function () { 35 | 36 | map.clear();// clear all 37 | 38 | }, 39 | 40 | size: function () { 41 | 42 | return map.size; 43 | 44 | }, 45 | 46 | }; 47 | 48 | return row; 49 | 50 | } )(); -------------------------------------------------------------------------------- /src/shaders/shadowPCSS.js: -------------------------------------------------------------------------------- 1 | THREE.ShadowPCSS = [ 2 | "#ifdef USE_SHADOWMAP", 3 | "#define LIGHT_WORLD_SIZE 0.005", 4 | "#define LIGHT_FRUSTUM_WIDTH 3.75", 5 | "#define LIGHT_SIZE_UV (LIGHT_WORLD_SIZE / LIGHT_FRUSTUM_WIDTH)", 6 | "#define NEAR_PLANE 9.5", 7 | " ", 8 | "#define NUM_SAMPLES 17", 9 | "#define NUM_RINGS 11", 10 | "#define BLOCKER_SEARCH_NUM_SAMPLES NUM_SAMPLES", 11 | "#define PCF_NUM_SAMPLES NUM_SAMPLES", 12 | " ", 13 | "vec2 poissonDisk[NUM_SAMPLES];", 14 | " ", 15 | "void initPoissonSamples( const in vec2 randomSeed ) {", 16 | " float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );", 17 | " float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );", 18 | 19 | // jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/ 20 | " float angle = rand( randomSeed ) * PI2;", 21 | " float radius = INV_NUM_SAMPLES;", 22 | " float radiusStep = radius;", 23 | 24 | " for( int i = 0; i < NUM_SAMPLES; i ++ ) {", 25 | " poissonDisk[i] = vec2( cos( angle ), sin( angle ) ) * pow( radius, 0.75 );", 26 | " radius += radiusStep;", 27 | " angle += ANGLE_STEP;", 28 | " }", 29 | "}", 30 | 31 | "float penumbraSize( const in float zReceiver, const in float zBlocker ) { ",// Parallel plane estimation 32 | " return (zReceiver - zBlocker) / zBlocker;", 33 | "}", 34 | 35 | "float findBlocker( sampler2D shadowMap, const in vec2 uv, const in float zReceiver ) {", 36 | // This uses similar triangles to compute what 37 | // area of the shadow map we should search 38 | " float searchRadius = LIGHT_SIZE_UV * ( zReceiver - NEAR_PLANE ) / zReceiver;", 39 | " float blockerDepthSum = 0.0;", 40 | " int numBlockers = 0;", 41 | 42 | " for( int i = 0; i < BLOCKER_SEARCH_NUM_SAMPLES; i++ ) {", 43 | " float shadowMapDepth = unpackRGBAToDepth(texture2D(shadowMap, uv + poissonDisk[i] * searchRadius));", 44 | " if ( shadowMapDepth < zReceiver ) {", 45 | " blockerDepthSum += shadowMapDepth;", 46 | " numBlockers ++;", 47 | " }", 48 | " }", 49 | 50 | " if( numBlockers == 0 ) return -1.0;", 51 | 52 | " return blockerDepthSum / float( numBlockers );", 53 | "}", 54 | 55 | "float PCF_Filter(sampler2D shadowMap, vec2 uv, float zReceiver, float filterRadius ) {", 56 | " float sum = 0.0;", 57 | " for( int i = 0; i < PCF_NUM_SAMPLES; i ++ ) {", 58 | " float depth = unpackRGBAToDepth( texture2D( shadowMap, uv + poissonDisk[ i ] * filterRadius ) );", 59 | " if( zReceiver <= depth ) sum += 1.0;", 60 | " }", 61 | " for( int i = 0; i < PCF_NUM_SAMPLES; i ++ ) {", 62 | " float depth = unpackRGBAToDepth( texture2D( shadowMap, uv + -poissonDisk[ i ].yx * filterRadius ) );", 63 | " if( zReceiver <= depth ) sum += 1.0;", 64 | " }", 65 | " return sum / ( 2.0 * float( PCF_NUM_SAMPLES ) );", 66 | "}", 67 | 68 | "float PCSS ( sampler2D shadowMap, vec4 coords ) {", 69 | " vec2 uv = coords.xy;", 70 | " float zReceiver = coords.z;", // Assumed to be eye-space z in this code 71 | 72 | " initPoissonSamples( uv );", 73 | // STEP 1: blocker search 74 | " float avgBlockerDepth = findBlocker( shadowMap, uv, zReceiver );", 75 | 76 | //There are no occluders so early out (this saves filtering) 77 | " if( avgBlockerDepth == -1.0 ) return 1.0;", 78 | 79 | // STEP 2: penumbra size 80 | " float penumbraRatio = penumbraSize( zReceiver, avgBlockerDepth );", 81 | " float filterRadius = penumbraRatio * LIGHT_SIZE_UV * NEAR_PLANE / zReceiver;", 82 | 83 | // STEP 3: filtering 84 | // return avgBlockerDepth; 85 | " return PCF_Filter( shadowMap, uv, zReceiver, filterRadius );", 86 | "}", 87 | 88 | ].join( "\n" ); -------------------------------------------------------------------------------- /src/textures.js: -------------------------------------------------------------------------------- 1 | /** _ _____ _ _ 2 | * | ||_ _| |_| | 3 | * | |_ | | | _ | 4 | * |___||_| |_| |_| 5 | * @author lo.th / http://lo-th.github.io/labs/ 6 | */ 7 | 8 | var textures = ( function () { 9 | 10 | 'use strict'; 11 | 12 | var data = new Map(); 13 | var pathTexture = './assets/textures/'; 14 | var loader = new THREE.TextureLoader(); 15 | var id = 0; 16 | 17 | textures = { 18 | 19 | get: function ( name ){ 20 | 21 | return data.has( name ) ? data.get( name ) : null; 22 | 23 | }, 24 | 25 | reset: function (){ 26 | 27 | data.forEach( function ( value, key ) { if( value.isTmp ){ value.dispose(); data.delete( key );} } ); 28 | 29 | }, 30 | 31 | clear: function (){ 32 | 33 | id = 0; 34 | data.forEach( function ( value, key ) { value.dispose(); } ); 35 | data.clear(); 36 | 37 | }, 38 | 39 | add: function ( name, txt, isTmp ) { 40 | 41 | txt.isTmp = isTmp !== undefined ? isTmp : true; 42 | data.set( name, txt ); 43 | 44 | }, 45 | 46 | make: function ( o ){ 47 | 48 | var name, tx = null; 49 | 50 | if( o.url !== undefined ) name = o.url.substring( o.url.lastIndexOf('/')+1, o.url.lastIndexOf('.') ); 51 | else if( o.name !== undefined ) name = o.name; 52 | else name = 'txt' + id++; 53 | 54 | // avoid duplication 55 | if( data.has( name ) ) return data.get( name ); 56 | 57 | if( o.url !== undefined ) { 58 | 59 | tx = loader.load( pathTexture + o.url ); 60 | 61 | tx.flipY = o.flip !== undefined ? o.flip : false; 62 | 63 | if( o.repeat !== undefined ){ 64 | tx.repeat.fromArray( o.repeat ); 65 | if(o.repeat[0]>1) tx.wrapS = THREE.RepeatWrapping; 66 | if(o.repeat[1]>1) tx.wrapT = THREE.RepeatWrapping; 67 | } 68 | 69 | if( o.anisotropy !== undefined ) tx.anisotropy = o.anisotropy; 70 | 71 | // clear on reset 72 | tx.isTmp = o.isTmp !== undefined ? o.isTmp : true; 73 | tx.encoding = THREE.sRGBEncoding; 74 | 75 | tx.name = name; 76 | 77 | // add to data 78 | this.add( name, tx ); 79 | 80 | return tx; 81 | 82 | } 83 | 84 | } 85 | 86 | } 87 | 88 | return textures; 89 | 90 | })(); -------------------------------------------------------------------------------- /test_Gltf.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIL test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /test_UIL.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIL test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /test_colors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | COLOR 7 | 8 | 9 | 10 | 11 | 29 | 30 | 31 | 32 | 33 | 34 |
35 |
36 |
37 | 116 | 117 | -------------------------------------------------------------------------------- /test_editor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test Editor 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /test_spotlights.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | three.js webgl - lights - spot light 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 242 | 243 | 244 | --------------------------------------------------------------------------------