three.js学习笔记1

1.webgl_animation_keyframes

1.增强环境光
const pmremGenerator = new THREE.PMREMGenerator(renderer);
scene.environment = pmremGenerator.fromScene(new RoomEnvironment(renderer), 0.04).texture;

2.动画混合器
loader.load('models/gltf/LittlestTokyo.glb', function (gltf) {
    mixer = new THREE.AnimationMixer(model);
    mixer.clipAction(gltf.animations[0]).play();
    renderer.setAnimationLoop(animate);
}, undefined, function (e) {
    console.error(e);
});

function animate() {
    const delta = clock.getDelta();
    mixer.update(delta);
}

2.webgl_animation_skinning_blending

// 1.设置雾效
scene.fog = new THREE.Fog(color, near, far);

//2.THREE.HemisphereLight 是 Three.js 中的一种光源,用于模拟天空和地面光照
const hemiLight = new THREE.HemisphereLight( 0xffffff, 0x8d8d8d, 3 );

//3.THREE.DirectionalLight 是 Three.js 中的一种光源,模拟从一个特定方向发出的平行光。这种光源常用于模拟太阳光

你可能感兴趣的:(three.js学习笔记,javascript,学习,笔记)