chenzhen 6 年 前
コミット
23036cfa55
100 ファイル変更194532 行追加0 行削除
  1. 44 0
      color3D_laya/.laya/compile.js
  2. 43 0
      color3D_laya/.laya/launch.json
  3. 448 0
      color3D_laya/.laya/publish.js
  4. 446 0
      color3D_laya/.laya/publish_oppogame.js
  5. 699 0
      color3D_laya/.laya/publish_vivogame.js
  6. 518 0
      color3D_laya/.laya/publish_xmgame.js
  7. 56 0
      color3D_laya/.laya/web.json
  8. 62 0
      color3D_laya/.laya/wxgame.json
  9. 1 0
      color3D_laya/bin/fileconfig.json
  10. 10 0
      color3D_laya/bin/game.js
  11. 17 0
      color3D_laya/bin/game.json
  12. 32 0
      color3D_laya/bin/index.html
  13. 16 0
      color3D_laya/bin/index.js
  14. 455 0
      color3D_laya/bin/js/bundle.js
  15. 3746 0
      color3D_laya/bin/libs/bytebuffer.js
  16. 2357 0
      color3D_laya/bin/libs/domparserinone.js
  17. 10 0
      color3D_laya/bin/libs/fairygui/fairygui.min.js
  18. 5553 0
      color3D_laya/bin/libs/laya.ani.js
  19. 1497 0
      color3D_laya/bin/libs/laya.bdmini.js
  20. 34349 0
      color3D_laya/bin/libs/laya.core.js
  21. 44693 0
      color3D_laya/bin/libs/laya.d3.js
  22. 104 0
      color3D_laya/bin/libs/laya.d3Plugin.js
  23. 9815 0
      color3D_laya/bin/libs/laya.debugtool.js
  24. 1032 0
      color3D_laya/bin/libs/laya.device.js
  25. 458 0
      color3D_laya/bin/libs/laya.effect.js
  26. 1878 0
      color3D_laya/bin/libs/laya.html.js
  27. 957 0
      color3D_laya/bin/libs/laya.particle.js
  28. 2037 0
      color3D_laya/bin/libs/laya.pathfinding.js
  29. 3656 0
      color3D_laya/bin/libs/laya.physics.js
  30. 559 0
      color3D_laya/bin/libs/laya.physics3D.js
  31. 379 0
      color3D_laya/bin/libs/laya.physics3D.runtime.js
  32. 607 0
      color3D_laya/bin/libs/laya.physics3D.wasm.js
  33. BIN
      color3D_laya/bin/libs/laya.physics3D.wasm.wasm
  34. 1938 0
      color3D_laya/bin/libs/laya.quickgamemini.js
  35. 2150 0
      color3D_laya/bin/libs/laya.tiledmap.js
  36. 11147 0
      color3D_laya/bin/libs/laya.ui.js
  37. 1941 0
      color3D_laya/bin/libs/laya.vvmini.js
  38. 1943 0
      color3D_laya/bin/libs/laya.wxmini.js
  39. 1646 0
      color3D_laya/bin/libs/laya.xmmini.js
  40. 12265 0
      color3D_laya/bin/libs/oimo.js
  41. 1 0
      color3D_laya/bin/libs/worker.js
  42. 32 0
      color3D_laya/bin/project.config.json
  43. 1 0
      color3D_laya/bin/project.swan.json
  44. BIN
      color3D_laya/bin/res/LayaScene_main/Conventional/Library/unity default resources-Cube.lm
  45. BIN
      color3D_laya/bin/res/LayaScene_main/Conventional/Library/unity default resources-Plane.lm
  46. 58 0
      color3D_laya/bin/res/LayaScene_main/Conventional/Resources/unity_builtin_extra.lmat
  47. 516 0
      color3D_laya/bin/res/LayaScene_main/Conventional/main.ls
  48. 40 0
      color3D_laya/bin/res/atlas/.rec
  49. 1 0
      color3D_laya/bin/res/atlas/comp.atlas
  50. BIN
      color3D_laya/bin/res/atlas/comp.png
  51. 3628 0
      color3D_laya/bin/swan-game-adapter.js
  52. 1 0
      color3D_laya/bin/test/TestScene.json
  53. 1 0
      color3D_laya/bin/unpack.json
  54. 1 0
      color3D_laya/bin/version.json
  55. 1662 0
      color3D_laya/bin/weapp-adapter.js
  56. 1 0
      color3D_laya/color3d.laya
  57. 53 0
      color3D_laya/laya/.laya
  58. BIN
      color3D_laya/laya/assets/comp/btn_close.png
  59. BIN
      color3D_laya/laya/assets/comp/button.png
  60. BIN
      color3D_laya/laya/assets/comp/check_circle.png
  61. BIN
      color3D_laya/laya/assets/comp/checkbox.png
  62. BIN
      color3D_laya/laya/assets/comp/clip_num.png
  63. BIN
      color3D_laya/laya/assets/comp/clip_tree_arrow.png
  64. BIN
      color3D_laya/laya/assets/comp/clip_tree_folder.png
  65. BIN
      color3D_laya/laya/assets/comp/combobox.png
  66. BIN
      color3D_laya/laya/assets/comp/fontClip.png
  67. BIN
      color3D_laya/laya/assets/comp/fontClip_num.png
  68. BIN
      color3D_laya/laya/assets/comp/hscroll$bar.png
  69. BIN
      color3D_laya/laya/assets/comp/hscroll$down.png
  70. BIN
      color3D_laya/laya/assets/comp/hscroll$up.png
  71. BIN
      color3D_laya/laya/assets/comp/hscroll.png
  72. BIN
      color3D_laya/laya/assets/comp/hslider$bar.png
  73. BIN
      color3D_laya/laya/assets/comp/hslider.png
  74. BIN
      color3D_laya/laya/assets/comp/html.png
  75. BIN
      color3D_laya/laya/assets/comp/image.png
  76. BIN
      color3D_laya/laya/assets/comp/img_bg.png
  77. BIN
      color3D_laya/laya/assets/comp/img_bg2.png
  78. BIN
      color3D_laya/laya/assets/comp/img_bg3.png
  79. BIN
      color3D_laya/laya/assets/comp/img_bg4.png
  80. BIN
      color3D_laya/laya/assets/comp/img_bg5.png
  81. BIN
      color3D_laya/laya/assets/comp/img_blank.png
  82. BIN
      color3D_laya/laya/assets/comp/label.png
  83. BIN
      color3D_laya/laya/assets/comp/progress$bar.png
  84. BIN
      color3D_laya/laya/assets/comp/progress.png
  85. BIN
      color3D_laya/laya/assets/comp/radio.png
  86. BIN
      color3D_laya/laya/assets/comp/radiogroup.png
  87. BIN
      color3D_laya/laya/assets/comp/tab.png
  88. BIN
      color3D_laya/laya/assets/comp/textarea.png
  89. BIN
      color3D_laya/laya/assets/comp/textinput.png
  90. BIN
      color3D_laya/laya/assets/comp/vscroll$bar.png
  91. BIN
      color3D_laya/laya/assets/comp/vscroll$down.png
  92. BIN
      color3D_laya/laya/assets/comp/vscroll$up.png
  93. BIN
      color3D_laya/laya/assets/comp/vscroll.png
  94. BIN
      color3D_laya/laya/assets/comp/vslider$bar.png
  95. BIN
      color3D_laya/laya/assets/comp/vslider.png
  96. 1 0
      color3D_laya/laya/ignore.cfg
  97. 3 0
      color3D_laya/laya/pageStyles.xml
  98. 37463 0
      color3D_laya/libs/LayaAir.d.ts
  99. 1505 0
      color3D_laya/libs/fairygui.d.ts
  100. 0 0
      color3D_laya/libs/layaAir.minigame.d.ts

+ 44 - 0
color3D_laya/.laya/compile.js

@@ -0,0 +1,44 @@
+// v1.0.0
+//是否使用IDE自带的node环境和插件,设置false后,则使用自己环境(使用命令行方式执行)
+let useIDENode = process.argv[0].indexOf("LayaAir") > -1 ? true : false;
+//获取Node插件和工作路径
+let ideModuleDir = useIDENode ? process.argv[1].replace("gulp\\bin\\gulp.js", "").replace("gulp/bin/gulp.js", "") : "";
+let workSpaceDir = useIDENode ? process.argv[2].replace("--gulpfile=", "").replace("\\.laya\\compile.js", "").replace("/.laya/compile.js", "") : "./../";
+
+//引用插件模块
+let gulp = require(ideModuleDir + "gulp");
+let browserify = require(ideModuleDir + "browserify");
+let source = require(ideModuleDir + "vinyl-source-stream");
+let tsify = require(ideModuleDir + "tsify");
+
+// 如果是发布时调用编译功能,增加prevTasks
+let prevTasks = "";
+if (global.publish) {
+	prevTasks = ["loadConfig"];
+}
+
+//使用browserify,转换ts到js,并输出到bin/js目录
+gulp.task("compile", prevTasks, function () {
+	// 发布时调用编译功能,判断是否点击了编译选项
+	if (global.publish && !global.config.compile) {
+		return;
+	} else if (global.publish && global.config.compile) {
+		// 发布时调用编译,workSpaceDir使用publish.js里的变量
+		workSpaceDir = global.workSpaceDir;
+	}
+	return browserify({
+		basedir: workSpaceDir,
+		//是否开启调试,开启后会生成jsmap,方便调试ts源码,但会影响编译速度
+		debug: true,
+		entries: ['src/Main.ts'],
+		cache: {},
+		packageCache: {}
+	})
+		//使用tsify插件编译ts
+		.plugin(tsify)
+		.bundle()
+		//使用source把输出文件命名为bundle.js
+		.pipe(source('bundle.js'))
+		//把bundle.js复制到bin/js目录
+		.pipe(gulp.dest(workSpaceDir + "/bin/js"));
+});

+ 43 - 0
color3D_laya/.laya/launch.json

@@ -0,0 +1,43 @@
+{
+	"version": "0.2.0",
+	"configurations": [ 
+		{
+			"name": "layaAir",
+			"type": "chrome",
+			"request": "launch",
+			"file": "${workspaceRoot}/bin/index.html",
+			"runtimeExecutable": "${execPath}",
+			"useBuildInServer": true,
+			"sourceMaps": true,
+			"webRoot": "${workspaceRoot}",
+			"port": 9222,
+			"fixedPort":false,
+			"sourceMapPathOverrides": {
+				"src/*": "${workspaceRoot}/src/*"
+			}		
+		},
+		{
+			"name": "chrome调试",
+			"type": "chrome",
+			"request": "launch",
+			"file": "${workspaceRoot}/bin/index.html",
+			// "换成自己的谷歌安装路径,": 比如
+			//window 默认安装路径为: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
+			//mac 系统上的默认安装路径为 "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
+			// "runtimeExecutable": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
+			"runtimeArgs": [
+				"--allow-file-access-from-files",
+				"--allow-file-access-frome-files",
+				" --disable-web-security"
+			],
+			"sourceMaps": true,
+			"webRoot": "${workspaceRoot}",
+			//假如谷歌调试报userDataDir不可用,请把谷歌安装路径取得管理员权限,或者更换${tmpdir}为其他可以读写的文件夹,也可以删除。
+			"userDataDir": "${workspaceRoot}/.laya/chrome",
+			"fixedPort":false,
+			"sourceMapPathOverrides": {
+				"src/*": "${workspaceRoot}/src/*"
+			}		
+		}
+	]
+}

+ 448 - 0
color3D_laya/.laya/publish.js

@@ -0,0 +1,448 @@
+// v1.3.0
+//是否使用IDE自带的node环境和插件,设置false后,则使用自己环境(使用命令行方式执行)
+const useIDENode = process.argv[0].indexOf("LayaAir") > -1 ? true : false;
+//获取Node插件和工作路径
+let ideModuleDir = useIDENode ? process.argv[1].replace("gulp\\bin\\gulp.js", "").replace("gulp/bin/gulp.js", "") : "";
+let workSpaceDir = useIDENode ? process.argv[2].replace("--gulpfile=", "").replace("\\.laya\\publish.js", "").replace("/.laya/publish.js", "") + "/" : "./../";
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const uglify = require(ideModuleDir + "gulp-uglify");
+const jsonminify = require(ideModuleDir + "gulp-jsonminify");
+const image = require(ideModuleDir + "gulp-image");
+const rev = require(ideModuleDir + "gulp-rev");
+const revdel = require(ideModuleDir + "gulp-rev-delete-original");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+const del = require(ideModuleDir + "del");
+const requireDir = require(ideModuleDir + 'require-dir');
+
+global.ideModuleDir = ideModuleDir;
+global.workSpaceDir = workSpaceDir;
+
+// 结合compile.js使用
+global.publish = true;
+const fileList = ["compile.js", "publish_xmgame.js", "publish_oppogame.js", "publish_vivogame.js"];
+requireDir('./', {
+	filter: function (fullPath) {
+		// 只用到了compile.js和publish.js
+		if (fileList.includes(path.basename(fullPath))) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+});
+
+const QUICKGAMELIST = ["xmgame", "oppogame", "vivogame"];
+
+// 清理临时文件夹,加载配置
+let config,
+	releaseDir,
+	platform,
+	isOpendataProj = false;
+gulp.task("loadConfig", function () {
+	platform = "web"
+	if (!useIDENode && process.argv.length > 5 && process.argv[4] == "--config") {
+		platform = process.argv[5].replace(".json", "");
+	}
+	if (useIDENode && process.argv.length >= 4 && process.argv[3].startsWith("--config") && process.argv[3].endsWith(".json")) {
+		platform = process.argv[3].match(/(\w+).json/)[1];
+	}
+	let _path;
+	if (!useIDENode) {
+		_path = platform + ".json";
+		releaseDir = "../release/" + platform;
+	}
+	if (useIDENode) {
+		_path = path.join(workSpaceDir, ".laya", `${platform}.json`);
+		releaseDir = path.join(workSpaceDir, "release", platform).replace(/\\/g, "/");
+	}
+	global.platform = platform;
+	let file = fs.readFileSync(_path, "utf-8");
+	if (file) {
+		if (QUICKGAMELIST.includes(platform)) {
+			file = file.replace(/\$basePath/g, releaseDir + "/temprelease");
+		} else {
+			file = file.replace(/\$basePath/g, releaseDir);
+		}
+		config = JSON.parse(file);
+		global.config = config;
+	}
+	// 是否是开放域项目
+	let projInfoPath = path.join(workSpaceDir, path.basename(workSpaceDir) + ".laya");
+	let isExist = fs.existsSync(projInfoPath);
+	if (isExist) {
+		try {
+			let projInfo = fs.readFileSync(projInfoPath, "utf8");
+			projInfo = projInfo && JSON.parse(projInfo);
+			isOpendataProj = projInfo.layaProType === 12;
+		} catch (e) {}
+	}
+});
+
+// 重新编译项目
+// gulp.task("compile", ["loadConfig"], function () {
+// 	if (config.compile) {
+// 		console.log("compile");
+// 	}
+// });
+
+// 清理release文件夹
+gulp.task("clearReleaseDir", ["compile"], function (cb) {
+	if (config.clearReleaseDir) {
+		let delList = [releaseDir, releaseDir + "_pack", config.packfileTargetValue];
+		// 小米快游戏,使用即存的项目,删掉Laya工程文件,保留小米环境项目文件
+		if (platform === "xmgame") {
+			let xmProjSrc = path.join(releaseDir, config.xmInfo.projName);
+			// 不要删掉manifest.json/main.js文件
+			// 这里不是node-glob语法,详见: https://github.com/sindresorhus/del
+			delList = [`${xmProjSrc}/**`, `!${xmProjSrc}`, `!${xmProjSrc}/node_modules/**`, `!${xmProjSrc}/sign/**`, `!${xmProjSrc}/{babel.config.js,main.js,manifest.json,package.json,package-lock.json}`];
+		} else if (platform === "oppogame") {
+			let oppoProjSrc = path.join(releaseDir, config.oppoInfo.projName);
+			delList = [`${oppoProjSrc}/**`, `!${oppoProjSrc}`, `!${oppoProjSrc}/dist/**`, `!${oppoProjSrc}/{manifest.json}`];
+		} else if (platform === "vivogame") {
+			let vvProj = path.join(releaseDir, config.vivoInfo.projName);
+			let vvProjSrc = path.join(vvProj, "src");
+			// 不要删掉manifest.json/main.js文件
+			// 这里不是node-glob语法,详见: https://github.com/sindresorhus/del
+			delList = [`${vvProjSrc}/**`, `!${vvProjSrc}`, `!${vvProjSrc}/sign/**`, `!${vvProjSrc}/{game.js,manifest.json}`];
+			delList = delList.concat(`${vvProj}/engine/**`, `${vvProj}/config/**`);
+		}
+		del(delList, { force: true }).then(paths => {
+			cb();
+		});
+	} else cb();
+});
+
+// copy bin文件到release文件夹
+gulp.task("copyFile", ["clearReleaseDir"], function () {
+	let baseCopyFilter = [`${workSpaceDir}/bin/**/*.*`];
+	// 只拷贝index.js中引用的类库
+	if (config.onlyIndexJS) {
+		baseCopyFilter = baseCopyFilter.concat(`!${workSpaceDir}/bin/libs/*.*`);
+	}
+	if (platform === "wxgame" && isOpendataProj) { // 开放域项目微信发布,仅拷贝用到的文件
+		config.copyFilesFilter = [`${workSpaceDir}/bin/js/bundle.js`, `${workSpaceDir}/bin/index.js`, `${workSpaceDir}/bin/game.js`];
+		if (config.projectType !== "as") { // 开放域精简类库
+			config.copyFilesFilter.push(`${workSpaceDir}/bin/libs/laya.opendata.min.js`);
+		}
+	} else if (platform === "wxgame") { // 微信项目,不拷贝index.html,不拷贝百度bin目录中的文件
+		config.copyFilesFilter = baseCopyFilter.concat([`!${workSpaceDir}/bin/index.html`, `!${workSpaceDir}/bin/{project.swan.json,swan-game-adapter.js}`]);
+	} else if (platform === "bdgame") { // 百度项目,不拷贝index.html,不拷贝微信bin目录中的文件
+		config.copyFilesFilter = baseCopyFilter.concat([`!${workSpaceDir}/bin/index.html`, `!${workSpaceDir}/bin/{project.config.json,weapp-adapter.js}`]);
+	} else { // web|QQ项目|快游戏,不拷贝微信、百度在bin目录中的文件
+		config.copyFilesFilter = baseCopyFilter.concat([`!${workSpaceDir}/bin/{game.js,game.json,project.config.json,weapp-adapter.js,project.swan.json,swan-game-adapter.js}`]);
+	}
+	// 快游戏,需要新建一个快游戏项目,拷贝的只是项目的一部分,将文件先拷贝到文件夹的临时目录中去
+	if (QUICKGAMELIST.includes(platform)) {
+		config.copyFilesFilter = config.copyFilesFilter.concat(`!${workSpaceDir}/bin/index.html`);
+		releaseDir = global.tempReleaseDir = path.join(releaseDir, "temprelease");
+	}
+	global.releaseDir = releaseDir;
+	var stream = gulp.src(config.copyFilesFilter, { base: `${workSpaceDir}/bin` });
+	return stream.pipe(gulp.dest(releaseDir));
+});
+
+// copy libs中的js文件到release文件夹
+gulp.task("copyLibsJsFile", ["copyFile"], function () {
+	if (!config.onlyIndexJS) {
+		return;
+	}
+	if (platform === "wxgame" && isOpendataProj) { // 开放域项目微信发布,拷贝文件时已经拷贝类库文件了
+		return;
+	}
+	// 开放域项目,as语言,没有libs目录,mac系统报错
+	let libs = path.join(workSpaceDir, "bin", "libs");
+	if (!fs.existsSync(libs)) {
+		return;
+	}
+	// 分析index.js
+	let indexJSPath = path.join(workSpaceDir, "bin", "index.js");
+	let indexJsContent = fs.readFileSync(indexJSPath, "utf8");
+	let libsList = indexJsContent.match(/loadLib\(['"]libs\/[a-zA-z0-9\/\.]+\.(js|wasm)['"]\)/g);
+	if (!libsList) {
+		libsList = [];
+	}
+	let 
+		item,
+		libsName = "",
+		libsStr = "";
+	for (let i = 0, len = libsList.length; i < len; i++) {
+		item = libsList[i];
+		libsName = item.match(/loadLib\(['"]libs\/([a-zA-z0-9\/\.]+\.(js|wasm))['"]\)/);
+		libsStr += libsStr ? `,${libsName[1]}` : libsName[1];
+	}
+	let copyLibsList = [`${workSpaceDir}/bin/libs/{${libsStr}}`];
+	if (!libsStr.includes(",")) {
+		copyLibsList = [`${workSpaceDir}/bin/libs/${libsStr}`];
+	}
+	// 微信、百度,需要拷贝对应平台的类库
+	if (platform === "wxgame") {
+		copyLibsList.push(`${workSpaceDir}/bin/libs/laya.wxmini.js`);
+	} else if (platform === "bdgame") {
+		copyLibsList.push(`${workSpaceDir}/bin/libs/laya.bdmini.js`);
+	}
+	var stream = gulp.src(copyLibsList, { base: `${workSpaceDir}/bin` });
+	return stream.pipe(gulp.dest(releaseDir));
+});
+
+// 根据不同的项目类型拷贝平台文件
+gulp.task("copyPlatformFile", ["copyLibsJsFile"], function () {
+	let fileLibsPath;
+	if (useIDENode) {
+		fileLibsPath = path.join(ideModuleDir, "../", "out", "layarepublic", "LayaAirProjectPack", "lib", "data");
+	} else if (process.argv.length >= 8 && process.argv[6] === "--libspath") {
+		fileLibsPath = process.argv[7];
+		console.log("平台文件包是否存在: " + fs.existsSync(fileLibsPath));
+	} else {
+		console.log("没有接收到可用文件包位置,不拷贝对应平台文件");
+		return;
+	}
+	// 开放域项目,微信发布
+	if (platform === "wxgame" && isOpendataProj) {
+		let platformDir = path.join(fileLibsPath, "wxfiles", "weapp-adapter.js");
+		let stream = gulp.src(platformDir);
+		return stream.pipe(gulp.dest(releaseDir));
+	}
+	// 微信项目,非开放域项目
+	if (platform === "wxgame") {
+		// 如果新建项目时已经点击了"微信/百度小游戏bin目录快速调试",不再拷贝
+		let isHadWXFiles =
+			fs.existsSync(path.join(workSpaceDir, "bin", "game.js")) &&
+			fs.existsSync(path.join(workSpaceDir, "bin", "game.json")) &&
+			fs.existsSync(path.join(workSpaceDir, "bin", "project.config.json")) &&
+			fs.existsSync(path.join(workSpaceDir, "bin", "weapp-adapter.js"));
+		if (isHadWXFiles) {
+			return;
+		}
+		let platformDir = path.join(fileLibsPath, "wxfiles");
+		let stream = gulp.src(platformDir + "/*.*");
+		return stream.pipe(gulp.dest(releaseDir));
+	}
+	// qq玩一玩项目,区分语言
+	if (platform === "qqwanyiwan") {
+		let projectLangDir = config.projectType;
+		let platformDir = path.join(fileLibsPath, "qqfiles", projectLangDir);
+		let stream = gulp.src(platformDir + "/**/*.*");
+		return stream.pipe(gulp.dest(releaseDir));
+	}
+	// 百度项目
+	if (platform === "bdgame") {
+		// 如果新建项目时已经点击了"微信/百度小游戏bin目录快速调试",不再拷贝
+		let isHadBdFiles =
+			fs.existsSync(path.join(workSpaceDir, "bin", "game.js")) &&
+			fs.existsSync(path.join(workSpaceDir, "bin", "game.json")) &&
+			fs.existsSync(path.join(workSpaceDir, "bin", "project.swan.json")) &&
+			fs.existsSync(path.join(workSpaceDir, "bin", "swan-game-adapter.js"));
+		if (isHadBdFiles) {
+			return;
+		}
+		let platformDir = path.join(fileLibsPath, "bdfiles");
+		let stream = gulp.src(platformDir + "/*.*");
+		return stream.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 拷贝文件后,针对特定平台修改文件内容
+gulp.task("modifyFile", ["copyPlatformFile"], function () {
+	// QQ玩一玩
+	if (platform === "qqwanyiwan") {
+		// 修改bundle.js
+		let bundleFilePath = path.join(releaseDir, "js", "bundle.js");
+		if (fs.existsSync(bundleFilePath)) {
+			let fileContent = fs.readFileSync(bundleFilePath, "utf8");
+			var appendCode = 'if(window["BK"]&&window["BK"]["Sprite"]){BK.Script.loadlib("GameRes://layaforqq/laya.bkadpter.js");}';
+			if (fileContent.includes("/**LayaGameStart**/") && !fileContent.includes(appendCode)) {
+				fileContent = fileContent.split("/**LayaGameStart**/").join(`/**LayaGameStart**/\n${appendCode}`);
+				fs.writeFileSync(bundleFilePath, fileContent, "utf8");
+			}
+		}
+
+		// 修改index.js
+		let indexFilePath = path.join(releaseDir, "index.js");
+		if (fs.existsSync(indexFilePath)) {
+			let fileContent = fs.readFileSync(indexFilePath, "utf8");
+			fileContent = fileContent.replace(/loadLib\("/g, "BK.Script.loadlib(\"GameRes://");
+			// 非as语言,要添加类库
+			if ("as" !== config.projectType) {
+				if (fileContent.includes("//-----libs-end-------")) {
+					fileContent = fileContent.split("//-----libs-end-------").join(`//-----libs-end-------\nBK.Script.loadlib("GameRes://layaforqq/laya.bkadpter.js");`);
+				}
+			}
+			fs.writeFileSync(indexFilePath, fileContent, "utf8");
+		}
+
+		// 修改main.js
+		let mainFilePath = path.join(releaseDir, "main.js");
+		if (fs.existsSync(mainFilePath)) {
+			let fileContent = fs.readFileSync(mainFilePath, "utf8");
+			fileContent = `BK.Script.loadlib("GameRes://layaforqq/qqPlayCore.js");
+BK.Script.loadlib("GameRes://layaforqq/bkadptpre.js");
+BK.Script.loadlib("GameRes://layaforqq/domparserinone.js");
+BK.Script.loadlib("GameRes://index.js");`;
+			fs.writeFileSync(mainFilePath, fileContent, "utf8");
+		}
+
+		return;
+	}
+
+	// 百度项目,修改index.js
+	if (platform === "bdgame") {
+		let filePath = path.join(releaseDir, "index.js");
+		if (!fs.existsSync(filePath)) {
+			return;
+		}
+		let fileContent = fs.readFileSync(filePath, "utf8");
+		fileContent = fileContent.replace(/loadLib\(/g, "require(");
+		fs.writeFileSync(filePath, fileContent, "utf8");
+		return;
+	}
+});
+
+// 压缩json
+gulp.task("compressJson", ["modifyFile"], function () {
+	if (config.compressJson) {
+		return gulp.src(config.compressJsonFilter, { base: releaseDir })
+			.pipe(jsonminify())
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 压缩js
+gulp.task("compressJs", ["compressJson"], function () {
+	if (config.compressJs) {
+		return gulp.src(config.compressJsFilter, { base: releaseDir })
+			.pipe(uglify())
+			.on('error', function (err) {
+				console.warn(err.toString());
+			})
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 压缩png,jpg
+gulp.task("compressImage", ["compressJs"], function () {
+	if (config.compressImage) {
+		return gulp.src(config.compressImageFilter, { base: releaseDir })
+			.pipe(image({
+				pngquant: true,			//PNG优化工具
+				optipng: false,			//PNG优化工具
+				zopflipng: true,		//PNG优化工具
+				jpegRecompress: false,	//jpg优化工具
+				mozjpeg: true,			//jpg优化工具
+				guetzli: false,			//jpg优化工具
+				gifsicle: false,		//gif优化工具
+				svgo: false,			//SVG优化工具
+				concurrent: 10,			//并发线程数
+				quiet: true 			//是否是静默方式
+				// optipng: ['-i 1', '-strip all', '-fix', '-o7', '-force'],
+				// pngquant: ['--speed=1', '--force', 256],
+				// zopflipng: ['-y', '--lossy_8bit', '--lossy_transparent'],
+				// jpegRecompress: ['--strip', '--quality', 'medium', '--min', 40, '--max', 80],
+				// mozjpeg: ['-optimize', '-progressive'],
+				// guetzli: ['--quality', 85]
+			}))
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 开放域的情况下,合并game.js和index.js,并删除game.js
+gulp.task("openData", ["compressImage"], function (cb) {
+	if (config.openDataZone) {
+		let indexPath = releaseDir + "/index.js";
+		let indexjs = readFile(indexPath);
+		let gamejs = readFile(releaseDir + "/game.js");
+		if (gamejs && indexjs) {
+			gamejs = gamejs.replace('require("index.js")', indexjs);
+			fs.writeFileSync(indexPath, gamejs, 'utf-8');
+		}
+		if (isOpendataProj) {
+			// 开放域项目,将game.js删掉,发布最小包
+			del(`${releaseDir}/game.js`, { force: true }).then(paths => {
+				cb();
+			}); 
+		} else {
+			cb();
+		}
+	} else {
+		cb();
+	}
+});
+
+function readFile(path) {
+	if (fs.existsSync(path)) {
+		return fs.readFileSync(path, "utf-8");
+	}
+	return null;
+}
+
+// 生成版本管理信息
+gulp.task("version1", ["openData"], function () {
+	if (config.version) {
+		return gulp.src(config.versionFilter, { base: releaseDir })
+			.pipe(rev())
+			.pipe(gulp.dest(releaseDir))
+			.pipe(revdel())
+			.pipe(rev.manifest("version.json"))
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 替换index.js里面的变化的文件名
+gulp.task("version2", ["version1"], function () {
+	if (config.version) {
+		//替换index.html和index.js里面的文件名称
+
+		let htmlPath = releaseDir + "/index.html";
+		let versionPath = releaseDir + "/version.json";
+		let gameJSPath = releaseDir + "/game.js";
+		let mainJSPath = releaseDir + "/main.js";
+		let indexJSPath;
+		let versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+		indexJSPath = releaseDir + "/" + versionCon["index.js"];
+		// 替换config.packfileFullValue中的路径
+		let packfileStr = JSON.stringify(config.packfileFullValue).replace(/\\\\/g, "/");
+		let tempPackfile = `${workSpaceDir}/.laya/configTemp.json`;
+		fs.writeFileSync(tempPackfile, packfileStr, "utf8");
+
+		let srcList = [versionPath, indexJSPath, tempPackfile];
+		if (fs.existsSync(htmlPath)) {
+			srcList.push(htmlPath);
+		}
+		if (fs.existsSync(gameJSPath)) {
+			srcList.push(gameJSPath);
+		}
+		if (fs.existsSync(mainJSPath)) {
+			srcList.push(mainJSPath);
+		}
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 筛选4M包
+gulp.task("packfile", ["version2"], function() {
+	if (config.version) {
+		// 从release目录取得带有版本号的目录
+		let tempPackfile = `${workSpaceDir}/.laya/configTemp.json`;
+		let releasePackfile = `${releaseDir}/configTemp.json`;
+		let packfileStr = fs.readFileSync(releasePackfile, "utf8");
+		config.packfileFullValue = JSON.parse(packfileStr);
+		// 删掉临时目录
+		fs.unlinkSync(tempPackfile);
+		fs.unlinkSync(releasePackfile);
+	}
+	if (config.packfile) { // 提取本地包(文件列表形式)
+		return gulp.src(config.packfileFullValue, { base: releaseDir })
+			.pipe(gulp.dest(config.packfileTargetValue || releaseDir + "_pack"));
+	}
+});
+
+// 起始任务
+gulp.task("publish", ["buildXiaomiProj", "buildOPPOProj", "buildVivoProj"], function () {
+	console.log("All tasks completed!");
+});

+ 446 - 0
color3D_laya/.laya/publish_oppogame.js

@@ -0,0 +1,446 @@
+// v1.0.2
+// publish 2.x 也是用这个文件,需要做兼容
+let isPublish2 = process.argv[2].includes("publish_oppogame.js") && process.argv[3].includes("--evn=publish2");
+// 获取Node插件和工作路径
+let ideModuleDir, workSpaceDir;
+if (isPublish2) {
+	//是否使用IDE自带的node环境和插件,设置false后,则使用自己环境(使用命令行方式执行)
+	const useIDENode = process.argv[0].indexOf("LayaAir") > -1 ? true : false;
+	ideModuleDir = useIDENode ? process.argv[1].replace("gulp\\bin\\gulp.js", "").replace("gulp/bin/gulp.js", "") : "";
+	workSpaceDir = useIDENode ? process.argv[2].replace("--gulpfile=", "").replace("\\.laya\\publish_oppogame.js", "").replace("/.laya/publish_oppogame.js", "") + "/" : "./../";
+} else {
+	ideModuleDir = global.ideModuleDir;
+	workSpaceDir = global.workSpaceDir;
+}
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+const del = require(ideModuleDir + "del");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+let commandSuffix = ".cmd";
+
+let prevTasks = ["packfile"];
+if (isPublish2) {
+	prevTasks = "";
+}
+
+let 
+    config,
+	platform,
+	releaseDir,
+    toolkitPath,
+    tempReleaseDir, // OPPO临时拷贝目录
+	projDir; // OPPO快游戏工程目录
+let versionCon; // 版本管理version.json
+// 创建OPPO项目前,拷贝OPPO引擎库、修改index.js
+// 应该在publish中的,但是为了方便发布2.0及IDE 1.x,放在这里修改
+gulp.task("preCreate_OPPO", prevTasks, function() {
+	if (isPublish2) {
+		let pubsetPath = path.join(workSpaceDir, ".laya", "pubset.json");
+		let content = fs.readFileSync(pubsetPath, "utf8");
+		let pubsetJson = JSON.parse(content);
+		platform = "oppogame";
+		releaseDir = path.join(workSpaceDir, "release", platform).replace(/\\/g, "/");
+		releaseDir = tempReleaseDir = path.join(releaseDir, "temprelease");
+		config = pubsetJson[5]; // 只用到了 config.oppoInfo|config.oppoSign
+	} else {
+		platform = global.platform;
+		releaseDir = global.releaseDir;
+		tempReleaseDir = global.tempReleaseDir;
+		config = global.config;
+	}
+    toolkitPath = path.join(ideModuleDir, "../", "out", "layarepublic", "oppo", "quickgame-toolkit");
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	if (process.platform === "darwin") {
+		commandSuffix = "";
+	}
+	let copyLibsList = [`${workSpaceDir}/bin/libs/laya.quickgamemini.js`];
+	var stream = gulp.src(copyLibsList, { base: `${workSpaceDir}/bin` });
+	return stream.pipe(gulp.dest(tempReleaseDir));
+});
+
+// 新建OPPO项目-OPPO项目与其他项目不同,需要安装OPPO quickgame node_modules,并打包成.rpk文件
+gulp.task("installModules_OPPO", ["preCreate_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	releaseDir = path.dirname(releaseDir);
+	projDir = path.join(releaseDir, config.oppoInfo.projName);
+    // 如果IDE里对应OPPO包已经install node_modules了,忽略这一步
+    if (fs.existsSync(path.join(toolkitPath, "node_modules"))) {
+        return;
+    }
+	// 安装OPPO quickgame node_modules
+	return new Promise((resolve, reject) => {
+		console.log("开始安装OPPO quickgame node_modules,请耐心等待...");
+		let cmd = `npm${commandSuffix}`;
+		let args = ["install"];
+        
+        let cp = childProcess.spawn(cmd, args, {
+            cwd: toolkitPath
+        });
+        
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+		
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+		
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+// 拷贝文件到OPPO快游戏
+gulp.task("copyFileToProj_OPPO", ["installModules_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	// 将临时文件夹中的文件,拷贝到项目中去
+	let originalDir = `${tempReleaseDir}/**/*.*`;
+	let stream = gulp.src(originalDir);
+	return stream.pipe(gulp.dest(path.join(projDir)));
+});
+
+// 拷贝icon到OPPO快游戏
+gulp.task("copyIconToProj_OPPO", ["copyFileToProj_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	let originalDir = config.oppoInfo.icon;
+	let stream = gulp.src(originalDir);
+	return stream.pipe(gulp.dest(path.join(projDir)));
+});
+
+// 清除OPPO快游戏临时目录
+gulp.task("clearTempDir_OPPO", ["copyIconToProj_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	// 删掉临时目录
+	return del([tempReleaseDir], { force: true });
+});
+
+// 生成release签名(私钥文件 private.pem 和证书文件 certificate.pem )
+gulp.task("generateSign_OPPO", ["clearTempDir_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+    }
+    if (!config.oppoSign.generateSign) {
+        return;
+    }
+	// https://doc.quickapp.cn/tools/compiling-tools.html
+	return new Promise((resolve, reject) => {
+		let cmd = "openssl";
+		let args = ["req", "-newkey", "rsa:2048", "-nodes", "-keyout", "private.pem", 
+					"-x509", "-days", "3650", "-out", "certificate.pem"];
+		let opts = {
+			cwd: projDir,
+			shell: true
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			data += "";
+			if (data.includes("Country Name")) {
+				cp.stdin.write(`${config.oppoSign.countryName}\n`);
+				console.log(`Country Name: ${config.oppoSign.countryName}`);
+			} else if (data.includes("Province Name")) {
+				cp.stdin.write(`${config.oppoSign.provinceName}\n`);
+				console.log(`Province Name: ${config.oppoSign.provinceName}`);
+			} else if (data.includes("Locality Name")) {
+				cp.stdin.write(`${config.oppoSign.localityName}\n`);
+				console.log(`Locality Name: ${config.oppoSign.localityName}`);
+			} else if (data.includes("Organization Name")) {
+				cp.stdin.write(`${config.oppoSign.orgName}\n`);
+				console.log(`Organization Name: ${config.oppoSign.orgName}`);
+			} else if (data.includes("Organizational Unit Name")) {
+				cp.stdin.write(`${config.oppoSign.orgUnitName}\n`);
+				console.log(`Organizational Unit Name: ${config.oppoSign.orgUnitName}`);
+			} else if (data.includes("Common Name")) {
+				cp.stdin.write(`${config.oppoSign.commonName}\n`);
+				console.log(`Common Name: ${config.oppoSign.commonName}`);
+			} else if (data.includes("Email Address")) {
+				cp.stdin.write(`${config.oppoSign.emailAddr}\n`);
+				console.log(`Email Address: ${config.oppoSign.emailAddr}`);
+				// cp.stdin.end();
+			}
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+// 拷贝sign文件到指定位置
+gulp.task("copySignFile_OPPO", ["generateSign_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+    }
+    if (config.oppoSign.generateSign) { // 新生成的签名
+        // 移动签名文件到项目中(Laya & OPPO快游戏项目中)
+        let 
+            privatePem = path.join(projDir, "private.pem"),
+            certificatePem = path.join(projDir, "certificate.pem");
+        let isSignExits = fs.existsSync(privatePem) && fs.existsSync(certificatePem);
+        if (!isSignExits) {
+            return;
+        }
+        let 
+            xiaomiDest = `${projDir}/sign/release`,
+            layaDest = `${workSpaceDir}/sign/release`;
+        let stream = gulp.src([privatePem, certificatePem]);
+        return stream.pipe(gulp.dest(xiaomiDest))
+                    .pipe(gulp.dest(layaDest));
+    } else if (config.oppoInfo.useReleaseSign && !config.oppoSign.generateSign) { // 使用release签名,并且没有重新生成
+        // 从项目中将签名拷贝到OPPO快游戏项目中
+        let 
+            privatePem = path.join(workSpaceDir, "sign", "release", "private.pem"),
+            certificatePem = path.join(workSpaceDir, "sign", "release", "certificate.pem");
+        let isSignExits = fs.existsSync(privatePem) && fs.existsSync(certificatePem);
+        if (!isSignExits) {
+            return;
+        }
+        let 
+            xiaomiDest = `${projDir}/sign/release`;
+        let stream = gulp.src([privatePem, certificatePem]);
+        return stream.pipe(gulp.dest(xiaomiDest));
+    }
+});
+
+gulp.task("deleteSignFile_OPPO", ["copySignFile_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	if (config.oppoSign.generateSign) { // 新生成的签名
+		let 
+            privatePem = path.join(projDir, "private.pem"),
+            certificatePem = path.join(projDir, "certificate.pem");
+		return del([privatePem, certificatePem], { force: true });
+	}
+});
+
+gulp.task("modifyFile_OPPO", ["deleteSignFile_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	// 修改manifest.json文件
+	let manifestPath = path.join(projDir, "manifest.json");
+	let IDEManifestPath = path.join(toolkitPath, "tpl", "manifest.json");
+	if (!fs.existsSync(IDEManifestPath)) {
+		return;
+	}
+	let manifestContent = fs.readFileSync(IDEManifestPath, "utf8");
+	let manifestJson = JSON.parse(manifestContent);
+	manifestJson.package = config.oppoInfo.package;
+	manifestJson.name = config.oppoInfo.name;
+	manifestJson.orientation = config.oppoInfo.orientation;
+	manifestJson.versionName = config.oppoInfo.versionName;
+	manifestJson.versionCode = config.oppoInfo.versionCode;
+	manifestJson.minPlatformVersion = config.oppoInfo.minPlatformVersion;
+	manifestJson.icon = `./${path.basename(config.oppoInfo.icon)}`;
+	if (config.oppoInfo.subpack) {
+		manifestJson.subpackages = config.oppoSubpack;
+	}
+	fs.writeFileSync(manifestPath, JSON.stringify(manifestJson, null, 4), "utf8");
+
+	if (config.version) {
+		let versionPath = projDir + "/version.json";
+		versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+	}
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	// OPPO项目,修改main.js
+	let filePath = path.join(projDir, "main.js");
+	// 这个地方,1.x IDE和2.x IDE 不一致
+	let fileContent = `window.navigator.userAgent = 'Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E8301 OPPO MiniGame NetType/WIFI Language/zh_CN';
+require("./libs/laya.quickgamemini.js");\nrequire("index.js");`;
+	fs.writeFileSync(filePath, fileContent, "utf8");
+
+	// OPPO项目,修改index.js
+	let indexFilePath = path.join(projDir, indexJsStr);
+	if (!fs.existsSync(indexFilePath)) {
+		return;
+	}
+	let indexFileContent = fs.readFileSync(indexFilePath, "utf8");
+	indexFileContent = indexFileContent.replace(/loadLib(\(['"])/gm, "require$1./");
+	fs.writeFileSync(indexFilePath, indexFileContent, "utf8");
+});
+
+gulp.task("version_OPPO", ["modifyFile_OPPO"], function () {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	if (config.version) {
+		let versionPath = projDir + "/version.json";
+		let mainJSPath = projDir + "/main.js";
+		let srcList = [versionPath, mainJSPath];
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(projDir));
+	}
+});
+
+// 打包rpk
+gulp.task("buildRPK_OPPO", ["version_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	// 在OPPO轻游戏项目目录中执行:
+    // quickgame pack || quickgame pack release
+    // quickgame subpack --no-build-js || quickgame subpack release --no-build-js
+	let cmdStr = "";
+	let packStr = "pack";
+	let nobuildjs = "";
+	if (config.oppoInfo.subpack) {
+		packStr = "subpack";
+		nobuildjs = "--no-build-js";
+	}
+    if (config.oppoInfo.useReleaseSign) {
+        cmdStr = "release";
+    }
+	return new Promise((resolve, reject) => {
+		let cmd = path.join(toolkitPath, "lib", "bin", `quickgame${commandSuffix}`);
+		let args = [packStr, cmdStr, nobuildjs];
+		let opts = {
+			cwd: projDir
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		// let cp = childProcess.spawn('npx.cmd', ['-v']);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+gulp.task("pushRPK_OPPO", ["buildRPK_OPPO"], function() {
+	// 如果不是OPPO快游戏
+	if (platform !== "oppogame") {
+		return;
+	}
+	if (!config.oppoInfo.oppoDebug) {
+        return;
+    }
+	// 在OPPO轻游戏项目目录中执行:
+    // adb push dist/game.rpk sdcard/games
+	// adb push idePath/resources/app/out/layarepublic/oppo/instant_app_settings.properties
+	// adb shell am start -n com.nearme.instant.platform/com.oppo.autotest.main.InstantAppActivity
+	return new Promise((resolve, reject) => {
+		let cmd = "adb";
+		let sdGamesPath = config.oppoInfo.subpack ? "sdcard/subPkg" : "sdcard/games";
+		let args = ["push", `dist/${config.oppoInfo.package}${config.oppoInfo.useReleaseSign ? ".signed" : ""}.rpk`, sdGamesPath];
+		let opts = {
+			cwd: projDir
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		// let cp = childProcess.spawn('npx.cmd', ['-v']);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`1) push_RPK 子进程退出码:${code}`);
+			resolve();
+		});
+	}).then(() => {
+		return new Promise((resolve, reject) => {
+			// 如果是分包,需要修改里面的内容
+			let oppoPropPath = path.join(ideModuleDir, "../", `/out/layarepublic/oppo/instant_app_settings.properties`);
+			if (config.oppoInfo.subpack) {
+				fs.writeFileSync(oppoPropPath, "default_tab_index=4", "utf8");
+			} else {
+				fs.writeFileSync(oppoPropPath, "default_tab_index=2", "utf8");
+			}
+			let cmd = "adb";
+			let args = ["push", oppoPropPath, "sdcard/"];
+			let opts = {
+				cwd: projDir
+			};
+			let cp = childProcess.spawn(cmd, args, opts);
+			// let cp = childProcess.spawn('npx.cmd', ['-v']);
+			cp.stdout.on('data', (data) => {
+				console.log(`stdout: ${data}`);
+			});
+	
+			cp.stderr.on('data', (data) => {
+				console.log(`stderr: ${data}`);
+				// reject();
+			});
+	
+			cp.on('close', (code) => {
+				console.log(`2) push_RPK 子进程退出码:${code}`);
+				resolve();
+			});
+		});
+	}).then(() => {
+		return new Promise((resolve, reject) => {
+			let cmd = "adb";
+			let args = ["shell", "am", "start", "-n", "com.nearme.instant.platform/com.oppo.autotest.main.InstantAppActivity"];
+			let opts = {
+				cwd: projDir
+			};
+			let cp = childProcess.spawn(cmd, args, opts);
+			// let cp = childProcess.spawn('npx.cmd', ['-v']);
+			cp.stdout.on('data', (data) => {
+				console.log(`stdout: ${data}`);
+			});
+	
+			cp.stderr.on('data', (data) => {
+				console.log(`stderr: ${data}`);
+				// reject();
+			});
+	
+			cp.on('close', (code) => {
+				console.log(`3) push_RPK 子进程退出码:${code}`);
+				resolve();
+			});
+		});
+	});
+});
+
+gulp.task("buildOPPOProj", ["pushRPK_OPPO"], function() {
+	console.log("all tasks completed");
+});

+ 699 - 0
color3D_laya/.laya/publish_vivogame.js

@@ -0,0 +1,699 @@
+// v1.0.0
+// publish 2.x 也是用这个文件,需要做兼容
+let isPublish2 = process.argv[2].includes("publish_vivogame.js") && process.argv[3].includes("--evn=publish2");
+// 获取Node插件和工作路径
+let ideModuleDir, workSpaceDir;
+if (isPublish2) {
+	//是否使用IDE自带的node环境和插件,设置false后,则使用自己环境(使用命令行方式执行)
+	const useIDENode = process.argv[0].indexOf("LayaAir") > -1 ? true : false;
+	ideModuleDir = useIDENode ? process.argv[1].replace("gulp\\bin\\gulp.js", "").replace("gulp/bin/gulp.js", "") : "";
+	workSpaceDir = useIDENode ? process.argv[2].replace("--gulpfile=", "").replace("\\.laya\\publish_vivogame.js", "").replace("/.laya/publish_vivogame.js", "") + "/" : "./../";
+} else {
+	ideModuleDir = global.ideModuleDir;
+	workSpaceDir = global.workSpaceDir;
+}
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+const del = require(ideModuleDir + "del");
+const iconv =  require(ideModuleDir + "iconv-lite");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+let commandSuffix = ".cmd";
+let isGlobalQG = true;
+
+let prevTasks = ["packfile"];
+if (isPublish2) {
+	prevTasks = "";
+}
+
+let 
+    config,
+	platform,
+	releaseDir,
+    tempReleaseDir, // vivo临时拷贝目录
+	projDir, // vivo快游戏工程目录
+	isDealNoCompile,
+	physicsLibsPathList = [],
+	isExistEngineFolder = false; // bin目录下是否存在engine文件夹
+let projSrc;
+let versionCon; // 版本管理version.json
+// 创建vivo项目前,拷贝vivo引擎库、修改index.js
+// 应该在publish中的,但是为了方便发布2.0及IDE 1.x,放在这里修改
+gulp.task("preCreate_VIVO", prevTasks, function() {
+	if (isPublish2) {
+		let pubsetPath = path.join(workSpaceDir, ".laya", "pubset.json");
+		let content = fs.readFileSync(pubsetPath, "utf8");
+		let pubsetJson = JSON.parse(content);
+		platform = "vivogame";
+		releaseDir = path.join(workSpaceDir, "release", platform).replace(/\\/g, "/");
+		releaseDir = tempReleaseDir = path.join(releaseDir, "temprelease");
+		config = pubsetJson[6]; // 只用到了 config.vivoInfo|config.vivoSign
+	} else {
+		platform = global.platform;
+		releaseDir = global.releaseDir;
+		tempReleaseDir = global.tempReleaseDir;
+		config = global.config;
+	}
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	if (process.platform === "darwin") {
+		commandSuffix = "";
+	}
+	let copyLibsList = [`${workSpaceDir}/bin/libs/laya.vvmini.js`];
+	var stream = gulp.src(copyLibsList, { base: `${workSpaceDir}/bin` });
+	return stream.pipe(gulp.dest(tempReleaseDir));
+});
+
+gulp.task("copyPlatformFile_VIVO", ["preCreate_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	let vivoAdapterPath = path.join(ideModuleDir, "../", "out", "layarepublic", "LayaAirProjectPack", "lib", "data", "vivofiles");
+	let copyLibsList = [`${vivoAdapterPath}/**/*.*`];
+	var stream = gulp.src(copyLibsList);
+	return stream.pipe(gulp.dest(tempReleaseDir));
+});
+
+// 检查是否全局安装了qgame
+gulp.task("createGlobalQGame_VIVO", ["copyPlatformFile_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	// qgame -V
+	// npm install -g qgame-toolkit
+	return new Promise((resolve, reject) => {
+		let cmd = `qgame${commandSuffix}`;
+		let args = ["-V"];
+		let cp = childProcess.spawn(cmd, args, {
+			shell: true
+		});
+		// let cp = childProcess.spawn('npx.cmd', ['-v']);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+			if (data.includes("qgame")) {
+				isGlobalQG = false;
+			}
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			console.log(`stderr(iconv): ${iconv.decode(data, 'gbk')}`);
+			if (data.includes("qgame") && !data.includes("qgame-toolkit")) {
+				isGlobalQG = false;
+			}
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`1 end) qgame -V:${code}`);
+			resolve();
+		});
+	}).then(() => {
+		return new Promise((resolve, reject) => {
+			if (isGlobalQG) {
+				resolve();
+				return;
+			}
+			console.log("全局安装qgame-toolkit");
+			// npm install -g qgame-toolkit
+			let cmd = `npm${commandSuffix}`;
+			let args = ["install", "qgame-toolkit", "-g"];
+			let cp = childProcess.spawn(cmd, args);
+			
+			cp.stdout.on('data', (data) => {
+				console.log(`stdout: ${data}`);
+			});
+	
+			cp.stderr.on('data', (data) => {
+				console.log(`stderr: ${data}`);
+				// reject();
+			});
+	
+			cp.on('close', (code) => {
+				console.log(`2 end) npm install -g qgame-toolkit:${code}`);
+				resolve();
+			});
+		});
+	}).catch((e) => {
+		console.log("catch e", e);
+	});
+});
+
+gulp.task("createProj_VIVO", ["createGlobalQGame_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	releaseDir = path.dirname(releaseDir);
+	projDir = path.join(releaseDir, config.vivoInfo.projName);
+	projSrc = path.join(projDir, "src");
+	// 如果有即存项目,不再新建
+	let isProjExist = fs.existsSync(projDir + "/node_modules") && 
+					  fs.existsSync(projDir + "/sign");
+	if (isProjExist) {
+		return;
+	}
+	// 在项目中创建vivo项目
+	return new Promise((resolve, reject) => {
+		console.log("(proj)开始创建vivo快游戏项目");
+		let cmd = `qgame${commandSuffix}`;
+		let args = ["init", config.vivoInfo.projName];
+        let opts = {
+			cwd: releaseDir
+		};
+
+        let cp = childProcess.spawn(cmd, args, opts);
+        
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+			if (data.includes("Init your Project")) {
+				cp.stdin.write(`\n`);
+			}
+			// TODO 这里还是要找原因,不要这样
+			if (data.includes("manifest.json created")) {
+				setTimeout(function() {
+					cp && cp.kill();
+				}, 500);
+			}
+		});
+		
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+		
+		cp.on('close', (code) => {
+			cp = null;
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+gulp.task("installProj_VIVO", ["createProj_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	// 如果有即存项目,不再新建
+	let isProjExist = fs.existsSync(projDir + "/node_modules") && 
+					  fs.existsSync(projDir + "/sign");
+	if (isProjExist) {
+		return;
+	}
+
+	return new Promise((resolve, reject) => {
+		console.log("(proj)下载类库 -> (npm install )");
+		let cmd = `npm${commandSuffix}`;
+		let args = ["install"];
+        let opts = {
+			cwd: projDir
+		};
+
+        let cp = childProcess.spawn(cmd, args, opts);
+        
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+		
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+		
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+// 拷贝文件到vivo快游戏
+gulp.task("copyFileToProj_VIVO", ["installProj_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	// 将临时文件夹中的文件,拷贝到项目中去
+	let originalDir = `${tempReleaseDir}/**/*.*`;
+	let stream = gulp.src(originalDir);
+	return stream.pipe(gulp.dest(path.join(projSrc)));
+});
+
+// 拷贝icon到vivo快游戏
+gulp.task("copyIconToProj_VIVO", ["copyFileToProj_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	let originalDir = config.vivoInfo.icon;
+	let stream = gulp.src(originalDir);
+	return stream.pipe(gulp.dest(projSrc));
+});
+
+// 清除vivo快游戏临时目录
+gulp.task("clearTempDir_VIVO", ["copyIconToProj_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	// 删掉临时目录
+	return del([tempReleaseDir], { force: true });
+});
+
+// 生成release签名(私钥文件 private.pem 和证书文件 certificate.pem )
+gulp.task("generateSign_VIVO", ["clearTempDir_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+    }
+    if (!config.vivoSign.generateSign) {
+        return;
+    }
+	// https://doc.quickapp.cn/tools/compiling-tools.html
+	return new Promise((resolve, reject) => {
+		let cmd = "openssl";
+		let args = ["req", "-newkey", "rsa:2048", "-nodes", "-keyout", "private.pem", 
+					"-x509", "-days", "3650", "-out", "certificate.pem"];
+		let opts = {
+			cwd: projDir,
+			shell: true
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			data += "";
+			if (data.includes("Country Name")) {
+				cp.stdin.write(`${config.vivoSign.countryName}\n`);
+				console.log(`Country Name: ${config.vivoSign.countryName}`);
+			} else if (data.includes("Province Name")) {
+				cp.stdin.write(`${config.vivoSign.provinceName}\n`);
+				console.log(`Province Name: ${config.vivoSign.provinceName}`);
+			} else if (data.includes("Locality Name")) {
+				cp.stdin.write(`${config.vivoSign.localityName}\n`);
+				console.log(`Locality Name: ${config.vivoSign.localityName}`);
+			} else if (data.includes("Organization Name")) {
+				cp.stdin.write(`${config.vivoSign.orgName}\n`);
+				console.log(`Organization Name: ${config.vivoSign.orgName}`);
+			} else if (data.includes("Organizational Unit Name")) {
+				cp.stdin.write(`${config.vivoSign.orgUnitName}\n`);
+				console.log(`Organizational Unit Name: ${config.vivoSign.orgUnitName}`);
+			} else if (data.includes("Common Name")) {
+				cp.stdin.write(`${config.vivoSign.commonName}\n`);
+				console.log(`Common Name: ${config.vivoSign.commonName}`);
+			} else if (data.includes("Email Address")) {
+				cp.stdin.write(`${config.vivoSign.emailAddr}\n`);
+				console.log(`Email Address: ${config.vivoSign.emailAddr}`);
+				// cp.stdin.end();
+			}
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+// 拷贝sign文件到指定位置
+gulp.task("copySignFile_VIVO", ["generateSign_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+    }
+    if (config.vivoSign.generateSign) { // 新生成的签名
+        // 移动签名文件到项目中(Laya & vivo快游戏项目中)
+        let 
+            privatePem = path.join(projDir, "private.pem"),
+            certificatePem = path.join(projDir, "certificate.pem");
+        let isSignExits = fs.existsSync(privatePem) && fs.existsSync(certificatePem);
+        if (!isSignExits) {
+            return;
+        }
+        let 
+            xiaomiDest = `${projDir}/sign/release`,
+            layaDest = `${workSpaceDir}/sign/release`;
+        let stream = gulp.src([privatePem, certificatePem]);
+        return stream.pipe(gulp.dest(xiaomiDest))
+                    .pipe(gulp.dest(layaDest));
+    } else if (config.vivoInfo.useReleaseSign && !config.vivoSign.generateSign) { // 使用release签名,并且没有重新生成
+        // 从项目中将签名拷贝到vivo快游戏项目中
+        let 
+            privatePem = path.join(workSpaceDir, "sign", "release", "private.pem"),
+            certificatePem = path.join(workSpaceDir, "sign", "release", "certificate.pem");
+        let isSignExits = fs.existsSync(privatePem) && fs.existsSync(certificatePem);
+        if (!isSignExits) {
+            return;
+        }
+        let 
+            xiaomiDest = `${projDir}/sign/release`;
+        let stream = gulp.src([privatePem, certificatePem]);
+        return stream.pipe(gulp.dest(xiaomiDest));
+    }
+});
+
+gulp.task("deleteSignFile_VIVO", ["copySignFile_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	if (config.vivoSign.generateSign) { // 新生成的签名
+		let 
+            privatePem = path.join(projDir, "private.pem"),
+            certificatePem = path.join(projDir, "certificate.pem");
+		return del([privatePem, certificatePem], { force: true });
+	}
+});
+
+gulp.task("modifyFile_VIVO", ["deleteSignFile_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	// 修改manifest.json文件
+	let manifestPath = path.join(projSrc, "manifest.json");
+	if (!fs.existsSync(manifestPath)) {
+		return;
+	}
+	let manifestContent = fs.readFileSync(manifestPath, "utf8");
+	let manifestJson = JSON.parse(manifestContent);
+	manifestJson.package = config.vivoInfo.package;
+	manifestJson.name = config.vivoInfo.name;
+	manifestJson.orientation = config.vivoInfo.orientation;
+	manifestJson.deviceOrientation = config.vivoInfo.orientation;
+	manifestJson.versionName = config.vivoInfo.versionName;
+	manifestJson.versionCode = config.vivoInfo.versionCode;
+	manifestJson.minPlatformVersion = config.vivoInfo.minPlatformVersion;
+	manifestJson.icon = `./${path.basename(config.vivoInfo.icon)}`;
+	fs.writeFileSync(manifestPath, JSON.stringify(manifestJson, null, 4), "utf8");
+
+	if (config.version) {
+		let versionPath = projSrc + "/version.json";
+		versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+	}
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	// 修改game.js文件
+	let content = `require("./qgame-adapter.js");\nif(!window.navigator)\n\twindow.navigator = {};\nwindow.navigator.userAgent = 'Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E8301 VVGame NetType/WIFI Language/zh_CN';\nrequire("./libs/laya.vvmini.js");\nrequire("./index.js");`;
+	let gameJsPath = path.join(projSrc, "game.js");
+	fs.writeFileSync(gameJsPath, content, "utf8");
+
+	// vivo项目,修改index.js
+	let filePath = path.join(projSrc, indexJsStr);
+	if (!fs.existsSync(filePath)) {
+		return;
+	}
+	let fileContent = fs.readFileSync(filePath, "utf8");
+	fileContent = fileContent.replace(/loadLib(\(['"])/gm, "require$1./");
+	fs.writeFileSync(filePath, fileContent, "utf8");
+})
+
+gulp.task("version_VIVO", ["modifyFile_VIVO"], function () {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	if (config.version) {
+		let versionPath = projSrc + "/version.json";
+		let mainJSPath = projSrc + "/game.js";
+		let srcList = [versionPath, mainJSPath];
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(projSrc));
+	}
+});
+
+// 处理engine文件夹
+gulp.task("dealEngineFolder1_VIVO", ["version_VIVO"], function() {
+	// 如果项目中游engine文件夹,我们默认该开发者是熟悉VIVO发布流程的,已经处理好所有的逻辑
+	// 值得注意的:
+	// 1) 如果有engine文件夹而未处理2D物理库(box2d.js/physics.js),项目将无法运行
+	// 2) 如果未处理3D物理库(physics3D.js),打包时间将会很长
+
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	let engineFolder = path.join(projDir, "src", "engine");
+	isExistEngineFolder = fs.existsSync(engineFolder);
+	if (!isExistEngineFolder) {
+		return;
+	}
+
+	let adapterOriginalPath = path.join(projDir, "src", "qgame-adapter.js");
+
+	let vivoConfigPath = path.join(ideModuleDir, "../", "out", "layarepublic", "LayaAirProjectPack", "lib", "data", "addi", "vivo");
+
+	// 不想写一堆task任务,500ms默认拷贝完成吧
+	// 未来有了更好的解决方案再修改
+	return new Promise(function(resolve, reject) {
+		// 拷贝webpack.config.js
+		setTimeout(resolve, 500);
+		var stream = gulp.src([`${vivoConfigPath}/**/*.*`]);
+		return stream.pipe(gulp.dest(projDir));
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			// 将engine文件夹拷贝到projRoot下
+			setTimeout(resolve, 500);
+			var stream = gulp.src([`${engineFolder}/**/*.*`], {base: `${projDir}/src`});
+			return stream.pipe(gulp.dest(projDir));
+		});
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			// 将adapter.js拷贝到engine文件夹中
+			setTimeout(resolve, 500);
+			var stream = gulp.src([adapterOriginalPath]);
+			return stream.pipe(gulp.dest(`${projDir}/engine`));
+		});
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			// 删掉src下的engine和adapter
+			setTimeout(resolve, 500);
+			return del([engineFolder, adapterOriginalPath], { force: true });
+		});
+	}).catch(function(err) {
+		console.log(err);
+	});
+});
+
+gulp.task("dealEngineFolder2_VIVO", ["dealEngineFolder1_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	if (!isExistEngineFolder) {
+		return;
+	}
+	
+	let engineFolder = path.join(projDir, "engine");
+	let engineFileList = fs.readdirSync(engineFolder);
+	// 修改webpack.config.js
+	let vvConfigPath = path.join(projDir, "config", "webpack.config.js");
+	let content = fs.readFileSync(vvConfigPath, "utf8");
+	let externalsStr = '{\n';
+	let libName;
+	for (let i = 0, len = engineFileList.length; i < len; i++) {
+		libName = engineFileList[i];
+		if (i !== 0) {
+			externalsStr += ',\n';
+		}
+		externalsStr += `'./${libName}':'commonjs ./${libName}'`;
+	}
+	externalsStr += '\n}';
+	content = content.replace("EXTERNALS_PLACE_HOLDER", externalsStr);
+	fs.writeFileSync(vvConfigPath, content, "utf8");
+});
+
+// 如果项目中用到了 box2d.js|laya.physics.js/laya.physics3D.js ,需要特殊处理
+gulp.task("dealNoCompile1_VIVO", ["dealEngineFolder2_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	if (isExistEngineFolder) {
+		return;
+	}
+	// 如果没有使用物理,则忽略这一步
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	let box2dJsStr = (versionCon && versionCon["libs/box2d.js"]) ? versionCon["libs/box2d.js"] :  "libs/box2d.js";
+	let physicsJsStr = (versionCon && versionCon["libs/laya.physics.js"]) ? versionCon["libs/laya.physics.js"] :  "libs/laya.physics.js";
+	let physics3DJsStr = (versionCon && versionCon["libs/laya.physics3D.js"]) ? versionCon["libs/laya.physics3D.js"] :  "libs/laya.physics3D.js";
+	let filePath = path.join(projSrc, indexJsStr);
+	if (!fs.existsSync(filePath)) {
+		return;
+	}
+	isDealNoCompile = true;
+
+	// 拷贝webpack.config.js
+	let vivoConfigPath = path.join(ideModuleDir, "../", "out", "layarepublic", "LayaAirProjectPack", "lib", "data", "addi", "vivo");
+	let copyConfigList = [`${vivoConfigPath}/**/*.*`];
+	var stream = gulp.src(copyConfigList);
+	return stream.pipe(gulp.dest(projDir));
+});
+
+gulp.task("dealNoCompile2_VIVO", ["dealNoCompile1_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	if (!isDealNoCompile) {
+		return;
+	}
+
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	let bundleJsStr = (versionCon && versionCon["js/bundle.js"]) ? versionCon["js/bundle.js"] :  "js/bundle.js";
+	let box2dJsStr = (versionCon && versionCon["libs/box2d.js"]) ? versionCon["libs/box2d.js"] :  "libs/box2d.js";
+	let physicsJsStr = (versionCon && versionCon["libs/laya.physics.js"]) ? versionCon["libs/laya.physics.js"] :  "libs/laya.physics.js";
+	let physics3DJsStr = (versionCon && versionCon["libs/laya.physics3D.js"]) ? versionCon["libs/laya.physics3D.js"] :  "libs/laya.physics3D.js";
+
+	// 修改index.js,去掉物理库前面的libs
+	let filePath = path.join(projSrc, indexJsStr);
+	let fileContent = fs.readFileSync(filePath, "utf8");
+	let physicsNameList = [];
+
+	if (fileContent.includes(bundleJsStr)) {
+		let adapterJsPath = path.join(projSrc, bundleJsStr);
+		physicsNameList.push(bundleJsStr);
+		physicsLibsPathList.push(adapterJsPath);
+	}
+	if (fileContent.includes(box2dJsStr)) {
+		let libPath = path.join(projSrc, box2dJsStr);
+		physicsNameList.push(box2dJsStr);
+		physicsLibsPathList.push(libPath);
+	}
+	if (fileContent.includes(physicsJsStr)) {
+		let libPath = path.join(projSrc, physicsJsStr);
+		physicsNameList.push(physicsJsStr);
+		physicsLibsPathList.push(libPath);
+	}
+	if (fileContent.includes(physics3DJsStr)) {
+		let libPath = path.join(projSrc, physics3DJsStr);
+		physicsNameList.push(physics3DJsStr);
+		physicsLibsPathList.push(libPath);
+	}
+	if (physicsLibsPathList.length > 0) {
+		let adapterJsPath = path.join(projSrc, "qgame-adapter.js");
+		physicsNameList.push("qgame-adapter.js");
+		physicsLibsPathList.push(adapterJsPath);
+	}
+
+	// 修改webpack.config.js
+	let vvConfigPath = path.join(projDir, "config", "webpack.config.js");
+	let content = fs.readFileSync(vvConfigPath, "utf8");
+	let externalsStr = '{\n';
+	let libName;
+	for (let i = 0, len = physicsNameList.length; i < len; i++) {
+		libName = physicsNameList[i];
+		if (i !== 0) {
+			externalsStr += ',\n';
+		}
+		externalsStr += `'./${libName}':'commonjs ./${libName}'`;
+	}
+	externalsStr += '\n}';
+	content = content.replace("EXTERNALS_PLACE_HOLDER", externalsStr);
+	fs.writeFileSync(vvConfigPath, content, "utf8");
+
+	// 将物理库、qgame-adapter.js拷贝到engine中
+	var stream = gulp.src(physicsLibsPathList, {base: projSrc});
+	return stream.pipe(gulp.dest(path.join(projDir, "engine")));
+});
+
+gulp.task("dealNoCompile3_VIVO", ["dealNoCompile2_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	if (!isDealNoCompile || physicsLibsPathList.length === 0) {
+		return;
+	}
+	return del(physicsLibsPathList, { force: true });
+});
+
+// 打包rpk
+gulp.task("buildRPK_VIVO", ["dealNoCompile3_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	// 在vivo轻游戏项目目录中执行:
+    // npm run build || npm run release
+    let cmdStr = "build";
+    if (config.vivoInfo.useReleaseSign) {
+        cmdStr = "release";
+    }
+	return new Promise((resolve, reject) => {
+		let cmd = `npm${commandSuffix}`;
+		let args = ["run", cmdStr];
+		let opts = {
+			cwd: projDir
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		// let cp = childProcess.spawn(`npx${commandSuffix}`, ['-v']);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			console.log(`stderr(iconv): ${iconv.decode(data, 'gbk')}`);
+			
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+gulp.task("showQRCode_VIVO", ["buildRPK_VIVO"], function() {
+	// 如果不是vivo快游戏
+	if (platform !== "vivogame") {
+		return;
+	}
+	// 在vivo轻游戏项目目录中执行:
+	// npm run server
+	return new Promise((resolve, reject) => {
+		let cmd = `npm${commandSuffix}`;
+		let args = ["run", "server"];
+		let opts = {
+			cwd: projDir
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		// let cp = childProcess.spawn(`npx${commandSuffix}`, ['-v']);
+		cp.stdout.on('data', (data) => {
+			console.log(`${data}`);
+			// 输出pid,macos要用: macos无法kill进程树,也无法执行命令获取3000端口pid(没有查询权限),导致无法kill这个进程
+			console.log('vv_qrcode_pid:' + cp.pid);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			console.log(`stderr(iconv): ${iconv.decode(data, 'gbk')}`);
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+
+gulp.task("buildVivoProj", ["showQRCode_VIVO"], function() {
+	console.log("all tasks completed");
+});

+ 518 - 0
color3D_laya/.laya/publish_xmgame.js

@@ -0,0 +1,518 @@
+// v1.1.1
+// publish 2.x 也是用这个文件,需要做兼容
+let isPublish2 = process.argv[2].includes("publish_xmgame.js") && process.argv[3].includes("--evn=publish2");
+// 获取Node插件和工作路径
+let ideModuleDir, workSpaceDir;
+if (isPublish2) {
+	//是否使用IDE自带的node环境和插件,设置false后,则使用自己环境(使用命令行方式执行)
+	const useIDENode = process.argv[0].indexOf("LayaAir") > -1 ? true : false;
+	ideModuleDir = useIDENode ? process.argv[1].replace("gulp\\bin\\gulp.js", "").replace("gulp/bin/gulp.js", "") : "";
+	workSpaceDir = useIDENode ? process.argv[2].replace("--gulpfile=", "").replace("\\.laya\\publish_xmgame.js", "").replace("/.laya/publish_xmgame.js", "") + "/" : "./../";
+} else {
+	ideModuleDir = global.ideModuleDir;
+	workSpaceDir = global.workSpaceDir;
+}
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+const del = require(ideModuleDir + "del");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+let commandSuffix = ".cmd";
+
+let prevTasks = ["packfile"];
+if (isPublish2) {
+	prevTasks = "";
+}
+
+let 
+    config,
+	platform,
+	releaseDir,
+    tempReleaseDir, // 小米临时拷贝目录
+	projDir; // 小米快游戏工程目录
+let IDEXMProjPath,
+	isUpdateIDEXMProj = false;
+let versionCon; // 版本管理version.json
+// 创建小米项目前,拷贝小米引擎库、修改index.js
+// 应该在publish中的,但是为了方便发布2.0及IDE 1.x,放在这里修改
+gulp.task("preCreate_XM", prevTasks, function() {
+	if (isPublish2) {
+		let pubsetPath = path.join(workSpaceDir, ".laya", "pubset.json");
+		let content = fs.readFileSync(pubsetPath, "utf8");
+		let pubsetJson = JSON.parse(content);
+		platform = "xmgame";
+		releaseDir = path.join(workSpaceDir, "release", platform).replace(/\\/g, "/");
+		releaseDir = tempReleaseDir = path.join(releaseDir, "temprelease");
+		config = pubsetJson[4]; // 只用到了 config.xmInfo|config.xmSign
+	} else {
+		platform = global.platform;
+		releaseDir = global.releaseDir;
+		tempReleaseDir = global.tempReleaseDir;
+		config = global.config;
+	}
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	if (process.platform === "darwin") {
+		commandSuffix = "";
+	}
+	let copyLibsList = [`${workSpaceDir}/bin/libs/laya.xmmini.js`];
+	var stream = gulp.src(copyLibsList, { base: `${workSpaceDir}/bin` });
+	return stream.pipe(gulp.dest(tempReleaseDir));
+});
+
+gulp.task("copyPlatformFile_XM", ["preCreate_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	let xmAdapterPath = path.join(ideModuleDir, "../", "out", "layarepublic", "LayaAirProjectPack", "lib", "data", "xmfiles");
+	let copyLibsList = [`${xmAdapterPath}/**/*.*`];
+	var stream = gulp.src(copyLibsList);
+	return stream.pipe(gulp.dest(tempReleaseDir));
+});
+
+// 新建小米项目-小米项目与其他项目不同,需要新建小米快游戏项目,并打包成.rpk文件
+gulp.task("checkIDEProj_XM", ["copyPlatformFile_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	if (!ideModuleDir) {
+		return;
+	}
+	IDEXMProjPath = path.join(ideModuleDir, "../", "out", "layarepublic", "xm");
+	if (process.platform === "darwin") {
+		return;
+	}
+	let ideLastXMProjPath = path.join(IDEXMProjPath, config.xmInfo.projName);
+	// 如果IDE中没有小米项目,跳过这一步
+	let isProjExist = fs.existsSync(ideLastXMProjPath + "/node_modules") && 
+					  fs.existsSync(ideLastXMProjPath + "/sign");
+	if (!isProjExist) {
+		console.log("IDE中没有小米项目,跳过检查小米项目版本号这一步");
+		return;
+	}
+	// 如果IDE中项目已经存在了,检查版本号
+	// npm view quickgame-cli version
+	// npm ls quickgame-cli
+	let remoteVersion, localVersion;
+	let isGetRemote, isGetLocal;
+	return new Promise((resolve, reject) => { // 远程版本号
+		childProcess.exec("npm view quickgame-cli version", function(error, stdout, stderr) {
+			if (!stdout) { // 获取 quickgame-cli 远程版本号失败
+				reject();
+				return;
+			}
+			remoteVersion = stdout;
+			isGetRemote = true;
+			if (isGetRemote && isGetLocal) {
+				resolve();
+			}
+		});
+		childProcess.exec("npm ls quickgame-cli", { cwd: ideLastXMProjPath }, function(error, stdout, stderr) {
+			if (!stdout) { // 获取 quickgame-cli 本地版本号失败
+				reject();
+				return;
+			}
+			localVersion = stdout.match(/quickgame-cli@(.+)/);
+			localVersion = localVersion && localVersion[1];
+			isGetLocal = true;
+			if (isGetRemote && isGetLocal) {
+				resolve();
+			}
+		});
+		setTimeout(() => {
+			if (!isGetLocal || !isGetRemote) {
+				console.log("获取远程版本号或本地版本号失败");
+				reject();
+				return;
+			}
+		}, 10000);
+	}).then(() => { // 比较两个版本号
+		if (!remoteVersion || !localVersion) {
+			console.log("获取远程版本号或本地版本号失败!");
+		}
+		console.log("quickgame-cli -> ", localVersion, "|", remoteVersion);
+		if (remoteVersion.trim() !== localVersion.trim()) { // 仅当两个版本号都获取到并且不相等,置为需要更新(true)
+			isUpdateIDEXMProj = true;
+		}
+	}).catch((e) => {
+		console.log("获取远程版本号或本地版本号失败 -> ", remoteVersion, "|", localVersion);
+		console.log(e);
+	});
+});
+
+gulp.task("createIDEProj_XM", ["checkIDEProj_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	if (!ideModuleDir) {
+		return;
+	}
+	if (process.platform === "darwin") {
+		return;
+	}
+	let ideLastXMProjPath = path.join(IDEXMProjPath, config.xmInfo.projName);
+	// 如果有即存项目,不再新建
+	let isProjExist = fs.existsSync(ideLastXMProjPath + "/node_modules") && 
+					  fs.existsSync(ideLastXMProjPath + "/sign");
+	if (isProjExist && !isUpdateIDEXMProj) { // 项目存在并且不需要更新IDE中的小米项目
+		return;
+	}
+	return new Promise((resolve, reject) => {
+		console.log("(IDE)开始创建小米快游戏项目,请耐心等待(预计需要10分钟)...");
+		let cmd = `npx${commandSuffix}`;
+		let args = ["create-quickgame", config.xmInfo.projName, `path=${IDEXMProjPath}`,
+					`package=${config.xmInfo.package}`, `versionName=${config.xmInfo.versionName}`,
+					`versionCode=${config.xmInfo.versionCode}`, `minPlatformVersion=${config.xmInfo.minPlatformVersion}`,
+                    `icon=/layaicon/${path.basename(config.xmInfo.icon)}`, `name=${config.xmInfo.name}`, `rebuild=true`];
+        console.log(JSON.stringify(args));
+        
+        let cp = childProcess.spawn(cmd, args);
+        
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+		
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+		
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+gulp.task("createProj_XM", ["createIDEProj_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	releaseDir = path.dirname(releaseDir);
+	projDir = path.join(releaseDir, config.xmInfo.projName);
+	// 如果有即存项目,不再新建
+	let isProjExist = fs.existsSync(projDir + "/node_modules") && 
+					  fs.existsSync(projDir + "/sign");
+	if (isProjExist) {
+		return;
+	}
+	// 如果IDE中有即存项目,不再新建,从IDE中拷贝
+	let ideLastXMProjPath = path.join(IDEXMProjPath, config.xmInfo.projName);
+	let isIDEXMProjExist = fs.existsSync(ideLastXMProjPath + "/node_modules") && 
+						fs.existsSync(ideLastXMProjPath + "/sign");
+	if (isIDEXMProjExist) { // 如果用的IDE并且有IDEXM目录
+		console.log("使用IDE中的小米游戏项目,拷贝...");
+		// node-glob语法中,* 无法匹配 .开头的文件(夹),必须手动匹配
+		let IDEXMProjPathStr = [`${IDEXMProjPath}/**/*.*`, `${ideLastXMProjPath}/node_modules/.bin/*.*`];
+		var stream = gulp.src(IDEXMProjPathStr, { base: IDEXMProjPath});
+		return stream.pipe(gulp.dest(releaseDir));
+	}
+	// 在项目中创建小米项目
+	return new Promise((resolve, reject) => {
+		console.log("(proj)开始创建小米快游戏项目,请耐心等待(预计需要10分钟)...");
+		let cmd = `npx${commandSuffix}`;
+		let args = ["create-quickgame", config.xmInfo.projName, `path=${releaseDir}`,
+					`package=${config.xmInfo.package}`, `versionName=${config.xmInfo.versionName}`,
+					`versionCode=${config.xmInfo.versionCode}`, `minPlatformVersion=${config.xmInfo.minPlatformVersion}`,
+                    `icon=/layaicon/${path.basename(config.xmInfo.icon)}`, `name=${config.xmInfo.name}`, `rebuild=true`];
+        console.log(JSON.stringify(args));
+        
+        let cp = childProcess.spawn(cmd, args);
+        
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+		
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+		
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+// 拷贝文件到小米快游戏
+gulp.task("copyFileToProj_XM", ["createProj_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	// 将临时文件夹中的文件,拷贝到项目中去
+	let originalDir = `${tempReleaseDir}/**/*.*`;
+	let stream = gulp.src(originalDir);
+	return stream.pipe(gulp.dest(path.join(projDir)));
+});
+
+// 拷贝icon到小米快游戏
+gulp.task("copyIconToProj_XM", ["copyFileToProj_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	let originalDir = config.xmInfo.icon;
+	let stream = gulp.src(originalDir);
+	return stream.pipe(gulp.dest(path.join(projDir, "layaicon")));
+});
+
+// 清除小米快游戏临时目录
+gulp.task("clearTempDir_XM", ["copyIconToProj_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	// 删掉临时目录
+	return del([tempReleaseDir], { force: true });
+});
+
+// 生成release签名(私钥文件 private.pem 和证书文件 certificate.pem )
+gulp.task("generateSign_XM", ["clearTempDir_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+    }
+    if (!config.xmSign.generateSign) {
+        return;
+    }
+	// https://doc.quickapp.cn/tools/compiling-tools.html
+	return new Promise((resolve, reject) => {
+		let cmd = "openssl";
+		let args = ["req", "-newkey", "rsa:2048", "-nodes", "-keyout", "private.pem", 
+					"-x509", "-days", "3650", "-out", "certificate.pem"];
+		let opts = {
+			cwd: projDir,
+			shell: true
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			data += "";
+			if (data.includes("Country Name")) {
+				cp.stdin.write(`${config.xmSign.countryName}\n`);
+				console.log(`Country Name: ${config.xmSign.countryName}`);
+			} else if (data.includes("Province Name")) {
+				cp.stdin.write(`${config.xmSign.provinceName}\n`);
+				console.log(`Province Name: ${config.xmSign.provinceName}`);
+			} else if (data.includes("Locality Name")) {
+				cp.stdin.write(`${config.xmSign.localityName}\n`);
+				console.log(`Locality Name: ${config.xmSign.localityName}`);
+			} else if (data.includes("Organization Name")) {
+				cp.stdin.write(`${config.xmSign.orgName}\n`);
+				console.log(`Organization Name: ${config.xmSign.orgName}`);
+			} else if (data.includes("Organizational Unit Name")) {
+				cp.stdin.write(`${config.xmSign.orgUnitName}\n`);
+				console.log(`Organizational Unit Name: ${config.xmSign.orgUnitName}`);
+			} else if (data.includes("Common Name")) {
+				cp.stdin.write(`${config.xmSign.commonName}\n`);
+				console.log(`Common Name: ${config.xmSign.commonName}`);
+			} else if (data.includes("Email Address")) {
+				cp.stdin.write(`${config.xmSign.emailAddr}\n`);
+				console.log(`Email Address: ${config.xmSign.emailAddr}`);
+				// cp.stdin.end();
+			}
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+// 拷贝sign文件到指定位置
+gulp.task("copySignFile_XM", ["generateSign_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+    }
+    if (config.xmSign.generateSign) { // 新生成的签名
+        // 移动签名文件到项目中(Laya & 小米快游戏项目中)
+        let 
+            privatePem = path.join(projDir, "private.pem"),
+            certificatePem = path.join(projDir, "certificate.pem");
+        let isSignExits = fs.existsSync(privatePem) && fs.existsSync(certificatePem);
+        if (!isSignExits) {
+            return;
+        }
+        let 
+            xiaomiDest = `${projDir}/sign/release`,
+            layaDest = `${workSpaceDir}/sign/release`;
+        let stream = gulp.src([privatePem, certificatePem]);
+        return stream.pipe(gulp.dest(xiaomiDest))
+                    .pipe(gulp.dest(layaDest));
+    } else if (config.xmInfo.useReleaseSign && !config.xmSign.generateSign) { // 使用release签名,并且没有重新生成
+        // 从项目中将签名拷贝到小米快游戏项目中
+        let 
+            privatePem = path.join(workSpaceDir, "sign", "release", "private.pem"),
+            certificatePem = path.join(workSpaceDir, "sign", "release", "certificate.pem");
+        let isSignExits = fs.existsSync(privatePem) && fs.existsSync(certificatePem);
+        if (!isSignExits) {
+            return;
+        }
+        let 
+            xiaomiDest = `${projDir}/sign/release`;
+        let stream = gulp.src([privatePem, certificatePem]);
+        return stream.pipe(gulp.dest(xiaomiDest));
+    }
+});
+
+gulp.task("deleteSignFile_XM", ["copySignFile_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	if (config.xmSign.generateSign) { // 新生成的签名
+		let 
+            privatePem = path.join(projDir, "private.pem"),
+            certificatePem = path.join(projDir, "certificate.pem");
+		return del([privatePem, certificatePem], { force: true });
+	}
+});
+
+gulp.task("modifyFile_XM", ["deleteSignFile_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	// 修改manifest.json文件
+	let manifestPath = path.join(projDir, "manifest.json");
+	if (!fs.existsSync(manifestPath)) {
+		return;
+	}
+	let manifestContent = fs.readFileSync(manifestPath, "utf8");
+	let manifestJson = JSON.parse(manifestContent);
+	manifestJson.package = config.xmInfo.package;
+	manifestJson.name = config.xmInfo.name;
+	manifestJson.orientation = config.xmInfo.orientation;
+	manifestJson.versionName = config.xmInfo.versionName;
+	manifestJson.versionCode = config.xmInfo.versionCode;
+	manifestJson.minPlatformVersion = config.xmInfo.minPlatformVersion;
+	manifestJson.icon = `/layaicon/${path.basename(config.xmInfo.icon)}`;
+	fs.writeFileSync(manifestPath, JSON.stringify(manifestJson, null, 4), "utf8");
+
+	if (config.version) {
+		let versionPath = projDir + "/version.json";
+		versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+	}
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	// 修改main.js文件
+	let content = 'require("./qg-adapter.js");\nrequire("./libs/laya.xmmini.js");\nrequire("./index.js");';
+	let mainJsPath = path.join(projDir, "main.js");
+	fs.writeFileSync(mainJsPath, content, "utf8");
+
+	// 小米项目,修改index.js
+	let filePath = path.join(projDir, indexJsStr);
+	if (!fs.existsSync(filePath)) {
+		return;
+	}
+	let fileContent = fs.readFileSync(filePath, "utf8");
+	fileContent = fileContent.replace(/loadLib(\(['"])/gm, "require$1./");
+	fs.writeFileSync(filePath, fileContent, "utf8");
+})
+
+gulp.task("version_XM", ["modifyFile_XM"], function () {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	if (config.version) {
+		let versionPath = projDir + "/version.json";
+		let mainJSPath = projDir + "/main.js";
+		let srcList = [versionPath, mainJSPath];
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(projDir));
+	}
+});
+
+// 打包rpk
+gulp.task("buildRPK_XM", ["version_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	// 在小米轻游戏项目目录中执行:
+    // npm run build || npm run release
+    let cmdStr = "build";
+    if (config.xmInfo.useReleaseSign) {
+        cmdStr = "release";
+    }
+	return new Promise((resolve, reject) => {
+		let cmd = `npm${commandSuffix}`;
+		let args = ["run", cmdStr];
+		let opts = {
+			cwd: projDir
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		// let cp = childProcess.spawn(`npx${commandSuffix}`, ['-v']);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+gulp.task("showQRCode_XM", ["buildRPK_XM"], function() {
+	// 如果不是小米快游戏
+	if (platform !== "xmgame") {
+		return;
+	}
+	// 在小米轻游戏项目目录中执行:
+	// npm run server
+	return new Promise((resolve, reject) => {
+		let cmd = `npm${commandSuffix}`;
+		let args = ["run", "server"];
+		let opts = {
+			cwd: projDir
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		// let cp = childProcess.spawn(`npx${commandSuffix}`, ['-v']);
+		cp.stdout.on('data', (data) => {
+			console.log(`${data}`);
+			// 输出pid,macos要用: macos无法kill进程树,也无法执行命令获取3000端口pid(没有查询权限),导致无法kill这个进程
+			console.log('xm_qrcode_pid:' + cp.pid);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+
+gulp.task("buildXiaomiProj", ["showQRCode_XM"], function() {
+	console.log("all tasks completed");
+});

+ 56 - 0
color3D_laya/.laya/web.json

@@ -0,0 +1,56 @@
+{
+    "copyFilesFilter": [
+        "../bin/**/*.*"
+    ],
+    "openDataZone": false,
+    "compressJson": true,
+    "compressJsonFilter": [
+        "$basePath/**/*.{json,atlas}"
+    ],
+    "compressJsonNoteList": [
+        ""
+    ],
+    "compressImage": true,
+    "compressImageFilter": [
+        "$basePath/**/*.{png,jpg}"
+    ],
+    "compressImageNoteList": [
+        ""
+    ],
+    "compressJs": true,
+    "compressJsFilter": [
+        "$basePath/**/*.js"
+    ],
+    "compressJsNoteList": [
+        ""
+    ],
+    "version": false,
+    "versionFilter": [
+        "$basePath/**/*.*",
+        "!$basePath/*.html",
+        "!$basePath/{version.json,game.js,game.json,project.config.json,weapp-adapter.js,project.swan.json,swan-game-adapter.js,main.js,gameConfig.json}",
+        "!$basePath/layaforqq/**/*.*"
+    ],
+    "versionNoteList": [
+        "",
+        "",
+        "",
+        ""
+    ],
+    "packfile": false,
+    "packfileFilter": [
+        ""
+    ],
+    "packfileFullValue": [
+        "$basePath/**/*.*"
+    ],
+    "packfileTargetValue": "",
+    "packfileNoteList": [
+        ""
+    ],
+    "clearReleaseDir": true,
+    "compile": false,
+    "onlyIndexJS": true,
+    "projectType": "ts",
+    "pubTime": 1562584808746
+}

+ 62 - 0
color3D_laya/.laya/wxgame.json

@@ -0,0 +1,62 @@
+{
+    "copyFilesFilter": [
+        "../bin/**/*.*"
+    ],
+    "openDataZone": false,
+    "compressJson": true,
+    "compressJsonFilter": [
+        "$basePath/**/*.{json,atlas}"
+    ],
+    "compressJsonNoteList": [
+        ""
+    ],
+    "compressImage": true,
+    "compressImageFilter": [
+        "$basePath/**/*.{png,jpg}"
+    ],
+    "compressImageNoteList": [
+        ""
+    ],
+    "compressJs": true,
+    "compressJsFilter": [
+        "$basePath/**/*.js",
+        "!$basePath/subContext/*.*"
+    ],
+    "compressJsNoteList": [
+        "",
+        ""
+    ],
+    "version": false,
+    "versionFilter": [
+        "$basePath/**/*.*",
+        "!$basePath/*.html",
+        "!$basePath/{version.json,game.js,game.json,project.config.json,weapp-adapter.js,project.swan.json,swan-game-adapter.js,main.js,gameConfig.json}",
+        "!$basePath/layaforqq/**/*.*"
+    ],
+    "versionNoteList": [
+        "",
+        "",
+        "",
+        ""
+    ],
+    "packfile": false,
+    "packfileFilter": [
+        ""
+    ],
+    "packfileFullValue": [
+        "$basePath/**/*.*",
+        "$basePath/game.js",
+        "$basePath/game.json",
+        "$basePath/project.config.json",
+        "$basePath/weapp-adapter.js"
+    ],
+    "packfileTargetValue": "",
+    "packfileNoteList": [
+        ""
+    ],
+    "clearReleaseDir": true,
+    "compile": true,
+    "onlyIndexJS": true,
+    "projectType": "ts",
+    "pubTime": 1564624353045
+}

ファイルの差分が大きいため隠しています
+ 1 - 0
color3D_laya/bin/fileconfig.json


+ 10 - 0
color3D_laya/bin/game.js

@@ -0,0 +1,10 @@
+if ((typeof swan !== 'undefined') && (typeof swanGlobal !== 'undefined')) {
+	require("swan-game-adapter.js");
+	require("libs/laya.bdmini.js");
+} else if (typeof wx!=="undefined") {
+	require("weapp-adapter.js");
+	require("libs/laya.wxmini.js");
+}
+window.loadLib = require;
+require('utils/ald-game.js');
+require("index.js");

+ 17 - 0
color3D_laya/bin/game.json

@@ -0,0 +1,17 @@
+{
+  "deviceOrientation": "portrait",
+  "showStatusBar": false,
+  "openDataContext": "subContext",
+  "networkTimeout": {
+    "request": 10000,
+    "connectSocket": 10000,
+    "uploadFile": 10000,
+    "downloadFile": 10000
+  },
+  "subpackages": [
+    {
+      "name": "subpackage",
+      "root": "subpackage/"
+    }
+  ]
+}

+ 32 - 0
color3D_laya/bin/index.html

@@ -0,0 +1,32 @@
+<html>
+
+<head>
+    <title>www.layabox.com</title>
+    <meta charset='utf-8' />
+    <meta name='renderer' content='webkit' />
+    <meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'
+    />
+    <meta name='apple-mobile-web-app-capable' content='yes' />
+    <meta name='full-screen' content='true' />
+    <meta name='x5-fullscreen' content='true' />
+    <meta name='360-fullscreen' content='true' />
+    <meta name='laya' screenorientation='landscape' />
+    <meta http-equiv='expires' content='0' />
+    <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1' />
+    <meta http-equiv='expires' content='0' />
+    <meta http-equiv='Cache-Control' content='no-siteapp' />
+</head>
+
+<body>
+    <script type="text/javascript">
+        function loadLib(url) {
+            var script = document.createElement("script");
+            script.async = false;
+            script.src = url;
+            document.body.appendChild(script);
+        }
+    </script>
+    <script type="text/javascript" src="index.js"></script>
+</body>
+
+</html>

+ 16 - 0
color3D_laya/bin/index.js

@@ -0,0 +1,16 @@
+/**
+ * 设置LayaNative屏幕方向,可设置以下值
+ * landscape           横屏
+ * portrait            竖屏
+ * sensor_landscape    横屏(双方向)
+ * sensor_portrait     竖屏(双方向)
+ */
+window.screenOrientation = "portrait";
+
+//-----libs-begin-----
+loadLib("libs/laya.core.js")
+loadLib("libs/laya.html.js")
+loadLib("libs/laya.d3.js")
+loadLib("libs/oimo.js")
+//-----libs-end-------
+loadLib("js/bundle.js");

ファイルの差分が大きいため隠しています
+ 455 - 0
color3D_laya/bin/js/bundle.js


ファイルの差分が大きいため隠しています
+ 3746 - 0
color3D_laya/bin/libs/bytebuffer.js


ファイルの差分が大きいため隠しています
+ 2357 - 0
color3D_laya/bin/libs/domparserinone.js


ファイルの差分が大きいため隠しています
+ 10 - 0
color3D_laya/bin/libs/fairygui/fairygui.min.js


ファイルの差分が大きいため隠しています
+ 5553 - 0
color3D_laya/bin/libs/laya.ani.js


ファイルの差分が大きいため隠しています
+ 1497 - 0
color3D_laya/bin/libs/laya.bdmini.js


ファイルの差分が大きいため隠しています
+ 34349 - 0
color3D_laya/bin/libs/laya.core.js


ファイルの差分が大きいため隠しています
+ 44693 - 0
color3D_laya/bin/libs/laya.d3.js


+ 104 - 0
color3D_laya/bin/libs/laya.d3Plugin.js

@@ -0,0 +1,104 @@
+
+(function(window,document,Laya){
+	var __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;
+
+	var Component=laya.components.Component,MeshTerrainSprite3D=laya.d3.core.MeshTerrainSprite3D;
+/**
+*<code>PathFinding</code> 类用于创建寻路。
+*/
+//class laya.d3.component.PathFind extends laya.components.Component
+var PathFind=(function(_super){
+	function PathFind(){
+		/**@private */
+		this._meshTerrainSprite3D=null;
+		/**@private */
+		this._finder=null;
+		/**@private */
+		this._setting=null;
+		/**寻路网格。*/
+		this.grid=null;
+		PathFind.__super.call(this);
+	}
+
+	__class(PathFind,'laya.d3.component.PathFind',_super);
+	var __proto=PathFind.prototype;
+	/**
+	*@private
+	*初始化载入蒙皮动画组件。
+	*@param owner 所属精灵对象。
+	*/
+	__proto._onAdded=function(){
+		if (! (this.owner instanceof laya.d3.core.MeshTerrainSprite3D ))
+			throw new Error("PathFinding: The owner must MeshTerrainSprite3D!");
+		this._meshTerrainSprite3D=this.owner;
+	}
+
+	/**
+	*寻找路径。
+	*@param startX 开始X。
+	*@param startZ 开始Z。
+	*@param endX 结束X。
+	*@param endZ 结束Z。
+	*@return 路径。
+	*/
+	__proto.findPath=function(startX,startZ,endX,endZ){
+		var minX=this._meshTerrainSprite3D.minX;
+		var minZ=this._meshTerrainSprite3D.minZ;
+		var cellX=this._meshTerrainSprite3D.width / this.grid.width;
+		var cellZ=this._meshTerrainSprite3D.depth / this.grid.height;
+		var halfCellX=cellX / 2;
+		var halfCellZ=cellZ / 2;
+		var gridStartX=Math.floor((startX-minX)/ cellX);
+		var gridStartZ=Math.floor((startZ-minZ)/ cellZ);
+		var gridEndX=Math.floor((endX-minX)/ cellX);
+		var gridEndZ=Math.floor((endZ-minZ)/ cellZ);
+		var boundWidth=this.grid.width-1;
+		var boundHeight=this.grid.height-1;
+		(gridStartX > boundWidth)&& (gridStartX=boundWidth);
+		(gridStartZ > boundHeight)&& (gridStartZ=boundHeight);
+		(gridStartX < 0)&& (gridStartX=0);
+		(gridStartZ < 0)&& (gridStartZ=0);
+		(gridEndX > boundWidth)&& (gridEndX=boundWidth);
+		(gridEndZ > boundHeight)&& (gridEndZ=boundHeight);
+		(gridEndX < 0)&& (gridEndX=0);
+		(gridEndZ < 0)&& (gridEndZ=0);
+		var path=this._finder.findPath(gridStartX,gridStartZ,gridEndX,gridEndZ,this.grid);
+		this.grid.reset();
+		for (var i=1;i < path.length-1;i++){
+			var gridPos=path[i];
+			gridPos[0]=gridPos[0] *cellX+halfCellX+minX;
+			gridPos[1]=gridPos[1] *cellZ+halfCellZ+minZ;
+		}
+		if (path.length==1){
+			path[0][0]=endX;
+			path[0][1]=endX;
+			}else if (path.length > 1){
+			path[0][0]=startX;
+			path[0][1]=startZ;
+			path[path.length-1][0]=endX;
+			path[path.length-1][1]=endZ;
+		}
+		return path;
+	}
+
+	/**
+	*设置寻路设置。
+	*@param value 寻路设置。
+	*/
+	/**
+	*获取寻路设置。
+	*@return 寻路设置。
+	*/
+	__getset(0,__proto,'setting',function(){
+		return this._setting;
+		},function(value){
+		(value)&& (this._finder=new PathFinding.finders.AStarFinder(value));
+		this._setting=value;
+	});
+
+	return PathFind;
+})(Component)
+
+
+
+})(window,document,Laya);

ファイルの差分が大きいため隠しています
+ 9815 - 0
color3D_laya/bin/libs/laya.debugtool.js


ファイルの差分が大きいため隠しています
+ 1032 - 0
color3D_laya/bin/libs/laya.device.js


+ 458 - 0
color3D_laya/bin/libs/laya.effect.js

@@ -0,0 +1,458 @@
+
+(function(window,document,Laya){
+	var __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;
+
+	var BlurFilter=laya.filters.BlurFilter,ColorFilter=laya.filters.ColorFilter,ColorUtils=laya.utils.ColorUtils;
+	var Component=laya.components.Component,Ease=laya.utils.Ease,Event=laya.events.Event,GlowFilter=laya.filters.GlowFilter;
+	var Handler=laya.utils.Handler,Node=laya.display.Node,Sprite=laya.display.Sprite,Tween=laya.utils.Tween,Utils=laya.utils.Utils;
+/**
+*...
+*@author ww
+*/
+//class laya.effect.FilterSetterBase
+var FilterSetterBase=(function(){
+	function FilterSetterBase(){
+		this._filter=null;
+		this._target=null;
+	}
+
+	__class(FilterSetterBase,'laya.effect.FilterSetterBase');
+	var __proto=FilterSetterBase.prototype;
+	__proto.paramChanged=function(){
+		Laya.systemTimer.callLater(this,this.buildFilter);
+	}
+
+	__proto.buildFilter=function(){
+		if (this._target){
+			this.addFilter(this._target);
+		}
+	}
+
+	__proto.addFilter=function(sprite){
+		if (!sprite)return;
+		if (!sprite.filters){
+			sprite.filters=[this._filter];
+			}else{
+			var preFilters;
+			preFilters=sprite.filters;
+			if (preFilters.indexOf(this._filter)< 0){
+				preFilters.push(this._filter);
+				sprite.filters=Utils.copyArray([],preFilters);
+			}
+		}
+	}
+
+	__proto.removeFilter=function(sprite){
+		if (!sprite)return;
+		sprite.filters=null;
+	}
+
+	__getset(0,__proto,'target',null,function(value){
+		if (this._target !=value){
+			this._target=value;
+			this.paramChanged();
+		}
+	});
+
+	return FilterSetterBase;
+})()
+
+
+/**
+*@Script {name:ButtonEffect}
+*@author ww
+*/
+//class laya.effect.ButtonEffect
+var ButtonEffect=(function(){
+	function ButtonEffect(){
+		this._tar=null;
+		this._curState=0;
+		this._curTween=null;
+		/**
+		*effectScale
+		*@prop {name:effectScale,type:number,tips:"缩放值",default:"1.5"}
+		*/
+		this.effectScale=1.5;
+		/**
+		*tweenTime
+		*@prop {name:tweenTime,type:number,tips:"缓动时长",default:"300"}
+		*/
+		this.tweenTime=300;
+		/**
+		*effectEase
+		*@prop {name:effectEase,type:ease,tips:"效果缓动类型"}
+		*/
+		this.effectEase=null;
+		/**
+		*backEase
+		*@prop {name:backEase,type:ease,tips:"恢复缓动类型"}
+		*/
+		this.backEase=null;
+	}
+
+	__class(ButtonEffect,'laya.effect.ButtonEffect');
+	var __proto=ButtonEffect.prototype;
+	__proto.toChangedState=function(){
+		this._curState=1;
+		if (this._curTween)Tween.clear(this._curTween);
+		this._curTween=Tween.to(this._tar,{scaleX:this.effectScale,scaleY:this.effectScale },this.tweenTime,Ease[this.effectEase],Handler.create(this,this.tweenComplete));
+	}
+
+	__proto.toInitState=function(){
+		if (this._curState==2)return;
+		if (this._curTween)Tween.clear(this._curTween);
+		this._curState=2;
+		this._curTween=Tween.to(this._tar,{scaleX:1,scaleY:1 },this.tweenTime,Ease[this.backEase],Handler.create(this,this.tweenComplete));
+	}
+
+	__proto.tweenComplete=function(){
+		this._curState=0;
+		this._curTween=null;
+	}
+
+	/**
+	*设置控制对象
+	*@param tar
+	*/
+	__getset(0,__proto,'target',null,function(tar){
+		this._tar=tar;
+		tar.on(/*laya.events.Event.MOUSE_DOWN*/"mousedown",this,this.toChangedState);
+		tar.on(/*laya.events.Event.MOUSE_UP*/"mouseup",this,this.toInitState);
+		tar.on(/*laya.events.Event.MOUSE_OUT*/"mouseout",this,this.toInitState);
+	});
+
+	return ButtonEffect;
+})()
+
+
+/**
+*效果插件基类,基于对象池管理
+*/
+//class laya.effect.EffectBase extends laya.components.Component
+var EffectBase=(function(_super){
+	function EffectBase(){
+		/**动画持续时间,单位为毫秒*/
+		this.duration=1000;
+		/**动画延迟时间,单位为毫秒*/
+		this.delay=0;
+		/**重复次数,默认为播放一次*/
+		this.repeat=0;
+		/**缓动类型,如果为空,则默认为匀速播放*/
+		this.ease=null;
+		/**触发事件,如果为空,则创建时触发*/
+		this.eventName=null;
+		/**效用作用的目标对象,如果为空,则是脚本所在的节点本身*/
+		this.target=null;
+		/**效果结束后,是否自动移除节点*/
+		this.autoDestroyAtComplete=true;
+		this._comlete=null;
+		this._tween=null;
+		EffectBase.__super.call(this);
+	}
+
+	__class(EffectBase,'laya.effect.EffectBase',_super);
+	var __proto=EffectBase.prototype;
+	__proto._onAwake=function(){this.target=this.target|| this.owner;
+		if (this.autoDestroyAtComplete)this._comlete=Handler.create(this.target,this.target.destroy,null,false);
+		if (this.eventName)this.owner.on(this.eventName,this,this._exeTween);
+		else this._exeTween();
+	}
+
+	__proto._exeTween=function(){
+		this._tween=this._doTween();
+		this._tween.repeat=this.repeat;
+	}
+
+	__proto._doTween=function(){
+		return null;
+	}
+
+	__proto.onReset=function(){
+		this.duration=1000;
+		this.delay=0;
+		this.repeat=0;
+		this.ease=null;
+		this.target=null;
+		if (this.eventName){
+			this.owner.off(this.eventName,this,this._exeTween);
+			this.eventName=null;
+		}
+		if (this._comlete){
+			this._comlete.recover();
+			this._comlete=null;
+		}
+		if (this._tween){
+			this._tween.clear();
+			this._tween=null;
+		}
+	}
+
+	return EffectBase;
+})(Component)
+
+
+/**
+*...
+*@author ww
+*/
+//class laya.effect.ColorFilterSetter extends laya.effect.FilterSetterBase
+var ColorFilterSetter=(function(_super){
+	function ColorFilterSetter(){
+		/**
+		*brightness 亮度,范围:-100~100
+		*/
+		this._brightness=0;
+		/**
+		*contrast 对比度,范围:-100~100
+		*/
+		this._contrast=0;
+		/**
+		*saturation 饱和度,范围:-100~100
+		*/
+		this._saturation=0;
+		/**
+		*hue 色调,范围:-180~180
+		*/
+		this._hue=0;
+		/**
+		*red red增量,范围:0~255
+		*/
+		this._red=0;
+		/**
+		*green green增量,范围:0~255
+		*/
+		this._green=0;
+		/**
+		*blue blue增量,范围:0~255
+		*/
+		this._blue=0;
+		/**
+		*alpha alpha增量,范围:0~255
+		*/
+		this._alpha=0;
+		this._color=null;
+		ColorFilterSetter.__super.call(this);
+		this._filter=new ColorFilter();
+	}
+
+	__class(ColorFilterSetter,'laya.effect.ColorFilterSetter',_super);
+	var __proto=ColorFilterSetter.prototype;
+	__proto.buildFilter=function(){
+		this._filter.reset();
+		this._filter.color(this.red,this.green,this.blue,this.alpha);
+		this._filter.adjustHue(this.hue);
+		this._filter.adjustContrast(this.contrast);
+		this._filter.adjustBrightness(this.brightness);
+		this._filter.adjustSaturation(this.saturation);
+		_super.prototype.buildFilter.call(this);
+	}
+
+	__getset(0,__proto,'brightness',function(){
+		return this._brightness;
+		},function(value){
+		this._brightness=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'alpha',function(){
+		return this._alpha;
+		},function(value){
+		this._alpha=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'contrast',function(){
+		return this._contrast;
+		},function(value){
+		this._contrast=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'hue',function(){
+		return this._hue;
+		},function(value){
+		this._hue=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'saturation',function(){
+		return this._saturation;
+		},function(value){
+		this._saturation=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'green',function(){
+		return this._green;
+		},function(value){
+		this._green=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'red',function(){
+		return this._red;
+		},function(value){
+		this._red=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'blue',function(){
+		return this._blue;
+		},function(value){
+		this._blue=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'color',function(){
+		return this._color;
+		},function(value){
+		this._color=value;
+		var colorO;
+		colorO=ColorUtils.create(value);
+		this._red=colorO.arrColor[0] *255;
+		this._green=colorO.arrColor[1] *255;
+		this._blue=colorO.arrColor[2] *255;
+		this.paramChanged();
+	});
+
+	return ColorFilterSetter;
+})(FilterSetterBase)
+
+
+/**
+*...
+*@author ww
+*/
+//class laya.effect.GlowFilterSetter extends laya.effect.FilterSetterBase
+var GlowFilterSetter=(function(_super){
+	function GlowFilterSetter(){
+		/**
+		*滤镜的颜色
+		*/
+		this._color="#ff0000";
+		/**
+		*边缘模糊的大小 0~20
+		*/
+		this._blur=4;
+		/**
+		*X轴方向的偏移
+		*/
+		this._offX=6;
+		/**
+		*Y轴方向的偏移
+		*/
+		this._offY=6;
+		GlowFilterSetter.__super.call(this);
+		this._filter=new GlowFilter(this._color);
+	}
+
+	__class(GlowFilterSetter,'laya.effect.GlowFilterSetter',_super);
+	var __proto=GlowFilterSetter.prototype;
+	__proto.buildFilter=function(){
+		this._filter=new GlowFilter(this.color,this.blur,this.offX,this.offY);
+		_super.prototype.buildFilter.call(this);
+	}
+
+	__getset(0,__proto,'blur',function(){
+		return this._blur;
+		},function(value){
+		this._blur=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'color',function(){
+		return this._color;
+		},function(value){
+		this._color=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'offX',function(){
+		return this._offX;
+		},function(value){
+		this._offX=value;
+		this.paramChanged();
+	});
+
+	__getset(0,__proto,'offY',function(){
+		return this._offY;
+		},function(value){
+		this._offY=value;
+		this.paramChanged();
+	});
+
+	return GlowFilterSetter;
+})(FilterSetterBase)
+
+
+/**
+*...
+*@author ww
+*/
+//class laya.effect.BlurFilterSetter extends laya.effect.FilterSetterBase
+var BlurFilterSetter=(function(_super){
+	function BlurFilterSetter(){
+		this._strength=4;
+		BlurFilterSetter.__super.call(this);
+		this._filter=new BlurFilter(this.strength);
+	}
+
+	__class(BlurFilterSetter,'laya.effect.BlurFilterSetter',_super);
+	var __proto=BlurFilterSetter.prototype;
+	__proto.buildFilter=function(){
+		this._filter=new BlurFilter(this.strength);
+		_super.prototype.buildFilter.call(this);
+	}
+
+	__getset(0,__proto,'strength',function(){
+		return this._strength;
+		},function(value){
+		this._strength=value;
+	});
+
+	return BlurFilterSetter;
+})(FilterSetterBase)
+
+
+/**
+*淡出效果
+*/
+//class laya.effect.FadeOut extends laya.effect.EffectBase
+var FadeOut=(function(_super){
+	function FadeOut(){
+		FadeOut.__super.call(this);;
+	}
+
+	__class(FadeOut,'laya.effect.FadeOut',_super);
+	var __proto=FadeOut.prototype;
+	__proto._doTween=function(){
+		this.target.alpha=1;
+		return Tween.to(this.target,{alpha:0},this.duration,Ease[this.ease],this._comlete,this.delay);
+	}
+
+	return FadeOut;
+})(EffectBase)
+
+
+/**
+*淡入效果
+*/
+//class laya.effect.FadeIn extends laya.effect.EffectBase
+var FadeIn=(function(_super){
+	function FadeIn(){
+		FadeIn.__super.call(this);;
+	}
+
+	__class(FadeIn,'laya.effect.FadeIn',_super);
+	var __proto=FadeIn.prototype;
+	__proto._doTween=function(){
+		this.target.alpha=0;
+		return Tween.to(this.target,{alpha:1},this.duration,Ease[this.ease],this._comlete,this.delay);
+	}
+
+	return FadeIn;
+})(EffectBase)
+
+
+
+})(window,document,Laya);

ファイルの差分が大きいため隠しています
+ 1878 - 0
color3D_laya/bin/libs/laya.html.js


ファイルの差分が大きいため隠しています
+ 957 - 0
color3D_laya/bin/libs/laya.particle.js


ファイルの差分が大きいため隠しています
+ 2037 - 0
color3D_laya/bin/libs/laya.pathfinding.js


ファイルの差分が大きいため隠しています
+ 3656 - 0
color3D_laya/bin/libs/laya.physics.js


ファイルの差分が大きいため隠しています
+ 559 - 0
color3D_laya/bin/libs/laya.physics3D.js


ファイルの差分が大きいため隠しています
+ 379 - 0
color3D_laya/bin/libs/laya.physics3D.runtime.js


ファイルの差分が大きいため隠しています
+ 607 - 0
color3D_laya/bin/libs/laya.physics3D.wasm.js


BIN
color3D_laya/bin/libs/laya.physics3D.wasm.wasm


ファイルの差分が大きいため隠しています
+ 1938 - 0
color3D_laya/bin/libs/laya.quickgamemini.js


ファイルの差分が大きいため隠しています
+ 2150 - 0
color3D_laya/bin/libs/laya.tiledmap.js


ファイルの差分が大きいため隠しています
+ 11147 - 0
color3D_laya/bin/libs/laya.ui.js


ファイルの差分が大きいため隠しています
+ 1941 - 0
color3D_laya/bin/libs/laya.vvmini.js


ファイルの差分が大きいため隠しています
+ 1943 - 0
color3D_laya/bin/libs/laya.wxmini.js


ファイルの差分が大きいため隠しています
+ 1646 - 0
color3D_laya/bin/libs/laya.xmmini.js


ファイルの差分が大きいため隠しています
+ 12265 - 0
color3D_laya/bin/libs/oimo.js


ファイルの差分が大きいため隠しています
+ 1 - 0
color3D_laya/bin/libs/worker.js


+ 32 - 0
color3D_laya/bin/project.config.json

@@ -0,0 +1,32 @@
+{
+	"description": "项目配置文件。",
+	"setting": {
+		"urlCheck": false,
+		"es6": false,
+		"postcss": true,
+		"minified": false,
+		"newFeature": true
+	},
+	"compileType": "game",
+	"libVersion": "game",
+	"appid": "wx58b35c3cfc7bec95",
+	"projectname": "gunner",
+	"condition": {
+		"search": {
+			"current": -1,
+			"list": []
+		},
+		"conversation": {
+			"current": -1,
+			"list": []
+		},
+		"game": {
+			"currentL": -1,
+			"list": []
+		},
+		"miniprogram": {
+			"current": -1,
+			"list": []
+		}
+	}
+}

+ 1 - 0
color3D_laya/bin/project.swan.json

@@ -0,0 +1 @@
+{"appid":"15052700","libversion":"game","compileType":"game","setting":{"urlCheck":true},"libVersion":"1.13.29","condition":{"swan":{"current":-2,"list":[]}}}

BIN
color3D_laya/bin/res/LayaScene_main/Conventional/Library/unity default resources-Cube.lm


BIN
color3D_laya/bin/res/LayaScene_main/Conventional/Library/unity default resources-Plane.lm


+ 58 - 0
color3D_laya/bin/res/LayaScene_main/Conventional/Resources/unity_builtin_extra.lmat

@@ -0,0 +1,58 @@
+{
+	"version":"LAYAMATERIAL:02",
+	"props":{
+		"type":"Laya.BlinnPhongMaterial",
+		"name":"Default-Material",
+		"renderStates":[
+			{
+				"cull":2,
+				"blend":0,
+				"srcBlend":1,
+				"dstBlend":0,
+				"depthWrite":true,
+				"depthTest":515
+			}
+		],
+		"alphaTest":false,
+		"alphaTestValue":0.5,
+		"renderQueue":2000,
+		"metallic":0,
+		"smoothness":0.5,
+		"smoothnessTextureScale":1,
+		"smoothnessSource":0,
+		"normalTextureScale":1,
+		"parallaxTextureScale":0.02,
+		"occlusionTextureStrength":1,
+		"textures":[],
+		"vectors":[
+			{
+				"name":"tilingOffset",
+				"value":[
+					1,
+					1,
+					0,
+					0
+				]
+			},
+			{
+				"name":"albedoColor",
+				"value":[
+					1,
+					1,
+					1,
+					1
+				]
+			},
+			{
+				"name":"emissionColor",
+				"value":[
+					0,
+					0,
+					0,
+					0.9999999
+				]
+			}
+		],
+		"defines":[]
+	}
+}

+ 516 - 0
color3D_laya/bin/res/LayaScene_main/Conventional/main.ls

@@ -0,0 +1,516 @@
+{
+	"version":"LAYASCENE3D:01",
+	"data":{
+		"type":"Scene3D",
+		"props":{
+			"name":"main",
+			"ambientColor":[
+				0.212,
+				0.227,
+				0.259
+			],
+			"lightmaps":[],
+			"enableFog":false,
+			"fogStart":0,
+			"fogRange":300,
+			"fogColor":[
+				0.5,
+				0.5,
+				0.5
+			]
+		},
+		"child":[
+			{
+				"type":"Camera",
+				"props":{
+					"name":"Main Camera",
+					"active":true,
+					"isStatic":false,
+					"layer":0,
+					"position":[
+						0.6728234,
+						5.414077,
+						4.322034
+					],
+					"rotation":[
+						-0.3776969,
+						0.003056441,
+						0.001246811,
+						0.9259235
+					],
+					"scale":[
+						1,
+						1,
+						1
+					],
+					"clearFlag":1,
+					"orthographic":false,
+					"fieldOfView":60,
+					"nearPlane":0.3,
+					"farPlane":1000,
+					"viewport":[
+						0,
+						0,
+						1,
+						1
+					],
+					"clearColor":[
+						0.1921569,
+						0.3019608,
+						0.4745098,
+						0
+					]
+				},
+				"components":[],
+				"child":[]
+			},
+			{
+				"type":"DirectionLight",
+				"props":{
+					"name":"Directional Light",
+					"active":true,
+					"isStatic":false,
+					"layer":0,
+					"position":[
+						0,
+						3,
+						0
+					],
+					"rotation":[
+						0.1093816,
+						0.8754261,
+						0.4082179,
+						-0.2345697
+					],
+					"scale":[
+						1,
+						1,
+						1
+					],
+					"intensity":1,
+					"lightmapBakedType":0,
+					"color":[
+						1,
+						0.9568627,
+						0.8392157
+					]
+				},
+				"components":[],
+				"child":[]
+			},
+			{
+				"type":"MeshSprite3D",
+				"props":{
+					"name":"Panel",
+					"active":true,
+					"isStatic":false,
+					"layer":0,
+					"position":[
+						0,
+						-0.72,
+						0
+					],
+					"rotation":[
+						0,
+						0,
+						0,
+						-1
+					],
+					"scale":[
+						100,
+						0.1,
+						100
+					],
+					"meshPath":"Library/unity default resources-Cube.lm",
+					"enableRender":true,
+					"materials":[
+						{
+							"type":"Laya.BlinnPhongMaterial",
+							"path":"Resources/unity_builtin_extra.lmat"
+						}
+					]
+				},
+				"components":[],
+				"child":[]
+			},
+			{
+				"type":"MeshSprite3D",
+				"props":{
+					"name":"Cube1",
+					"active":true,
+					"isStatic":false,
+					"layer":0,
+					"position":[
+						3.67,
+						0,
+						0
+					],
+					"rotation":[
+						0,
+						0,
+						0,
+						-1
+					],
+					"scale":[
+						1,
+						1,
+						1
+					],
+					"meshPath":"Library/unity default resources-Cube.lm",
+					"enableRender":true,
+					"materials":[
+						{
+							"type":"Laya.BlinnPhongMaterial",
+							"path":"Resources/unity_builtin_extra.lmat"
+						}
+					]
+				},
+				"components":[],
+				"child":[]
+			},
+			{
+				"type":"Sprite3D",
+				"props":{
+					"name":"Move",
+					"active":true,
+					"isStatic":false,
+					"layer":0,
+					"position":[
+						0,
+						0,
+						0
+					],
+					"rotation":[
+						0,
+						0,
+						0,
+						-1
+					],
+					"scale":[
+						1,
+						1,
+						1
+					]
+				},
+				"components":[],
+				"child":[
+					{
+						"type":"MeshSprite3D",
+						"props":{
+							"name":"Cube (1)",
+							"active":true,
+							"isStatic":false,
+							"layer":0,
+							"position":[
+								-0.35,
+								0,
+								-2.65
+							],
+							"rotation":[
+								0,
+								0,
+								0,
+								-1
+							],
+							"scale":[
+								1,
+								1,
+								1
+							],
+							"meshPath":"Library/unity default resources-Cube.lm",
+							"enableRender":true,
+							"materials":[
+								{
+									"type":"Laya.BlinnPhongMaterial",
+									"path":"Resources/unity_builtin_extra.lmat"
+								}
+							]
+						},
+						"components":[],
+						"child":[]
+					},
+					{
+						"type":"MeshSprite3D",
+						"props":{
+							"name":"Cube (2)",
+							"active":true,
+							"isStatic":false,
+							"layer":0,
+							"position":[
+								2.03,
+								0,
+								-2.65
+							],
+							"rotation":[
+								0,
+								0,
+								0,
+								-1
+							],
+							"scale":[
+								1,
+								1,
+								1
+							],
+							"meshPath":"Library/unity default resources-Cube.lm",
+							"enableRender":true,
+							"materials":[
+								{
+									"type":"Laya.BlinnPhongMaterial",
+									"path":"Resources/unity_builtin_extra.lmat"
+								}
+							]
+						},
+						"components":[],
+						"child":[]
+					},
+					{
+						"type":"MeshSprite3D",
+						"props":{
+							"name":"Cube (3)",
+							"active":true,
+							"isStatic":false,
+							"layer":0,
+							"position":[
+								2.03,
+								0,
+								-7.31
+							],
+							"rotation":[
+								0,
+								0,
+								0,
+								-1
+							],
+							"scale":[
+								1,
+								1,
+								1
+							],
+							"meshPath":"Library/unity default resources-Cube.lm",
+							"enableRender":true,
+							"materials":[
+								{
+									"type":"Laya.BlinnPhongMaterial",
+									"path":"Resources/unity_builtin_extra.lmat"
+								}
+							]
+						},
+						"components":[],
+						"child":[]
+					},
+					{
+						"type":"MeshSprite3D",
+						"props":{
+							"name":"Cube (4)",
+							"active":true,
+							"isStatic":false,
+							"layer":0,
+							"position":[
+								0.2,
+								0,
+								-7.31
+							],
+							"rotation":[
+								0,
+								0,
+								0,
+								-1
+							],
+							"scale":[
+								1,
+								1,
+								1
+							],
+							"meshPath":"Library/unity default resources-Cube.lm",
+							"enableRender":true,
+							"materials":[
+								{
+									"type":"Laya.BlinnPhongMaterial",
+									"path":"Resources/unity_builtin_extra.lmat"
+								}
+							]
+						},
+						"components":[],
+						"child":[]
+					},
+					{
+						"type":"MeshSprite3D",
+						"props":{
+							"name":"Cube (5)",
+							"active":true,
+							"isStatic":false,
+							"layer":0,
+							"position":[
+								0.2,
+								1.4,
+								-2.65
+							],
+							"rotation":[
+								0,
+								0,
+								0,
+								-1
+							],
+							"scale":[
+								1,
+								1,
+								1
+							],
+							"meshPath":"Library/unity default resources-Cube.lm",
+							"enableRender":true,
+							"materials":[
+								{
+									"type":"Laya.BlinnPhongMaterial",
+									"path":"Resources/unity_builtin_extra.lmat"
+								}
+							]
+						},
+						"components":[],
+						"child":[]
+					},
+					{
+						"type":"MeshSprite3D",
+						"props":{
+							"name":"Cube (6)",
+							"active":true,
+							"isStatic":false,
+							"layer":0,
+							"position":[
+								1.69,
+								1.4,
+								-2.65
+							],
+							"rotation":[
+								0,
+								0,
+								0,
+								-1
+							],
+							"scale":[
+								1,
+								1,
+								1
+							],
+							"meshPath":"Library/unity default resources-Cube.lm",
+							"enableRender":true,
+							"materials":[
+								{
+									"type":"Laya.BlinnPhongMaterial",
+									"path":"Resources/unity_builtin_extra.lmat"
+								}
+							]
+						},
+						"components":[],
+						"child":[]
+					},
+					{
+						"type":"MeshSprite3D",
+						"props":{
+							"name":"Cube (7)",
+							"active":true,
+							"isStatic":false,
+							"layer":0,
+							"position":[
+								-1.5,
+								1.4,
+								-2.65
+							],
+							"rotation":[
+								0,
+								0,
+								0,
+								-1
+							],
+							"scale":[
+								1,
+								1,
+								1
+							],
+							"meshPath":"Library/unity default resources-Cube.lm",
+							"enableRender":true,
+							"materials":[
+								{
+									"type":"Laya.BlinnPhongMaterial",
+									"path":"Resources/unity_builtin_extra.lmat"
+								}
+							]
+						},
+						"components":[],
+						"child":[]
+					},
+					{
+						"type":"MeshSprite3D",
+						"props":{
+							"name":"Cube (8)",
+							"active":true,
+							"isStatic":false,
+							"layer":0,
+							"position":[
+								-1.5,
+								1.4,
+								-0.33
+							],
+							"rotation":[
+								0,
+								0,
+								0,
+								-1
+							],
+							"scale":[
+								1,
+								1,
+								1
+							],
+							"meshPath":"Library/unity default resources-Cube.lm",
+							"enableRender":true,
+							"materials":[
+								{
+									"type":"Laya.BlinnPhongMaterial",
+									"path":"Resources/unity_builtin_extra.lmat"
+								}
+							]
+						},
+						"components":[],
+						"child":[]
+					},
+					{
+						"type":"MeshSprite3D",
+						"props":{
+							"name":"Cube",
+							"active":true,
+							"isStatic":false,
+							"layer":0,
+							"position":[
+								-0.35,
+								0,
+								0
+							],
+							"rotation":[
+								0,
+								0,
+								0,
+								-1
+							],
+							"scale":[
+								1,
+								1,
+								1
+							],
+							"meshPath":"Library/unity default resources-Cube.lm",
+							"enableRender":true,
+							"materials":[
+								{
+									"type":"Laya.BlinnPhongMaterial",
+									"path":"Resources/unity_builtin_extra.lmat"
+								}
+							]
+						},
+						"components":[],
+						"child":[]
+					}
+				]
+			}
+		]
+	}
+}

+ 40 - 0
color3D_laya/bin/res/atlas/.rec

@@ -0,0 +1,40 @@
+D .
+D comp
+P 316AD948 btn_close.png
+P 5B258D17 button.png
+P 3C493DD4 check_circle.png
+P 98E54F0D checkbox.png
+P 6B7AB858 clip_num.png
+P 63A22FAC clip_tree_arrow.png
+P D749C312 clip_tree_folder.png
+P 704C5D70 combobox.png
+P D566AE8B fontClip.png
+P 38AB8F3F fontClip_num.png
+P 6EF336AE hscroll$bar.png
+P 7FF47AC5 hscroll$down.png
+P 3D7B147A hscroll$up.png
+P 750BD445 hscroll.png
+P 9A5EF899 hslider$bar.png
+P 9CED7132 hslider.png
+P BA2A0579 html.png
+P 8236CD48 image.png
+P 4ACB7AEF img_bg.png
+P FCD04607 img_bg2.png
+P 23FB4D29 img_bg3.png
+P 5FD17798 img_bg4.png
+P 2BE22124 img_bg5.png
+P BA28BD65 img_blank.png
+P BA2A0579 label.png
+P B017E53E progress$bar.png
+P C05839CD progress.png
+P 3C493DD4 radio.png
+P 3C493DD4 radiogroup.png
+P 5BA25C15 tab.png
+P A3D7A036 textarea.png
+P A3D7A036 textinput.png
+P 2DCE1DF9 vscroll$bar.png
+P 6FE7EA34 vscroll$down.png
+P 0587871F vscroll$up.png
+P 5FD17798 vscroll.png
+P DDDDFB9E vslider$bar.png
+P 01BAE7F5 vslider.png

ファイルの差分が大きいため隠しています
+ 1 - 0
color3D_laya/bin/res/atlas/comp.atlas


BIN
color3D_laya/bin/res/atlas/comp.png


ファイルの差分が大きいため隠しています
+ 3628 - 0
color3D_laya/bin/swan-game-adapter.js


+ 1 - 0
color3D_laya/bin/test/TestScene.json

@@ -0,0 +1 @@
+{"type":"Scene","props":{"width":640,"runtime":"script/GameUI.ts","positionVariance_0":100,"maxPartices":100,"height":1136},"compId":1,"loadList":[],"loadList3D":[]}

+ 1 - 0
color3D_laya/bin/unpack.json

@@ -0,0 +1 @@
+[]

+ 1 - 0
color3D_laya/bin/version.json

@@ -0,0 +1 @@
+{}

ファイルの差分が大きいため隠しています
+ 1662 - 0
color3D_laya/bin/weapp-adapter.js


+ 1 - 0
color3D_laya/color3d.laya

@@ -0,0 +1 @@
+{"proName":"gunner","engineType":0,"proType":1,"layaProType":301,"version":"2.0.0"}

+ 53 - 0
color3D_laya/laya/.laya

@@ -0,0 +1,53 @@
+<project version="2.0">
+   <asynRes>img,temp,sound                                    </asynRes>
+   <unDealRes>embed                                    </unDealRes>
+   <resTypes>png,jpg   </resTypes>
+   <resExportPath>bin/res/atlas   </resExportPath>
+   <asynResExportPath>bin   </asynResExportPath>
+   <codeExportPath>src/ui   </codeExportPath>
+   <codeImports><![CDATA[import laya.ui.*;]]>   </codeImports>
+   <codeImportsJS><![CDATA[var View=laya.ui.View;
+var Dialog=laya.ui.Dialog;]]>   </codeImportsJS>
+   <uiType>3   </uiType>
+   <uiExportPath>bin/ui.json   </uiExportPath>
+   <boxTypes>Sprite,Box,List,Tab,RadioGroup,ViewStack,Panel,HBox,VBox,Tree   </boxTypes>
+   <pageTypes>Scene,View,Dialog   </pageTypes>
+   <shareResPath/>
+   <codeType>1   </codeType>
+   <resCanCompress/>
+   <resPublishQuality>80                                    </resPublishQuality>
+   <langPath/>
+   <defaultFont/>
+   <codeImportsTS><![CDATA[import View=Laya.View;
+import Dialog=Laya.Dialog;
+import Scene=Laya.Scene;]]>   </codeImportsTS>
+   <textureWidth>2048   </textureWidth>
+   <textureHeight>2048   </textureHeight>
+   <picWidth>512   </picWidth>
+   <picHeight>512   </picHeight>
+   <power2>false   </power2>
+   <trimempty>true   </trimempty>
+   <startScene/>
+   <engineType>2D   </engineType>
+   <scaleMode>fixedwidth   </scaleMode>
+   <screenMode>none   </screenMode>
+   <alignV>middle   </alignV>
+   <alignH>center   </alignH>
+   <designWidth>720   </designWidth>
+   <designHeight>1280   </designHeight>
+   <codeViewExportPath>src/view   </codeViewExportPath>
+   <picType>0   </picType>
+   <atlasType>1   </atlasType>
+   <atlasScale/>
+   <debugMode>false   </debugMode>
+   <copyRes>true   </copyRes>
+   <dataCompact>true   </dataCompact>
+   <isRemoteProject>false   </isRemoteProject>
+   <idePath/>
+   <ver>2.0   </ver>
+   <stat>false   </stat>
+   <physicsDebug>false   </physicsDebug>
+   <toJsonScene>true   </toJsonScene>
+   <compressTexture>false   </compressTexture>
+   <libProjectPath/>
+</project>

BIN
color3D_laya/laya/assets/comp/btn_close.png


BIN
color3D_laya/laya/assets/comp/button.png


BIN
color3D_laya/laya/assets/comp/check_circle.png


BIN
color3D_laya/laya/assets/comp/checkbox.png


BIN
color3D_laya/laya/assets/comp/clip_num.png


BIN
color3D_laya/laya/assets/comp/clip_tree_arrow.png


BIN
color3D_laya/laya/assets/comp/clip_tree_folder.png


BIN
color3D_laya/laya/assets/comp/combobox.png


BIN
color3D_laya/laya/assets/comp/fontClip.png


BIN
color3D_laya/laya/assets/comp/fontClip_num.png


BIN
color3D_laya/laya/assets/comp/hscroll$bar.png


BIN
color3D_laya/laya/assets/comp/hscroll$down.png


BIN
color3D_laya/laya/assets/comp/hscroll$up.png


BIN
color3D_laya/laya/assets/comp/hscroll.png


BIN
color3D_laya/laya/assets/comp/hslider$bar.png


BIN
color3D_laya/laya/assets/comp/hslider.png


BIN
color3D_laya/laya/assets/comp/html.png


BIN
color3D_laya/laya/assets/comp/image.png


BIN
color3D_laya/laya/assets/comp/img_bg.png


BIN
color3D_laya/laya/assets/comp/img_bg2.png


BIN
color3D_laya/laya/assets/comp/img_bg3.png


BIN
color3D_laya/laya/assets/comp/img_bg4.png


BIN
color3D_laya/laya/assets/comp/img_bg5.png


BIN
color3D_laya/laya/assets/comp/img_blank.png


BIN
color3D_laya/laya/assets/comp/label.png


BIN
color3D_laya/laya/assets/comp/progress$bar.png


BIN
color3D_laya/laya/assets/comp/progress.png


BIN
color3D_laya/laya/assets/comp/radio.png


BIN
color3D_laya/laya/assets/comp/radiogroup.png


BIN
color3D_laya/laya/assets/comp/tab.png


BIN
color3D_laya/laya/assets/comp/textarea.png


BIN
color3D_laya/laya/assets/comp/textinput.png


BIN
color3D_laya/laya/assets/comp/vscroll$bar.png


BIN
color3D_laya/laya/assets/comp/vscroll$down.png


BIN
color3D_laya/laya/assets/comp/vscroll$up.png


BIN
color3D_laya/laya/assets/comp/vscroll.png


BIN
color3D_laya/laya/assets/comp/vslider$bar.png


BIN
color3D_laya/laya/assets/comp/vslider.png


+ 1 - 0
color3D_laya/laya/ignore.cfg

@@ -0,0 +1 @@
+{"src/Main.ts":true,"src/GameConfig.ts":true,"src/ui":true}

+ 3 - 0
color3D_laya/laya/pageStyles.xml

@@ -0,0 +1,3 @@
+<page>
+   <item name="test/TestScene.scene" props="" ifExport="分离模式" aName=""/>
+</page>

ファイルの差分が大きいため隠しています
+ 37463 - 0
color3D_laya/libs/LayaAir.d.ts


ファイルの差分が大きいため隠しています
+ 1505 - 0
color3D_laya/libs/fairygui.d.ts


+ 0 - 0
color3D_laya/libs/layaAir.minigame.d.ts


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません