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

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

91. 关于3d场景上Button点击事件顺序问题 [ 70%]

...点击事件  Laya.stage.on(Event.MOUSE_DOWN,this,sceneClick);   private function sceneClick():void {     trace("scene clicked"); }   3,在button上添加按钮功能 button.on(Event.CLICK,this,onBtn); private function onBtn(e:Event):void {     e.stopPropagation();     trace("button clicke...

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

92. 预设/场景的导出(ActionScript-3D基础(AS3)-LayaAir3D之3D场景可视化编辑) [ 70%]

...,建议用脚本方 */ public class GameUI extends TestSceneUI { public function GameUI():void { super(); //加载场景 Scene3D.load('LayaScene_test/Conventional/test.ls',Handler.create(this,onComplete)) } /** * 加载完成 */ private function onComplete(scene:Scene3D):void{ // 将场景加到...

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

93. ScrollRect设置会引起其他的UI资源无法正在显示 [ 70%]

...rivate var _path:Sprite = new Sprite(); private var arr:Array = []; public function TestView() { super(); _path.pivot(0,0); _path.pos(a.x,a.y); this.addChild(_path); _path.rotation = Math.atan2(b.y - a.y, b.x - a.x) / Math.PI * 180; var len:int = Math.floor(GetPathLen()/PATH_LEN)+2; var p:Image; for...

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

94. 设置遮罩(ActionScript-LayaAir基础篇(AS3)-位图) [ 69%]

...ic class MaskDemo { private var Res:String; private var img:Sprite; public function MaskDemo() { Laya.init(1136,640); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制...

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

95. 回调函数传递sprite3D问题 [ 69%]

....push(warehouse1); Laya.timer.frameLoop(1, this, freshBubble,spriteArray); function freshBubble(sprites) { var spr = sprites[0]; xp = (((-25) - cameraX) * ((-25) - cameraX)+( 0 - cameraY) * ( 0 - cameraY) + ( 0 - cameraZ)*( 0 - cameraZ)); camera.viewport.project(spr.transform.position, camera.projec...

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

96. timer无法执行 [ 69%]

...ial();   Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function(layabox: Laya.Texture2D): void{ ball1mat.albedoTexture = layabox; })); //ball1mat.tilingOffset = new Laya.Vector4(10, 10, 0, 0); ball1.meshRenderer.material = ball1mat; //添加刚体 ball1.addComponent(Laya.PhysicsC...

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

97. [求助]无法使用loader预先加载 [ 69%]

...lse), Loader.TEXT); Laya.loader.on(Event.ERROR, this, onError);   private function onAssetLoaded(texture:Texture):void{             //console.log("111: ");                          txt.visible=false;             title = new Sprite();         ...

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

98. WebGLContext2D arcTo方法如果设置了setPathId 无法绘制 [ 69%]

...arcTo方法如果设置了setPathId 无法绘制。 源码 override public function arcTo(x1:Number, y1:Number, x2:Number, y2:Number, r:Number):void {     if (mId != -1) {         var tShape:IShape = VectorGraphManager.getInstance().shapeDic[this.mId];         if (mHaveKey ) {       ...

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

99. ios load后 声音播放问题 [ 69%]

...ler.create(this, onLoaded), Handler.create(this, onLoading, null, false)); function onLoaded(){ console.log(Laya.loader.getRes(src)); }   在chrome,安卓下都是正常的,在ios和mac Safari下是undefined 放在一个sprite的click事件里 同样也是undefined   2017-08-11 添加评论 ...

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

100. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 68%]

...res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }...

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