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

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

201. 屏幕适配 · LayaAir3.4 · 引擎文档 · LAYABOX [ 39%]

...ated"; const { regClass } = Laya; @regClass() export default class IndexRT extends IndexRTBase { onAwake(): void { //设置舞台设计宽高 Laya.stage.designWidth = 1080; Laya.stage.designHeight = 1920; //在引擎初始化之后改变舞台设置的话,必须要手动调用一次updateCanvasSiz...

来源: Laya3.0_文档 发布时间: 20251010

202. laya.ui.List_API3.0 [ 38%]

...dex= ", index); } } } import laya.ui.Box; import laya.ui.Label; class Item extends Box { public function Item() { graphics.drawRect(0, 0, 100, 20,null, "#ff0000"); var label:Label = new Label(); label.text = "100000"; label.name = "label";//设置 label 的name属性值。 label.size(100, 20); addCh...

来源: Laya3.0_api 发布时间: 20231115

203. 统计信息 · LayaAir3.4 · 引擎文档 · LAYABOX [ 37%]

...下: const { regClass, property } = Laya; @regClass() export class Demo extends Laya.Script { onEnable(): void { Laya.Stat.elements = [ Laya.StatElement.CT_FPS, Laya.StatElement.CT_DrawCall, Laya.StatElement.M_GPUMemory ]; // 开启统计面板(参数为x,y坐标,默认为0,0) Laya.Stat.show...

来源: Laya3.0_文档 发布时间: 20260128

204. laya.ui.Tree_API3.0 [ 37%]

... import laya.ui.Box; import laya.ui.Clip; import laya.ui.Label; class Item extends Box { public function Item() { this.name = "render"; this.right = 0; this.left = 0; var selectBox:Clip = new Clip("resource/ui/clip_selectBox.png", 1, 2); selectBox.name = "selectBox"; selectBox.height = 24; selectBox...

来源: Laya3.0_api 发布时间: 20231115

205. HTML文本 · LayaAir3.0文档 · LAYABOX [ 36%]

...<img src='res/boy.png'></img>"; */ export class HTMLDivElement extends Sprite { 下面我们通过一些示例代码来看看运行效果: 3.1 同一个文本中设置Bold、Font、FontSize、Color、下划线 【注意:目前不支持斜体、描边、span标签内嵌的方式】 ...

来源: Laya3.0_文档 发布时间: 20230303

206. laya.ui.Dialog_API3.0 [ 36%]

...Button; import laya.ui.Dialog; import laya.ui.Image; class Dialog_Instance extends Dialog { function Dialog_Instance():void { var bg:Image = new Image("resource/ui/bg.png"); bg.sizeGrid = "40,10,5,10"; bg.width = 150; bg.height = 250; addChild(bg); var image:Image = new Image("resource/ui/image.png"...

来源: Laya3.0_api 发布时间: 20231115

207. 官方案例里摄像机绕物体旋转脚本的问题 [ 36%]

....AroundPos = plane.transform.position; */ export default class ModelViewer extends Laya.Script { // Text m_debugTip; public canRotation_X: boolean = true; public canRotation_Y: boolean = true; public canScale: boolean = true; /// <summary> /// Around center. /// </summary> //public targe...

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

208. 列表组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 35%]

...须和预制体根节点类型匹配,一般都是GButton。 class MyItem extends Laya.GButton { //注意!在onConstruct里才可以获取子对象,建议在这里做初始化,不要在构造函数里做初始化 onConstruct() { //this.xx = this.getChild("xx"); //this.xx.on(Laya.Event.CLICK, ...

来源: Laya3.0_文档 发布时间: 20251128

209. 正常运行的2.1升级到2.2.0出现循环依赖的错误,这是咋回事丫 ? [ 35%]

...面的import就没了。  无法去掉的import主要是类似 new B, extends B, instanceof B, 以及静态成员访问B.stM 这种形式 例如上面的改成 b=new B() 就真的是循环了。 对于真正的循环可以通过引入一个接口对象等方式解决。这个就要看具体项...

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

210. 3D中摄像机绕物体旋转该如何实现? [ 33%]

....AroundPos = plane.transform.position; */ export default class ModelViewer extends Laya.Script { // Text m_debugTip; public canRotation_X: boolean = true; public canRotation_Y: boolean = true; public canScale: boolean = true; /// <summary> /// Around center. /// </summary> //public targe...

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