大约有 3,990 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0070 秒)
Laya_社区(2836) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(55)
...输出的位置信息和我在Player中输出的位置信息不一致: var player :Player = Laya.stage.getChildAt(i) as Player; console.log(player.x); 附:在Player中输出x的信息 一直为0 但是在Monster类中输出Player的x的数据一直是497,0,494,0,491,0,488,0..........
来源: Laya_社区 发布时间: 20180828
...。 navigator.mediaDevices.enumerateDevices().then(function (devices) { var userMediaConstraints = { audio: false, video: { facingMode: {exact : 'environment'}, } } navigator.mediaDevices.getUserMedia(userMediaConstraints).then(function success(stream) { let status = true; LayaAir3D.video.srcObje...
来源: Laya_社区 发布时间: 20180217
用正则的方式检验打成APP会有问题 var pat:RegExp=new RegExp(/^[\u4e00-\u9fa5a-zA-Z0-9.-_@]+$/,"i"); if(param!=null){ for(var i:int=0;i<param.length;i++){ if(param[i][1]!=""){ ...
来源: Laya_社区 发布时间: 20170813
JS的WebGL模式下使用Laya.Video报跨域错误 测试源码var video_url = 'http://test_domain.com/resource/2.webm'; var video = new Laya.Video(); video.on('loadedmetadata', this, function() { console.info(video.width + ',' + video.height); Laya.stage.addChild(video); video.play(); }); video.lo...
来源: Laya_社区 发布时间: 20170508
看一下这是什么问题,运行报错 var MPanel1 = (function (_super) { function MPanel1() { MPanel1.super(this); } Laya.class(MPanel1, "MPanel1", _super) var _proto = MPanel1.prototype; return MPanel1; }(ui.Panel1UI));代码如上,报错如下 附件 : --> 2018-02-06 添加评论 免费...
来源: Laya_社区 发布时间: 20180206
...=PhysicsWorld_Character)) ```typescript //为精灵添加角色控制器 var character = monkey.addComponent(Laya.CharacterController); //创建胶囊碰撞器 var sphereShape = new Laya.CapsuleColliderShape(1.0, 3.4); //设置Shape的本地偏移 sphereShape.localOffset = new Laya.Vector3(0, 1.7,...
来源: Laya2.0_文档 发布时间: 20210715
...nderMode(value:int):voidstretchedBillboardCameraSpeedScaleproperty public var stretchedBillboardCameraSpeedScale:Number拉伸广告牌模式摄像机速度缩放,暂不支持。stretchedBillboardLengthScaleproperty public var stretchedBillboardLengthScale:Number拉伸广告牌模式长度缩放。...
来源: laya_api 发布时间: 20170929
...锤 赞同来自: 具体代码位置 MovieClip.as _parseFrame函数内, var mat:Matrix = _data._getMatrix(); spp.transform = mat; 设置对象位置,旧版本使用的是 RenderSprite.TRANSFORM (0x04) 新版本使用常量是 SpriteConst.TRANSFORM (0x02) 导致的,请问到底是哪...
来源: Laya_社区 发布时间: 20181125
...6-22 0 0 分享 微博 QZONE 微信 hesen 赞同来自: 大致代码是: var panel:Panel = new Panel; var box:Box = new Box; box.size(500,1000); panel.size(500,500); panel.addChild(box); panel.vScrollBarSkin = ""; 运行后: 因为panel高500, 初始显示box的上面500像素的部...
来源: Laya_社区 发布时间: 20170622
...个画图软件,官方封装的矢量api无法满足需求 代码: var canvas = document.getElementById('layaCanvas'); var ctx=canvas.getContext("2d"); ctx.fillStyle="#0000ff"; ctx.fillStyle="#0000ff"; ctx.fillRect(200,200,15000,100); 这样...
来源: Laya_社区 发布时间: 20180104