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

大约有 443 项符合查询结果, 库内数据总量为 30,897 项。 (搜索耗时: 0.0047 秒)

341. List翻页效果 [ 51%]

...fo"; import { ui } from "../ui/layaMaxUI"; export default class RuleDialog extends ui.scene.RuleDialogUI { private m_index: number = -1; private m_downValue: number = -1; constructor() { super(); this.list_rule.hScrollBarSkin = ""; this.list_rule.renderHandler = new Laya.Handler(this, this.updateIte...

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

342. 仿照laya官方demo做了一个视频播放的UI,为啥在微信里不能用? [ 51%]

...下:   /**Created by the LayaAirIDE*/ module view { export class Guide extends ui.GuideUI { constructor() { super(); // 创建Video元素 let videoElmt: any = Laya.Browser.createElement("video"); Laya.Browser.document.body.appendChild(videoElmt); // 设置Video元素地样式和属性 videoElmt.s...

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

343. 2D方向光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 51%]

...码如下: const { regClass } = Laya; @regClass() export class DayNight extends Laya.Script { declare owner: Laya.Sprite; private lightComp: Laya.DirectionLight2D; private dayTime: number = 0; private dayDuration: number = 24; // 一个完整周期的秒数 private displayText: Laya.Text; // 文...

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

344. Laya3D 中如何解决3D模型上添加文本的问题,类似Unity中的3DText [ 51%]

... 关注: 5 人 大大大懒猫 • 2018-09-10 10:39 export class ShopTitle extends Laya.Script{ public title: string; constructor(){ super(); } public _initialize(owner: Laya.Sprite3D): void { super._initialize(owner); var sprite3D = this.owner as Laya.MeshSprite3D; var sprite3DMat = new Laya.Standa...

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

345. List翻页效果怎么实现 [ 51%]

...fo"; import { ui } from "../ui/layaMaxUI"; export default class RuleDialog extends ui.scene.RuleDialogUI { private m_index: number = -1; private m_downValue: number = -1; constructor() { super(); this.list_rule.hScrollBarSkin = ""; this.list_rule.renderHandler = new Laya.Handler(this, this.updateIte...

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

346. 如何自定义Shader(ActionScript-3D基础(AS3)-LayaAir3D之shader) [ 50%]

...BaseMaterial变更为Material。 ```typescript export class CustomMaterial extends Laya.Material { public function CustomMaterial() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 ​ 在使用自定义材质之前,一定...

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

347. ProtocolBuffer通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 50%]

...rotobuf"; const { regClass } = Laya; @regClass() export class ProtobufDemo extends Laya.Script { onEnable() { console.log("Game start"); } } 2.2 Protobuf示例脚本 引入了protobuf模块就可以直接在项目中使用了,这里我们写了一个简单的示例DEMO,完整代码如下: // s...

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

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

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

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

349. laya 的list组件,如果有多页信息,怎么实现翻页丫?? [ 50%]

...fo"; import { ui } from "../ui/layaMaxUI"; export default class RuleDialog extends ui.scene.RuleDialogUI { private m_index: number = -1; private m_downValue: number = -1; constructor() { super(); this.list_rule.hScrollBarSkin = ""; this.list_rule.renderHandler = new Laya.Handler(this, this.updateIte...

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

350. Cannot read property 'rayCast' of undefined [ 50%]

...annot read property 'rayCast' of undefined export default class indexscene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let config...

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