海盗传说^^

欢迎来到程序小院

海盗传说

玩法:海盗版俄罗斯方块,上键 ↑变换、 左键 ← 左移、右键 → 右移、下键 ↓ 加速,
快去玩海盗版俄罗斯方块吧^^。

开始游戏icon-default.png?t=N7T8https://www.ormcc.com/play/gameStart/240

html

 <canvas id="canvas" moz-opaque></canvas>

css

#canvas {position: absolute;left: 0;right: 0;top: 0;margin: auto;
}
#rotate-prompt {position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: #000;opacity: 0.9;visibility: hidden;z-index: 2541;text-align:center;
}
#prompt-icon {font-size: 24pt;position: relative;top: 50%;
}

js

(function (g) {Number.prototype.map = function (i, j, h, k) {return h + (k - h) * ((this - i) / (j - i))};Number.prototype.limit = function (i, h) {return Math.min(h, Math.max(i, this))};Number.prototype.round = function (h) {h = Math.pow(10, h || 0);return Math.round(this * h) / h};Number.prototype.floor = function () {return Math.floor(this)};Number.prototype.ceil = function () {return Math.ceil(this)};Number.prototype.toInt = function () {return (this | 0)};Number.prototype.toRad = function () {return (this / 180) * Math.PI};Number.prototype.toDeg = function () {return (this * 180) / Math.PI};Array.prototype.erase = function (j) {for (var h = this.length; h--;) {if (this[h] === j) {this.splice(h, 1)}}return this};Array.prototype.random = function () {return this[Math.floor(Math.random() * this.length)]};Function.prototype.bind = Function.prototype.bind || function (h) {if (typeof this !== "function") {throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable")}var l = Array.prototype.slice.call(arguments, 1),k = this,i = function () {},j = function () {return k.apply((this instanceof i && h ? this : h), l.concat(Array.prototype.slice.call(arguments)))};i.prototype = this.prototype;j.prototype = new i();return j};g.ig = {game: null,debug: null,version: "1.23",global: g,modules: {},resources: [],ready: false,baked: false,nocache: "",ua: {},prefix: (g.ImpactPrefix || ""),lib: "lib/",_current: null,_loadQueue: [],_waitForOnload: 0,$: function (h) {return h.charAt(0) == "#" ? document.getElementById(h.substr(1)) : document.getElementsByTagName(h)},$new: function (h) {return document.createElement(h)},copy: function (j) {if (!j || typeof (j) != "object" || j instanceof HTMLElement || j instanceof ig.Class) {return j} else {if (j instanceof Array) {var m = [];for (var k = 0, h = j.length; k < h; k++) {m[k] = ig.copy(j[k])}return m} else {var m = {};for (var k in j) {m[k] = ig.copy(j[k])}return m}}},merge: function (j, h) {for (var i in h) {var k = h[i];if (typeof (k) != "object" || k instanceof HTMLElement || k instanceof ig.Class || k === null) {j[i] = k} else {if (!j[i] || typeof (j[i]) != "object") {j[i] = (k instanceof Array) ? [] : {}}ig.merge(j[i], k)}}return j},ksort: function (l) {if (!l || typeof (l) != "object") {return []}var k = [],h = [];for (var j in l) {k.push(j)}k.sort();for (var j = 0; j < k.length; j++) {h.push(l[k[j]])}return h},setVendorAttribute: function (j, h, k) {var i = h.charAt(0).toUpperCase() + h.substr(1);j[h] = j["ms" + i] = j["moz" + i] = j["webkit" + i] = j["o" + i] = k},getVendorAttribute: function (j, h) {var i = h.charAt(0).toUpperCase() + h.substr(1);return j[h] || j["ms" + i] || j["moz" + i] || j["webkit" + i] || j["o" + i]},normalizeVendorAttribute: function (j, h) {var i = ig.getVendorAttribute(j, h);if (!j[h] && i) {j[h] = i}},getImagePixels: function (j, n, m, h, p) {var i = ig.$new("canvas");i.width = j.width;i.height = j.height;var q = i.getContext("2d");ig.System.SCALE.CRISP(i, q);var l = ig.getVendorAttribute(q, "backingStorePixelRatio") || 1;ig.normalizeVendorAttribute(q, "getImageDataHD");var o = j.width / l,k = j.height / l;i.width = Math.ceil(o);i.height = Math.ceil(k);q.drawImage(j, 0, 0, o, k);return (l === 1) ? q.getImageData(n, m, h, p) : q.getImageDataHD(n, m, h, p)},module: function (h) {if (ig._current) {throw ("Module '" + ig._current.name + "' defines nothing")}if (ig.modules[h] && ig.modules[h].body) {throw ("Module '" + h + "' is already defined")}ig._current = {name: h,requires: [],loaded: false,body: null};ig.modules[h] = ig._current;ig._loadQueue.push(ig._current);return ig},requires: function () {ig._current.requires = Array.prototype.slice.call(arguments);return ig},defines: function (h) {ig._current.body = h;ig._current = null;ig._initDOMReady()},addResource: function (h) {ig.resources.push(h)},setNocache: function (h) {ig.nocache = h ? "?" + Date.now() : ""},log: function () {},assert: function (i, h) {},show: function (h, i) {},mark: function (i, h) {},_loadScript: function (j, i) {ig.modules[j] = {name: j,requires: [],loaded: false,body: null};ig._waitForOnload++;var k = ig.prefix + ig.lib + j.replace(/\./g, "/") + ".js" + ig.nocache;var h = ig.$new("script");h.type = "text/javascript";h.src = k;h.onload = function () {ig._waitForOnload--;ig._execModules()};h.onerror = function () {throw ("Failed to load module " + j + " at " + k + " required from " + i)};ig.$("head")[0].appendChild(h)},_execModules: function () {var k = false;for (var p = 0; p < ig._loadQueue.length; p++) {var n = ig._loadQueue[p];var h = true;for (var o = 0; o < n.requires.length; o++) {var l = n.requires[o];if (!ig.modules[l]) {h = false;ig._loadScript(l, n.name)} else {if (!ig.modules[l].loaded) {h = false}}}if (h && n.body) {ig._loadQueue.splice(p, 1);n.loaded = true;n.body();k = true;p--}}if (k) {ig._execModules()} else {if (!ig.baked && ig._waitForOnload == 0 && ig._loadQueue.length != 0) {var q = [];for (var p = 0; p < ig._loadQueue.length; p++) {var s = [];var r = ig._loadQueue[p].requires;for (var o = 0; o < r.length; o++) {var n = ig.modules[r[o]];if (!n || !n.loaded) {s.push(r[o])}}q.push(ig._loadQueue[p].name + " (requires: " + s.join(", ") + ")")}throw ("Unresolved (or circular?) dependencies. Most likely there's a name/path mismatch for one of the listed modules or a previous syntax error prevents a module from loading:\n" + q.join("\n"))}}}

源码

需要源码请关注添加好友哦^ ^

转载:欢迎来到本站,转载请注明文章出处https://ormcc.com/

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

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

SESV:通过预测和纠错实现精确的医学图像分割

SESV: Accurate Medical Image Segmentation by Predicting and Correcting Errors SESV&#xff1a;通过预测和纠错实现精确的医学图像分割背景贡献实验方法Thinking SESV&#xff1a;通过预测和纠错实现精确的医学图像分割 286 IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. …

vue3中使用echarts:tooltip的trigger为axis tooltip不显示问题

vue3中使用echarts时&#xff0c;tooltip的trigger设置为axis时formatter不触发 tooltip: {trigger: "axis",formatter: function (params) {console.log("params", params);},axisPointer: {type: "shadow", // 阴影指示器}, },解决办法&#…

配置文件的创建和部署

配置描述文件&#xff08;Configuration Profiles&#xff09;的格式为xml&#xff0c;其提供了一个非常容易的方式去给电脑、移动设备或用户定义一些设置或限制&#xff0c;你可以使用Jamf Pro去创建这样的配置文件。 &#xff08;配置文件的负载&#xff09; 有关配置文件的配…

【HarmonyOS开发】ArkUI-X 跨平台框架(使用ArkTs开发AndroidIOS)

ArkUI-X 跨平台框架进一步将 ArkUI 开发框架扩展到了多个OS平台&#xff0c;目前支持OpenHarmony、HarmonyOS、Android、 iOS&#xff0c;后续会逐步增加更多平台支持。开发者基于一套主代码&#xff0c;就可以构建支持多平台的精美、高性能应用。 一、跨平台框架有哪些? 1、…

Mendix 创客访谈录|太迅的闪电侠如何发动闪电战

本期创客 房杰 上海太迅自动识别技术有限公司 移动开发经理 大家好&#xff0c;我叫房杰&#xff0c;软件工程专业毕业&#xff0c;目前任职于上海太迅自动识别技术有限公司&#xff0c;任职的部门是软件事业部&#xff0c;担任移动开发经理。 上海太迅是一家专注于自动识…

HAL库之硬件SPI配置

一、设置RCC时钟(复位和时钟控制&#xff09; 设置高速外部时钟HSE 选择外部晶振 Disable&#xff1a;内部时钟BYPASS Clock Source&#xff1a;外部旁路时钟源&#xff0c;指无需使用外部晶体时所需的芯片内部时钟驱动组件&#xff08;%外部晶振起振需要内部有时钟驱动组件&a…

玩转Mysql 三(权限管理)

一、用户管理 1、登录MySQL服务器 语法示例&#xff1a; mysql –h hostname|hostIP –P port –u username –p DatabaseName –e "SQL语句" 详细命令中参数说明&#xff1a; -h参数 后面接主机名或者主机IP&#xff0c;hostname为主机&#xff0c;hostIP为主机…

Redis 给集合元素单独设置过期

其他系列文章导航 Java基础合集数据结构与算法合集 设计模式合集 多线程合集 分布式合集 ES合集 文章目录 其他系列文章导航 文章目录 前言 一、场景 1.1 消费队列 1.2 Redis实现 二、常见的方案 2.1 为单独的 field 设置过期 2.2 设置整体过期时间 2.3 zset 结合 sc…

skimage图像处理(全)

文章目录 一、简介二、安装三、模块简介&#xff1a;API reference四、项目实战4.1、2D图像处理4.1.1、打印图像属性4.1.2、读取 / 显示 / 保存图像&#xff1a;skimage.io.imread() skimage.io.imshow() skimage.io.imsave()4.1.3、颜色空间转换&#xff1a;skimage.color.r…

给Flutter + FireBase 增加 badge 徽章,App启动器 通知红点。

在此之前需要配置好 firebase 在flutter 在项目中。&#xff08;已经配置好的可以忽略此提示&#xff09; Firebase 配置教程&#xff1a;flutter firebase 云消息通知教程 (android-安卓、ios-苹果)_flutter firebase_messaging ios环境配置-CSDN博客 由于firebase 提供的消息…

Tecplot 各版本安装指南

Tecplot下载链接 https://pan.baidu.com/s/1XbzjHnho8zIF7eC4KBFmgA?pwd0531 1.鼠标右击【Tecplot 360 EX 2023(64bit)】压缩包&#xff08;win11及以上系统需先点击“显示更多选项”&#xff09;【解压到 Tecplot 360 EX 2023(64bit)】。①解压前&#xff1a;需要先关闭“所…

x-cmd pkg | pdfcpu - 强大的 PDF 处理工具

目录 简介首次用户多功能支持性能表现安全的加密处理进一步阅读 简介 pdfcpu 是一个用 Go 编写的 PDF 处理库。同时它也提供 API 和 CLI。pdfcpu 提供了丰富的 PDF 操作功能&#xff0c;用户还能自己编写配置文件&#xff0c;用来管理和使用各种自定义字体并存储有效的默认配置…