大约有 2,280 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0070 秒)
Laya_社区(1494) Laya2.0_文档(259) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(80) Laya2.0_api(74) laya_api(70) Laya3.0_文档(64)
...ya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this.aniFly = new Animation(); this.aniFly.loadAtlas(PathFly); this.aniFly.play(); this.aniFly.pos(250, 100); Laya.stage.addChild(this.aniFly); // 创建按钮 this.btn = new Sprite().size...
来源: Laya2.0_示例 发布时间: 20241117
...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, 2, 5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, fal...
来源: Laya_示例 发布时间: 20241117
...age.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } createTimerAnimation() { const Clip = Laya.Clip; this.counter = new Clip(clipSkin, 10, 1); Laya.stage.addChild(this.counter); this.counter.autoPlay = true; this.counter.interval = 1000; this.counter.x = (Laya....
来源: Laya2.0_示例 发布时间: 20241117
...器"; coralRect.size(Laya.stage.width, Laya.stage.height / 2); Laya.stage.addChild(coralRect); coralRect.on(Event.MOUSE_DOWN, this, this.onDown); } createDeepSkyblueRect() { const Sprite = Laya.Sprite, Event = Laya.Event; let deepSkyblueRect = new Sprite(); deepSkyblueRect.graphics.drawRect(0, 0, 10...
来源: Laya2.0_示例 发布时间: 20241117
...个背景 var bg = new Image(); bg.skin = "../../res/bg.jpg"; Laya.stage.addChild(bg); //实例一个文本 txt = new Text(); txt.text = "点击我切换适配模式(noscale)"; txt.bold = true; txt.pos(0, 200); txt.fontSize = 30; txt.on("click", this, onTxtClick); Laya.stage.addChild(txt); //实例...
来源: Laya_示例 发布时间: 20241117
...例一个背景 let bg = new Image(); bg.skin = "res/bg.jpg"; Laya.stage.addChild(bg); //实例一个文本 this.txt = new Text(); this.txt.text = "点击我切换适配模式(noscale)"; this.txt.bold = true; this.txt.pos(0, 200); this.txt.fontSize = 30; this.txt.on("click", this, this.onTxtClick); ...
来源: Laya2.0_示例 发布时间: 20241117
...++){ let t = new Laya.Text() t.text = 'test' t.color = '#ffffff' container.addChild(t) } Laya.stage.addChild(container)新建一个精灵 向其中插入1000个文字 内存快照变为10.5var WebGL = laya.webgl.WebGL; Laya.init(600, 400, WebGL); let container = new Laya.Box() for(let i =0;i<1000...
来源: Laya_社区 发布时间: 20180728
...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.5, 1)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); Laya.loader.cr...
来源: Laya_示例 发布时间: 20241117
...``typescript //创建一个空节点用来放置各模型 sprite3D = scene.addChild(new Sprite3D()) as Sprite3D; //正方体 var box:MeshSprite3D = sprite3D.addChild(new MeshSprite3D(PrimitiveMesh.createBox(0.5, 0.5, 0.5))) as MeshSprite3D; box.transform.position = new Vector3(2.0, 0.25, 0.6); box.t...
来源: Laya2.0_文档 发布时间: 20210715
...Animation(); var waterBg = Laya.Sprite.fromImage("res/bg.png"); Laya.stage.addChild(waterBg); //创建背景 this.bg = []; this.bg[0] = new BackGround("res/bg1.png", 0.1); this.bg[0].pos(0, 0); Laya.stage.addChild(this.bg[0]); this.bg[1] = new BackGround("res/bg2.png", 1); this.bg[1].pos(0, 0); Laya...
来源: Laya_社区 发布时间: 20170103