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

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

141. VBOX动态增加的元素没有自动布局 [ 83%]

...1_btn为null console.log(btn1_btn); // btn1_btn.label="first"; this.myvbox.addChild(btn1); var btn2=new ui.test.view_btnUI(); var btn2_btn:laya.ui.Button=btn2.getChildByName("btn") as laya.ui.Button; // btn2_btn.label="second"; this.myvbox.addChild(btn2); var btn3=new ui.test.view_btnUI(); var btn3_...

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

142. 舞台上有个label,我能通过截图保存成图片么 [ 83%]

....fontSize=60; label.text="666"; label.bold=true; label.color="#000000"; sp.addChild(label); sp.size(200,200); Laya.stage.addChild(sp); Laya.timer.frameLoop(60,this,function():void{ var htmlC:HTMLCanvas=sp.drawToCanvas(200,200,0,0); var texture:Texture=new Texture(htmlC); var sp2:Sprite=new Sprite();...

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

143. laya2.7.3 Cannon物理设置了ColliderShape的localOffset属性 并 isKinematic=true时模型会匀速移动 [ 83%]

...stage.alignV = "top"; Laya.stage.alignH = "left";  let scene = Laya.stage.addChild(new Laya.Scene3D());  let camera = new Laya.Camera(0, 0.1, 100); scene.addChild(camera); camera.transform.translate(new Laya.Vector3(0, 2, 5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false);  le...

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

144. 坐标系原点 [ 83%]

...Sprite(); _parent.graphics.drawRect(0, 0, 500, 500, '#ff0000'); Laya.stage.addChild(_parent); var _child = new Sprite(); _child.graphics.drawRect(0, 0, 50, 50, '#336699'); _parent.addChild(_child);就像上面那样,我需要在addChild的时候,_child默认在_parant的左下角~按上面的方...

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

145. 关于graphics镂空的问题https://ask.layabox.com/question/139 [ 82%]

...toSize = true; redBox.graphics.drawRect(0,0,100,100,'#ff0000'); Laya.stage.addChild(redBox); redBox.on("click",this,function(){ trace("click redbox"); }); redBox.on("mouseover",this,function(){ redBox.graphics.clear(); redBox.graphics.drawRect(0,0,100,100,'#00ff00'); }); redBox.on("mouseout",this,fu...

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

146. webgl模式下对Panel组件旋转时Panel子对象显示错误的BUG! [ 82%]

...anelRotationTest(Laya.Sprite); testSpriteRotation.pos(300,260); Laya.stage.addChild(testSpriteRotation); var testPanelRotation:PanelRotationTest = new PanelRotationTest(Laya.Panel); testPanelRotation.pos(1000,260); Laya.stage.addChild(testPanelRotation); Laya.Tween.to(testPanelRotation,{rotation:720...

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

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

...eenMode = 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.transform.translate(new Laya.Vector3(0, 0.5, 1)); camera.transform.rotate(new Laya.Vector3( -15, 0, 0), true, false); var layaMonke...

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

148. 续飞机大战 [ 82%]

...,852); Laya.stage.bgColor="#EEFFCC"; var bg = new BackGround(); Laya.stage.addChild(bg); } return Game; }()); var gameInstance = new Game();BackGround.jsvar BackGround = (function (_super) { function BackGround() { BackGround.__super.call(this); //创建背景1 this.bg1 = new Laya.Sprite(); //加载...

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

149. 为啥 增加 Text ,drawcall 暴增 ?????????????? [ 82%]

... fish.scoreItem.y = fish.getBox().y - fish.scoreItem.height; this.scoreBox.addChild(fish.scoreItem); fish.scoreGold = new Laya.Image(); fish.scoreGold.skin = "assets/ui_imgs/icon_00312.png"; fish.scoreGold.x = fish.scoreItem.x; fish.scoreGold.y = fish.scoreItem.y; fish.scoreGold.scaleX = 0.6; fish.s...

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

150. 请问,如何获得StandardMaterial,为什么transformUV始终是null [ 82%]

...LL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); var directio...

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