Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CG Tutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kihyun lee
CG Tutorial
Commits
9166b39c
Commit
9166b39c
authored
2 years ago
by
kihyun lee
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
326180c8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+6
-0
6 additions, 0 deletions
README.md
with
6 additions
and
0 deletions
README.md
+
6
−
0
View file @
9166b39c
...
@@ -24,6 +24,7 @@ const materials = [
...
@@ -24,6 +24,7 @@ const materials = [
>그리고 더 나아가 주변 환경이 비치도록 Reflection 을 이용할 수도 있습니다.
>그리고 더 나아가 주변 환경이 비치도록 Reflection 을 이용할 수도 있습니다.
const path = 'https://raw.githubusercontent.com/tamani-coding/threejs-texture-maps/main/dist/Metal_Tiles_003_';
const path = 'https://raw.githubusercontent.com/tamani-coding/threejs-texture-maps/main/dist/Metal_Tiles_003_';
const urls = [
const urls = [
path+'ambientOcclusion.jpg', path+'basecolor.jpg',
path+'ambientOcclusion.jpg', path+'basecolor.jpg',
path+'metallic.jpg', path+'metallic.jpg',
path+'metallic.jpg', path+'metallic.jpg',
...
@@ -31,14 +32,19 @@ const urls = [
...
@@ -31,14 +32,19 @@ const urls = [
];
];
const reflectionCube = new THREE.CubeTextureLoader().load( urls );
const reflectionCube = new THREE.CubeTextureLoader().load( urls );
scene.background = reflectionCube;
scene.background = reflectionCube;
const material1 = new THREE.MeshPhongMaterial(
const material1 = new THREE.MeshPhongMaterial(
{ color: 0x00ffff, envMap: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.5 } );
{ color: 0x00ffff, envMap: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.5 } );
const material2 = new THREE.MeshLambertMaterial(
const material2 = new THREE.MeshLambertMaterial(
{ color: 0xffffff, envMap: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.5 } );
{ color: 0xffffff, envMap: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.5 } );
const material3 = new THREE.MeshLambertMaterial(
const material3 = new THREE.MeshLambertMaterial(
{ color: 0xffff00, envMap: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.5 } );
{ color: 0xffff00, envMap: reflectionCube, combine: THREE.MixOperation, reflectivity: 0.5 } );
> 여기서 반사가 얼마나 되는지 조절하려면 reflectivity를 수정하면 됩니다.
> 여기서 반사가 얼마나 되는지 조절하려면 reflectivity를 수정하면 됩니다.
> envMap를 reflectionCube로 설정했기에 반사를 활용할 수 있습니다.
> envMap를 reflectionCube로 설정했기에 반사를 활용할 수 있습니다.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment