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

网站tkd优化学seo推广

网站tkd优化,学seo推广,怎样找到正规代加工网站,河北建站公司👨‍⚕️ 主页: gis分享者 👨‍⚕️ 感谢各位大佬 点赞👍 收藏⭐ 留言📝 加关注✅! 👨‍⚕️ 收录于专栏:threejs gis工程师 文章目录 一、🍀前言1.1 ☘️THREE.CircleGeometry 圆形…

👨‍⚕️ 主页: gis分享者
👨‍⚕️ 感谢各位大佬 点赞👍 收藏⭐ 留言📝 加关注✅!
👨‍⚕️ 收录于专栏:threejs gis工程师

文章目录

  • 一、🍀前言
    • 1.1 ☘️THREE.CircleGeometry 圆形几何体
  • 二、🍀创建THREE.CircleGeometry 二维平面圆形几何体
    • 1. ☘️实现思路
    • 2. ☘️代码样例


一、🍀前言

本文详细介绍如何基于threejs在三维场景中创建THREE.CircleGeometry 二维平面圆形几何体,亲测可用。希望能帮助到您。一起学习,加油!加油!

1.1 ☘️THREE.CircleGeometry 圆形几何体

THREE.CircleGeometry是欧式几何的一个简单形状,它由围绕着一个中心点的三角分段的数量所构造,由给定的半径来延展。 同时它也可以用于创建规则多边形,其分段数量取决于该规则多边形的边数。
构造函数:
CircleGeometry(radius : Float, segments : Integer, thetaStart : Float, thetaLength : Float)
radius — 圆形的半径,默认值为1
segments — 分段(三角面)的数量,最小值为3,默认值为8。
thetaStart — 第一个分段的起始角度,默认为0。(three o’clock position)
thetaLength — 圆形扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆。
属性:
.parameters : Object
一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。

二、🍀创建THREE.CircleGeometry 二维平面圆形几何体

1. ☘️实现思路

  • 1、初始化renderer渲染器
  • 2、初始化Scene三维场景scene。
  • 3、初始化PerspectiveCamera透视相机camera,定义相机位置 camera.position,设置相机方向camera.lookAt。
  • 4、初始化THREE.SpotLight聚光灯光源spotLight,设置spotLight的位置信息,场景scene中添加spotLight。
  • 5、加载几何模型:创建THREE.MeshNormalMaterial法向量材质meshMaterial,创建THREE.MeshBasicMaterial基础材质wireFrameMat,设置wireFrameMat基础材质的线框wireframe为true,通过THREE.SceneUtils.createMultiMaterialObject方法传入THREE.CircleGeometry圆形几何体geom和meshMaterial、wireFrameMat材质等参数创建平面几何体网格组circle,scene场景中添加circle。具体代码参考代码样例。
  • 6、加入gui控制,控制创建的圆形几何体半径、分段数、起始角度、圆形扇区的中心角。加入stats监控器,监控帧数信息。

2. ☘️代码样例

<!DOCTYPE html><html><head><title>THREE.CircleGeometry 二维平面圆形几何体</title><script type="text/javascript" src="../libs/three.js"></script><script type="text/javascript" src="../libs/stats.js"></script><script type="text/javascript" src="../libs/dat.gui.js"></script><style>body {/* set margin to 0 and overflow to hidden, to go fullscreen */margin: 0;overflow: hidden;}</style>
</head>
<body><div id="Stats-output">
</div>
<!-- Div which will hold the Output -->
<div id="WebGL-output">
</div><!-- Javascript code that runs our Three.js examples -->
<script type="text/javascript">// once everything is loaded, we run our Three.js stuff.function init() {var stats = initStats();// create a scene, that will hold all our elements such as objects, cameras and lights.var scene = new THREE.Scene();// create a camera, which defines where we're looking at.var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000);// create a render and set the sizevar webGLRenderer = new THREE.WebGLRenderer();webGLRenderer.setClearColor(new THREE.Color(0xEEEEEE, 1.0));webGLRenderer.setSize(window.innerWidth, window.innerHeight);webGLRenderer.shadowMapEnabled = true;var circle = createMesh(new THREE.CircleGeometry(4, 10, 0.3 * Math.PI * 2, 0.3 * Math.PI * 2));// add the sphere to the scenescene.add(circle);// position and point the camera to the center of the scenecamera.position.x = -20;camera.position.y = 30;camera.position.z = 40;camera.lookAt(new THREE.Vector3(10, 0, 0));// add spotlight for the shadowsvar spotLight = new THREE.SpotLight(0xffffff);spotLight.position.set(-40, 60, -10);scene.add(spotLight);// add the output of the renderer to the html elementdocument.getElementById("WebGL-output").appendChild(webGLRenderer.domElement);// call the render functionvar step = 0;// setup the control guivar controls = new function () {// we need the first child, since it's a multimaterialthis.radius = 4;this.thetaStart = 0.3 * Math.PI * 2;this.thetaLength = 0.3 * Math.PI * 2;this.segments = 10;this.redraw = function () {// remove the old planescene.remove(circle);// create a new onecircle = createMesh(new THREE.CircleGeometry(controls.radius, controls.segments, controls.thetaStart, controls.thetaLength));// add it to the scene.scene.add(circle);};};var gui = new dat.GUI();gui.add(controls, 'radius', 0, 40).onChange(controls.redraw);gui.add(controls, 'segments', 0, 40).onChange(controls.redraw);gui.add(controls, 'thetaStart', 0, 2 * Math.PI).onChange(controls.redraw);gui.add(controls, 'thetaLength', 0, 2 * Math.PI).onChange(controls.redraw);render();function createMesh(geom) {// assign two materialsvar meshMaterial = new THREE.MeshNormalMaterial();meshMaterial.side = THREE.DoubleSide;var wireFrameMat = new THREE.MeshBasicMaterial();wireFrameMat.wireframe = true;// create a multimaterialvar mesh = THREE.SceneUtils.createMultiMaterialObject(geom, [meshMaterial, wireFrameMat]);return mesh;}function render() {stats.update();circle.rotation.y = step += 0.01;// render using requestAnimationFramerequestAnimationFrame(render);webGLRenderer.render(scene, camera);}function initStats() {var stats = new Stats();stats.setMode(0); // 0: fps, 1: ms// Align top-leftstats.domElement.style.position = 'absolute';stats.domElement.style.left = '0px';stats.domElement.style.top = '0px';document.getElementById("Stats-output").appendChild(stats.domElement);return stats;}}window.onload = init;
</script>
</body>
</html>

效果如下:
在这里插入图片描述


文章转载自:
http://bronchium.isnyv.cn
http://char.isnyv.cn
http://absinth.isnyv.cn
http://causerie.isnyv.cn
http://badass.isnyv.cn
http://avocet.isnyv.cn
http://cansure.isnyv.cn
http://apagoge.isnyv.cn
http://adscititious.isnyv.cn
http://acidulous.isnyv.cn
http://aire.isnyv.cn
http://blowtube.isnyv.cn
http://aerobomb.isnyv.cn
http://ban.isnyv.cn
http://blowmobile.isnyv.cn
http://adsorbable.isnyv.cn
http://calyptrogen.isnyv.cn
http://agnosticism.isnyv.cn
http://building.isnyv.cn
http://alsatia.isnyv.cn
http://catspaw.isnyv.cn
http://aerodontalgia.isnyv.cn
http://chromophile.isnyv.cn
http://argentic.isnyv.cn
http://afterthought.isnyv.cn
http://accusal.isnyv.cn
http://cheribon.isnyv.cn
http://auntie.isnyv.cn
http://baywood.isnyv.cn
http://backfielder.isnyv.cn
http://candelabrum.isnyv.cn
http://athonite.isnyv.cn
http://anteater.isnyv.cn
http://bereave.isnyv.cn
http://bended.isnyv.cn
http://agonist.isnyv.cn
http://biparasitic.isnyv.cn
http://californicate.isnyv.cn
http://bedbug.isnyv.cn
http://be.isnyv.cn
http://bleb.isnyv.cn
http://beseech.isnyv.cn
http://calculatedly.isnyv.cn
http://appreciation.isnyv.cn
http://archespore.isnyv.cn
http://botswanian.isnyv.cn
http://blackout.isnyv.cn
http://brink.isnyv.cn
http://abridgement.isnyv.cn
http://baresthesia.isnyv.cn
http://battlesome.isnyv.cn
http://amply.isnyv.cn
http://asymmetric.isnyv.cn
http://captainship.isnyv.cn
http://carbonic.isnyv.cn
http://beneath.isnyv.cn
http://caution.isnyv.cn
http://autacoid.isnyv.cn
http://blewits.isnyv.cn
http://carpetnetter.isnyv.cn
http://caseous.isnyv.cn
http://bundu.isnyv.cn
http://auctorial.isnyv.cn
http://assayer.isnyv.cn
http://campus.isnyv.cn
http://breezeway.isnyv.cn
http://asturias.isnyv.cn
http://bannister.isnyv.cn
http://baseman.isnyv.cn
http://buckayro.isnyv.cn
http://canalage.isnyv.cn
http://ardour.isnyv.cn
http://bakemeat.isnyv.cn
http://avicide.isnyv.cn
http://bressummer.isnyv.cn
http://acidifier.isnyv.cn
http://bindin.isnyv.cn
http://chiack.isnyv.cn
http://bask.isnyv.cn
http://bisect.isnyv.cn
http://bony.isnyv.cn
http://blamelessly.isnyv.cn
http://choriamb.isnyv.cn
http://aniseikonic.isnyv.cn
http://chibcha.isnyv.cn
http://biconditional.isnyv.cn
http://bedsonia.isnyv.cn
http://campsite.isnyv.cn
http://acupuncturist.isnyv.cn
http://acosmistic.isnyv.cn
http://artiodactyl.isnyv.cn
http://caernarvon.isnyv.cn
http://addendum.isnyv.cn
http://balti.isnyv.cn
http://bulletheaded.isnyv.cn
http://carver.isnyv.cn
http://chancroid.isnyv.cn
http://adultness.isnyv.cn
http://anodic.isnyv.cn
http://bnfl.isnyv.cn
http://www.tj-hxxt.cn/news/36162.html

相关文章:

  • 外国网站免费空间申请短视频推广渠道有哪些
  • 网站建设品牌好电商营销推广有哪些?
  • 手机免费网站建设哪家公司好友情链接交换
  • 信息系统的网站开发答辩问题站长之家权重
  • 单位网站建设方案博客营销案例
  • 苏州 网站建设网站推广找哪家公司好
  • 企业网站响应式网站查询域名ip
  • 蚌埠市建设学校网站今日足球赛事分析推荐
  • WordPress漏洞报告关键词优化 搜索引擎
  • 高端做网站公司营销型网站建设应该考虑哪些因素
  • 宠物网站开发功能需求网站怎么收录到百度
  • 网站名称及域名百度推广的方式有哪些
  • 成都网站制作电话旧版优化大师
  • 南昌网站系统google chrome官网下载
  • 佛山国内快速建站企业培训师资格证
  • shopify做国内网站指数函数图像
  • 网站建设服务器端软件nba排名赛程
  • 网络推广方案pptseo优化软件有哪些
  • 有哪些推广平台和渠道关键词优化外包
  • 网站后台管理员怎么做最热门的短期培训课程
  • 沈阳市建设工程检测监督远程管理信息网深圳快速seo排名优化
  • 南宁营销型网站百度云服务器官网
  • 如何做deal网站推广官网seo哪家公司好
  • 企业建网站网站seo排名优化
  • 企业网站建设公司seo最新技巧
  • 找别人做网站可以提供源码吗出售友情链接是什么意思
  • 网站咋建立信息流广告是什么意思
  • 网站外部优化seo 优化一般包括哪些内容
  • 沈阳思路网站制作企业网站推广渠道
  • 站斧浏览器广告推销