电线错字(Wire stagger)

2023-10-30 17:40
文章标签 wire 错字 stagger 电线

本文主要是介绍电线错字(Wire stagger),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

电线错字(Wire stagger)

  • 示例
  • HTML
  • CSS
  • JS

更多有趣示例 尽在 知屋安砖社区

示例

在这里插入图片描述

HTML

#canvas-wrapper(aria-label='wire')

CSS

body {height: 100vh;background-color: #212121; // blackbackground: radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(46,46,46,1) 0%, rgba(0,0,0,1) 100%);margin: 0;padding: 0;overflow: hidden;
}

JS

/* * WIRE TYPO* Made with ThreeJS - Enjoy!* https://threejs.org/** Experimenting with wireframe typography.* Move the cursor to zoom in/out.* On mobile touch + drag screen to zoom in/out.** #019 - #100DaysOfCode* By ilithya | 2019*/const colorBg = '#212121'; // Black
const colorWire = '#18FFFF'; // blueconst nearDist = 0.1;
const farDist = 1000;const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75,window.innerWidth / window.innerHeight,nearDist,farDist
);
camera.position.z = farDist;const renderer = new THREE.WebGLRenderer({alpha: true,antialias: true
});
renderer.setClearColor(colorBg, 0); // Set the bg via CSS instead, for a gradient effect
renderer.setPixelRatio(window.devicePixelRatio); // For HiDPI devices to prevent bluring output canvas
renderer.setSize(window.innerWidth, window.innerHeight);
document.querySelector("#canvas-wrapper").appendChild(renderer.domElement);// CREATE TYPOGRAPHY
const group = new THREE.Group(); // To add 3d float effect
const typoLoader = new THREE.FontLoader();
const createTypo = font => {const word = "wire";const typoSize = 120;const typoProperties = {font: font,size: typoSize,height: typoSize * 3,curveSegments: 1,bevelEnabled: true,bevelThickness: 0.1,bevelSize: 2,bevelOffset: 0,bevelSegments: 3};const textMesh = new THREE.Mesh();textMesh.geometry = new THREE.TextBufferGeometry(word, typoProperties);textMesh.material =  new THREE.MeshBasicMaterial({ color: (colorWire),wireframe: true,});// Let's center typo in scenetextMesh.geometry.computeBoundingBox();textMesh.geometry.boundingBox.getCenter(textMesh.position).multiplyScalar(-1);// Manually control when 3D transformations recalculation occurs for better performancetextMesh.matrixAutoUpdate = false;textMesh.updateMatrix();group.add(textMesh);
};
typoLoader.load("https://threejs.org/examples/fonts/helvetiker_bold.typeface.json",createTypo
);
scene.add(group);// CREATE PART OF THE MOUSE/TOUCH OVER EFFECT
let mouseX = 0;
let mouseY = 0;
const mouseFX = {windowHalfX: window.innerWidth / 2,windowHalfY: window.innerHeight / 2,coordinates: function(coordX, coordY) {mouseX = coordX - mouseFX.windowHalfX;mouseY = coordY - mouseFX.windowHalfY;mouseX = mouseX < 0 ? Math.abs(mouseX) : mouseX;},onMouseMove: function(e) {mouseFX.coordinates(e.clientX, e.clientY);},onTouchMove: function(e) {const touchX = e.changedTouches[0].clientX * 2;const touchY = e.changedTouches[0].clientY * 2;mouseFX.coordinates(touchX, touchY);}
};
document.addEventListener("mousemove", mouseFX.onMouseMove, false);
document.addEventListener("touchmove", mouseFX.onTouchMove, false);// RENDER 3D GRAPHIC
const render = () => {requestAnimationFrame(render);// Camera animation// Works with onMouseMove and onTouchMove functionsconst ct = 0.05;const pZ = (mouseX - camera.position.z) * ct;camera.position.z += pZ;		// Floating animationconst radians = Date.now() * 0.0005;const rot = Math.sin(radians) * 0.1;group.rotation.x = rot;group.rotation.y = rot;renderer.render(scene, camera);
};
render();// RESIZE CANVAS
// This is buggy in some iOS...
// const resizeCanvas = () => {
// 	camera.aspect = window.innerWidth / window.innerHeight;
// 	camera.updateProjectionMatrix();
// 	renderer.setSize(window.innerWidth, window.innerHeight);
// };
// window.addEventListener("resize", resizeCanvas, false);

这篇关于电线错字(Wire stagger)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/309553

相关文章

vivado WIRE

WIRE是用于在Xilinx部件上路由连接或网络的设备对象。一根电线 是单个瓦片内部的一条互连金属。PIP、系紧装置和 SITE_PINs。 提示:WIRE对象不应与设计的Verilog文件中的WIRE实体混淆。那些 电线在设计中与网络有关,而不是与定义的设备的路由资源有关 WIRE对象。 相关对象 如图2-33第119页所示,WIRE对象与TILE、NODE、PIP或NET相关。 您可以使用

【无标题】verlog中wire 和reg用法

wire(组合逻辑) wire用来连接模块实例化的输入和输出端口; wire用作实际模块声明中输入和输出; wire 元素必须由某些东西驱动,并且在没有被驱动的情况下,无法存储值; wire 元素不能用在 always模块中 = 或者 <= 的左边; wire元素是assign语句左侧 唯一的合法类型; wire 元素是在基于Verilog的设计中连接两片的无状态方式; wire 只能用在 组合

Verilog中端口应该设置为wire形还是reg形

初学Verilog时,一直搞不清Verilog描述模块时端口应该取什么类型;是reg形?还是wire形?模块对应测试文件的端口类型为什么又与模块的端口类型不一样?因此有必要进行学习与整理: 先写结论: verilog中的端口具有三种传输方向:input、output、和inout,所有的端口均默认为wire类型; 模块描述时,input端口只能为线网形,output端口可以为线网/reg,in

Golang: 依赖注入与wire —— 构建高效模块化应用的秘诀

💝💝💝欢迎莅临我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:「stormsha的主页」👈,持续学习,不断总结,共同进步,为了踏实,做好当下事儿~ 专栏导航 Python系列: Python面试题合集,剑指大厂Git系列: Git操作技巧GO系列: 记录博主学习GO语言的笔

altera 防止reg/wire 优化

转载:# 关于SignalTap中的节点查找不到的问题_signaltap找不到信号-CSDN博客 关于SignalTap中的节点查找不到的问题 在选择需要查看的信号节点时,有一个信号节点,我翻遍了所有的模块,始终未能看到它的影子,然后上网查了一下,找到了问题所在。 因为在使用quartus编译综合时,某些信号会被优化掉,就会导致在查找此信号节点时,会发现找不见。 解决方法: 1.对

【chisel】chisel怎么给io wire定义初值

在 Chisel 中,为 IO 节点的 Wire 定义初始值通常与特定的信号类型和使用场景有关。以下是一些定义初始值的常见方法: 使用 RegInit 创建寄存器并定义初始值: 当您想要为一个寄存器类型的 Wire 定义初始值时,可以使用 RegInit。以下是一个例子: class MyModule extends Module {val io = IO(new Bundle

[HDLBits] Simple wire

Create a module with one input and one output that behaves like a wire. module top_module( input in, output out );assign out = in; endmodule

golang beego结合wire依赖注入及自动路由

1 安装wire 1.1 通过命令直接安装 go install github.com/google/wire/cmd/wire@latest 1.2 通过go get方式安装 go get github.com/google/wire/cmd/wire 进入目录编译 cd C:\Users\leell\go\pkg\mod\github.com\google\wire@v0.6.0

golang wire 依赖注入

1 安装wire 1.1 通过命令直接安装 go install github.com/google/wire/cmd/wire@latest 1.2 通过go get方式安装 go get github.com/google/wire/cmd/wire 进入目录编译 cd C:\Users\leell\go\pkg\mod\github.com\google\wire@v0.6.0

Spring auto wire(自动装配) 的 五种方式

Spring  auto-wire的 五种方式: 1:no   默认的方式是不进行自动装配,通过手工设置ref 属性来进行装配bean 2:byName   通过参数名 自动装配,如果一个bean的name 和另外一个bean的 property 相同,就自动装配。 3:byType   通过参数的数据类型自动自动装配,如果一个bean的数据类型和另外一个bean的proper