Commit f9b60a25 authored by wjf's avatar wjf

l

parents
This diff is collapsed.
{"watchers":[],"configurations":{},"breakpoints":{"breakpointsEnabled":true,"breakpoints":{},"exceptionsBreakpoints":{}},"storageVersion":"1.5.10"}
\ No newline at end of file
const g = typeof global !== 'undefined' ? global : self;
g.appXAppJson = {
"app": {
"$homepage": "pages/index/index"
}
};
if(!self.Map || !self.Set || !self.Symbol) {
importScripts('https://gw.alipayobjects.com/as/g/appx_release/deps/1.0.3/es6-set-map-symbol.js');
}
\ No newline at end of file
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/index3/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/bbb/bbb?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
if(!self.__appxInited) {
self.__appxInited = 1;
require('./config$');
var AFAppX = self.AFAppX.getAppContext
? self.AFAppX.getAppContext().AFAppX
: self.AFAppX;
self.getCurrentPages = AFAppX.getCurrentPages;
self.getApp = AFAppX.getApp;
self.Page = AFAppX.Page;
self.App = AFAppX.App;
self.my = AFAppX.bridge || AFAppX.abridge;
self.abridge = self.my;
self.Component = AFAppX.WorkerComponent || function(){};
self.$global = AFAppX.$global;
self.requirePlugin = AFAppX.requirePlugin;
if(AFAppX.registerApp) {
AFAppX.registerApp({
appJSON: appXAppJson,
});
}
function success() {
require('../../app');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/index3/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/bbb/bbb?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}
\ No newline at end of file
const g = typeof global !== 'undefined' ? global : self;
g.appXAppJson = {
"app": {
"$homepage": "pages/index/index"
}
};
if(!self.Map || !self.Set || !self.Symbol) {
importScripts('https://gw.alipayobjects.com/as/g/appx_release/deps/1.0.3/es6-set-map-symbol.js');
}
importScripts(`https://appx/af-appx.worker.min.js`);
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/index3/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/bbb/bbb?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
This diff is collapsed.
{"layout":{"left":{"currentId":"explorer","size":310},"right":{"currentId":""},"bottom":{"currentId":""}},"storageVersion":"1.5.10"}
\ No newline at end of file
{"OPENED_FILE":["file:///c%3A/Users/57058/Desktop/tm/pages/index/index.axml","file:///c%3A/Users/57058/Desktop/tm/pages/index/index.js","file:///c%3A/Users/57058/Desktop/tm/app.json","file:///c%3A/Users/57058/Desktop/tm/pages/index/index.json","file:///c%3A/Users/57058/Desktop/tm/skill.json","file:///c%3A/Users/57058/Desktop/tm/debug.log","file:///c%3A/Users/57058/Desktop/tm/enterModal/enterModal.acss","file:///c%3A/Users/57058/Desktop/tm/pages/index/index.acss","file:///c%3A/Users/57058/Desktop/tm/snapshot.png","file:///c%3A/Users/57058/Desktop/tm/enterModal/enterModal.axml","file:///c%3A/Users/57058/Desktop/tm/package.json","file:///c%3A/Users/57058/Desktop/tm/app.acss","file:///c%3A/Users/57058/Desktop/tm/pages/bbb/bbb.axml","file:///c%3A/Users/57058/Desktop/tm/pages/bbb/bbb.js","file:///c%3A/Users/57058/Desktop/tm/pages/aaaaa/aaaaa.axml","file:///c%3A/Users/57058/Desktop/tm/pages/aaaaa/aaaaa.js"],"storageVersion":"1.5.10"}
\ No newline at end of file
{"grid":{"editorGroup":{"uris":["file:///c%3A/Users/57058/Desktop/tm/pages/aaaaa/aaaaa.axml","file:///c%3A/Users/57058/Desktop/tm/pages/aaaaa/aaaaa.js","file:///c%3A/Users/57058/Desktop/tm/pages/bbb/bbb.js","file:///c%3A/Users/57058/Desktop/tm/pages/index/index.js","file:///c%3A/Users/57058/Desktop/tm/pages/index/index.json","file:///c%3A/Users/57058/Desktop/tm/app.json","file:///c%3A/Users/57058/Desktop/tm/skill.json","file:///c%3A/Users/57058/Desktop/tm/package.json","file:///c%3A/Users/57058/Desktop/tm/pages/index/index.axml","file:///c%3A/Users/57058/Desktop/tm/pages/index/index.acss"],"current":"file:///c%3A/Users/57058/Desktop/tm/pages/index/index.axml","previewIndex":-1}},"storageVersion":"1.5.10"}
\ No newline at end of file
page {
flex: 1;
display: flex;
background: #f7f7f7;
}
App({
onLaunch(options) {
// 第一次打开
// options.query == {number:1}
console.info('App onLaunch');
},
onShow(options) {
// 从后台被 scheme 重新打开
// options.query == {number:1}
},
});
{
"pages": [
"pages/index/index",
"pages/index3/index",
"pages/bbb/bbb"
],
"window": {
"navigationBarForceEnable": true,
"defaultTitle": "My App",
"gpuAccelerate": "true",
"enableSkia": "true",
"navigationStyle": "custom"
}
}
This diff is collapsed.
{
"includes": [
"app.json",
"skill.json"
]
}
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"@mrkwon/svga-player": {
"version": "1.0.3",
"resolved": "https://registry.npm.taobao.org/@mrkwon/svga-player/download/@mrkwon/svga-player-1.0.3.tgz",
"integrity": "sha1-MBrMd66BA6qYlY3QE78RDw3u/lI=",
"requires": {
"svga-parser": "^1.1.0"
}
},
"@tbminiapp/lottie-miniapp": {
"version": "0.0.4",
"resolved": "https://registry.npm.taobao.org/@tbminiapp/lottie-miniapp/download/@tbminiapp/lottie-miniapp-0.0.4.tgz",
"integrity": "sha1-YBN9pxTZa2mxzmDQQ6a5wf6FA5E="
},
"@tbmp/mp-cloud-sdk": {
"version": "1.4.1",
"resolved": "https://registry.npm.taobao.org/@tbmp/mp-cloud-sdk/download/@tbmp/mp-cloud-sdk-1.4.1.tgz",
"integrity": "sha1-2y9tanEKqWjGd2YMYtjaSjqryd0="
},
"fyge-tbmini": {
"version": "1.3.2",
"resolved": "https://registry.npm.taobao.org/fyge-tbmini/download/fyge-tbmini-1.3.2.tgz",
"integrity": "sha1-06+pauXjj6ehbprzi+gtZ/tH/9w="
},
"svga-parser": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/svga-parser/download/svga-parser-1.1.0.tgz",
"integrity": "sha1-sXgVrAwaDgGobJG7l/g02tYCdek="
}
}
}
<view>
New Component
</view>
\ No newline at end of file
Component({
mixins: [],
data: {},
props: {},
didMount() {},
didUpdate() {},
didUnmount() {},
methods: {},
});
{
"component": true
}
\ No newline at end of file
<view>
New Page
</view>
\ No newline at end of file
Page({
data: {},
onLoad() {},
});
{}
\ No newline at end of file
.btn-integration{
position: absolute;
top: 310rpx;
left: 50%;
margin-left: -140rpx;
width: 266rpx;
height: 97rpx;
border: 0; padding: 0;
/* outline: none; */
/* background: url('/snapshot.png') no-repeat center; */
/* background-color:red */
}
.enter-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 20;
}
.enter-modal__shade {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.75);
}
.enter-modal__container {
position: absolute;
width: 653rpx;
height: 459rpx;
left: 50%;
top: 50%;
margin-left: -326rpx;
margin-top: -229rpx;
background: url('//yun.duiba.com.cn/db_games/activity/cowTmallGenie/shouquanBg.png') no-repeat center;
/* background-size: 653rpx 459rpx; */
}
.enter-modal-enter-btn {
position: absolute;
top: 275rpx;
left: 50%;
margin-left: -140rpx;
width: 266rpx;
height: 97rpx;
background: url('//yun.duiba.com.cn/db_games/activity/cowTmallGenie/shouquan.png') no-repeat center;
}
\ No newline at end of file
<view class="page">
<view class="enter-modal">
<view class="enter-modal__shade modal-animate-fade-in" />
<view class="enter-modal__container modal-animate-zoom-in">
<view class="enter-modal-title-enter"></view>
<view class="enter-modal__main">
</view>
<view class="enter-modal-enter-btn">
</view>
<!-- <button type="ghost" open-type="getAuthorize" class="btn-integration enter-modal-enter-btn" onGetAuthorize="onGetAuthorize" onError="onAuthError" scope='userInfo'>
会员基础信息授权
</button>
<button type="ghost" open-type="getAuthorize" class="btn-integration" onGetAuthorize="onGetAuthorize" onError="onAuthError" scope='userInfo'>
会员基础信息授权
</button> -->
<button type="ghost" open-type="getAuthorize" class="btn-integration" onGetAuthorize="onGetAuthorize" onError="onAuthError" scope='userInfo'>
</button>
</view>
</view>
<!-- <button type="ghost" open-type="getAuthorize" class="btn-integration" onGetAuthorize="onGetAuthorize" onError="onAuthError" scope='userInfo'>
会员基础信息授权
</button> -->
<web-view a:if="{{contentShow}}" id="web-view-1" src="https://activity.m.duiba.com.cn/projectx/p23ec4425/ff9bbe612.html" onMessage="onMessage"></web-view>
</view>
\ No newline at end of file
Page({
data: {
contentShow: false
},
onLoad(query) {
// 页面加载
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
this.webViewContext = my.createWebViewContext('web-view-1');
//必须点击按钮授权过才行
// this.login();
},
onReady() {
// my.getAuthCode({
// scopes: ['auth_base'],
// success: (res) => {
// my.alert({
// content: res.authCode,
// });
// },
// });
//显示webview
// this.setData({
// contentShow: true
// })
},
login() {
my.call('hideNavigationBar')
my.getAuthCode({
scopes: 'auth_user',
success: ({ authCode }) => {
my.getOpenUserInfo({
fail: (error) => {
console.error('getAuthUserInfo', error);
},
success: (res) => {
console.log(`userInfo:`, res);
let userInfo = JSON.parse(res.response).response // 以下方的报文格式解析两层 response
// this.setData({
// mockAvatar: 'https://tfs.alipayobjects.com/images/partner/T1dH8EXcFeXXXXXXXX',
// userInfo,
// });
console.log(userInfo)
my.alert({
content: JSON.stringify(userInfo)
});
//头像,到时用
this.avatar = userInfo.avatar;
//昵称
this.userNick = userInfo.nickName;
//显示webview
this.setData({
contentShow: true
})
}
});
},
});
},
onGetAuthorize() {
my.call('hideNavigationBar');
let count = 0, countAll = 2;
//获取用户userId
my.call('getGenieUserInfo', (result) => {
this.userId = result ? result.userId : null;
if (++count >= countAll) {
//显示webview
this.setData({
contentShow: true
})
}
})
//返回数据参考
// {
// "avatar": "https://wwc.alicdn.com/avatar/getAvatar.do?userNick=jickyi521&_input_charset=UTF-8&width=160&height=160&type=sns",
// "nickName": "jickyi521test",
// "userId": "GULLg/5o1zoKbuZg605heg=="
// }
// 页面加载完成
// my.getAuthCode({
// scopes: ['auth_user'],
// success: ({ authCode }) => {
my.getOpenUserInfo({
fail: (error) => {
console.error('getAuthUserInfo', error);
},
success: (res) => {
let userInfo = JSON.parse(res.response).response // 以下方的报文格式解析两层 response
// console.log(userInfo.avatar, userInfo.userNick)
// my.alert({ content: "onVoiceEvent = " + JSON.stringify(userInfo) });
// my.alert({ content: "userInfo = " + JSON.stringify(userInfo) });
//头像,到时用
this.avatar = userInfo.avatar;
//昵称
this.userNick = userInfo.nickName;
// my.alert({title:this.userNick ,content:this.avatar})
// return
//显示webview
if (++count >= countAll) this.setData({
contentShow: true
})
}
});
// },
// });
},
onVoiceEvent(event) {
// my.alert({ content: "onVoiceEvent = " + JSON.stringify(event) });
},
onShow() {
// 页面显示
},
// {
// netName: netName,
// parameter: parameter
// }
onMessage(e) {
console.log(e)
// my.alert({ content: JSON.stringify(e) })
let netName = e.detail.netName;
let parameter = e.detail.parameter;
//前端接口
if (netName.indexOf("mine") == 0) {
var data = {
success: true,
data: null
};
switch (netName) {
case "mine.getAppData":
data.data = {
avatar: this.avatar,
userNick: this.userNick,
userId: this.userId
};
break;
case "mine.navigateToOutside":
my.call("navigateToOutside", {
url: parameter.url
}, (res) => {
// my.alert({ content: "success - " + JSON.stringify(res)})
});
break;
case "mine.returnHome":
my.call("sendKeyEvent", { "keyCode": "HOME" });
break;
}
this.webViewContext.postMessage({ netName: netName, data: data });
return
}
//获取后端接口
// var app = getApp();
// const { function: fc } = app.cloud;
// // console.log(e)
// fc.invoke("duiba", parameter, netName)
// .then(res => {
// // console.log("返回数据" + JSON.stringify(res));
// //发送消息
// this.webViewContext.postMessage({ netName: netName, data: res });
// //发送邀请和接受助力额外处理
// if (netName == "duiba.assist.createItem" || netName == "duiba.assist.doAssist") {
// app.cloud.topApi.invoke({
// api: 'taobao.chatting.platform.message.sendcard',
// scopes: 'scope.groupChat',
// data: { "request_info": JSON.stringify(res.data) }
// })
// }
// })
},
onMusic() {
this.webViewContext.postMessage({ netName: "mine.getVoiceType", data: "music" });
},
onBall() {
this.webViewContext.postMessage({ netName: "mine.getVoiceType", data: "basketball" });
},
onTouch() {
this.webViewContext.postMessage({ netName: "mine.getVoiceType", data: "touch" });
},
onMilk() {
this.webViewContext.postMessage({ netName: "mine.getVoiceType", data: "milk" });
},
onFeed() {
this.webViewContext.postMessage({ netName: "mine.getVoiceType", data: "feed" });
},
onGrass() {
this.webViewContext.postMessage({ netName: "mine.getVoiceType", data: "grass" });
},
respond() {
// my.tg.playTTS({ text: '你好主人,欢迎开发语音小程序。您可以查看开发者文档探索更多我所具备的能力哦。' })
// my.alert({ content: 'huhu' });
},
test1() {
// my.request({
// url: 'https://ams.dui88.com/server/index.php?g=Web&c=Mock&o=simple&projectID=218&uri=qiaqia2.getExchangeGoodsList',
// method: 'get',
// success: ({ data }) => {
// console.log(data)
// my.alert({ content: JSON.stringify(data) })
// }
// });
// my.tg.playTTS({ text: '我是呼呼呀' })
},
searchVideo(artist, video) {
// my.alert({ content: "searchVideo" + artist + "," + video })
},
onHide() {
// 页面隐藏
},
onUnload() {
// 页面被关闭
},
onTitleClick() {
// 标题被点击
},
onPullDownRefresh() {
// 页面被下拉
},
onReachBottom() {
// 页面被拉到底部
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
});
{
"skill": [
{
"commands": ["hello"],
"onVoice": "respond"
},
{
"commands": ["test1"],
"onVoice": "test1"
},
{
"commands": ["searchVideo"],
"onVoice": "searchVideo(artist, title)"
},
{
"commands": ["music"],
"onVoice": "onMusic"
},
{
"commands": ["ball"],
"onVoice": "onBall"
},
{
"commands": ["touch"],
"onVoice": "onTouch"
},
{
"commands": ["milk"],
"onVoice": "onMilk"
},
{
"commands": ["feed"],
"onVoice": "onFeed"
},
{
"commands": ["grass"],
"onVoice": "onGrass"
}
]
}
\ No newline at end of file
.canvas {
width:100%;
height:100%;
}
.page-game {
/* position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
min-height: 100vh; */
flex: 1;
display: flex;
flex-direction: column;
}
\ No newline at end of file
<!-- <view class="page" disable-scroll="true" style="padding-top: 0px;-ms-touch-action: none; touch-action: none;background: #888888;
padding: 0;
border: 0;
margin: 0;
height: 100%;" > -->
<!-- 备用的canvas用于绘制文本,尺寸对内存影响很大 -->
<!-- <canvas
id="backupCanvas"
style="width:750;height:750;position:absolute;left:0;top:0;opacity:1;display:block"
width="750"
height="750"
disable-scroll="true"
class="canvas"
onTouchStart=""
onTouchMove=""
onTouchEnd=""
/> -->
<!-- <canvas
id="canvas"
type="webgl"
width="{{canWidth}}"
height= "{{canHeight}}"
disable-scroll="true"
class="canvas"
onTouchStart="log"
onTouchMove="log"
onTouchEnd="log"
style="width:{{divWidth}}px;height:{{divHeight}}px;position:absolute;left:0;top:0;display:block;background: #ff0000"
/> -->
<!-- <canvas
id="canva4stats"
type="webgl"
style="width:80;height:48;position:absolute;right:0;top:0;opacity:0.9;z-index:10000;display:block;"
width="80"
height="48"
class="canvas"
disable-scroll="true" /> -->
<!-- </view> -->
<!-- <view a:if="{{my.getSystemInfoSync().pixelRatio === 2}}"> 1 </view>
<view a:elif="{{1 > 2}}"> 2 </view>
<view a:else> 3 </view> pointer-events: none;-->
<view class="page-game">
<canvas id="canvas" type="2d" class="canvas" disable-scroll="true"
onTouchStart="log"
onTouchMove="log"
onTouchEnd="log"
onReady="onCanvasReady"
></canvas>
<!-- <canvas
id="canva4stats"
type="webgl"
style="width:80;height:48;position:absolute;right:0;top:0;opacity:0.9;z-index:10000;display:block;"
width="80"
height="48"
class="canvas"
disable-scroll="true" /> -->
</view>
import { Main } from './output.1591869086';
Page({
//暂时先不用吧,有问题
data: {
},
onLoad(query) {
// 页面加载
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
},
onReady() {
// console.log(my._createCanvas)
// this.createMain();
return
my.development = true;
my._createCanvas({
id: 'canvas',
success: (ccc) => {
const dpr = my.getSystemInfoSync().pixelRatio
const windowWidth = my.getSystemInfoSync().windowWidth;
const windowHeight = my.getSystemInfoSync().windowHeight;
ccc.width = windowWidth * dpr;
ccc.height = windowHeight * dpr;
// const context = canvas.getContext("2d");
console.log(ccc.width, ccc.height, dpr)
//初始化
FYGE.initedByCanvas(ccc);
//测试
var aa = ccc.createImage();
aa.src = "https://yun.duiba.com.cn/db_games/activity/etc/optionImages/%E5%8D%8E%E4%B8%BAP30.jpg";
// console.log(aa)
//帧率控制
FYGE.Stage.addFPS("canva4stats")
this.main = new Main(ccc)
console.log(ccc.width, ccc.height)
}
})
},
onCanvasReady() {
my.alert({ content: '111' });
my.development = true;
this.createMain();
},
createMain() {
my.createCanvas({
id: 'canvas',
success: (ccc) => {
const dpr = my.getSystemInfoSync().pixelRatio
const windowWidth = my.getSystemInfoSync().windowWidth;
const windowHeight = my.getSystemInfoSync().windowHeight;
ccc.width = windowWidth * dpr;//重新修改会有误差
ccc.height = windowHeight * dpr;
// console.log(Main)
console.log(ccc.width, ccc.height)
if (!this.main) this.main = new Main(ccc)
// console.log(this.main)
}
})
},
onShow() {
// 页面显示
// FYGE.Stage.pause = false
if (this.main) this.main.run();
},
onHide() {
// 页面隐藏
// FYGE.Stage.pause = true
if (this.main) this.main.pause();
},
onUnload() {
// 页面被关闭
// Stage.stop()
if (this.main) this.main.destroy();
},
onTitleClick() {
// 标题被点击
},
onPullDownRefresh() {
// 页面被下拉
},
onReachBottom() {
// 页面被拉到底部
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
log(e) {
if (this.main) this.main.stage.onMouseEvent(e)
},
});
{}
\ No newline at end of file
import * as FYGE from 'fyge';
var requestID
Page({
//暂时先不用吧,有问题
data: {
divWidth: FYGE.sysInfo.windowWidth,
divHeight: FYGE.sysInfo.windowHeight,
canWidth: FYGE.osType == "ios" ? FYGE.sysInfo.windowWidth : FYGE.sysInfo.windowWidth * FYGE.devicePixelRatio,
canHeight: FYGE.osType == "ios" ? FYGE.sysInfo.windowHeight : FYGE.sysInfo.windowHeight * FYGE.devicePixelRatio,
},
onLoad(query) {
// 页面加载
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
},
onReady() {
my.development = true;
my._createCanvas({
id: 'canvas',
success: (ccc) => {
// console.log(FYGE)
//准备备用的canvas上下文
// FYGE.setBackupCanvasContext(my.createCanvasContext('backupCanvas'))
//初始化
FYGE.initedByCanvas(ccc);
var gl = ccc.getContext('webgl');//获取上下文后才有宽高
// var gl = ccc.getContext('2d')
// var a = my._createOffscreenCanvas()
// a.width = a.height = 300
// var cctx = a.getContext("2d");
// cctx.font = "13px";
// cctx.fillStyle = "red";
// cctx.fillRect(0,0,300,300)
// cctx.fillStyle = "black";
// cctx.fillText("啊实打实大苏打", 100, 100)
// console.log(a)
// gl.drawImage(a, 0, 0)
// gl.fillStyle="#ff0000"
// gl.fillRect(20,0,350,300)
// console.log(ccc.width)
// return
var stage = new FYGE.Stage(
gl,
{
desWidth: 750,
desHeight: 1206,
divWidth: FYGE.sysInfo.windowWidth,
divHeight: FYGE.sysInfo.windowHeight,
canWidth: ccc.width,
canHeight: ccc.height,
type: FYGE.RENDERER_TYPE.WEBGL
}
);
console.log(FYGE.sysInfo)
console.log(ccc.width, ccc.height)
// stage.renderObj.textureManager.img = img
this.stage = stage;
//stage初始化
stage.addEventListener(FYGE.Event.INIT_STAGE, () => {
//启动循环
FYGE.Stage.flushAll()
}, this);
//测试
// console.log(stage)
var t = FYGE.Texture.fromUrl("https://yun.duiba.com.cn/db_games/activity/etc/optionImages/%E5%8D%8E%E4%B8%BAP30.jpg")
// var t= FYGE.Texture.fromCanvas(a)
for (var i = 0; i < 50; i++) {
let sprite = new FYGE.Sprite(t);
stage.addChild(sprite);
sprite.width = sprite.height = 250
sprite.position.set(Math.random() * 750, Math.random() * 1206)
sprite.rotation = 30;
sprite.addEventListener(FYGE.Event.ENTER_FRAME, function () {
sprite.rotation += 2
})
}
// console.log(t)
// FYGE.Tween.get(sprite).to({ x: 750 }, 5000)
//文本
var text = new FYGE.TextField()
// text.position.set(0,-30)
text.size = 30;
text.fillColor = "#ff0000";
text.text = "10";
// stage.addChild(text);
// var count=1;
// setInterval(()=>{
// text.text=""+(count++);
// },100)
var text1 = new FYGE.TextField()
text1.position.set(200, 200)
text1.size = 30;
text1.fillColor = "#ff0000";
text1.text = "10";
// stage.addChild(text1);
// //帧率
FYGE.Stage.addFPS("canva4stats")
// var stats = new FYGE.Stats("canva4stats");
// //循环
// loop();
// function loop() {
// stats.begin();
// //全部都循环
// FYGE.Stage.flushAll();
// stats.end();
// //记录一个id,到时要cancelAnimationFrame的
// requestID = ccc.requestAnimationFrame(loop);
// }
}
})
// this.stage = new FYGE.Sprite()
},
onShow() {
// 页面显示
FYGE.Stage.pause = false
},
onHide() {
// 页面隐藏
FYGE.Stage.pause = true
},
onUnload() {
// 页面被关闭
// Stage.stop()
this.main.destroy();
},
onTitleClick() {
// 标题被点击
},
onPullDownRefresh() {
// 页面被下拉
},
onReachBottom() {
// 页面被拉到底部
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
log(e) {
if (e.touches && e.touches[0]) {
// console.log(e.type, e.touches[0].x, e.touches[0].y);
// my.alert({
// title: '55729:' + e.type + "," + e.touches[0].b + "," + e.touches[0].c
// });
// my.alert({
// title: JSON.stringify(e.changedTouches[0])
// });
} else {
// my.alert({
// title: JSON.stringify(e.changedTouches)
// });
// console.log(e.type);
}
// my.alert({
// title: JSON.stringify(e.type)
// });
// this.stage.onMouseEvent(e)
// console.log(e.type);
// console.log(my.getSystemInfoSync())
// console.log(my._createCanvas)
// console.log(this.ctx)
// this.stage.onMouseEvent(e)
},
});
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
{
"skill": [
{
"command": "hello",
"voice": [
"你好"
]
},
{
"command": "test1",
"voice": [
"呼呼"
]
},
{
"command": "searchVideo",
"voice": [
"我要看@{title:String}",
"我要看@{artist:String}的@{title:String}"
],
"tips": [
"我要看无间道",
"我要看周星驰的大话西游"
]
},
{
"command": "music",
"voice": [
"给奶牛听个音乐",
"给小牛听个音乐",
"给牛牛听个音乐",
"给牛听个音乐",
"给奶牛听首音乐",
"给小牛听首音乐",
"给牛牛听首音乐",
"给牛听首音乐",
"给奶牛放个音乐",
"给小牛放个音乐",
"给牛牛放个音乐",
"给牛放个音乐",
"给奶牛放首音乐",
"给小牛放首音乐",
"给牛牛放首音乐",
"给牛放首音乐",
"给奶牛听音乐",
"给小牛听音乐",
"给牛牛听音乐",
"给牛听音乐",
"给奶牛放音乐",
"给小牛放音乐",
"给牛牛放音乐",
"给牛放音乐",
"给奶牛听个歌",
"给小牛听个歌",
"给牛牛听个歌",
"给牛听个歌",
"给奶牛听首歌",
"给小牛听首歌",
"给牛牛听首歌",
"给牛听首歌",
"给奶牛放个歌",
"给小牛放个歌",
"给牛牛放个歌",
"给牛放个歌",
"给奶牛放首歌",
"给小牛放首歌",
"给牛牛放首歌",
"给牛放首歌",
"给奶牛听歌",
"给小牛听歌",
"给牛牛听歌",
"给牛听歌",
"给奶牛放歌",
"给小牛放歌",
"给牛牛放歌",
"给牛放歌"
]
},
{
"command": "ball",
"voice": [
"给牛玩个球",
"陪奶牛玩球",
"陪小牛玩球",
"陪牛牛玩球",
"陪牛玩球",
"陪奶牛玩篮球",
"陪小牛玩篮球",
"陪牛牛玩篮球",
"陪牛玩篮球",
"陪奶牛玩个球",
"陪小牛玩个球",
"陪牛牛玩个球",
"陪牛玩个球",
"陪奶牛打球",
"陪小牛打球",
"陪牛牛打球",
"陪牛打球",
"陪奶牛打篮球",
"陪小牛打篮球",
"陪牛牛打篮球",
"陪牛打篮球",
"陪奶牛打个球",
"陪小牛打个球",
"陪牛牛打个球",
"陪牛打个球",
"玩球",
"玩篮球",
"玩个球",
"打球",
"打篮球",
"打个球"
]
},
{
"command": "touch",
"voice": [
"给牛摸个头",
"摸奶牛",
"摸小牛",
"摸牛牛",
"摸牛",
"摸摸奶牛",
"摸摸小牛",
"摸摸牛牛",
"摸摸牛",
"摸奶牛的头",
"摸小牛的头",
"摸牛牛的头",
"摸牛的头",
"摸摸奶牛的头",
"摸摸小牛的头",
"摸摸牛牛的头",
"摸摸牛的头",
"摸头",
"摸摸头",
"摸个头"
]
},
{
"command": "milk",
"voice": [
"给奶牛收奶",
"给小牛收奶",
"给牛牛收奶",
"给牛收奶",
"给奶牛收奶滴",
"给小牛收奶滴",
"给牛牛收奶滴",
"给牛收奶滴",
"给奶牛收牛奶",
"给小牛收牛奶",
"给牛牛收牛奶",
"给牛收牛奶",
"给奶牛收个奶",
"给小牛收个奶",
"给牛牛收个奶",
"给牛收个奶",
"给奶牛收个牛奶",
"给小牛收个牛奶",
"给牛牛收个牛奶",
"给牛收个牛奶",
"给奶牛收个奶滴",
"给小牛收个奶滴",
"给牛牛收个奶滴",
"给牛收个奶滴",
"帮奶牛收奶",
"帮小牛收奶",
"帮牛牛收奶",
"帮牛收奶",
"帮奶牛收奶滴",
"帮小牛收奶滴",
"帮牛牛收奶滴",
"帮牛收奶滴",
"帮奶牛收牛奶",
"帮小牛收牛奶",
"帮牛牛收牛奶",
"帮牛收牛奶",
"帮奶牛收个奶",
"帮小牛收个奶",
"帮牛牛收个奶",
"帮牛收个奶",
"帮奶牛收个牛奶",
"帮小牛收个牛奶",
"帮牛牛收个牛奶",
"帮牛收个牛奶",
"帮奶牛收个奶滴",
"帮小牛收个奶滴",
"帮牛牛收个奶滴",
"帮牛收个奶滴",
"收奶",
"收奶滴",
"收牛奶",
"收个奶",
"收个牛奶",
"收个奶滴"
]
},
{
"command": "feed",
"voice": [
"给奶牛喂草",
"给小牛喂草",
"给牛牛喂草",
"给牛喂草",
"给奶牛喂个草",
"给小牛喂个草",
"给牛牛喂个草",
"给牛喂个草",
"给奶牛喂牧草",
"给小牛喂牧草",
"给牛牛喂牧草",
"给牛喂牧草",
"给奶牛喂个牧草",
"给小牛喂个牧草",
"给牛牛喂个牧草",
"给牛喂个牧草",
"给奶牛喂点牧草",
"给小牛喂点牧草",
"给牛牛喂点牧草",
"给牛喂点牧草",
"给奶牛吃草",
"给小牛吃草",
"给牛牛吃草",
"给牛吃草",
"给奶牛吃个草",
"给小牛吃个草",
"给牛牛吃个草",
"给牛吃个草",
"给奶牛吃牧草",
"给小牛吃牧草",
"给牛牛吃牧草",
"给牛吃牧草",
"给奶牛吃个牧草",
"给小牛吃个牧草",
"给牛牛吃个牧草",
"给牛吃个牧草",
"给奶牛吃点牧草",
"给小牛吃点牧草",
"给牛牛吃点牧草",
"给牛吃点牧草",
"喂草",
"喂个草",
"喂牧草",
"喂个牧草",
"喂点牧草",
"吃草",
"吃个草",
"吃牧草",
"吃个牧草",
"吃点牧草"
]
},
{
"command": "grass",
"voice": [
"给奶牛收草",
"给小牛收草",
"给牛牛收草",
"给牛收草",
"给奶牛收个草",
"给小牛收个草",
"给牛牛收个草",
"给牛收个草",
"给奶牛收牧草",
"给小牛收牧草",
"给牛牛收牧草",
"给牛收牧草",
"给奶牛收个牧草",
"给小牛收个牧草",
"给牛牛收个牧草",
"给牛收个牧草",
"给奶牛收点牧草",
"给小牛收点牧草",
"给牛牛收点牧草",
"给牛收点牧草",
"给奶牛收割草",
"给小牛收割草",
"给牛牛收割草",
"给牛收割草",
"给奶牛收割个草",
"给小牛收割个草",
"给牛牛收割个草",
"给牛收割个草",
"给奶牛收割牧草",
"给小牛收割牧草",
"给牛牛收割牧草",
"给牛收割牧草",
"给奶牛收割个牧草",
"给小牛收割个牧草",
"给牛牛收割个牧草",
"给牛收割个牧草",
"给奶牛收割点牧草",
"给小牛收割点牧草",
"给牛牛收割点牧草",
"给牛收割点牧草",
"给奶牛割草",
"给小牛割草",
"给牛牛割草",
"给牛割草",
"给奶牛割个草",
"给小牛割个草",
"给牛牛割个草",
"给牛割个草",
"给奶牛割牧草",
"给小牛割牧草",
"给牛牛割牧草",
"给牛割牧草",
"给奶牛割个牧草",
"给小牛割个牧草",
"给牛牛割个牧草",
"给牛割个牧草",
"给奶牛割点牧草",
"给小牛割点牧草",
"给牛牛割点牧草",
"给牛割点牧草",
"收草",
"收个草",
"收牧草",
"收个牧草",
"收点牧草",
"收割草",
"收割个草",
"收割牧草",
"收割个牧草",
"收割点牧草"
]
}
]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment