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

大约有 772 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0054 秒)

241. 小米手机三指点击后,后续获得的触摸点失效 [ 72%]

...的触摸点失效,单点的情况下会获得三个触摸点信息Laya.stage.on(Laya.Event.MOUSE_DOWN, this, (data: Laya.Event) => { let str = ""; if (data.touches) { for (let i = 0; i < data.touches.length; i++) { str += ` {${i} : ${data.touches[i].pos.toString()}}`; } } console.log("drag ...

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

242. 关于多点触控e.touches问题 [ 72%]

关于多点触控e.touches问题 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, onCtrlMoveRockerTouchDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, onCtrlMoveRockerTouchDown);     function onCtrlMoveRockerTouchDown(e) {    console.log("onCtrlMoveRockerTouchDown()");    this.ctrlMoveRockerPosX...

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

243. 分享:避免鼠标快速移动,mouseout和mouseover触发顺序不一致的问题! [ 72%]

...示对象 public function MouseOver_mouseOut() { Laya.init(600,400); Laya.stage.bgColor='#EEFFCC'; arr=; var sp1:Sprite=new Sprite(); sp1.autoSize=true; sp1.name='sp1'; sp1.graphics.drawRect(0,0,100,100,"#FF0000"); var sp2:Sprite=new Sprite(); sp2.autoSize=true; sp2.name='sp2'; sp2.graphics.drawRect...

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

244. 陀螺仪与加速计(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 72%]

... this.info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height);  Laya.stage.addChild(this.info);  Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, onDeviceorientation); function onDeviceorientation(absolute, rotationInfo) { this.info.text = "alpha:" +...

来源: Laya2.0_文档 发布时间: 20210714

245. Event触发不了 [ 71%]

...ent.MOUSE_DOWN, this, function():void {console.log(1);}); btn.on换成Laya.stage.on是可以触发的,但是btn却触发不了。 麻烦解答,谢谢。 2017-05-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回...

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

246. 为什么全局属性赋值后,在另外个函数中调用会自动变成undefined [ 71%]

...ontroller(){             super();             Laya.stage.scaleMode = Stage.SCALE_FULL;             Laya.stage.screenMode = Stage.SCREEN_NONE;              Scene3D.load("res/model/LayaScene_Car/Conventional/car.ls", Handler.create(null, function(scene:...

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

247. 3D中摄像机绕物体旋转该如何实现? [ 71%]

...Distance = Vector3.distance(this.transform.position, this.AroundPos); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouse...

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

248. Laya中如何使用canvas [ 71%]

...03 17:08 用了 137*****130 • 2018-08-03 17:12 Laya.init(640,1136); Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_WIDTH; // Laya.stage.bgColor = null; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.Stat.show(); let canvas = Laya.Render.canvas; let co...

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

249. 官方案例里摄像机绕物体旋转脚本的问题 [ 71%]

...Distance = Vector3.distance(this.transform.position, this.AroundPos); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouse...

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

250. 3D怎么使用canvas渲染,无论怎么看都是webgl [ 71%]

...怎么看都是webgl 3D怎么使用canvas渲染  Laya3D.init(0, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.tr...

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