果冻跳跃

欢迎来到程序小院

果冻跳跃

玩法:点击果冻跳跃,果冻会消失掉,果冻只能跳一个果冻的距离高度,共36关卡,
不同关卡有不同的跳板,快去闯关吧^^。

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

html

<canvas id="canvas" width="320" height="480"></canvas>

css

body {
  background: #fff;
  color:#cccccc;
  margin: 0px;
  padding: 0px;
  border: 0px;
}
canvas {
  image-rendering: optimizeSpeed;
  -webkit-interpolation-mode: nearest-neighbor;
  -ms-touch-action: none;
  margin: 0px;
  padding: 0px;
  border: 0px;
}

js

var colourBackground = "#2a2a2a";     
//This is your base colour
var colourText = shadeColor('#3796E3',70);   
//This is calculated from your base colour (but can be a custom HEX)
var colourLoadingBack = "#ffffff";// shadeColor('#3796E3',-10); 
//This is calculated from your base colour (but can be a custom HEX)
var colourLoadingFront = "#d40700"; //shadeColor('#3796E3',-10); 
//This is calculated from your base colour (but can be a custom HEX)
//Create an image to be drawn
var loadingBarImage = new Image();
loadingBarImage.src = 'html5game/load.png';
loadingBarImage.width = 250;
loadingBarImage.height = 110;
loadingBarImage.x_offset = -(loadingBarImage.width/2);
loadingBarImage.y_offset = -(loadingBarImage.height/2);
if (typeof loading_bar_smoother === 'undefined') {
    var loading_bar_smoother = 0;
}
// Full screen Loading Bar (WebGL OFF)
function jchtml5_fullscreen_loading_bar(_graphics, _width, _height, _total, _current,
_loadingscreen){
 _width = window.innerWidth;
 _height = window.innerHeight;
 _canvas = document.getElementById("canvas");
 if (_canvas.width !== _width || _canvas.height !== _height)
 {
  // Set the canvas size
  _canvas.width = _width;
  _canvas.height = _height;

  // Fill entire screen with colour
  _graphics.fillStyle = colourBackground;
  _graphics.fillRect(0, 0, _width, _height);
 }
 _graphics = _canvas.getContext("2d");

 // Fill entire screen with colour
 _graphics.fillStyle = colourBackground;
 _graphics.fillRect(0, 0, _width, _height);
 /*
 //Draw the loading text
 _graphics.fillStyle = colourText;
 _graphics.font = "20px Arial";
 _graphics.textAlign="center";
 _graphics.fillText(toString(fillW)."%",_width / 2,(_height / 2) - 30);
 */
 // Calculate loading bar position and size
 var barW = Math.round(_width / 4);
 var barH = Math.max(Math.round(_height / 40), 4);
 var barX = Math.round((_width - barW) / 2);
 var barY = Math.round((_height - barH) / 1.75);
 // Draw the loading bar (full)
 _graphics.fillStyle = colourLoadingBack;
 _graphics.fillRect(barX, barY, barW, barH);
 // Work out the completion status
 var fillW = Math.round((barW / _total) * _current);
 //Make the loading bar smooth
 if (loading_bar_smoother < fillW){
  loading_bar_smoother += 1;
 }
 // Draw the loading bar (current) if something has loaded
 if (_current !== 0){
  _graphics.fillStyle = colourLoadingFront;
  _graphics.fillRect(barX, barY, loading_bar_smoother, barH);
 }

 //Draw the image onto the loding bar
 _graphics.drawImage(loadingBarImage,_width/2+loadingBarImage.x_offset,_height/2.5+
  loadingBarImage.y_offset);
}
function shadeColor(color, percent) {  
    var num = parseInt(color.slice(1),16), amt = Math.round(2.55 * percent), R = 
    (num >> 16) + amt, G = (num >> 8 & 0x00FF) + amt, B = (num & 0x0000FF) + amt;
    return "#" + (0x1000000 + (R<255?R<1?0:R:255)*0x10000 + (G<255?G<1?0:G:255)*0x100 + 
    (B<255?B<1?0:B:255)).toString(16).slice(1);
}
function _D1(_X5, _Y5) {
 global._76 = _86();
 _96(global._76, "w", 11);
 _96(global._76, "u", 18);
 _96(global._76, "p", 3);
 _96(global._76, "W", 19);
 _96(global._76, "v", 13);
 _96(global._76, "x", 22);
 _96(global._76, "b", 23);
 _96(global._76, "g", 7);
 _96(global._76, "G", 15);
 _96(global._76,
  "o", 24);
 global._a6 = 36;
 global._b6 = 1;
 if (!(global._c6 instanceof Array)) {
  global._c6 = [];
  global._c6._f1 = 1355860334
 } else if (global._c6._f1 !== 1355860334) {
  global._c6 = global._c6.slice(0);
  global._c6._f1 = 1355860334
 }
 global._c6[1] = "       p     www          www        w          ";
 global._c6[2] = "          p   www        WWWw         w         ";
 global._c6[3] = "        p   wvvvvw             wvvvw            ";
 global._c6[4] = "      p     w  www w    w   wu       wwwu       ";
 global._c6[5] = "            b p   vvvwwx     x     x    ww      ";
 global._c6[6] = "       p  g  wwww    G    wWw                   ";
 global._c6[7] = "    g     wwbG p  vvvvvu         xxxwWWwww      ";
 global._c6[8] = "             pwwww w   u  ww  ww   u      wwwwwu";
 global._c6[9] = "  p     wwWwb    bvwWW v xxxx  w      w         ";
 global._c6[10] = "      wwwwwW      uwxwWu  xxxxwu        p uwwww ";
 global._c6[11] = "          gg Gwwvv G        u  p     WWwu  w    ";
 global._c6[12] = "        p     w    wwwww wwww         ww        ";
 global._c6[13] = "        p    wWvW     x                WWw  w   ";
 global._c6[14] = "      p     v  vvv        v vu      uvuvuv      ";
 global._c6[15] = "  p     w    WWw   vxv        vx  v   ww     wwv";
 global._c6[16] = "        p     vv    xx               wWWWw      ";
 global._c6[17] = " p     v      g   v vvGv    b vvvGvu   x    ww  ";
 global._c6[18] = " p     WWg        wWWWWW       uwww  wwG     w  ";
 global._c6[19] = "  ggg   www  p     wwwu        Gvvw   GG  wWwww ";
 global._c6[20] = "       WWwWw     p uWWwwb xxvvvvxx    ww        ";
 _E1(_X5, _Y5);
}

function _E1(_X5, _Y5) {
 if (!(global._c6 instanceof Array)) {
  global._c6 = [];
  global._c6._f1 = 1355860334
 } else if (global._c6._f1 !== 1355860334) {
  global._c6 = global._c6.slice(0);
  global._c6._f1 = 1355860334
 }
 global._c6[21] = "          o o      w         p uwWww            ";
 global._c6[22] = " o       b   wwvw  xx       u  p    owwwu       ";
 global._c6[23] = "       WWWw      pwu uwW  wWw   xb b wwvvv      ";
 global._c6[24] = " o         p ww  w       WWW         uWWw     o ";
 global._c6[25] = "  xx   bxx  wvvvvw pb   uvvWw w    w uwww       ";
 global._c6[26] = "      p     wwwwwwg    ovvvuvv oG    ww         ";
 global._c6[27] = "    o p     wwwwwwwwo         uwwww   uwWw    w ";
 global._c6[28] = "       g  G p   wwww    wuwWwu       wwu        ";
 global._c6[29] = "     p   wWW  xxwbWWvwvv      uwww              ";
 global._c6[30] = "o     vvvWWW       vuwwup     vuwwwu   o    u   ";
 global._c6[31] = "  x   pbxb  wvvvW xxxxx          x   wWwww      ";
 global._c6[32] = "o  vv  p GG wvvvvG   gowvwwW  gg    wvWu        ";
 global._c6[33] = "o bG  vwvvwvxxxxxx        p    gWWw  wwwW  wwwwo";
 global._c6[34] = "   p    wWww   wWbvxvvvv u     WW   wwww        ";
 global._c6[35] = " p     wwww wwwW   o  o uvvvvv o   o  WWWWw     ";
 global._c6[36] = "p  o  wwg G vvwWw     x wWw     wwww Ggb  wwvvo ";
}
function _F1(_X5, _Y5) {
 var _d6, _e6, _f6, _g6;
 _d6 = global._c6[global._b6];
 _e6 = 1;
 _X5._h6(global._i6);
 _X5._j6(global._k6);
 for (var _l6 = 0, _m6 = ~~ (48); _l6 < _m6; _l6++) {
  {
   _f6 = _n6(_d6, _e6);
   if ((_f6 != " ")) {
    {
     _g6 = _o6(global._76, _f6);
     _p6((_X5._w2 + 24), (_X5._x2 + 24), _g6);
    }
   };
   _X5._h6(_X5._w2 + 48);
   if ((_X5._w2 > 257)) {
    {
     _X5._h6(global._i6);
     _X5._j6(_X5._x2 + 48);
    }
   };
   _e6 += 1;
  }
 };
}
function _WK(e) {
 if (_Gm != _Hm) return;
 var targetid = e.target.targetid;
 debug("error loading sound" + targetid);
 if (targetid == undefined) {} else {
  debug("AudioError: " + this.URL);
  this.completed = !1;
  _XK++;
  ClearEventListeners(this)
 }
}
function _YK(e) {
 if (_Gm != _Hm) return;
 var targetid = e.target.targetid;
 if (_ZK) debug("sound loaded" + targetid);
 if (targetid == undefined) {} else {
  this.completed = !0;
  ClearEventListeners(this);
  try {
   g_WebAudioContext.decodeAudioData(e.target.response, function(buffer) {
    var __K = audio_sampledata[targetid];
    __K.buffer = buffer;
    _XK++
   }, function(err) {
    debug("error decoding audio data:" + err);
    _XK++
   })
  } catch (_0L) {
   debug("error decoding audio data: " + _0L.message);
   _XK++
  }
 }
}
function _1L(_uC, _dn, _2L) {
 var __K = audio_sampledata[_dn];
 __K.buffer = null
}
function _3L(_uC, _dn, _2L, _4L) {
 _uC = _5L(_uC);
 if ((_Gm != _Hm) || (_6L == !1)) {
  return undefined
 }
 var _7L;
 var index;
 index = _uC.indexOf(_2L);
 if (index >= 0) {
  _uC = _uC.substr(0, index)
 }
 if (_8L) {
  _2L = "ogg"
 } else if (_9L) {
  _2L = "mp3"
 } else {
  _2L = "ogg"
 }
 _uC = _uC + "." + _2L;
 var __D = new XMLHttpRequest();
 __D.open('GET', _uC, !0);
 __D.responseType = 'arraybuffer';
 __D.targetid = _dn;
 __D.URL = _uC;
 __D.completed = !1;
 if (_4L != undefined) {
  __D.targetid = {
   _aL: _4L,
   _bL: _dn
  };
  __D.onload = _cL;
  __D.onerror = _dL
 } else {
  __D.onload = _YK;
  __D.onerror = _WK
 }
 __D.send();
 _eL[_dn] = __D;
 return _dn
}
var _fL = "Unloaded";
var _gL = "Loading";
var _hL = "Loaded";
var _iL = "Unloading";
var _jL = 0;
var _kL = [];
function _lL(_OK) {
 this._3K = _OK;
 this._mL = _fL;
 this._nL = 0;
 this._oL = 0;
 this._pL = []
}
_lL.prototype._qL = function(_rL) {
 this._pL.push(_rL)
};
_lL.prototype._sL = function(_tL) {
 if (this._mL != _tL) {
  this._mL = _tL;
  debug("Audio Group " + this._3K + "-> " + this._mL);
  if (_tL == _hL) {
   var map = _86();
   _O7._uL = map;
   _96(map, "type", "audiogroup_load");
   _96(map, "group_id", this._3K);
   _cy._vL(_wL, 0)
  }
 }
};
function _cL(e) {
 var targetid = this.targetid._bL;
 var _xL = this.targetid._aL;
 if (_ZK) debug("sound loaded " + targetid);
 if (targetid != undefined) {
  e.target.completed = !0;
  ClearEventListeners(this);
  try {
   g_WebAudioContext.decodeAudioData(e.target.response, function(buffer) {
    var __K = audio_sampledata[targetid];
    __K.buffer = buffer;
    _xL._yL()
   }, function(err) {
    debug("error decoding audio data:" + err);
    _xL._yL()
   })
  } catch (_0L) {
   debug("error decoding audio data: " + _0L.message);
   _xL._yL()
  }
 }
}
function _dL(e) {
 var targetid = this.targetid._bL;
 var _xL = this.targetid._aL;
 debug("error loading sound" + targetid);
 if (targetid != undefined) {
  debug("AudioError: " + this.URL);
  this.completed = !1;
  ClearEventListeners(this);
  _xL._yL()
 }
}
_lL.prototype._yL = function() {
 this._nL--;
 if (this._pL.length > 0) {
  this._oL = ((this._pL.length - this._nL) * 100) / (this._pL.length)
 }
 if (this._nL <= 0) {
  this._sL(_hL)
 }
};
_lL.prototype._jg = function() {
 if (this._mL != _fL) {
  return 0
 }
 if (this._pL.length == 0) {
  return 0
 }
 this._sL(_gL);
 this._nL = this._pL.length;
 this._oL = 0;
 var _u2;
 for (_u2 = 0; _u2 < this._pL.length; ++_u2) {
  var index = this._pL[_u2];
  if (_cv._j1[index]._Zh == 0) {
   var id = _3L(_sg + _cv._j1[index]._zL, index, _cv._j1[index]._AL, this);
   if (id === undefined) this._yL()
  } else {
   this._yL()
  }
 }
};
function _YJ() {
 var index;
 var _BL = 1;
 for (index = 0; index < _cv._j1.length; index++) {
  if (_cv._j1[index] !== null) {
   var __K = new __J();
   audio_sampledata[index] = __K;
   __K.buffer = null;
   var _CL = _cv._j1[index].volume;
   __K.gain = _CL;
   __K._0K = _CL;
   __K._1K = 1.0;
   __K._Zh = _cv._j1[index]._Zh;
   if (_cv._j1[index].duration != undefined) {
    __K.duration = _cv._j1[index].duration
   }
   __K._3K = 0;
   var _3K = _cv._j1[index]._3K;
   if (_3K != undefined) {
    __K._3K = _3K
   }
  }
 }
}

源码

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

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

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【全csdn最前沿LVGL9】按钮的使用(lv_button)、标签的使用(lv_label)

文章目录 前言一、按钮概述二、按钮的使用2.1 创建一个按钮2.2 按钮的样式 三、标签概述四、标签的使用4.1 创建一个标签4.2 样式4.3 设置文本4.4 长文本模式4.5 文本选择4.6 文本对齐4.7 非常长的文本4.8 字体设置字体支持的Unicode字符字体列表特殊的字体 总结 前言 欢迎来到…

CXO清单:低代码平台必备的16个基本功能:从需求到实现的全面指南

对于 CIO、CTO 和 CDO&#xff08;在此统称为 CXO&#xff09;来说&#xff0c;认识到快速变化的技术和竞争格局以及他们在组织中的角色变化至关重要。处理持续不断的软件开发请求、考虑不断变化的业务流程、提高客户和法规的透明度、提高企业数据安全性以及在短时间内扩展基础…

2024斋月大促跨境卖家准备指南

市场覆盖西欧、中东、东南亚、北非地区的跨境电商卖家注意了&#xff0c;2024年的斋月即将开启&#xff0c;较往年日期&#xff0c;今年提前了10天左右&#xff0c;斋月的第一天预测在3月11日星期一到来。 根据Google搜索数据可知&#xff0c;目前已经进入高频“斋月”搜索期&…

与数组相关经典面试题

&#x1d649;&#x1d65e;&#x1d658;&#x1d65a;!!&#x1f44f;&#x1f3fb;‧✧̣̥̇‧✦&#x1f44f;&#x1f3fb;‧✧̣̥̇‧✦ &#x1f44f;&#x1f3fb;‧✧̣̥̇:Solitary-walk ⸝⋆ ━━━┓ - 个性标签 - &#xff1a;来于“云”的“羽球人”。…

嵌入式学习第十六天

制作俄罗斯方块小游戏&#xff08;一&#xff09; 分析&#xff1a; printf函数高级用法 \033[&#xff1a;表示转义序列的开始 m&#xff1a;表示转义序列的结束 0&#xff1a;重置所有属性 1&#xff1a;设置粗体或高亮 30-37&#xff1a;设置字体色 30: 黑 31: 红 32:…

江科大stm32学习笔记10——对射式红外传感器

一、接线 上电之后可以看到对射式红外传感器亮两个灯&#xff0c;如果此时用挡光片挡住两个黑色方块中间的部分&#xff0c;则只亮一个灯。 二、代码 将4-1的工程文件夹复制粘贴一份&#xff0c;重命名为“5-1 对射式红外传感器计次”&#xff0c;打开keil&#xff0c;右键添…

C++/数据结构:二叉搜索树的实现与应用

目录 一、二叉搜索树简介 二、二叉搜索树的结构与实现 2.1二叉树的查找与插入 2.2二叉树的删除 2.3二叉搜索树的实现 2.3.1非递归实现 2.3.2递归实现 三、二叉搜索树的k模型和kv模型 一、二叉搜索树简介 二叉搜索树又称二叉排序树&#xff0c;它或者是一棵空树&#xff0…

LeetCode刷题记录:(5)前K个高频元素

LeetCode传送通道 很好的一道题&#xff01; 核心知识点&#xff1a; …①map频率统计&#xff1b; …②优先级队列(不用的话见解法二) //解法一 class Solution {public int[] topKFrequent(int[] nums, int k) {int[] result new int[k];//1.次数统计mapMap<Integer,Inte…

ElementUI Form:Input 输入框

ElementUI安装与使用指南 Input 输入框 点击下载learnelementuispringboot项目源码 效果图 el-input.vue &#xff08;Input 输入框&#xff09;页面效果图 项目里el-input.vue代码 <script> export default {name: el_input,data() {return {input: ,input1: ,i…

Mac内存清理的方法,Mac老用户都用这几种方法清理Mac内存

Mac磁盘空间又爆满了&#xff1f;系统运行又卡了&#xff1f;你的Mac需要清理内存啦&#xff01;如果你正在为“您的磁盘内存不足”的提示所困扰&#xff0c;或者你的Mac电脑突然运行缓慢和迟缓&#xff0c;那么你可能需要了解以下几种Mac释放内存的方法。 一、清理缓存 在配…

正点原子--STM32中断系统学习笔记

1、什么是中断&#xff1f; 原子哥给出的概念是这样的&#xff1a;打断CPU正常执行的程序&#xff0c;转而处理紧急程序&#xff0c;然后返回原暂停的程序继续运行&#xff0c;就叫中断。 当发生中断时&#xff0c;当前执行的程序会被暂时中止&#xff0c;进而进入中断处理函…

YIA主题如何关闭新版本升级提示?WordPress主题怎么取消升级提醒?

前两天YIA主题发布了升级到2.8版本&#xff0c;新增了一些功能&#xff0c;优化调整修复了一些功能&#xff0c;但是这些功能调整幅度不大&#xff0c;加上boke112百科使用的YIA主题已经进行了很多方面的个性化修改&#xff0c;所以就懒得升级了&#xff0c;但是每次进入WordPr…

C++基础语法学习笔记

C Tutorial 1.基础语法 C 应用&#xff1a;操作系统、图形用户界面和嵌入式系统 C和C区别&#xff1a;C支持类和对象 C语法 #include <iostream> using namespace std;int main(){cout << "hello world!";return 0; }int main () { cout << &q…

Flutter canvas 画一条会动的波浪线 进度条

之前用 Flutter Canvas 画过一个三角三角形&#xff0c;html 的 Canvas 也画过一次类似的&#xff0c; 今天用 Flutter Canvas 试了下 感觉差不多&#xff1a; html 版本 大致效果如下&#xff1a; 思路和 html 实现的类似&#xff1a; 也就是找出点的位置&#xff0c;使用二阶…

Linux部署DataEase数据分析工具并结合内网穿透实现任意设备远程查看数据

文章目录 前言1. 安装DataEase2. 本地访问测试3. 安装 cpolar内网穿透软件4. 配置DataEase公网访问地址5. 公网远程访问Data Ease6. 固定Data Ease公网地址 前言 DataEase 是开源的数据可视化分析工具&#xff0c;帮助用户快速分析数据并洞察业务趋势&#xff0c;从而实现业务…

Docker安装MongoDB并做副本集群

mongodb cluster 1. 创建外挂目录并授权 mkdir -p /home/mongo1/db /home/mongo1/log mkdir -p /home/mongo2/db /home/mongo2/log mkdir -p /home/mongo3/db /home/mongo3/log chmod 755 2. 拉取最新mongodb docker pull mongo3. 创建副本集结点 docker run -itd --namemong…

代码随想录算法刷题训练营day21

代码随想录算法刷题训练营day21&#xff1a;LeetCode(501)二叉搜索树中的众数、LeetCode(530)二叉搜索树的最小绝对差 LeetCode(501)二叉搜索树中的众数 题目 代码 import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;/*…

一些大语言模型(LLM)相关的开源项目

一些大语言模型&#xff08;LLM&#xff09;相关的开源项目 更多文章访问: https://www.cyisme.top 因为站内限制问题&#xff0c;有些图片无法显示&#xff0c;导致阅读体验较差&#xff0c;可以访问原文&#xff1a;《一些大语言模型&#xff08;LLM&#xff09;相关的开源项…

Linux逻辑卷(LV)扩容

Linux逻辑卷&#xff08;LV&#xff09;扩容 1、准备物理磁盘&#xff08;分区和不分区都行&#xff09;&#xff0c;可以使用lsblk命令查看新增的磁盘&#xff0c;如下图sde就是我们新增磁盘&#xff0c;容量为600G。 2、将新磁盘变成物理卷&#xff08;PV&#xff09; pvcr…

疾控中心污水采样器的招标参数有哪些

技术指标 1 采样程序&#xff1a;可以预先编制 10 种采样程序&#xff0c;一键式启动&#xff1b; 2 采样方式&#xff1a;平行采样、 定时定量采样、定流定量采样、 定时比例采样、液位比例采样、即时定量采样等&#xff1b; 3 采样记录&#xff1a;可保存 10000 条采样记录…
最新文章