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

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

91. 射线检测-放置物体 [ 79%]

...ere.transform.rotate(new Laya.Vector3(0, 90, 0), false, false); } }); })();class RayPicking02 { private ray: Laya.Ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); private point: Laya.Vector2 = new Laya.Vector2(); private _outHitInfo: Laya.RaycastHit = new Laya.RaycastHit(); ...

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

92. 十几秒以后动画渲染时间变长,帧率变慢,是怎么回事? [ 79%]

...*************************************************************************/ class DollGunRole extends GunRole{  public _box: GunBox; // toset: /** 飞行的范围, 用于计算飞行路径 */ private _fly_site:Site = new SiteEntity( 10, 10, -1, 400 );  public static _ani_cached:boolean = false;  /...

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

93. UI-ProgressBar [ 78%]

...ript、TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class UI_ProgressBar { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya...

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

94. 输入设备-指南针 [ 78%]

...Laya.Handler; import WebGL = Laya.WebGL; import Event = Laya.Event; export class InputDevice_Compasss { private compassImgPath:string = "../../res/inputDevice/kd.png"; private compassImg:Sprite; private degreesText:Text; private directionIndicator:Sprite; private firstTime:Boolean = true; constructo...

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

95. Sprite-旋转缩放 [ 77%]

...ya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Sprite_RoateAndScale { private ape: Sprite; private scaleDelta: number = 0; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stag...

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

96. 鼠标交互-滑动 [ 77%]

...ackLength / 2; let buttonPosition, beginPosition, endPosition; let button; class Interaction_Swipe { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth...

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

97. 照相机-3D空间转2D空间 [ 77%]

...outPos.x / Laya.stage.clientScaleX, _outPos.y / Laya.stage.clientScaleY); }class D3SpaceToD2Space { private scene: Laya.Scene; private camera: Laya.Camera; private layaMonkey3D: Laya.Sprite3D; private layaMonkey2D: Laya.Image; private _position: Laya.Vector3; private _outPos: Laya.Vector3; private s...

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

98. 鼠标交互-自定义事件 [ 77%]

...发语言、LayaAirIDE让项目开发更高效。const ROTATE = "rotate"; class Interaction_CustomEvent { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.client...

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

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

...ort laya.ui.Image; import laya.utils.Handler; import ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number = 120.0; private var speed:Number = 15; private var _path:Sprite = new Sprite(); private var arr:Array = []; public function TestView() { super(); _path.pivot(0,...

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

100. 引擎 TiledMap 居然不支持图块翻转 [ 77%]

...73741824;     const TiledMapFlipConstHalf = TiledMapFlipConst / 2;     class GridSprite extends Laya.Sprite {         constructor() {             super(...arguments);             this.relativeX = 0;             this.relativeY = 0;             this.isAloneObject = fals...

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