Coder Social home page Coder Social logo

gitalk-comment's Introduction

gitalk-comment

Store comments managed on the gitalk plugin

gitalk-comment's People

Contributors

tutusiji avatar

Watchers

 avatar

gitalk-comment's Issues

自动化部署——git更新方案中package.json的diff比较

https://www.tuziki.com/coder/article/65f11933cda10061c62a5f68

自动化部署过程中,当本地代码更新并涉及新的插件或依赖项时,需要确保服务端也同步进行这些更新。一个解决方案是通过比较git更新前后的package.json文件来识别这些变化。

首先,使用Node.js的child_process模块执行git status package.json命令,检查package.json是否有修改。如果文件已修改,说明可能有新的依赖项需要安装。

接着,通过编写一个比较函数来详细分析package.json文件的变化。该函数会递归地比较两个JSON对象,并收集所有的不同之处,例如缺失的键或不同的值。这些差异可能指示了需要更新的依赖项。

最后,根据比较结果,在服务端执行npm install命令来安装或更新这些依赖项。这样可以确保服务端环境与本地开发环境保持一致,从而顺利地进行后续的部署和服务重启操作。

基于 fabric.js 的 canvas 画板工具实现解析

https://www.tuziki.com/coder/article/65f12d2c7a31733570505935

基于fabric.js的canvas画板工具实现包括安装fabric.js库、创建canvas实例、加载图片对象、创建图形对象(如矩形和圆形)、设置画笔样式和颜色、渲染画布等步骤。用户可以通过调色板选择颜色,通过工具栏选择绘制不同的图形和操作,如画笔、拖动、矩形和圆形等。对于绘制的图形,需要监听鼠标事件来实现拖动生成对应大小的图形。此外,还提供了贴图功能,用户可以通过上传图片将其添加到画布上。

基于 three.js 的 web 端模型加载和360操作演示实例

https://www.tuziki.com/coder/article/65f1365c7a317335705059f6

这是一个基于three.js的web端3D模型加载和操作演示的实例。首先,通过npm安装three.js库,并在项目中引入。然后,创建了一个容器来承载3D场景,并初始化了场景、相机和渲染器。此外,还引入了一些辅助工具,如OrbitControls用于控制相机的旋转和缩放,以及OBJLoader、MTLLoader和FBXLoader用于加载不同格式的3D模型。

在初始化场景后,通过加载器加载了OBJ和FBX格式的模型,并对其进行了缩放和添加到场景中。对于OBJ格式的模型,还需要加载对应的MTL文件来设置材质属性。同时,为了增强模型的显示效果,添加了不同类型的光源,包括点光源、环境光和方向光,并设置了它们的位置和亮度。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.