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

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

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

...?代码如下:   /**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元素地样式和属性...

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

322. 怎么实现同一个工程内分包? [ 50%]

....StageScaleMode; import flash.events.Event; import login.LoginView; public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); t...

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

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

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

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

324. 微信小游戏关系链 我创建了一个开放域的项目 但是报错了 [ 49%]

...ld(this.img); this.setImg = function (src) { this.img.skin = src; } } Laya.class(RankListItem, "RankListItem", Laya.Box); //rankList var rankList = new Laya.List(); rankList.itemRender = RankListItem; rankList.repeatX = 1; rankList.repeatY = 4; // 使用但隐藏滚动条 rankList.vScrollBarSkin = "...

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

325. Cannot read property 'rayCast' of undefined [ 49%]

Cannot 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 conf...

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

326. 2.0版本可用的CameraMoveScript.ts [ 49%]

....0,跟示例里效果一样的文件:   /** * ... * @author */ export class CameraMoveScript extends Laya.Script {      /** @private */     protected _tempVector3: Laya.Vector3 = new Laya.Vector3();     protected lastMouseX: number;     protected lastMouseY: number;     pro...

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

327. 2.3.0beta 各种bug [ 48%]

...物理引擎碰撞被禁用的,需要重新开启 修改 laya.d3.js   class PhysicsCollider extends PhysicsTriggerComponent {      constructor(collisionGroup = Physics3DUtils.COLLISIONFILTERGROUP_DEFAULTFILTER, canCollideWith = Physics3DUtils.COLLISIONFILTERGROUP_ALLFILTER) {      super(c...

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

328. list item 添加事件后无法监听 [ 48%]

...(this.img);   this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box);   // 主要逻辑代码 var Stage   = Laya.Stage; var List    = Laya.List; var Handler = Laya.Handler; var WebGL   = Laya.WebGL;     (function() { // 不支持WebGL时自动切换至Canvas L...

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

329. 分享个用美术资源做位图文本的方法。。。 [ 48%]

...可以根据自己需求调整,这个是json的格式: // 程序入口 class GameMain{ constructor() { Laya.init(600,400); var that = this; Laya.loader.load([{"url":"res/playerKpiFont.json","type":Laya.Loader.JSON}, {"url":"res/playerKpiFont.png","type":Laya.Loader.IMAGE}],new Laya.Handler(that,...

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

330. 动画实例在调用含有名字参数的时候获取不到边界 [ 48%]

...浏览: 2083 关注: 2 人 198*****136 • 2020-09-11 16:34 export default class Scene_Battle extends Laya.Script{ playerUnitReady:number; enemyUnitReady:number; private playerUnit:Laya.Animation[]; private enemyUnit:Laya.Animation[]; constructor(){ super(); Laya.stage.alignH= Laya.Stage.ALIGN_CENTE...

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