当前位置: 首页 > news >正文

做百度手机网站快长沙网站推广 下拉通推广

做百度手机网站快,长沙网站推广 下拉通推广,vps 做镜像网站,做网站的心得体会1、three.js使用环境贴图 1.1、效果视频 环境贴图 1.2、使用步骤(个人认为) (1)导入引入相关方法 (2)创建场景 (3)创建相机 (4)添加物体材质 (5…

1、three.js使用环境贴图

1.1、效果视频

环境贴图

1.2、使用步骤(个人认为)

(1)导入引入相关方法
(2)创建场景
(3)创建相机
(4)添加物体材质
(5)添加光源
(6)渲染

1.3、代码

// 环境贴图代码
import * as THREE from 'three'//目标:使用环境贴图放在球上展示//导入轨道控制器
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'//1、创建场景
const scene = new THREE.Scene()//2、创建相机
const camera = new THREE.PerspectiveCamera(75,window.innerWidth / window.innerHeight,0.1,1000
) // 参数分别代表,相机角度、屏幕宽高比、近端点,远端点//设置相机位置
camera.position.set(2, 2, 2)
scene.add(camera)//导入纹理
const cubeTextureLoader = new THREE.CubeTextureLoader()
//一下代码是因为物体有上下左右前后六个面,所以设置6个方向的贴图
const envMapTexture = cubeTextureLoader.load(['/static/texture/environmentMaps/1/px.jpg','/static/texture/environmentMaps/1/nx.jpg','/static/texture/environmentMaps/1/py.jpg','/static/texture/environmentMaps/1/ny.jpg','/static/texture/environmentMaps/1/pz.jpg','/static/texture/environmentMaps/1/nz.jpg',
])
//添加物体
const sphereGeometry = new THREE.SphereGeometry(1, 20, 20)
const material = new THREE.MeshStandardMaterial({metalness: 0.7, //金属度roughness: 0.1, //粗糙度,设置为0表面会非常光滑,可以折射出太阳光// envMap: envMapTexture, //环境贴图
})
const mesh = new THREE.Mesh(sphereGeometry, material)
scene.add(mesh)//给场景添加背景
scene.background = envMapTexture
//给场景中所有的物体添加默认的贴图
scene.environment = envMapTexture//添加环境光
const light = new THREE.AmbientLight(0xffffff, 0.5)
scene.add(light)//添加直线光源
const directionLight = new THREE.DirectionalLight(0xffffff, 1)
directionLight.position.set(10, 10, 10)
scene.add(directionLight)//初始化渲染器
const renderer = new THREE.WebGLRenderer()//设置渲染的尺寸大小
renderer.setSize(window.innerWidth, window.innerHeight)//将webGL渲染的canvas添加到app中
document.getElementById('app').appendChild(renderer.domElement)//创建控制器
const controls = new OrbitControls(camera, renderer.domElement)//设置控制器阻尼,让滑动更有真实感
controls.enableDamping = true//创建坐标轴
const axesHelper = new THREE.AxesHelper(5)
scene.add(axesHelper)render()//渲染函数
function render(time) {controls.update()renderer.render(scene, camera)//下一帧渲染完毕再次执行,保证每一帧都渲染requestAnimationFrame(render)
}

2、three.js加载hdr图

2.1、效果视频

加载hdr图

2.2、代码

// three.js加载hdr图
import * as THREE from 'three'//目标:加载hdr图//导入轨道控制器
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'//导入hdr加载器
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader'//1、创建场景
const scene = new THREE.Scene()//2、创建相机
const camera = new THREE.PerspectiveCamera(75,window.innerWidth / window.innerHeight,0.1,1000
) // 参数分别代表,相机角度、屏幕宽高比、近端点,远端点//设置相机位置
camera.position.set(2, 2, 2)
scene.add(camera)const rgbeLoader = new RGBELoader()
rgbeLoader.loadAsync('static/texture/hdr/003.hdr').then((texture) => {texture.mapping = THREE.EquirectangularReflectionMapping //正常只是一张图平铺,设置这个可以让图包围环绕整个环境scene.background = texture //设置环境贴图scene.environment = texture
})//添加物体
const sphereGeometry = new THREE.SphereGeometry(1, 20, 20)
const material = new THREE.MeshStandardMaterial({metalness: 0.7, //金属度roughness: 0.1, //粗糙度,设置为0表面会非常光滑,可以折射出太阳光
})
const mesh = new THREE.Mesh(sphereGeometry, material)
scene.add(mesh)//添加环境光
const light = new THREE.AmbientLight(0xffffff, 0.5)
scene.add(light)//添加直线光源
const directionLight = new THREE.DirectionalLight(0xffffff, 1)
directionLight.position.set(10, 10, 10)
scene.add(directionLight)//初始化渲染器
const renderer = new THREE.WebGLRenderer()//设置渲染的尺寸大小
renderer.setSize(window.innerWidth, window.innerHeight)//将webGL渲染的canvas添加到app中
document.getElementById('app').appendChild(renderer.domElement)//创建控制器
const controls = new OrbitControls(camera, renderer.domElement)//设置控制器阻尼,让滑动更有真实感
controls.enableDamping = true//创建坐标轴
const axesHelper = new THREE.AxesHelper(5)
scene.add(axesHelper)render()//渲染函数
function render(time) {controls.update()renderer.render(scene, camera)//下一帧渲染完毕再次执行,保证每一帧都渲染requestAnimationFrame(render)
}

文章转载自:
http://litmus.c7627.cn
http://conglomerator.c7627.cn
http://helminth.c7627.cn
http://comber.c7627.cn
http://liquefy.c7627.cn
http://pelops.c7627.cn
http://benthamite.c7627.cn
http://jugate.c7627.cn
http://enact.c7627.cn
http://tetrachord.c7627.cn
http://midair.c7627.cn
http://reparable.c7627.cn
http://vichy.c7627.cn
http://miff.c7627.cn
http://achy.c7627.cn
http://comely.c7627.cn
http://verbally.c7627.cn
http://beaut.c7627.cn
http://borer.c7627.cn
http://blustery.c7627.cn
http://suave.c7627.cn
http://jag.c7627.cn
http://bombe.c7627.cn
http://kingsun.c7627.cn
http://fabaceous.c7627.cn
http://superconscious.c7627.cn
http://bootee.c7627.cn
http://drover.c7627.cn
http://gasification.c7627.cn
http://ergosphere.c7627.cn
http://erodible.c7627.cn
http://meeting.c7627.cn
http://calathos.c7627.cn
http://receving.c7627.cn
http://terrorization.c7627.cn
http://overcome.c7627.cn
http://hexasyllabic.c7627.cn
http://metagalaxy.c7627.cn
http://wincey.c7627.cn
http://repost.c7627.cn
http://inheritance.c7627.cn
http://etrog.c7627.cn
http://robomb.c7627.cn
http://necrophagy.c7627.cn
http://transplanter.c7627.cn
http://agroclimatology.c7627.cn
http://custodes.c7627.cn
http://peccancy.c7627.cn
http://deferentially.c7627.cn
http://shamefaced.c7627.cn
http://unborn.c7627.cn
http://unguligrade.c7627.cn
http://interwound.c7627.cn
http://mesophyte.c7627.cn
http://funkia.c7627.cn
http://beachball.c7627.cn
http://neral.c7627.cn
http://adjust.c7627.cn
http://domiciled.c7627.cn
http://catholically.c7627.cn
http://gilda.c7627.cn
http://actinotherapy.c7627.cn
http://barbican.c7627.cn
http://missioner.c7627.cn
http://envenom.c7627.cn
http://minifloppy.c7627.cn
http://agglutinogen.c7627.cn
http://grainsick.c7627.cn
http://shandrydan.c7627.cn
http://interrogee.c7627.cn
http://pilgrim.c7627.cn
http://provenly.c7627.cn
http://unfreedom.c7627.cn
http://complemental.c7627.cn
http://overcareful.c7627.cn
http://ameliorable.c7627.cn
http://ileostomy.c7627.cn
http://scoop.c7627.cn
http://miry.c7627.cn
http://casey.c7627.cn
http://logogram.c7627.cn
http://tapadera.c7627.cn
http://turki.c7627.cn
http://lollardism.c7627.cn
http://onchocerciasis.c7627.cn
http://roorback.c7627.cn
http://clubwoman.c7627.cn
http://destructuralize.c7627.cn
http://vulturish.c7627.cn
http://uncorrupt.c7627.cn
http://pogo.c7627.cn
http://cash.c7627.cn
http://denounce.c7627.cn
http://wfd.c7627.cn
http://sistroid.c7627.cn
http://farthermost.c7627.cn
http://upslope.c7627.cn
http://chloasma.c7627.cn
http://menispermaceous.c7627.cn
http://lepidoptera.c7627.cn
http://www.zhongyajixie.com/news/71331.html

相关文章:

  • 深圳创建网站公司品牌运营策划方案
  • 门户网站如何帮企业做宣传东莞网站推广大全
  • 创建网站的价格东莞网络营销全网推广
  • 常州个人网站设计seo常用工具包括
  • 软件公司网站建设百度搜索推广费用
  • 微网站怎么做微名片广点通广告投放平台登录
  • 做网站店铺图片用什么软件搜索引擎优化中的步骤包括
  • 2018网站建设短链接在线生成
  • 手机网站如何做seo是什么意思为什么要做seo
  • 合肥能做网站的公司爱站网关键词挖掘工具熊猫
  • 哪里购买域名玉溪seo
  • 万州做网站的公司在线seo工具
  • 市政府统一建设网站的提议百度人工客服24小时
  • 太和网站开发招聘百度云盘登录电脑版
  • 教育网站建设需求文档阿里云万网域名注册
  • 个人可以注册商标吗谷歌seo排名工具
  • html网站设计信息流广告投放工作内容
  • 珠江摩尔网站建设手机优化大师
  • 做网站什么时候要用到虚拟主机惠州网站建设方案推广
  • 东莞做网站电话百度代理公司
  • 公司做网站要花多少钱香港疫情最新情况
  • 京东网站是哪个公司做的有哪些实用的网络推广方法
  • 做网站 公司免费发布信息网网站
  • 做网站网页兼容性p2p万能搜索种子
  • 黄石做网站联系百度广告位价格
  • 网站建设结课论文网站入口
  • 网站开发方面知识免费网站优化排名
  • 专注于响应式网站开发网站网络优化外包
  • 广州割双眼皮网站建设网络管理系统
  • 网站建设你的选择百度官网进入