大约有 2,307 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0122 秒)
Laya_社区(1512) Laya2.0_文档(259) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(80) Laya2.0_api(74) Laya3.0_文档(73) laya_api(70)
... "#FF0000"); var bounds:Rectangle = sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调用。 2. 设置容器的autoSize为true。 ```javascript var sp:Sprite = new Sprite(); sp.autoSize = tr...
来源: Laya2.0_文档 发布时间: 20210715
...官方示例脚本,加载一个从U3D导出的2D粒子特效Laya.stage.addChild(Laya.Scene.load(url)) 但是粒子不显示。想问到底这个步骤怎么搞?急急急!!!!我把导出的资源上传了。 附件 : --> LayaScene_1.rar 2018-03-20 添加评论 免费帖 --> 分享 微...
来源: Laya_社区 发布时间: 20180320
...加入父对象滤镜渲染失效 let ctn = new Laya.Sprite(); Laya.stage.addChild(ctn); let drawSp = new Laya.Sprite(); drawSp.graphics.drawRect(0, 0, 100, 100, `#ffcc00`); drawSp.x = 200; drawSp.y = 200; //由 20 个项目(排列成 4 x 5 矩阵)组成的数组,灰图 var grayscaleMat: any[]...
来源: Laya_社区 发布时间: 20250929
...00,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调用。 1. 设置容器的autoSize为true。 ```javascript var sp=new Laya.Sprite(); sp.autoSize=true; sp.graphics....
来源: Laya2.0_文档 发布时间: 20210715
... = Laya.Image; let dialog = new Image("res/ui/dialog (3).png"); Laya.stage.addChild(dialog); dialog.pos(165, 62.5); } } new UI_Image();module laya { import Stage = Laya.Stage; import Image = Laya.Image; import WebGL = Laya.WebGL; export class UI_Image { constructor() { // 不支持WebGL时自动切...
来源: Laya2.0_示例 发布时间: 20251209
...left" this.html.style.color = "#fff" this.html.innerHTML = "" this.hornBox.addChild(this.html) this.addChild(this.hornBox) } /** 滚动动画 */ private _animate(e: Event): void { const _w = this.html.width const _x = this.html.x if (_x < -_w) { this.stop(true) } else { this.html.x -= 2 } } /** ...
来源: Laya_社区 发布时间: 20180314
... this.arr = []; this.newScene = Laya.stage.addChild(new Laya.Scene3D()) as Laya.Scene3D; //初始化照相机 var camera = this.newScene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera; camera.transform...
来源: Laya_社区 发布时间: 20201120
...tmpVector = new Laya.Vector3(0, 0, 0); this.scene = Laya.stage.addChild(new Laya.Scene3D()); //初始化照相机 let camera = this.scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 6, 9.5)); camer...
来源: Laya_社区 发布时间: 20191009
... = Math.random() * 0.75 + 0.25; //创建盒型MeshSprite3D var box = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(sX, sY, sZ))) as Laya.MeshSprite3D; //创建刚体碰撞器 var rigidBody:Laya.Rigidbody3D = box.addComponent(Laya.Rigidbody3D); //创建盒子形状碰撞器 var bo...
来源: Laya2.0_文档 发布时间: 20210714
...r = new Sprite(); this.guideContainer.cacheAs = "bitmap"; Utils.GuideLayer.addChild(this.guideContainer); this.guideContainer.on(Laya.Event.CLICK, this, this.nextStep); this.mouseEnabled = false; var maskArea: Laya.Sprite = new Laya.Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, La...
来源: Laya_社区 发布时间: 20171222