|
|
@ -45,7 +45,7 @@ var container = document.getElementById('container'); |
|
|
|
//创建场景
|
|
|
|
var scene = new THREE.Scene(); |
|
|
|
|
|
|
|
var hemiLight = new THREE.HemisphereLight(0xddeeff, 0x0f0e0d, 0.8); |
|
|
|
var hemiLight = new THREE.HemisphereLight(0xffffff, 0xffffff, 0.8); |
|
|
|
scene.add(hemiLight); |
|
|
|
|
|
|
|
var bulbGeometry = new THREE.SphereBufferGeometry(0.22, 16, 8); |
|
|
@ -87,7 +87,7 @@ mtlLoader.load('dimian.mtl', function (materials) { |
|
|
|
|
|
|
|
objLoader.setMaterials(materials); |
|
|
|
|
|
|
|
objLoader.load('ket.obj', function (mesh) { |
|
|
|
objLoader.load('33.obj', function (mesh) { |
|
|
|
|
|
|
|
mesh.scale.set(0.01, 0.01, 0.01); |
|
|
|
scene.add(mesh); |
|
|
@ -138,19 +138,17 @@ camTarget.position.set(0, 0, 0); |
|
|
|
|
|
|
|
//抗锯齿
|
|
|
|
var composer; |
|
|
|
var fxaaPass; |
|
|
|
var renderPass; |
|
|
|
var pixelRatio; |
|
|
|
|
|
|
|
renderPass = new RenderPass(scene, camera); |
|
|
|
fxaaPass = new ShaderPass(FXAAShader); |
|
|
|
pixelRatio = renderer.getPixelRatio(); |
|
|
|
fxaaPass.material.uniforms['resolution'].value.x = 1 / (container.offsetWidth * pixelRatio); |
|
|
|
fxaaPass.material.uniforms['resolution'].value.y = 1 / (container.offsetHeight * pixelRatio); |
|
|
|
var ssaaRenderPass; |
|
|
|
var copyPass; |
|
|
|
|
|
|
|
composer = new EffectComposer(renderer); |
|
|
|
composer.addPass(renderPass); |
|
|
|
composer.addPass(fxaaPass); |
|
|
|
|
|
|
|
ssaaRenderPass = new SSAARenderPass(scene, camera); |
|
|
|
ssaaRenderPass.unbiased = true; |
|
|
|
composer.addPass(ssaaRenderPass); |
|
|
|
copyPass = new ShaderPass(CopyShader); |
|
|
|
composer.addPass(copyPass); |
|
|
|
composer.setSize(window.innerWidth, window.innerHeight); |
|
|
|
|
|
|
|
// 渲染函数
|
|
|
|
function render() { |
|
|
@ -162,8 +160,9 @@ function render() { |
|
|
|
hemiLight.intensity = hemiLuminousIrradiances[params.hemiIrradiance]; |
|
|
|
requestAnimationFrame(render); |
|
|
|
|
|
|
|
//fxaa
|
|
|
|
ssaaRenderPass.sampleLevel = 3; |
|
|
|
composer.render(); |
|
|
|
|
|
|
|
//renderer.render(scene, camera); //执行渲染操作
|
|
|
|
} |
|
|
|
|
|
|
@ -186,18 +185,18 @@ function makeDimian() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_dimian_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_dimian_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_dimian_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_dimian_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
@ -232,18 +231,18 @@ function makeTijiao() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_tijiao_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_tijiao_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_tijiao_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_tijiao_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
@ -271,18 +270,18 @@ function makeQiangti() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_qiangti_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_qiangti_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_qiangti_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_qiangti_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
@ -311,18 +310,18 @@ function makeChuangkuang() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_chuangkuang_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_chuangkuang_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_chuangkuang_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_chuangkuang_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
@ -350,23 +349,23 @@ function makeChuangsha() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_chuangsha_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_chuangsha_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_chuangsha_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_chuangsha_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
|
transparent:true, |
|
|
|
opacity:0.91, |
|
|
|
transparent: true, |
|
|
|
opacity: 1.5, |
|
|
|
map: diffuseMpa, |
|
|
|
bumpMap: bumpMap, |
|
|
|
metalnessMap: matelMap, |
|
|
@ -390,22 +389,22 @@ function makeGlass() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_glass_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_glass_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_glass_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_glass_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
|
transparent:true, |
|
|
|
transparent: true, |
|
|
|
alphaMap: diffuseMpa, |
|
|
|
bumpMap: bumpMap, |
|
|
|
metalnessMap: matelMap, |
|
|
@ -430,18 +429,18 @@ function makeChuanglianbu() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_chuanglianbu_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_chuanglianbu_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_chuanglianbu_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_chuanglianbu_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
@ -470,18 +469,18 @@ function makeHeikon() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_heikon_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_heikon_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_heikon_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_heikon_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
@ -510,18 +509,18 @@ function makeJinshuxian() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_jinshuxian_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_jinshuxian_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_jinshuxian_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_jinshuxian_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
@ -550,18 +549,18 @@ function makeQiangbu() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_qiangbu_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_qiangbu_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_qiangbu_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_qiangbu_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
@ -591,18 +590,18 @@ function makeDalishi() { |
|
|
|
bumpMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//matelness map
|
|
|
|
var matelMap = textureLoader.load('./ket_dalishi_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_dalishi_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
var matelMap = textureLoader.load('./ket_dalishi_Metallic.png'); |
|
|
|
matelMap.wrapS = THREE.RepeatWrapping; |
|
|
|
matelMap.wrapT = THREE.RepeatWrapping; |
|
|
|
matelMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
matelMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
//roughness map
|
|
|
|
var roughnessMap = textureLoader.load('./ket_dalishi_Roughness.png'); |
|
|
|
roughnessMap.wrapS = THREE.RepeatWrapping; |
|
|
|
roughnessMap.wrapT = THREE.RepeatWrapping; |
|
|
|
roughnessMap.repeat.copy(new THREE.Vector2(1, 1)); |
|
|
|
roughnessMap.offset.copy(new THREE.Vector2(0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
var ret = new MeshStandardMaterial({ |
|
|
|