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

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

1151. 如何使 3d 人物变半透明 [ 74%]

... 提交 1 个回复 Monica - 知识达人 赞同来自: yoahuili var mat = new StandardMaterial(); mat.renderMode = 5; mat.albedo = new Vector4(1,1,1,0.5); meshSprite3D.meshRender.sharedMaterials = mat; 2017-10-31 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问...

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

1152. 怎么获取手机相册内容 [ 74%]

...setsLoaded)); } public function onUIAssetsLoaded():void { var btn:Button = new Button("res/button-1.png"); Laya.stage.addChild(btn); //创建隐藏的file并且把它和按钮对齐。达到位置一致,这里我们默认在0点位置; var file:Object = Browser.document.createElement("input"); /...

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

1153. ts怎么调用input file弹框选择本地文件 [ 74%]

...      trace("111");             var fileReader:Object = new Browser.window.FileReader();             trace("上传点击");   Browser.document.getElementById('file').click();                        var file:Object = Browser.document.getElementByI...

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

1154. 菜鸟求教:laya 按钮问题 [ 74%]

...山。我用的是layaide2.1.0.  用的是TypeScript,我发现 var ff = new laya.ui.Button(this.skin); var _btn = new Laya.Button(this.skin);  这两个方法都是实例一个按钮,但是第一行却报错说Button未定义。但是第二行却是可以的。难道说这两种写法还有什...

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

1155. 对象池是什么,没怎么理解 [ 74%]

...折叠 要回复问题请先登录 发起人  相关问题 两个对象new了一个相同的对象,调用第一个的一个方法,走进了第二方法里 使用了u3D导出来的粒子,不停的显示移除并销毁其克隆对象,统计面板的显存和内存就会显示成负数 怎...

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

1156. laya3d导入模型动画,添加光照之后,模型全黑。 [ 74%]

...就好了 //方向光 var directionLight:DirectionLight = scene.addChild(new DirectionLight()) as DirectionLight; directionLight.color = new Vector3(1, 1, 1); directionLight.direction = new Vector3(0, -1.0, -1.0); 如果还是达不到你想要的效果的话就尝试更改一下你的材质 材质...

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

1157. 物理碰撞脚本和触发器脚本(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 74%]

...TriggerEnter(other) { this.owner.meshRenderer.sharedMaterial.albedoColor = new Laya.Vector4(0.0, 1.0, 0.0, 1.0); } /** * 当其他碰撞器进入绑定物体碰撞器后逐帧触发(子弹在物品内时) * 注:如相对移动速度过快,可能直接越过 */ onTriggerStay(other) {} /** * ...

来源: Laya2.0_文档 发布时间: 20210715

1158. 这个圆形遮罩问题怎么解决 [ 74%]

这个圆形遮罩问题怎么解决 我的代码时这样的 var sp = new Sprite(); this.addChild(sp);         this.img = new Sprite(); sp.graphics.drawCircle(0,0,50,"transparent");         this.addChild(this.img); this.img.mark = sp;   我看被人也都是这样写的不知道...

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

1159. 精灵 · LayaAir3.4 · 引擎文档 · LAYABOX [ 74%]

...下代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组...

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

1160. domParser在哪儿 [ 74%]

....replace(/>\s+</g, '><');             __JS__("rst=(new DOMParser()).parseFromString(value,'text/xml')");             if (rst.firstChild.textContent.indexOf("This page contains the following errors") > -1) {                 throw new Error(rst.fi...

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