• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 1,013 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0082 秒)

351. 给以个对象绑定两个on方法为什么只能执行一次 ? [ 65%]

...is,this.showMyfamMenu);   _proto.showMyfamMenu = function(){         console.log(1)         if(!this.famlilyMune.isActive){         //     //Laya缓动动画——操作对新-属性列表-执行时间-动画效果-回调             Laya.Tween.to(this.famlilyMune,{rotation:0},...

来源: Laya_社区 发布时间: 20170301

352. 请问 layaair2.0的js有没有api可以查询 例如Laya.Script [ 65%]

...oder 赞同来自: 获取触发事件我摸索出来了   onMouseDown(e){ console.log("mouseDown "+e.target.name); } onMouseUp(e){ console.log("mouseup"); } 2018-10-29 0 0 分享 微博 QZONE 微信 coder 赞同来自: 可是 https://layaair.ldc.layabox.com/api 实在没有对js有什么描述,...

来源: Laya_社区 发布时间: 20181029

353. 计时器-延迟调用 [ 65%]

...+) { Laya.timer.callLater(this, onCallLater); } } function onCallLater() { console.log("onCallLater triggered"); var text = new Text(); text.font = "SimHei"; text.fontSize = 30; text.color = "#FFFFFF"; text.text = "打开控制台可见该函数仅触发了一次"; text.size(Laya.stage.width, Laya.s...

来源: Laya_示例 发布时间: 20241001

354. this.bitmap.activeResource is not a function [ 65%]

...ize(Laya.stage.width,Laya.stage.height); if(this._openZone.parent) return; console.log("打开开放域",Laya.Browser.onMiniGame) Laya.stage.addChild(this._openZone); this._openZone.x = vx; this._openZone.y = vy; if(Laya.Browser.onMiniGame){ Laya.Browser.window.sharedCanvas.width = Laya.stage.design...

来源: Laya_社区 发布时间: 20200618

355. 3D模型旋转问题,鼠标移动之后,根据按下移动的X坐标差值判断左右旋转,但是会越转越快,请问是什么问题? [ 65%]

...问是什么问题? private mouseMove(state: Laya.RenderState):void{ // console.log(mX + "移动"); // console.log(this.lastMouseX + "按下"); let mX:number = Laya.stage.mouseX; let mY:number = Laya.stage.mouseY; let vec:Laya.Vector3 ; if(this.isDown){ if(this.lastMouseX - mX > 0) { vec = new ...

来源: Laya_社区 发布时间: 20180113

356. l微信开放域无法显示,但是可以正常传数据 [ 65%]

.../?nav=zh-ts-5-0-7 if(Laya.Browser.onMiniGame) wx.onMessage(function(data){ console.log(data); if(data.url == "res/atlas/test.atlas" ){ Laya.loader.load("res/atlas/test.atlas",Laya.Handler.create(this,this.onComplete)); } }.bind(this)); else Laya.loader.load("res/atlas/test.atlas",Laya.Handler.create...

来源: Laya_社区 发布时间: 20200314

357. image在相应loaded的时候,无法正确获取高度 [ 65%]

...or() { super(); this.on('start', this, this.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies.rectangle(this.x, this.y, this.width, this.height, createOp...

来源: Laya_社区 发布时间: 20180530

358. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 65%]

...is, onLoading, null, false)); //加载进度 function onLoading(progress){ console.log("onLoading: " + progress); } //加载完毕 function onLoaded(){ console.log("onLoaded"); } 我们刷新页面看看有什么效果 如下图所示 我们看到 图片加载了 而且也有我们打印出来的加...

来源: Laya_社区 发布时间: 20160722

359. 请问graphics.drawTexture(texture)中如何增加一个matrix,只显示图中的一个圆形区域 [ 65%]

...n(){ if(miniMap.complete==true){ var img = circle_image(miniMap,750,1334); console.log(miniMap); var miniMap1 = new Laya.Image(); miniMap1.loadImage(img); Laya.stage.addChild(miniMap1); } } miniMap.src=url;     function circle_image(img, oldImgWidth, oldImgHeight) { var width, height, canvas, cont...

来源: Laya_社区 发布时间: 20181125

360. 请问HtmlDivElement控件在innerHTML中有<div>标签的情况下获取实际宽高为0的问题? [ 65%]

...3'&gt;HTML文本&lt;/span&gt;"; html += "&lt;/div&gt;" p.innerHTML = html; console.log(p.contextWidth); //0 p.frameOnce(2,this,function(){ console.log(p.contextWidth); //0 }) } function showExternalHTML() { var p = new HTMLIframeElement(); Laya.stage.addChild(p); p.href = "../../res/html/test.html";...

来源: Laya_社区 发布时间: 20170314