Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
game-3dball
Advanced tools
npm install game-3dball
{
"usingComponents": {
"game": "game-3dball/index"
}
}
{
"node_modules_es6_whitelist": [
"game-3dball"
]
}
Page({
enterFun() {
// 1.进场
this.gameComponent.intro();
},
ballFun(e) {
// 2.选择球
let idx = e.currentTarget.dataset.idx;
this.gameComponent.setBall(idx);
},
playFun() {
// 开始游戏
this.gameComponent.play();
},
stopFun() {
// 停止游戏
this.gameComponent.stop();
},
resetFun() {
// 重置游戏
this.gameComponent.reset();
},
leftFun() {
// 左移
this.gameComponent.goLeft();
},
rightFun() {
// 右移
this.gameComponent.goRight();
},
onInitDone(ref) {
this.gameComponent = ref;
console.log("场景加载完成...");
},
onUpdate(num) {
console.error("穿过了房子:", num);
},
})
<view class="pageBox">
<game onInitDone="onInitDone" onUpdate="onUpdate" />
</view>
<view style="position:absolute;width:100vw;height:100vh;z-index:2;">
<view onTap="enterFun" style="position:absolute;left: 10%;bottom: 100rpx;">进场</view>
<view onTap="playFun" style="position:absolute;left: 40%;bottom: 100rpx;">开始</view>
<view onTap="stopFun" style="position:absolute;left: 50%;bottom: 100rpx;">结束</view>
<view onTap="resetFun" style="position:absolute;left: 60%;bottom: 100rpx;">重置</view>
<view onTap="leftFun" style="position:absolute;left: 10%;bottom: 200rpx;">左移</view>
<view onTap="ballFun" data-idx="1" style="position:absolute;left: 30%;bottom: 200rpx;">球1</view>
<view onTap="ballFun" data-idx="2" style="position:absolute;left: 40%;bottom: 200rpx;">球2</view>
<view onTap="ballFun" data-idx="3" style="position:absolute;left: 50%;bottom: 200rpx;">球3</view>
<view onTap="rightFun" style="position:absolute;left: 80%;bottom: 200rpx;">右移</view>
</view>
.pageBox{
background-color: #e1edfb;
width: 100vw;
height: 100vh;
position: relative;
z-index: 1;
}
FAQs
# 游戏
The npm package game-3dball receives a total of 0 weekly downloads. As such, game-3dball popularity was classified as not popular.
We found that game-3dball demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.