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

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

281. UI-Image [ 82%]

...ew Image("../../res/ui/dialog (3).png"); dialog.pos(165, 62.5); Laya.stage.addChild(dialog); } })();module laya { import Stage = Laya.Stage; import Image = Laya.Image; import WebGL = Laya.WebGL; export class UI_Image { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, Web...

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

282. 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

283. 设置滤镜(JavaScript-LayaAir基础篇(JS)-位图) [ 82%]

...pe = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); return ape; } })(); ``` 在上面的代码中,我们创建了一个原始位图、一个红色滤镜效果位图、一个灰色滤镜效果位图。运行效果如图1所示: ![图1](img/1.png) (图1) ## 2...

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

284. 关于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

285. 续飞机大战 [ 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

286. 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

287. 请问,如何获得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

288. 分享:Panel下动态修改子容器宽高并刷新显示! [ 82%]

...置panel的垂直滚动条,方便看出panel的滚动变化 Laya.stage.addChild(panel); var sp:Sprite=new Sprite();//panel的子容器sp sp.graphics.drawRect(0,0,500,1000,"#FF0000"); sp.size(500,1000); panel.addChild(sp); var btnAdd:Button=new Button();//点击按钮,动态添加sp的子对象...

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

289. 为啥 增加 Text ,drawcall 暴增 ?????????????? [ 81%]

... 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

290. 多种碰撞器形状(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 81%]

...m() * 0.75 + 0.25; //创建盒型MeshSprite3D var box:MeshSprite3D = scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(sX, sY, sZ))) as MeshSprite3D; //创建刚体碰撞器 var rigidBody:Rigidbody3D = box.addComponent(Rigidbody3D); //创建盒子形状碰撞器 var boxShape:BoxColliderShape =...

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