Compare commits

..

No commits in common. "c86df30c9c7c41b254804a9b872ec99c3ffbe2b3" and "f9c501a0f920c51e3d1951e4bc8eabb775645eb6" have entirely different histories.

6 changed files with 8 additions and 86 deletions

View File

@ -67,7 +67,6 @@
"glslify": "^7.1.1", "glslify": "^7.1.1",
"handtrackjs": "^0.1.5", "handtrackjs": "^0.1.5",
"jsmpeg": "^1.0.0", "jsmpeg": "^1.0.0",
"matter-js": "^0.18.0",
"meshline": "^2.0.3", "meshline": "^2.0.3",
"qrcode": "^1.4.4", "qrcode": "^1.4.4",
"snapsvg-cjs": "^0.0.6", "snapsvg-cjs": "^0.0.6",

View File

@ -143,8 +143,6 @@ html,body{
} }
} }
//初始化开始循环 不初始化 不会开始循环 //初始化开始循环 不初始化 不会开始循环
.loop(@i); .loop(@i);
} }

View File

@ -3,7 +3,6 @@ import LAYOUT from "./view";
import { gsap } from "gsap"; import { gsap } from "gsap";
import Resource from "./preload"; import Resource from "./preload";
import utils from '@/utils/index.js'; import utils from '@/utils/index.js';
import Matter from 'matter-js';
class game { class game {
@ -42,13 +41,6 @@ class game {
this.otherLoaderArr = []; this.otherLoaderArr = [];
this.utils = utils; this.utils = utils;
// init Matter
this.Engine = Matter.Engine,
this.Render = Matter.Render,
this.Runner = Matter.Runner,
this.Bodies = Matter.Bodies,
this.Composite = Matter.Composite;
} }
// 初始化 // 初始化
@ -60,13 +52,13 @@ class game {
this.VIEW = new LAYOUT(this); this.VIEW = new LAYOUT(this);
// 保存帧率 // 保存帧率
// this.saveMomentFPS = setInterval(() => { this.saveMomentFPS = setInterval(() => {
// if (this.FPS > 30) if (this.FPS > 30)
// this.momentFPS.push(this.FPS) this.momentFPS.push(this.FPS)
// // console.log(this.momentFPS.length) // console.log(this.momentFPS.length)
// if (this.momentFPS.length > 20) if (this.momentFPS.length > 20)
// this.momentFPS.shift(); this.momentFPS.shift();
// }, 10); }, 10);
// 绑定事件 // 绑定事件
@ -76,9 +68,6 @@ class game {
// 初始化主资源加载器 // 初始化主资源加载器
this.loadingRes(); this.loadingRes();
// 初始化物理引擎
this.initMatterEngine();
} }
// 开发debug模式 // 开发debug模式
@ -183,63 +172,6 @@ class game {
console.log(this.globalSpeed) console.log(this.globalSpeed)
} }
//
initMatterEngine() {
// create an engine
this.myEngine = this.Engine.create();
this.myWorld = this.myEngine.world;
// create a renderer
// this.myRender = this.Render.create({
// element: this.vue.$refs.container,
// engine: this.myEngine,
// options: {
// width: window.innerWidth,
// height: window.innerHeight,
// pixelRatio: 1, // 设置像素比
// showAngleIndicator: true,
// wireframes: true,
// showDebug: true
// }
// });
// create two boxes and a ground
var boxA = this.Bodies.rectangle(100, 200, 80, 80);
var boxB = this.Bodies.rectangle(150, 50, 80, 80);
var boxC = this.Bodies.rectangle(150, 50, 80, 80);
var boxD = this.Bodies.rectangle(150, 50, 80, 80);
var ground = this.Bodies.rectangle(0, 800, 750, 10, { isStatic: true });
// this.Composite.add(this.myWorld, [
// this.Bodies.fromVertices(
// 0, 0,
// [
// // 顶点坐标
// { x: 0, y: 0 },
// { x: 0, y: 890 },
// { x: 140, y: 815 },
// { x: 208, y: 614 },
// { x: 548, y: 614 },
// { x: 612, y: 815 },
// { x: 750, y: 890 },
// { x: 750, y: 0 }
// ],
// { isStatic: true }
// )
// ]);
// add all of the bodies to the world
this.Composite.add(this.myWorld, [boxA, boxB, boxC, boxD, ground]);
// create runner
// this.Render.run(this.myRender);
// run the engine
// this.myRunner = this.Runner.create();
// this.Runner.run(this.myRunner, this.myEngine);
this.Engine.run(this.myEngine);
}
//debug mode destroyed //debug mode destroyed
//game model //game model

View File

@ -95,8 +95,6 @@ class layout {
// 创建粒子动画 // 创建粒子动画
this.createLoadingParticle(); this.createLoadingParticle();
console.log(this.loading_bg)
return this return this
} }

View File

@ -7,7 +7,7 @@
* @FilePath: /xfhd-vue-scaffold/src/page/index/Home/Index.vue * @FilePath: /xfhd-vue-scaffold/src/page/index/Home/Index.vue
--> -->
<template> <template>
<div class="pushcoin" id="container" ref="container"></div> <div class="pushcoin" id="container"></div>
</template> </template>
<script> <script>
// @ is an alias to /src // @ is an alias to /src

View File

@ -302,11 +302,6 @@ export default {
message: `正在计算,请稍等...`, message: `正在计算,请稍等...`,
}); });
let height = 100; //boxHeight
if (word.length > 180) {
height = 180;
}
setTimeout(() => { setTimeout(() => {
if (this.hideOrigin) { if (this.hideOrigin) {
// //