当前位置:网站首页>three. JS gorgeous bubble effect
three. JS gorgeous bubble effect
2022-07-06 22:35:00 【Ziwei front end】
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
canvas {
position: fixed;
width: 100%;
height: 100%;
}
const nbObjects = 800;
var conf, scene, camera, cameraCtrl, light, renderer;
var whw, whh;
var objects;
var spriteMap, spriteMaterial;
var mouse = new THREE.Vector2();
var mouseOver = false;
var mousePlane = new THREE.Plane(new THREE.Vector3(0, 0, 1), 0);
var mousePosition = new THREE.Vector3();
var raycaster = new THREE.Raycaster();
function init() {
conf = {
opacity: 0.8
};
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera(100, window.innerWidth / window.innerHeight, 0.1, 1000);
cameraCtrl = new THREE.OrbitControls(camera);
cameraCtrl.autoRotate = true;
cameraC
边栏推荐
猜你喜欢
Should novice programmers memorize code?
Installation and use of labelimg
将MySQL的表数据纯净方式导出
【LeetCode】19、 删除链表的倒数第 N 个结点
NPDP certification | how do product managers communicate across functions / teams?
重磅新闻 | Softing FG-200获得中国3C防爆认证 为客户现场测试提供安全保障
Web APIs DOM 时间对象
Aardio - 通过变量名将变量值整合到一串文本中
0 basic learning C language - digital tube
Aardio - Method of batch processing attributes and callback functions when encapsulating Libraries
随机推荐
Unity3d minigame-unity-webgl-transform插件转换微信小游戏报错To use dlopen, you need to use Emscripten‘s...问题
变量与“零值”的比较
NPDP certification | how do product managers communicate across functions / teams?
case 关键字后面的值有什么要求吗?
rust知识思维导图xmind
手写ABA遇到的坑
剪映+json解析将视频中的声音转换成文本
Aardio - 利用customPlus库+plus构造一个多按钮组件
NPM cannot install sharp
Puppeter connects to the existing Chrome browser
MySQL教程的天花板,收藏好,慢慢看
新手程序员该不该背代码?
关于声子和热输运计算中BORN电荷和non-analytic修正的问题
项目复盘模板
2022-07-04 the high-performance database engine stonedb of MySQL is compiled and run in centos7.9
第十九章 使用工作队列管理器(二)
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
Data storage (1)
[IELTS speaking] Anna's oral learning record part1
OpenNMS separation database