当前位置: 首页> 财经> 金融 > 国外素材设计欣赏网站_怀化seo快速排名_网络营销的四大特点_制作网站的app

国外素材设计欣赏网站_怀化seo快速排名_网络营销的四大特点_制作网站的app

时间:2025/7/14 12:04:16来源:https://blog.csdn.net/printf_hello/article/details/144064989 浏览次数:0次
国外素材设计欣赏网站_怀化seo快速排名_网络营销的四大特点_制作网站的app

在这里插入图片描述
请添加图片描述

请添加图片描述

const paramsObject = {sourceOffset: new THREE.Vector3(0, 10, -2),destOffset: new THREE.Vector3(0, 3, -2),generateUVs: false,maxIterations: 4,straightness: 0.7,radius0: 0.05,radius1: 0.05,radius0Factor: 0.9,radius1Factor: 0.4,minRadius: 0.1,isEternal: true,timeScale: 1,// 表示光线传播的时间占其生命周期的比例propagationTimeFactor: 0.5,// 表示光线从稳定阶段开始消失的时间占生命周期的比例vanishingTimeFactor: 0.87,// 子分支周期性出现的时间周期。默认值:4。subrayPeriod: 0.8,// 子分支最多可以拥有的子分支数量ramification: 200,// 值越低,每代子分支生成新子分支的概率越小recursionProbability: 1,// 从 0 到 1。值越高,光线越曲折。roughness: 0.85,// 射线起点处的射线“向上”方向。必须归一化。它应该垂直于光线的前进方向,但这并不重要。up0: new THREE.Vector3(0, 0, 1),// 类似于up0参数,但位于光线的末尾。必须归一化。up1: new THREE.Vector3(0, 0, 1),// 一旦创建并初始化了子射线,就可以使用它来调整子射线的形式或其他参数onSubrayCreation: (segment, parentSubray, childSubray, lightningStrike) => {// 圆椎形约束lightningStrike.subrayConePosition(segment, parentSubray, childSubray, 0.6, 0.9, 0.7);if (this.textMesh && this.aroundWord) {const pos = this.getPosition(this.textMesh.geometry, this.indexCount++);const r = Math.random();if (r < 0.5) {childSubray.pos0.set(pos.x, pos.y - (Math.random() * 2 - 1) * 0.5, pos.z + 0.1);childSubray.pos1.set(pos.x, pos.y - (Math.random() * 2 - 1) * 0.5, pos.z + 0.1);} else if (r < 0.9) {childSubray.pos0.set(pos.x - (Math.random() * 2 - 1) * 0.5, pos.y, pos.z + 0.1);childSubray.pos1.set(pos.x - (Math.random() * 2 - 1) * 0.5, pos.y, pos.z + 0.1);}// childSubray.pos0.set(pos.x - (Math.random() * 2 -1),pos.y - (Math.random() * 2 -1),pos.z)// childSubray.pos1.set(pos.x, pos.y, pos.z);}},
};
//three.js r152 examples/jsm/geometries/LightningStrike.js
const myRay = new LightningStrike(paramsObject);const myRayMesh = new THREE.Mesh(myRay,new THREE.MeshBasicMaterial({color: 0xffffff,})
);const outlinePass = new OutlinePass(new THREE.Vector2(window.innerWidth, window.innerHeight), scene, camera);const outlineParams = {// edgeStrength: 20.0,edgeStrength: 4.0,edgeGlow: 2.0,edgeThickness: 14.0,// pulsePeriod: 1.99,pulsePeriod: 0,
};
 getPosition(geometry: THREE.BufferGeometry, index: number) {const { array, count } = geometry.getAttribute("position");let targetIndex = index + Math.round(Math.random() * count);const position = { x: 0, y: 0, z: 0 };targetIndex %= count;const targetIndex3 = targetIndex * 3;position.x = array[targetIndex3];position.y = array[targetIndex3 + 1];position.z = array[targetIndex3 + 2];return position;
}
关键字:国外素材设计欣赏网站_怀化seo快速排名_网络营销的四大特点_制作网站的app

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: