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

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

61. 缓动-时间线 [ 94%]

... = Laya.TimeLine; import WebGL = Laya.WebGL; export class Tween_TimeLine { private target:Sprite; private timeLine:TimeLine = new TimeLine(); constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_...

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

62. 计时器-间隔循环 [ 94%]

...r = Laya.Browser; import WebGL = Laya.WebGL; export class Timer_Interval { private rotateTimeBasedText: Text; private rotateFrameRateBasedText: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN...

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

63. 鼠标交互-拖动 [ 94%]

...= Laya.Handler; import WebGL = Laya.WebGL; export class Interaction_Drag { private ApePath: string = "../../res/apes/monkey2.png"; private ape: Sprite; private dragRegion: Rectangle; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL)...

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

64. 鼠标交互-Hold [ 94%]

...n = Laya.Tween; import WebGL = 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时自动切换至C...

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

65. 射线检测-点击行走 [ 94%]

...ition, _vector3, _upVector3, _quaternion); } }); })();class RayPicking03 { private ray: Laya.Ray; private point: Laya.Vector2 = new Laya.Vector2(); private _outHitInfo: Laya.RaycastHit; private _position: Laya.Vector3; private _upVector3: Laya.Vector3; private _quaternion: Laya.Quaternion; private _...

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

66. 照相机-3D空间转2D空间 [ 94%]

...entScaleX, _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 scaleDelta: number = 0; co...

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

67. 设置滤镜(TypeScript-LayaAir基础篇(TS)-位图) [ 94%]

...ort Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Main { private ApePath: string = "../../res/apes/monkey2.png"; private apeTexture: Texture; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = S...

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

68. 加载-销毁Texture使用的图片资源 [ 94%]

...ure 使用的图片资源不存在,则自动恢复。 */ class GameMain{ private spBg:Sprite; private aniFly:Animation; private btn:Sprite; private txt:Text; private isDestroyed:Boolean = false; private readonly PathBg:string = "../../res/bg2.png"; private readonly PathFly:string = "../../res/figh...

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

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

...import laya.utils.Stat; import laya.utils.TimeLine; public class AirDemo { private var sp1:Sprite; private var sp2:Sprite; private var sp3:Sprite; private var timeLine1:TimeLine; private var timeLine2:TimeLine; private var timeLine3:TimeLine; public function AirDemo() { //初始化引擎 Laya.init(6...

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

70. 鼠标交互-拖动 [ 94%]

...= Laya.Handler; import WebGL = Laya.WebGL; export class Interaction_Drag { private ApePath: string = "res/apes/monkey2.png"; private ape: Sprite; private dragRegion: Rectangle; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya...

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