大约有 1,614 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0049 秒)
Laya_社区(1206) Laya2.0_文档(194) Laya_示例(55) Laya3.0_api(49) Laya2.0_示例(43) Laya3.0_文档(42) Laya2.0_api(13) laya_api(12)
...3D场景 Laya.Scene3D.load("LayaScene_Laya3D01/Laya3D01.ls",Laya.Handler.create(null,function(scene){ Laya.stage.addChild(scene); //创建摄像机(横纵比,近距裁剪,远距裁剪) var camera= new Laya.Camera( 0, 0.1, 1000); //加载到场景 scene.addChild(camera); //移动摄像机位置 c...
来源: Laya_社区 发布时间: 20180919
...: Scene3D; Scene3D.load("res/laya-test.ls",Handler.create(null,function(sp:Scene3D):void{ scene = Laya.stage.addChild(sp) as Scene3D; })); 找到对应的示例代码了,但是编译报错。。。。用的是layaAi...
来源: Laya_社区 发布时间: 20181115
...neY,lastWords.x+lastWords.width,lineY,color,1); } } var hitRec=HTMLHitRect.create(); hitRec.rec.setTo(words[0].x,lastWords.y,lastWords.x+lastWords.width-words[0].x,lastWords.height); hitRec.href=this.href; recList.push(hitRec); } } } }if(words[0].y != words[words.length-1].y) 此处的修改。目...
来源: Laya_社区 发布时间: 20190611
...创建comp,将这两个body组合起来。测试代码如下: function createBody() { var size = 200, x = 200, y = 200; var sp = new Laya.Sprite(); var text = Laya.loader.getRes("res/bar.png"); var w = size, h = size/5; sp.pivot(w/2, h/2); sp.graphics.fillTexture(text, 0, 0, w, h); partA = Matte...
来源: Laya_社区 发布时间: 20180625
...,使用对象池创建子弹 let flyer: Laya.Sprite = Laya.Pool.getItemByCreateFun("bullet", this.bullet.create, this.bullet); flyer.pos(Laya.stage.mouseX, Laya.stage.mouseY); this._gameBox.addChild(flyer); this._chains.points="118,99,158,70,218,99,258,70,318,99,358,70,418,99,458,70...
来源: Laya_社区 发布时间: 20181128
...th += "../../"; Laya.loader.load("res/particles/GravityMode.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON); })(); function onAssetsLoaded(settings) { data = { "minStartColor": { "0": 1, "1": 0, "2": 0, "3": 1 }, "boxEmitterVelocity": { "0": 0, "1": 0, "2": 0 }, "minHorizontalStartRa...
来源: Laya_社区 发布时间: 20180109
...o(ColorTool.getInstance(), { persent: 1 }, time * 1000, null, Laya.Handler.create(this, this.setPersent, [0])); } /** * 颜色改变函数 * @param color 目标色值 * @param lastColor 当前色值 * @param persent 差值 */ public colorFilter(color: number, lastColor: number, persent: number): L...
来源: Laya_社区 发布时间: 20180930
...uot;), text:"helloWorld"}); var dataTexture = Laya.DataTexture2D.create(imageData.data, 512, 128); console.log("data:" + imageData.data.length); sprite3DMat.diffuseTexture = dataTexture; sprite3D.meshRender.material = sprite3DMat; } //绘制文字到canvas,判断换行位置,...
来源: Laya_社区 发布时间: 20180814
...= "36px Arial"; Laya.loader.load("data/Questv1_Regular.ttf", Handler.create(this,onLoaded), null, Loader.BUFFER); } private function onLoaded():void { var arr:ArrayBuffer=Laya.loader.getRes("data/Questv1_Regular.ttf"); if(arr && Browser.window.conch) { Browser.window.conch.setFon...
来源: Laya_社区 发布时间: 20180705
...aya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1, 1, 1))) as Laya.MeshSprite3D; box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); var material: Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/layabox.png", Laya.Han...
来源: Laya_社区 发布时间: 20190717