首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

Planetary.js 旋转地球插件

(function() { var canvas = document.getElementById('quakeCanvas'); // Create our Planetary.js planet and set some initial values; // we use several custom plugins, defined at the bottom of the file var planet = planetaryjs.planet(); planet.loadPlugin(autocenter({extraHeight: -120})); planet.loadPlugin(autoscale({extraHeight: -120})); planet.loadPlugin(planetaryjs.plugins.earth({ topojson: { file: 'https://101.43.39.125/HexoFiles/js/planetaryjs/world-110m.json' }, oceans: { fill: '#001320' }, land: { fill: '#06304e' }, borders: { stroke: '#001320' } })); planet.loadPlugin(planetaryjs.plugins.pings()); planet.loadPlugin(planetaryjs.plugins.zoom({ scaleExtent: [50, 5000] })); planet.loadPlugin(planetaryjs.plugins.drag({ onDragStart: function() { this.plugins.autorotate.pause(); }, onDragEnd: function() { this.plugins.autorotate.resume(); } })); planet.loadPlugin(autorotate(5)); planet.projection.rotate([100, -10, 0]); planet.draw(canvas); // Plugin to resize the canvas to fill the window and to // automatically center the planet when the window size changes function autocenter(options) { options = options || {}; var needsCentering = false; var globe = null; var resize = function() { var width = window.outerWidth /2 + (options.extraWidth || 0); var height = window.outerHeight/2 + (options.extraHeight || 0); globe.canvas.width = width; globe.canvas.height = height; globe.projection.translate([width / 2, height / 2]); }; return function(planet) { globe = planet; planet.onInit(function() { needsCentering = true; d3.select(window).on('resize', function() { needsCentering = true; }); }); planet.onDraw(function() { if (needsCentering) { resize(); needsCentering = false; } }); }; }; // Plugin to automatically scale the planet's projection based // on the window size when the planet is initia

03

Node.js + Vue.js 全栈开发王者荣耀手机端官网和管理后台

最近在跟着Johnny的全栈之巅系列视频教程学习使用NodeJS+Express+Element-UI+MongoDB等开发王者荣耀,服务端server,移动端web,admin,学到了不少东西。总体来说,他讲的视频思路蛮清晰的,跟着做基本上都能快速上手。 Element-UI,网站快速成型工具,一套为开发者、设计师和产品经理准备的基于 Vue 2.0 的桌面端组件库 Element-UI中文官网地址 Express是基于 Node.js 平台,快速、开放、极简的 Web 开发框架,Express 是一个保持最小规模的灵活的 Node.js Web 应用程序开发框架,为 Web 和移动应用程序提供一组强大的功能。其中文官网地址是:http://www.expressjs.com.cn Node.js (Express.js) + Vue.js (Element UI) 全栈开发王者荣耀手机端官网和管理后台,目前的Github项目地址是:https://github.com/topfullstack/node-vue-moba 全栈之巅TopFullStack 全栈之巅官方账号 下面的内容转载自Johnny老师的关于该项目的Github的README.md文件,感兴趣的小伙伴可以跟着B站上的视频相关视频学些一下,可以结合Github上面源代码参考学习,不过有一点就是B站上的视频的代码没有Github上面新。

02

Mac 下安装node.js

Node.js 是一个用Chrome's V8 JavaScript engine 构建的 JavaScript 运行时框架。Node.js 使用事件驱动、非阻塞式 I/O 模块使得它非常的轻量级和非常的高效。Node.js 生态系统,npm 是世界上最大的开源库生态系统。 NPM是什么呢? NPM的全称是Node Package Manager,是Nodejs的包管理器。Node.js本身身提供了基本的模块,但是我们利用这些基本模块开发实际应用需要编写大量的代码,做较多的工作。NPM上已经有很多Node.js库或框架,这些库或框架可以帮助Node.js的开发者用较少的代码完成较复杂的应用。而npm 上的库或者框架已达30,0000个,其中Node.js 的库和框架也有几千个,真不愧是世界上最大的开源库生态系统。

05
领券