cocos creator 3.6 发布web手机端 加载进度条添加

news2024/10/7 16:20:11

cocos creator 升级到3.x之后加载进度条取消了,测试了多个3.x版本最终以creator 3.6.3版本,构建了简单的进度加载

参考链接:

https://forum.cocos.org/t/topic/137113

打包web-mobile后,没有进度条。加载的时候只显示一个黑屏。 - Creator 3.x - Cocos中文社区

cocos creator 3.6.x 版本H5下 启动页做进度条加载 - 掘金

 参考了多个实例,大部分之解决到了第一个场景的加载进度,但creater 中cc.js加载时还是会留下空白时间,所以做了个伪进度条,让进度更平滑

主要对以下文件修改

设计思路:添加个计时函数,让进度每秒都长,确保每个时间都在增长,然后在一些关键点,插入手动更新,让进度更真实平滑

//------------------中间是新增加内容-----------------------

//-------------------end-----------------

1、 style.css中添加进度条及logo的布局
html {
  -ms-touch-action: none;
}

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;

  cursor: default;
  color: #888;
  background-color: #333;

  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;

  display: flex;
  flex-direction: column;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

#GameDiv, #Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}
/******************以下 进度条和logo **********/
.progress-bar {
  background-color: #1a1a1a;
  position: absolute;
  left: 25%;
  top: 80%;
  height: 14px;
  padding: 5px;
  width: 50%;
  /*margin: 0 -175px;         */
  border-radius: 5px;
  box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;           
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
  transition: width .4s ease-in-out; 
  background-color: #34c2e3;    
}

.stripes span {
  background-size: 30px 30px;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
                      transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
                      transparent 75%, transparent);            
  
  animation: animate-stripes 1s linear infinite;             
}

#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #171717 url(./splash.png) no-repeat center;
  background-size: 45%;
}
/******************end**********/
2、 index.html中添加节点,并且启动显示
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">

  <title>Cocos Creator | spider</title>

  <!--http://www.html5rocks.com/en/mobile/mobifying/-->
  <meta name="viewport"
        content="width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=true"/>

  <!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  <meta name="format-detection" content="telephone=no">

  <!-- force webkit on 360 -->
  <meta name="renderer" content="webkit"/>
  <meta name="force-rendering" content="webkit"/>
  <!-- force edge on IE -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  <meta name="msapplication-tap-highlight" content="no">

  <!-- force full screen on some browser -->
  <meta name="full-screen" content="yes"/>
  <meta name="x5-fullscreen" content="true"/>
  <meta name="360-fullscreen" content="true"/>

  <!--fix fireball/issues/3568 -->
  <!--<meta name="browsermode" content="application">-->
  <meta name="x5-page-mode" content="app">

  <!--<link rel="apple-touch-icon" href=".png" />-->
  <!--<link rel="apple-touch-icon-precomposed" href=".png" />-->

  <link rel="stylesheet" type="text/css" href="style.css"/>

</head>
<body>
  <div id="GameDiv" cc_exact_fit_screen="true">
      <div id="Cocos3dGameContainer">
        <canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="99"></canvas>
      </div>
    </div>
    <!--------------添加节点 -------------->
    <div id="splash">
      <div class="progress-bar stripes">
        <span style="width: 0%"></span>
      </div>
    </div>
    <!-----------------end--------------->
  
<!-- Polyfills bundle. -->
<script src="src/polyfills.bundle.js" charset="utf-8"> </script>

<!-- SystemJS support. -->
<script src="src/system.bundle.js" charset="utf-8"> </script>

<!-- Import map -->
<script src="src/import-map.json" type="systemjs-importmap" charset="utf-8"> </script>

<script>
    System.import('./index.js').catch(function(err) { console.error(err); })
</script>
<!--------------启动显示进度 -------------->
<script type="text/javascript">
  (function () { 
      var splash = document.getElementById('splash');
      splash.style.display = 'block';
  })();
</script>
<!--------------end -------------->
</body>
</html>
3、 添加进度条更新onProgress,和自动一个计时更新函数,onProgress手动调用分的越细节,进度曲线越平滑
System.register([], function (_export, _context) {
  "use strict";

  var cc, Application;
  //---------------计时函数 和更新进度函数--------------
  var percentJd=0;
    //每秒更新进度条
  var timer =setInterval(() => {
    const now = new Date();
    //console.log(now.toString());
    if (percentJd<90) {
      percentJd=percentJd+1;
      onProgress(percentJd);
    } else{
      clearInterval(timer);
    }
  }, 1000);

    //刷新ui 及进度
  function onProgress(percent){
    //用于手动跟新,比每秒进度大就更新
    if (percent>percentJd) {
      percentJd=percent;
    }
    var progressBar = splash.querySelector('.progress-bar span');
    // var percent = 100 * finish / total;
    if (progressBar) {
      progressBar.style.width = percent + '%';
    }
  }
  //---------------------------end-----------------

  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

  return {
    setters: [],
    execute: function () {
      _export("Application", Application = /*#__PURE__*/function () {
        function Application() {
          _classCallCheck(this, Application);

          this.settingsPath = 'src/settings.json';
          this.showFPS = false;
        }

        _createClass(Application, [{
          key: "init",
          value: function init(engine) {
            cc = engine;
            cc.game.onPostBaseInitDelegate.add(this.onPostInitBase.bind(this));
            cc.game.onPostSubsystemInitDelegate.add(this.onPostSystemInit.bind(this));
          }
        }, {
          key: "onPostInitBase",
          value: function onPostInitBase() {// cc.settings.overrideSettings('assets', 'server', '');
            // do custom logic
          }
        }, {
          key: "onPostSystemInit",
          value: function onPostSystemInit() {// do custom logic
          }
        }, {
          key: "start",
          value: function start() {、
            //---------------手动更新进度条--------------
            //上面的其他函数中可以拆分更细致
            onProgress(50);,
            //game.init,初始化第一个场景,第一个场景比较大的话也会比较耗时,所以定在50%
            //----------------------------------------
            return cc.game.init({
              debugMode: false ? cc.DebugMode.INFO : cc.DebugMode.ERROR,
              settingsPath: this.settingsPath,
              overrideSettings: {
                // assets: {
                //      preloadBundles: [{ bundle: 'main', version: 'xxx' }],
                // }
                profiling: {
                  showFPS: this.showFPS
                }
              }
            }).then(function () {
              return cc.game.run();
            });
          }
        }]);

        return Application;
      }());
    }
  };
});
4、关闭进度条和logo的显示的监听
System.register(["./application.js"], function (_export, _context) {
  "use strict";

  var Application, canvas, $p, bcr, application;

  //------注册第一个场景 是否加载完成监听-----------------
  function setLoadingDisplay () {
    console.log('Engine is initialized');
    cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, function () {
      console.log('game run over' );  
        //关闭进度条显示
      splash.style.display = 'none';
        //关闭计时,但有时无效,未找到原因,有好的修改方案告知下
        if (application.timer) {
          clearInterval(application.timer);
        }
    });
  }
    //------ end-----------------

  function topLevelImport(url) {
    return System["import"](url);
  }

  return {
    setters: [function (_applicationJs) {
      Application = _applicationJs.Application;
    }],
    execute: function () {
      canvas = document.getElementById('GameCanvas');
      $p = canvas.parentElement;
      bcr = $p.getBoundingClientRect();
      canvas.width = bcr.width;
      canvas.height = bcr.height;
      application = new Application();
      topLevelImport('cc').then(function (engine) {
        //------cc 文件加载完后,添加监听-----------------
        setLoadingDisplay();
        //------end-----------------
        return application.init(engine);
      }).then(function () {
        return application.start();
      })["catch"](function (err) {
        console.error(err);
      });
    }
  };
});
以上就是全部修改内容,但由于每次发布都得修改,所以我将以上内容放入到引擎默认模板中,splash.png放在了项目模板下,就可以勾选md5 也不会更新不到了
5、修改引擎模板

路劲:F:\cocos-dashboard-editors\3.6.3\resources\resources\3d\engine\templates\web-mobile

index.html-》index.ejs 

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">

  <title><%= projectName %></title>

  <!--http://www.html5rocks.com/en/mobile/mobifying/-->
  <meta name="viewport"
        content="width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=true"/>

  <!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  <meta name="format-detection" content="telephone=no">

  <!-- force webkit on 360 -->
  <meta name="renderer" content="webkit"/>
  <meta name="force-rendering" content="webkit"/>
  <!-- force edge on IE -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  <meta name="msapplication-tap-highlight" content="no">

  <!-- force full screen on some browser -->
  <meta name="full-screen" content="yes"/>
  <meta name="x5-fullscreen" content="true"/>
  <meta name="360-fullscreen" content="true"/>

  <!--fix fireball/issues/3568 -->
  <!--<meta name="browsermode" content="application">-->
  <meta name="x5-page-mode" content="app">

  <!--<link rel="apple-touch-icon" href=".png" />-->
  <!--<link rel="apple-touch-icon-precomposed" href=".png" />-->

  <link rel="stylesheet" type="text/css" href="<%= cssUrl %>"/>

</head>
<body>
  <div id="GameDiv" cc_exact_fit_screen="true">
      <div id="Cocos3dGameContainer">
        <canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="99"></canvas>
      </div>
    </div>
    <div id="splash">
      <div class="progress-bar stripes">
        <span style="width: 0%"></span>
      </div>
    </div>
  <%- include(cocosTemplate, {}) %>

  <script type="text/javascript">
    (function () {
   
        var splash = document.getElementById('splash');
        splash.style.display = 'block';
    })();
  </script>
</body>
</html>

 index.js-》index.js.ejs

import { Application } from '<%= applicationJS %>';

const canvas = document.getElementById('GameCanvas');
const $p = canvas.parentElement;
const bcr = $p.getBoundingClientRect();
canvas.width = bcr.width;
canvas.height = bcr.height;

// 是否加载执行完成
function setLoadingDisplay () {
  console.log('Engine is initialized');
  cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, function () {
    console.log('game run over' );  
    splash.style.display = 'none';
      if (application.timer) {
        clearInterval(application.timer);
      }
  });
}

function topLevelImport (url) {
    return System.import(url);
}

const application = new Application();

topLevelImport('cc')
.then((engine) => {
     //监听
    setLoadingDisplay();
    return application.init(engine);
}).then(() => {
    return application.start();
}).catch((err) => {
    console.error(err);
});

style.css

html {
  -ms-touch-action: none;
}

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;

  cursor: default;
  color: #888;
  background-color: #333;

  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;

  display: flex;
  flex-direction: column;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

#GameDiv, #Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}
/********************进度条********************/
.progress-bar {
  background-color: #1a1a1a;
  position: absolute;
  left: 25%;
  top: 80%;
  height: 14px;
  padding: 5px;
  width: 50%;
  /*margin: 0 -175px;         */
  border-radius: 5px;
  box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;           
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
  transition: width .4s ease-in-out; 
  background-color: #34c2e3;    
}

.stripes span {
  background-size: 30px 30px;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
                      transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
                      transparent 75%, transparent);            
  
  animation: animate-stripes 1s linear infinite;             
}

#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #171717 url(./splash.png) no-repeat center;
  background-size: 45%;
}

 application.js-》application.ejs

F:\cocos-dashboard-editors\3.6.3\resources\resources\3d\engine\templates\launcher

<%- include(versionCheckTemplate, { version: '1.0.0'}) %>
let cc;

//---------------自动 updata Progress--------------
var percentJd=0;
var timer =setInterval(() => {
  const now = new Date();
  //console.log(now.toString());
  if (percentJd<90) {
    percentJd=percentJd+1;
    onProgress(percentJd);
  } else{
    clearInterval(timer);
  }
}, 1000);

function onProgress(percent){
  if (percent>percentJd) {
    percentJd=percent;
  }
  var progressBar = splash.querySelector('.progress-bar span');
  // var percent = 100 * finish / total;
  if (progressBar) {
    progressBar.style.width = percent + '%';
  }
}
//------------end-----------------

export class Application {
    constructor () {
        this.settingsPath = '<%= settingsJsonPath %>';
        this.showFPS = <%= showFPS %>;
    }
    


    init (engine) {
        cc = engine;
        cc.game.onPostBaseInitDelegate.add(this.onPostInitBase.bind(this));
        cc.game.onPostSubsystemInitDelegate.add(this.onPostSystemInit.bind(this));
    }

    onPostInitBase () {
        // cc.settings.overrideSettings('assets', 'server', '');
        // do custom logic
    }

    onPostSystemInit () {
        // do custom logic
    }

    start () {
        // 手动更新
        onProgress(50);
        return cc.game.init({
            debugMode: <%= debugMode %> ? cc.DebugMode.INFO : cc.DebugMode.ERROR,
            settingsPath: this.settingsPath,
            overrideSettings: {
                // assets: {
                //      preloadBundles: [{ bundle: 'main', version: 'xxx' }],
                // }
                profiling: {
                    showFPS: this.showFPS,
                }
            }
        }).then(() => cc.game.run());
    }
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1610818.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

贪吃蛇设计详解

在去年12月中&#xff0c;初次接触c语言&#xff0c;我靠着为数不多的知识&#xff0c;使用数组仿照写了一份贪吃蛇&#xff0c;现在时隔5个月&#xff0c;我已经有能力独立写出真正的贪吃蛇而不是简单的仿照&#xff08;虽然写的是挺简单的&#xff09;。 那么我们现在就正式…

在ComfyUI中使用Deforum简单步骤, 以及报错处理

⛳背景 deforum这个插件其实去年就在webui流行的时候火过一阵子&#xff0c;效果的话&#xff0c;因为并没有引入太多“时间”的概念&#xff0c;所以画面基本上每一帧都不一样&#xff0c;但也恰恰因为这个&#xff0c;所以可以产生很多宛若吃了毒蘑菇的视频&#xff0c;后来…

Rokid AR Lite空间计算套装发布,软硬件全面升级推动居家、出行、户外场景大规模应用

4月20日&#xff0c;以“好玩、好看、好上头”为主题的Rokid Open Day 2024发布会在杭州举行&#xff0c;Rokid对外正式发布新一代AR Lite空间计算套装&#xff0c;分享了近期Rokid在AR开发者生态和数字文化领域的进展和成果&#xff0c;并宣布了多项跨行业重磅合作。作为中国代…

OerOerlikonTCO1200欧瑞康LPCVD system操作使用说明

OerOerlikonTCO1200欧瑞康LPCVD system操作使用说明

javaWeb项目-智能仓储系统功能介绍

项目关键技术 开发工具&#xff1a;IDEA 、Eclipse 编程语言: Java 数据库: MySQL5.7 框架&#xff1a;ssm、Springboot 前端&#xff1a;Vue、ElementUI 关键技术&#xff1a;springboot、SSM、vue、MYSQL、MAVEN 数据库工具&#xff1a;Navicat、SQLyog 1、JSP技术 JSP(Jav…

MySQL 列数据跨表拷贝,一句SQL快速将表A每条记录的某些字段拷贝到表B每条记录的某些字段(A、B表通过ID等字段对应)

文章目录 MySQL 列数据跨表拷贝&#xff0c;一句SQL快速将表A每条记录的某些字段拷贝到表B每条记录的某些字段&#xff08;A、B表通过ID等字段对应&#xff09;背景定义表填充测试数据跨表一 一对应拷贝列数据SQL参考资料 MySQL 列数据跨表拷贝&#xff0c;一句SQL快速将表A每条…

OSPF动态路由实验(思科)

华为设备参考&#xff1a;OSPF动态路由实验&#xff08;华为&#xff09; 一&#xff0c;技术简介 OSPF&#xff08;Open Shortest Path First&#xff09;是一种内部网关协议&#xff0c;主要用于在单一自治系统内决策路由。它是一种基于链路状态的路由协议&#xff0c;通过…

漆包线行业你了解多少?专业漆包线行业MES生产管理系统

今天就说说漆包线行业&#xff0c;漆包线是工业电机&#xff08;包括电动机和发电机&#xff09;、变压器、电工仪表、电力及电子元器件、电动工具、家用电器、汽车电器等用来绕制电磁线圈的主要材料。 漆包线上游是铜杆行业&#xff0c;下游是各种消费终端&#xff0c;主要是电…

详解数据在内存中的存储

系列文章目录 第一章 C语言基础知识 第二章 C语言控制语句 第三章 C语言函数详解 第四章 C语言数组详解 第五章 C语言操作符详解 第六章 C语言指针详解 第七章 C语言结构体详解 文章目录 1. 数据类型 1.1 基本数据类型 1.2 派生数据类型 2. 整形在内存中的存储 2.1 …

力扣练习题(2024/4/18)

1不相交的线 在两条独立的水平线上按给定的顺序写下 nums1 和 nums2 中的整数。 现在&#xff0c;可以绘制一些连接两个数字 nums1[i] 和 nums2[j] 的直线&#xff0c;这些直线需要同时满足&#xff1a; nums1[i] nums2[j]且绘制的直线不与任何其他连线&#xff08;非水平线…

kaggle 房价预测 得分0.53492

流程 导入需要的包引入文件,查看内容数据处理调用模型准备训练输出结果 导入需要的包 import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.model_selection import train_test_split from sklearn.linear_model i…

Pandas介绍与Series创建

1.Pandas介绍 Pandas 是基于 NumPy 的一种工具&#xff0c;该工具是为解决数据分析任务而创建的&#xff0c;Pandas 提供了大量能使我们快速便捷地处理数据的功能 Pandas 与出色的 Jupyter 工具包和其他库相结合&#xff0c;Python 中用于进行数据分析的环境在性能、生产率和协…

【介绍下WebStorm开发插件】

&#x1f3a5;博主&#xff1a;程序员不想YY啊 &#x1f4ab;CSDN优质创作者&#xff0c;CSDN实力新星&#xff0c;CSDN博客专家 &#x1f917;点赞&#x1f388;收藏⭐再看&#x1f4ab;养成习惯 ✨希望本文对您有所裨益&#xff0c;如有不足之处&#xff0c;欢迎在评论区提出…

稀碎从零算法笔记Day53-LeetCode:不同路径 II

稀碎系列有点更不动(更多是自己懈怠了) 题型&#xff1a;矩阵、模拟 链接&#xff1a;63. 不同路径 II - 力扣&#xff08;LeetCode&#xff09; 来源&#xff1a;LeetCode 题目描述 一个机器人位于一个 m x n 网格的左上角 &#xff08;起始点在下图中标记为 “Start” &…

Emerald AI 2024

使用易于使用的编辑器和大量内置功能,快速创建高质量的人工智能。 Emerald AI 2024是一个完全重写和重新设计的通用人工智能框架,适用于各种人工智能和游戏类型。它的多组件设计使开发人员能够灵活地只使用他们需要的功能,并允许有组织和可管理的工作流程。Emerald AI经过了…

【介绍下LeetCode的使用方法】

&#x1f308;个人主页: 程序员不想敲代码啊 &#x1f3c6;CSDN优质创作者&#xff0c;CSDN实力新星&#xff0c;CSDN博客专家 &#x1f44d;点赞⭐评论⭐收藏 &#x1f91d;希望本文对您有所裨益&#xff0c;如有不足之处&#xff0c;欢迎在评论区提出指正&#xff0c;让我们共…

OpenHarmony其他工具类—libharu [GN编译]

简介 libharu主要用于生成 PDF格式文件。 下载安装 直接在OpenHarmony-SIG仓中搜索libharu并下载。 使用说明 以OpenHarmony 3.1 Beta的rk3568版本为例 库代码存放路径&#xff1a;./third_party/libharu 修改添加依赖的编译脚本&#xff0c;路径&#xff1a;/developtools…

OpenHarmony南向开发案例:【智能中控屏】

样例简介 本Demo是基于Hi3516开发板&#xff0c;使用开源OpenHarmony开发的应用。通过控制面板可以控制同一局域网内的空调&#xff0c;窗帘&#xff0c;灯等智能家居设备。 当前支持的配套L0设备只有[智能灯]&#xff0c;如需添加新的设备。 应用运行效果图&#xff1a; 样…

nginx--Nginx转发真实的IP

Nginx转发真实的IP 前言给nginx.conf 设置proxy_set_headerjava 程序里获取 前言 在使用nginx的时候可能会遇到判断是不是本机在做操作&#xff0c;这样的话web端我们是可以通过ip和端口进行远程连接的这样的话我们就需要从后端获取到真实ip来判断是不是指定的机器了&#xff…

PS-ZB转座子分析流程2-重新分析并总结

数据处理 数据质控 随机挑出九个序列进行比对&#xff0c;结果如下&#xff1a; 所有序列前面的部分序列均完全相同&#xff0c;怀疑是插入的转座子序列&#xff0c;再随机挑选9个序列进行比对&#xff0c;结果如下&#xff1a; 结果相同&#xff0c;使用cutadapt将该段序列修…