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

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

311. 鼠标交互-Hold [ 47%]

...L = Laya.WebGL; export class Interaction_Hold { private HOLD_TRIGGER_TIME: number = 1000; private apePath: string = "res/apes/monkey2.png"; //触发hold事件时间为1秒 private ape: Sprite; private isApeHold: Boolean; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.cli...

来源: Laya2.0_示例 发布时间: 20260303

312. LayaAir3D 坐标系统与矩阵变换 [ 47%]

...各个轴的旋转弧度计算出 //Quaternion.createFromYawPitchRoll(yaw:Number, pitch:Number, roll:Number, out:Quaternion) box.transform.rotation = new Quaternion(x, y, z, w); //设置局部旋转,会使这个方体根据自身坐标系的坐标轴进行旋转 //如果没有进行过旋转,则...

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

313. 缓动-时间线 [ 46%]

...ya.Event; this.timeLine = new TimeLine(); // addLabel(label:String, offset:Number) offset: 标签事件相对于上个动画的偏移时间(单位:毫秒) this.timeLine.addLabel("turnRight", 0).to(this.target, {x:450, y:100, scaleX:0.5, scaleY:0.5}, 2000, null, 0) .addLabel("turnDown", 0).to(this....

来源: Laya2.0_示例 发布时间: 20260303

314. 发现TimeLine的一些问题,像是BUG [ 46%]

...加缓动的函数 private function addTime(timeLine:TimeLine,sp:Sprite,yy:Number):void { timeLine=new TimeLine(); timeLine.to(sp, {y: yy}, 3000, Ease.linearIn); timeLine.once(Event.COMPLETE,this, complete,[sp,timeLine]); timeLine.play(0,false); } //清理缓动的函数 private function clearTime(t...

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

315. SCALE_FIXED_WIDTH适配屏幕的问题 [ 46%]

...s Main {         private _roomId = 0;         constructor(roomId?: number) {             this._roomId = roomId;             Laya.init(750, 1218, Laya.WebGL);             Laya.Browser.document.title = 'GG游戏;             if (Laya.Browser.onPC) {              ...

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

316. Laya多点触控是有开关吗 为什么多点触控没有任何反应 [ 46%]

...变化,确定是放大还是缩小 const factor = 0.01; let scaleSize: number = (distance - this.lastDistance) * factor; this.text.text = "缩放比例" + scaleSize + "" scaleSize += 1; this.earth2.transform.scale = new Laya.Vector3(scaleSize, scaleSize, scaleSize); } else { le...

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

317. Sprite-新手引导 [ 46%]

...tip:"../../res/guide/help3.png", tipx:900, tipy:300 } ]; private guideStep:number = 0; private hitArea:HitArea; private interactionArea:Sprite; constructor() { Laya.init(1285, 727); Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; //绘制一个蓝色方块,不被抠...

来源: Laya_示例 发布时间: 20260303

318. UI-Clip [ 46%]

...g = "../../res/ui/coutDown.png"; private counter: Clip; private currFrame: number; private controller: Button; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = ...

来源: Laya_示例 发布时间: 20260303

319. 2D物理-碰撞事件与传感器 [ 45%]

...gl.WebGL; public class Physics_Physics_CollisionEvent { private var count: Number = 7; private var sensorCollider: CircleCollider; private var bodys: Array = []; private var touching: Array = []; public function Physics_CollisionEvent() { Laya.Config.isAntialias = true; Laya.init(1200, 700, WebGL); ...

来源: Laya2.0_示例 发布时间: 20260303

320. Sprite-新手引导 [ 45%]

...:110, tip:"res/guide/help3.png", tipx:900, tipy:300 } ]; private guideStep:number = 0; private hitArea:HitArea; private interactionArea:Sprite; constructor() { Laya.init(1285, 727); Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; //绘制一个蓝色方块,不被抠...

来源: Laya2.0_示例 发布时间: 20260303