大约有 278 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)
Laya_社区(173) Laya3.0_api(61) Laya2.0_示例(19) Laya_示例(17) Laya3.0_文档(5) laya_api(2) Laya2.0_api(1)
...起作用,哪位大神可以帮忙看看,是为什么 scrollRect 与 pivot 同时使用,pivot不起作用 3d物理引擎设置碰撞盒isTrigger为true的话,旋转不起作用 资源白名单怎么不起作用呢 预制件里面有灯光时,加载到场景不起作用 设置背景音乐音...
来源: Laya_社区 发布时间: 20230711
...ge.addChild(this.ape); let texture = Laya.loader.getRes(ApePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; this.ape.on(Event.MOUSE_DOWN, this, this.onStartDrag); } showDragRegion() { const Rectangle = Laya.Rectangle...
来源: Laya2.0_示例 发布时间: 20251130
...0, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length...
来源: Laya_示例 发布时间: 20251130
...s.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches =...
来源: Laya2.0_示例 发布时间: 20251130
...(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.pivot(texture.width / 2, texture.height / 2); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape.scale(0.8, 0.8); Laya.stage.addChild(ape); // 鼠标交互 ape.on(Event.MOUSE_DOWN, this, onApePress); } function onApePr...
来源: Laya_示例 发布时间: 20251130
...adImage("../../res/apes/monkey2.png"); Laya.stage.addChild(target); target.pivot(55, 72); target.pos(100,100); } function createTimerLine() { timeLine.addLabel("turnRight",0).to(target,{x:450, y:100, scaleX:0.5, scaleY:0.5},2000,null,0) .addLabel("turnDown",0).to(target,{x:450, y:300, scaleX:0.2, sc...
来源: Laya_示例 发布时间: 20251130
...pe.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOUSE_DOWN, this, this.onApeP...
来源: Laya2.0_示例 发布时间: 20251130
...0, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length...
来源: Laya_示例 发布时间: 20251130
...d(this.target); this.target.loadImage("res/apes/monkey2.png"); this.target.pivot(55, 72); this.target.pos(100,100); } createTimerLine() { const TimeLine = Laya.TimeLine, Event = Laya.Event; this.timeLine = new TimeLine(); // addLabel(label:String, offset:Number) offset: 标签事件相对于上个...
来源: Laya2.0_示例 发布时间: 20251130
...var text = Laya.loader.getRes("res/bar.png"); var w = size, h = size/5; sp.pivot(w/2, h/2); sp.graphics.fillTexture(text, 0, 0, w, h); partA = Matter.Bodies.rectangle(x, y, w, h, { isStatic:true, layaSprite:sp, }); sp = new Laya.Sprite(); w = size/5, h=size; sp.pivot(w/2, h/2); sp.graphics.fillTex...
来源: Laya_社区 发布时间: 20180625