大约有 203 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0043 秒)
...根据手机屏幕大小去调整3d人物的大小 我直接在一个Box里addChild一个scene3D对象,设置scene3D的xy无效 请问大大们我该怎么做呢? 2019-01-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...
来源: Laya_社区 发布时间: 20190109
...ayabox.png"); img.x=(Laya.stage.width-256)/2; //添加到舞台 Laya.stage.addChild(img); var img2:Sprite = new Sprite(); //加载显示图片,坐标位于100,50 img2.loadImage("res/layabox.png"); img2.x=(Laya.stage.width-256)/2+100; img2.y=(Laya.stage.height-256)/2-50; //添加到舞台 Laya.stag...
来源: Laya_社区 发布时间: 20200217
...了 2018-12-19 0 4 分享 微博 QZONE 微信 LT 赞同来自: Laya.stage.addChild(this); Laya.timer.once(500,this,test); 转坐标放在后面加了个延时执行。。就没问题了。。应该是执行的时候组件还没有全部加进stage。。 2018-12-20 0 0 分享 微博 QZONE 微信 为...
来源: Laya_社区 发布时间: 20181219
...相对于遮罩对象的,比如代码 var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); ape.pos(400,400); var sprite2 = new laya.display.Sprite(); sprite2.graphics.drawRect(0,0,50,50,"#fff9900"); ape.mask = sprite2; 你可以看下效果 2017-12-2...
来源: Laya_社区 发布时间: 20171221
...= new Laya.Image(); bg.skin = "res/bg.png"; Laya.stage.addChild(bg); })(); 在layaIDE,微信开发者工具模拟器,和iPhoneX真机上的显示效果分别如图: 附件 : --> demo.zip 2018-06-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...
来源: Laya_社区 发布时间: 20180604
...下图一。let cube = new MeshSprite3D(PrimitiveMesh.createBox()); scene.addChild(cube); let pos = new Vector3(); let screenPos = new Vector3(); Laya.timer.frameLoop(1, this, ()=>{ camera.orthographic = true; screenPos.setValue(camera.clientWidth / 2, camera.clientHeight / 2, 0.1); //converScree...
来源: Laya_社区 发布时间: 20220525
... this.down2) Laya.stage.on(Laya.Event.MOUSE_UP, this, this.up2) Laya.stage.addChild(this.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage.mouseY; console.log("鼠标点击的点" + this.a, this.b) Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.move2) } move2() { this.path.push(Laya....
来源: Laya_社区 发布时间: 20170721
...考官方案例。 https://layaair.ldc.layabox.co ... World Laya.stage.addChild(MaxUi.GameUi); MaxUi.GameUi.addChild(tiledMap); 1、原图按照1.5倍来开发,所有逻辑坐在MaxUi.GameUi 上。 2、手势缩放时,MaxUi.GameUi.scale(2,2) 放大 或者 MaxUi.GameUi.scale(1,1) ...
来源: Laya_社区 发布时间: 20180502
...0 ); clickRect.size( Laya.stage.width, Laya.stage.height-100 ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e ){ console.log( e.nativeEvent.offsetX ); console.log( e.nativeEvent.offsetY ); } 我设置了一个矩形,并给这个...
来源: Laya_社区 发布时间: 20180201
...s.are.width, this.are.height, "#00ff00"); _fish.x = 300 _fish.y = 200 this.addChild(_fish); Laya.timer.loop(100, this, function () { console.log(_fish.x, _fish.y, _fish.width, _fish.height, _fish.rotation); if (_fish.hitTestPoint(_fish.x, _fish.y)) { console.log("hittttttt"); } }); } } //程序入...
来源: Laya_社区 发布时间: 20180315