大约有 6,598 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0142 秒)
Laya_社区(5247) Laya3.0_api(482) Laya2.0_文档(363) Laya_示例(154) Laya2.0_示例(116) Laya3.0_文档(105) Laya2.0_api(67) laya_api(64)
...光。 ```typescript //创建方向光 var directionLight = scene.addChild(new Laya.DirectionLight()) as Laya.DirectionLight; //方向光的颜色 directionLight.color = new Laya.Vector3(1, 1, 1); //设置平行光的方向 var mat = directionLight.transform.worldMatrix; mat.setForward(new Laya.Vect...
来源: Laya2.0_文档 发布时间: 20210714
...= "#232628"; createInput(); })(); function createInput() { var inputText = new Input(); inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya.stage.height - inputText.height >> 1; // 设置字体样式 inputText.bold = true; inputText.bgColor = "#666666"...
来源: Laya_示例 发布时间: 20260303
...mitText.y = 320; } createSampleText() { const Text = Laya.Text; let text = new Text(); Laya.stage.addChild(text); text.overflow = Text.HIDDEN; text.color = "#FFFFFF"; text.font = "Impact"; text.fontSize = 20; text.borderColor = "#FFFF00"; text.x = 80; text.text = "A POWERFUL HTML5 ENGINE ON FLASH TE...
来源: Laya2.0_示例 发布时间: 20260303
...ffectMaterialDemo)): ```typescript var earth:MeshSprite3D = scene.addChild(new MeshSprite3D(PrimitiveMesh.createSphere())) as MeshSprite3D; earth.transform.position = new Vector3(0, 0, 0); //创建EffectMaterial材质 var material:EffectMaterial = new EffectMaterial(); //加载地球贴图 Texture2D...
来源: Laya2.0_文档 发布时间: 20210715
...链接 提交 1 个回复 lvfy 赞同来自: 支持。 传入类名直接new就行了。 getObj(className, ...ars : Array<any>){ return new className(...ars); } 2017-10-19 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 tianlikehui ...
来源: Laya_社区 发布时间: 20171019
as编译js的一个问题 var o:Object = new Object(); for ( var key :int in o ) { } 这样的AS代码会编译出 var o=new Object(); for (var key=0 in o){ } 这样的JS代码 在IOS里真机还是LAYABOX运行都会报 SyntaxError:Cannot assign to the loop variable inside a for-in loop h...
来源: Laya_社区 发布时间: 20171011
...方形拉成长方形。我应该怎么做呢。var box = scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(0.5, 0.5, 0.5))); // var _scale = new Laya.Vector3(2,2,2); box._geometryFilter._sharedMesh._height=1 console.log(box._geometryFilter._sharedMesh) 2018-12-13 添加评论 免费帖 --> 分...
来源: Laya_社区 发布时间: 20181213
...ll; private _persent: number = 0; protected constructor() { this.targets = new Array<Laya.Sprite>(); } /** * 实例 */ public static getInstance(): ColorTool { if (ColorTool.instance == null) { ColorTool.instance = new ColorTool(); } return ColorTool.instance; } /** * 添加颜色改变对...
来源: Laya_社区 发布时间: 20180930
...r.create(this,this.graphicsImg)); } private graphicsImg():void{ this.img = new Laya.Sprite(); //获取图片资源,绘制到画布 this.img.graphics.drawTexture(Laya.loader.getRes(this.Res),150,50); //添加到舞台 Laya.stage.addChild(this.img); } } new MaskDemo(); ``` 运行效果如图2所示...
来源: Laya2.0_文档 发布时间: 20210715
... //加载并显示模型 roleMan = new MeshSprite3D(Mesh.load("3d/man/hero-mon_1129.lm")); roleMan.transform.localScale = new Vector3(0.01, 0.01, 0.01); roleMan.transform.localPosition = new Vector3(0, -0.5, -3); ...
来源: Laya_社区 发布时间: 20170401