[add] First

This commit is contained in:
2022-07-28 17:43:25 +08:00
parent 4804fc1005
commit 17b9af484e
149 changed files with 125806 additions and 5877 deletions

View File

@@ -0,0 +1,137 @@
{
"paths": {
"30aC+Hnw1PF4pEcoY3kUYb": [
"effects/builtin-2d-graphics",
"cc.EffectAsset"
],
"14TDKXr2NJ6LjvHPops74o": [
"effects/builtin-2d-gray-sprite",
"cc.EffectAsset"
],
"f1h0LXVtJOta5JLZ1xCzfI": [
"effects/builtin-2d-label",
"cc.EffectAsset"
],
"0ek66qC1NOQLjgYmi04HvX": [
"effects/builtin-2d-spine",
"cc.EffectAsset"
],
"28dPjdQWxEQIG3VVl1Qm6T": [
"effects/builtin-2d-sprite",
"cc.EffectAsset"
],
"82migssElAGb04Ws6NimQX": [
"effects/builtin-3d-particle",
"cc.EffectAsset"
],
"2afAA24LNP4YmYiaVLiivs": [
"effects/builtin-3d-trail",
"cc.EffectAsset"
],
"c0BAyVxX9JzZy8EjFrc9DU": [
"effects/builtin-clear-stencil",
"cc.EffectAsset"
],
"6dkeWRTOBGXICfYQ7JUBnG": [
"effects/builtin-unlit",
"cc.EffectAsset"
],
"6fgBCSDDdPMInvyNlggls2": [
"materials/builtin-2d-base",
"cc.Material"
],
"a1U5RdJRFMFL57BdJC9H1X": [
"materials/builtin-2d-graphics",
"cc.Material"
],
"3ae7efMv1CLq2ilvUY/tQi": [
"materials/builtin-2d-gray-sprite",
"cc.Material"
],
"e0LYfU5ZlNFoAB4UiRrGUG": [
"materials/builtin-2d-label",
"cc.Material"
],
"7a/QZLET9IDreTiBfRn2PD": [
"materials/builtin-2d-spine",
"cc.Material"
],
"ecpdLyjvZBwrvm+cedCcQy": [
"materials/builtin-2d-sprite",
"cc.Material"
],
"43L6CczwNM/6GGmCYEQIoH": [
"materials/builtin-3d-particle",
"cc.Material"
],
"46bU+b5fROqIXVPG6aZWWK": [
"materials/builtin-3d-trail",
"cc.Material"
],
"cffgu4qBxEqa150o1DmRAy": [
"materials/builtin-clear-stencil",
"cc.Material"
],
"2aKWBXJHxKHLvrBUi2yYZQ": [
"materials/builtin-unlit",
"cc.Material"
]
},
"uuids": [
"02delMVqdBD70a/HSD99FK",
"0ek66qC1NOQLjgYmi04HvX",
"14TDKXr2NJ6LjvHPops74o",
"28dPjdQWxEQIG3VVl1Qm6T",
"2aKWBXJHxKHLvrBUi2yYZQ",
"2afAA24LNP4YmYiaVLiivs",
"30aC+Hnw1PF4pEcoY3kUYb",
"3ae7efMv1CLq2ilvUY/tQi",
"43L6CczwNM/6GGmCYEQIoH",
"46bU+b5fROqIXVPG6aZWWK",
"60AwGqM1dKELCGhPAR+jK6",
"6dkeWRTOBGXICfYQ7JUBnG",
"6fgBCSDDdPMInvyNlggls2",
"7a/QZLET9IDreTiBfRn2PD",
"82migssElAGb04Ws6NimQX",
"a1U5RdJRFMFL57BdJC9H1X",
"c0BAyVxX9JzZy8EjFrc9DU",
"cffgu4qBxEqa150o1DmRAy",
"e0LYfU5ZlNFoAB4UiRrGUG",
"ecpdLyjvZBwrvm+cedCcQy",
"f1h0LXVtJOta5JLZ1xCzfI"
],
"scenes": {},
"redirect": [],
"deps": [],
"packs": {
"0b6c4470e": [
"02delMVqdBD70a/HSD99FK",
"0ek66qC1NOQLjgYmi04HvX",
"14TDKXr2NJ6LjvHPops74o",
"28dPjdQWxEQIG3VVl1Qm6T",
"2aKWBXJHxKHLvrBUi2yYZQ",
"2afAA24LNP4YmYiaVLiivs",
"30aC+Hnw1PF4pEcoY3kUYb",
"3ae7efMv1CLq2ilvUY/tQi",
"43L6CczwNM/6GGmCYEQIoH",
"46bU+b5fROqIXVPG6aZWWK",
"60AwGqM1dKELCGhPAR+jK6",
"6dkeWRTOBGXICfYQ7JUBnG",
"6fgBCSDDdPMInvyNlggls2",
"7a/QZLET9IDreTiBfRn2PD",
"82migssElAGb04Ws6NimQX",
"a1U5RdJRFMFL57BdJC9H1X",
"c0BAyVxX9JzZy8EjFrc9DU",
"cffgu4qBxEqa150o1DmRAy",
"e0LYfU5ZlNFoAB4UiRrGUG",
"ecpdLyjvZBwrvm+cedCcQy",
"f1h0LXVtJOta5JLZ1xCzfI"
]
},
"name": "internal",
"importBase": "import",
"nativeBase": "native",
"debug": true,
"isZip": false,
"encrypted": false
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,28 @@
(function e(t, n, r) {
function s(o, u) {
if (!n[o]) {
if (!t[o]) {
var b = o.split("/");
b = b[b.length - 1];
if (!t[b]) {
var a = "function" == typeof __require && __require;
if (!u && a) return a(b, !0);
if (i) return i(b, !0);
throw new Error("Cannot find module '" + o + "'");
}
o = b;
}
var f = n[o] = {
exports: {}
};
t[o][0].call(f.exports, function(e) {
var n = t[o][1][e];
return s(n || e);
}, f, f.exports, e, t, n, r);
}
return n[o].exports;
}
var i = "function" == typeof __require && __require;
for (var o = 0; o < r.length; o++) s(r[o]);
return s;
})({}, {}, []);

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -0,0 +1,32 @@
{
"paths": {},
"uuids": [
"2dL3kvpAxJu6GJ7RdqJG5J",
"31vIlawANFZqnzLlSuHBfc",
"41D7kWhyFGY7q4NDlzkazn",
"6aoKpq6+5BVaCIpoemqt7E",
"a8Anh32NZGRZegUtSgEj26"
],
"scenes": {
"db://assets/Scene/helloworld.fire": "2dL3kvpAxJu6GJ7RdqJG5J"
},
"redirect": [],
"deps": [],
"packs": {
"05dd1dc0e": [
"2dL3kvpAxJu6GJ7RdqJG5J",
"31vIlawANFZqnzLlSuHBfc",
"41D7kWhyFGY7q4NDlzkazn"
],
"0cfd22b7a": [
"6aoKpq6+5BVaCIpoemqt7E",
"a8Anh32NZGRZegUtSgEj26"
]
},
"name": "main",
"importBase": "import",
"nativeBase": "native",
"debug": true,
"isZip": false,
"encrypted": false
}

View File

@@ -0,0 +1,546 @@
[
1,
[
"41D7kWhyFGY7q4NDlzkazn",
"31vIlawANFZqnzLlSuHBfc",
"6aoKpq6+5BVaCIpoemqt7E",
"a8Anh32NZGRZegUtSgEj26"
],
[
"node",
"_spriteFrame",
"_textureSetter",
"label",
"scene",
"_parent"
],
[
[
"cc.Node",
[
"_name",
"_id",
"_components",
"_contentSize",
"_color",
"_trs",
"_parent",
"_children"
],
1,
9,
5,
5,
7,
1,
2
],
"cc.SpriteFrame",
[
"cc.Widget",
[
"_alignFlags",
"_originalWidth",
"_originalHeight",
"_wasAlignOnce",
"node"
],
-1,
1
],
[
"cc.Sprite",
[
"_type",
"_sizeMode",
"node",
"_spriteFrame"
],
1,
1,
6
],
[
"cc.SceneAsset",
[
"_name",
"asyncLoadAssets"
],
1
],
[
"cc.Node",
[
"_name",
"_parent",
"_components",
"_contentSize",
"_trs"
],
2,
1,
2,
5,
7
],
[
"cc.Canvas",
[
"node"
],
3,
1
],
[
"e1b90/rohdEk4SdmmEZANaD",
[
"node",
"label"
],
3,
1,
1
],
[
"cc.Scene",
[
"_name",
"_children",
"_anchorPoint",
"_trs"
],
2,
2,
5,
7
],
[
"cc.Label",
[
"_string",
"_fontSize",
"_lineHeight",
"_N$horizontalAlign",
"_N$verticalAlign",
"node"
],
-2,
1
]
],
[
[
4,
0,
1,
3
],
[
0,
0,
1,
7,
2,
4,
3,
5,
3
],
[
0,
0,
6,
2,
4,
3,
2
],
[
0,
0,
6,
2,
3,
5,
2
],
[
5,
0,
1,
2,
3,
4,
2
],
[
6,
0,
1
],
[
7,
0,
1,
1
],
[
2,
0,
4,
2
],
[
2,
0,
1,
2,
3,
4,
5
],
[
3,
0,
1,
2,
3,
3
],
[
3,
2,
3,
1
],
[
8,
0,
1,
2,
3,
2
],
[
9,
0,
1,
2,
3,
4,
5,
6
]
],
[
[
[
[
0,
"helloworld",
null
],
[
1,
"Canvas",
"a286bbGknJLZpRpxROV6M94",
[
-5,
-6,
-7
],
[
[
5,
-1
],
[
6,
-3,
-2
],
[
7,
45,
-4
]
],
[
4,
4294769916
],
[
5,
960,
640
],
[
480,
320,
0,
0,
0,
0,
1,
1,
1,
1
]
],
[
2,
"background",
1,
[
[
8,
45,
200,
150,
{},
-8
],
[
9,
1,
0,
-9,
0
]
],
[
4,
4281214491
],
[
5,
960,
640
]
],
[
11,
"New Node",
[
1
],
[
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
],
[
3,
"cocos",
1,
[
[
10,
-10,
1
]
],
[
5,
195,
270
],
[
0,
50,
0,
0,
0,
0,
1,
1,
1,
1
]
],
[
4,
"label",
1,
[
-11
],
[
5,
342.33,
60
],
[
0,
-180,
0,
0,
0,
0,
1,
1,
1,
1
]
],
[
12,
"Hello, World!",
60,
60,
1,
1,
5
]
],
0,
[
0,
0,
1,
0,
3,
6,
0,
0,
1,
0,
0,
1,
0,
-1,
2,
0,
-2,
4,
0,
-3,
5,
0,
0,
2,
0,
0,
2,
0,
0,
4,
0,
-1,
6,
0,
4,
3,
1,
5,
3,
11
],
[
0,
0
],
[
1,
1
],
[
0,
1
]
],
[
[
{
"name": "HelloWorld",
"rect": [
0,
0,
195,
270
],
"offset": [
0,
0
],
"originalSize": [
195,
270
],
"capInsets": [
0,
0,
0,
0
]
}
],
[
1
],
0,
[
0
],
[
2
],
[
2
]
],
[
[
{
"name": "singleColor",
"rect": [
0,
0,
2,
2
],
"offset": [
0,
0
],
"originalSize": [
2,
2
],
"capInsets": [
0,
0,
0,
0
]
}
],
[
1
],
0,
[
0
],
[
2
],
[
3
]
]
]
]

View File

@@ -0,0 +1,4 @@
{
"type": "cc.Texture2D",
"data": "0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"
}

View File

@@ -0,0 +1,80 @@
window.__require = function e(t, n, r) {
function s(o, u) {
if (!n[o]) {
if (!t[o]) {
var b = o.split("/");
b = b[b.length - 1];
if (!t[b]) {
var a = "function" == typeof __require && __require;
if (!u && a) return a(b, !0);
if (i) return i(b, !0);
throw new Error("Cannot find module '" + o + "'");
}
o = b;
}
var f = n[o] = {
exports: {}
};
t[o][0].call(f.exports, function(e) {
var n = t[o][1][e];
return s(n || e);
}, f, f.exports, e, t, n, r);
}
return n[o].exports;
}
var i = "function" == typeof __require && __require;
for (var o = 0; o < r.length; o++) s(r[o]);
return s;
}({
Helloworld: [ function(require, module, exports) {
"use strict";
cc._RF.push(module, "e1b90/rohdEk4SdmmEZANaD", "Helloworld");
"use strict";
var __extends = this && this.__extends || function() {
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(d, b) {
d.__proto__ = b;
} || function(d, b) {
for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
};
return extendStatics(d, b);
};
return function(d, b) {
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
};
}();
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var Helloworld = function(_super) {
__extends(Helloworld, _super);
function Helloworld() {
var _this = null !== _super && _super.apply(this, arguments) || this;
_this.label = null;
_this.text = "hello";
return _this;
}
Helloworld.prototype.start = function() {
this.label.string = this.text;
};
__decorate([ property(cc.Label) ], Helloworld.prototype, "label", void 0);
__decorate([ property ], Helloworld.prototype, "text", void 0);
Helloworld = __decorate([ ccclass ], Helloworld);
return Helloworld;
}(cc.Component);
exports.default = Helloworld;
cc._RF.pop();
}, {} ]
}, {}, [ "Helloworld" ]);

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cocos Creator | hello_world</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta name="viewport"
content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1"/>
<!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="format-detection" content="telephone=no">
<!-- force webkit on 360 -->
<meta name="renderer" content="webkit"/>
<meta name="force-rendering" content="webkit"/>
<!-- force edge on IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="msapplication-tap-highlight" content="no">
<!-- force full screen on some browser -->
<meta name="full-screen" content="yes"/>
<meta name="x5-fullscreen" content="true"/>
<meta name="360-fullscreen" content="true"/>
<!-- force screen orientation on some browser -->
<meta name="screen-orientation" content=""/>
<meta name="x5-orientation" content="">
<!--fix fireball/issues/3568 -->
<!--<meta name="browsermode" content="application">-->
<meta name="x5-page-mode" content="app">
<!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<link rel="stylesheet" type="text/css" href="style-mobile.css"/>
<link rel="icon" href="favicon.ico"/>
</head>
<body>
<canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
<div id="splash">
<div class="progress-bar stripes">
<span style="width: 0%"></span>
</div>
</div>
<script src="src/settings.js" charset="utf-8"></script>
<script src="main.js" charset="utf-8"></script>
<script type="text/javascript">
(function () {
// open web debugger console
if (typeof VConsole !== 'undefined') {
window.vConsole = new VConsole();
}
var debug = window._CCSettings.debug;
var splash = document.getElementById('splash');
splash.style.display = 'block';
function loadScript (moduleName, cb) {
function scriptLoaded () {
document.body.removeChild(domScript);
domScript.removeEventListener('load', scriptLoaded, false);
cb && cb();
};
var domScript = document.createElement('script');
domScript.async = true;
domScript.src = moduleName;
domScript.addEventListener('load', scriptLoaded, false);
document.body.appendChild(domScript);
}
loadScript(debug ? 'cocos2d-js.js' : 'cocos2d-js-min.js', function () {
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
loadScript(debug ? 'physics.js' : 'physics-min.js', window.boot);
}
else {
window.boot();
}
});
})();
</script>
</body>
</html>

View File

@@ -0,0 +1,144 @@
window.boot = function () {
var settings = window._CCSettings;
window._CCSettings = undefined;
var onProgress = null;
var RESOURCES = cc.AssetManager.BuiltinBundleName.RESOURCES;
var INTERNAL = cc.AssetManager.BuiltinBundleName.INTERNAL;
var MAIN = cc.AssetManager.BuiltinBundleName.MAIN;
function setLoadingDisplay () {
// Loading splash scene
var splash = document.getElementById('splash');
var progressBar = splash.querySelector('.progress-bar span');
onProgress = function (finish, total) {
var percent = 100 * finish / total;
if (progressBar) {
progressBar.style.width = percent.toFixed(2) + '%';
}
};
splash.style.display = 'block';
progressBar.style.width = '0%';
cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, function () {
splash.style.display = 'none';
});
}
var onStart = function () {
cc.view.enableRetina(true);
cc.view.resizeWithBrowserSize(true);
if (cc.sys.isBrowser) {
setLoadingDisplay();
}
if (cc.sys.isMobile) {
if (settings.orientation === 'landscape') {
cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
}
else if (settings.orientation === 'portrait') {
cc.view.setOrientation(cc.macro.ORIENTATION_PORTRAIT);
}
cc.view.enableAutoFullScreen([
cc.sys.BROWSER_TYPE_BAIDU,
cc.sys.BROWSER_TYPE_BAIDU_APP,
cc.sys.BROWSER_TYPE_WECHAT,
cc.sys.BROWSER_TYPE_MOBILE_QQ,
cc.sys.BROWSER_TYPE_MIUI,
cc.sys.BROWSER_TYPE_HUAWEI,
cc.sys.BROWSER_TYPE_UC,
].indexOf(cc.sys.browserType) < 0);
}
// Limit downloading max concurrent task to 2,
// more tasks simultaneously may cause performance draw back on some android system / browsers.
// You can adjust the number based on your own test result, you have to set it before any loading process to take effect.
if (cc.sys.isBrowser && cc.sys.os === cc.sys.OS_ANDROID) {
cc.assetManager.downloader.maxConcurrency = 2;
cc.assetManager.downloader.maxRequestsPerFrame = 2;
}
var launchScene = settings.launchScene;
var bundle = cc.assetManager.bundles.find(function (b) {
return b.getSceneInfo(launchScene);
});
bundle.loadScene(launchScene, null, onProgress,
function (err, scene) {
if (!err) {
cc.director.runSceneImmediate(scene);
if (cc.sys.isBrowser) {
// show canvas
var canvas = document.getElementById('GameCanvas');
canvas.style.visibility = '';
var div = document.getElementById('GameDiv');
if (div) {
div.style.backgroundImage = '';
}
console.log('Success to load scene: ' + launchScene);
}
}
}
);
};
var option = {
id: 'GameCanvas',
debugMode: settings.debug ? cc.debug.DebugMode.INFO : cc.debug.DebugMode.ERROR,
showFPS: settings.debug,
frameRate: 60,
groupList: settings.groupList,
collisionMatrix: settings.collisionMatrix,
};
cc.assetManager.init({
bundleVers: settings.bundleVers,
remoteBundles: settings.remoteBundles,
server: settings.server
});
var bundleRoot = [INTERNAL];
settings.hasResourcesBundle && bundleRoot.push(RESOURCES);
var count = 0;
function cb (err) {
if (err) return console.error(err.message, err.stack);
count++;
if (count === bundleRoot.length + 1) {
cc.assetManager.loadBundle(MAIN, function (err) {
if (!err) cc.game.run(option, onStart);
});
}
}
cc.assetManager.loadScript(settings.jsList.map(function (x) { return 'src/' + x;}), cb);
for (var i = 0; i < bundleRoot.length; i++) {
cc.assetManager.loadBundle(bundleRoot[i], cb);
}
};
if (window.jsb) {
var isRuntime = (typeof loadRuntime === 'function');
if (isRuntime) {
require('src/settings.js');
require('src/cocos2d-runtime.js');
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
require('src/physics.js');
}
require('jsb-adapter/engine/index.js');
}
else {
require('src/settings.js');
require('src/cocos2d-jsb.js');
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
require('src/physics.js');
}
require('jsb-adapter/jsb-engine.js');
}
cc.macro.CLEANUP_IMAGE_CACHE = true;
window.boot();
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,19 @@
window._CCSettings = {
platform: "web-mobile",
groupList: [
"default"
],
collisionMatrix: [
[
true
]
],
hasResourcesBundle: false,
hasStartSceneBundle: false,
remoteBundles: [],
subpackages: [],
launchScene: "db://assets/Scene/helloworld.fire",
orientation: "",
debug: true,
jsList: []
};

View File

@@ -0,0 +1,116 @@
body {
cursor: default;
padding: 0;
border: 0;
margin: 0;
text-align: center;
background-color: white;
font-family: Helvetica, Verdana, Arial, sans-serif;
}
body, canvas, div {
outline: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-khtml-user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
/* display: none; <- Crashes Chrome on hover */
-webkit-appearance: none;
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}
#Cocos2dGameContainer {
position: absolute;
margin: 0;
overflow: hidden;
left: 0px;
top: 0px;
}
canvas {
background-color: rgba(0, 0, 0, 0);
}
a:link, a:visited {
color: #000;
}
a:active, a:hover {
color: #666;
}
p.header {
font-size: small;
}
p.footer {
font-size: x-small;
}
#splash {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #171717 url(./splash.png) no-repeat center;
background-size: 350px;
}
.progress-bar {
background-color: #1a1a1a;
position: absolute;
left: 50%;
top: 80%;
height: 5px;
width: 300px;
margin: 0 -150px;
border-radius: 5px;
box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
}
.progress-bar span {
display: block;
height: 100%;
border-radius: 5px;
box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
transition: width .4s ease-in-out;
background-color: #3dc5de;
}
.stripes span {
background-size: 30px 30px;
background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
animation: animate-stripes 1s linear infinite;
}
@keyframes animate-stripes {
0% {background-position: 0 0;} 100% {background-position: 60px 0;}
}
h1 {
color: #444;
text-shadow: 3px 3px 15px;
}
#GameDiv {
width: 800px;
height: 450px;
margin: 0 auto;
background: black;
position: relative;
border: 3px solid black;
border-radius: 6px;
box-shadow: 0 5px 40px #333
}

View File

@@ -0,0 +1,124 @@
html {
-ms-touch-action: none;
}
body, canvas, div {
display: block;
outline: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-khtml-user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
/* display: none; <- Crashes Chrome on hover */
-webkit-appearance: none;
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}
body {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 0;
border: 0;
margin: 0;
cursor: default;
color: #888;
background-color: #333;
text-align: center;
font-family: Helvetica, Verdana, Arial, sans-serif;
display: flex;
flex-direction: column;
/* fix bug: https://github.com/cocos-creator/2d-tasks/issues/791 */
/* overflow cannot be applied in Cocos2dGameContainer,
otherwise child elements will be hidden when Cocos2dGameContainer rotated 90 deg */
overflow: hidden;
}
#Cocos2dGameContainer {
position: absolute;
margin: 0;
left: 0px;
top: 0px;
display: -webkit-box;
-webkit-box-orient: horizontal;
-webkit-box-align: center;
-webkit-box-pack: center;
}
canvas {
background-color: rgba(0, 0, 0, 0);
}
a:link, a:visited {
color: #666;
}
a:active, a:hover {
color: #666;
}
p.header {
font-size: small;
}
p.footer {
font-size: x-small;
}
#splash {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #171717 url(./splash.png) no-repeat center;
background-size: 45%;
}
.progress-bar {
position: absolute;
left: 27.5%;
top: 80%;
height: 3px;
padding: 2px;
width: 45%;
border-radius: 7px;
box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
}
.progress-bar span {
display: block;
height: 100%;
border-radius: 3px;
transition: width .4s ease-in-out;
background-color: #3dc5de;
}
.stripes span {
background-size: 30px 30px;
background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
animation: animate-stripes 1s linear infinite;
}
@keyframes animate-stripes {
0% {background-position: 0 0;} 100% {background-position: 60px 0;}
}