大约有 6,579 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0109 秒)
Laya_社区(5232) Laya3.0_api(482) Laya2.0_文档(363) Laya_示例(154) Laya2.0_示例(116) Laya3.0_文档(101) Laya2.0_api(67) laya_api(64)
...///////////左右两张背景图 var sprite0:Sprite = new Sprite(); sprite0.loadImage("creatRoom/background_bk.png"); sprite0.pos(0,0 ); sprite0.cacheAsBitmap = true; Laya.stage.addChildAt(sprite...
来源: Laya_社区 发布时间: 20170314
hitArea怎么用 var container = new Sprite(); container.graphics.drawRect(0,0,640,1136,'#ff0000'); container.size(640,1136) Laya.stage.addChild(container); var bg2Sprite = new Sprite(); bg2Sprite.graphics.drawRect(...
来源: Laya_社区 发布时间: 20170223
..., Handler.create(this, createApe)); })(); function createApe() { var ape = new Sprite(); ape.loadImage(apePath); ape.x = (Laya.stage.width - ape.width) / 2; ape.y = (Laya.stage.height - ape.height) / 2; Laya.stage.addChild(ape); applayFilter(ape); } function applayFilter(ape) { var blurFilter = new ...
来源: Laya_示例 发布时间: 20251130
... = "#232628"; Stat.show(); setup(); })(); function setup() { var textBox = new Sprite(); // 随机摆放文本 var text; for (var i = 0; i < 1000; i++) { text = new Text(); text.fontSize = 20; text.text = (Math.random() * 100).toFixed(0); text.rotation = Math.random() * 360; text.color = "#CCCCCC"; ...
来源: Laya_示例 发布时间: 20251130
3D模型除了无法获得款高问题,发现在new Laya.Scene()中无法通过getChildByName获取到对象 但是,通过getChildAt 可以获取到对象,另外我希望获取之下的所有子节点应该如何处理?另外在减少对象过程中发现删除其中一个对象后,后续...
来源: Laya_社区 发布时间: 20171120
...c); } function createButton(label) { var w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } function onPlayMus...
来源: Laya_示例 发布时间: 20251130
...owApe(); })(); function showApe() { // 方法1:使用loadImage var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("...
来源: Laya_示例 发布时间: 20251130
...)(); //创建地图 function createMap() { //创建地图对象 tiledMap = new TiledMap(); mX = mY = 0; //创建地图,适当的时候调用destory销毁地图 tiledMap.createMap("../../res/tiledMap/desert.json", new Rectangle(0, 0, Browser.width, Browser.height), new Handler(this, completeHandler...
来源: Laya_示例 发布时间: 20251130
...NGE, this, onOrientationChange); } function createCompass() { compassImg = new Sprite(); Laya.stage.addChild(compassImg); compassImg.loadImage(compassImgPath); compassImg.pivot(compassImg.width / 2, compassImg.height / 2); compassImg.pos(Laya.stage.width / 2, 400); } function drawUI() { var canvas =...
来源: Laya_示例 发布时间: 20251130
....MeshTerrainSprite3D.createFromMesh(terrain, 129, 129)); var terMaterial = new Laya.TerrainMaterial(); terMaterial.diffuseTexture1=new Laya.Texture2D.load("map2.png"); terMaterial.diffuseTexture2=new Laya.Texture2D.load("map2.png"); terMaterial.diffuseTexture3=new Laya.Texture2D.load("map2.png"); te...
来源: Laya_社区 发布时间: 20170620