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

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

71. 计时器-间隔循环 [ 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...

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

72. 高级应用-寻路导航 [ 94%]

...this, loopfun); } function loopfun() { if (this._everyPath && this.index ; private _everyPath: any; private _position: Laya.Vector3 = new Laya.Vector3(0, 0, 0); private _upVector3: Laya.Vector3 = new Laya.Vector3(0, 1, 0); private _tarPosition: Laya.Vector3 = new Laya.Vector3(0, 0, 0); private _fina...

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

73. 射线检测-射线检测 [ 94%]

..._color); //绘出MeshCollider检测出物体的3角面 for (var i = 0; i ; private _posiV3: Laya.Vector3; private _scaleV3: Laya.Vector3; private _rotaV3: Laya.Vector3; private phasorSpriter3D: Laya.PhasorSpriter3D; private sphereSprite3d: Laya.MeshSprite3D; private sphereMesh: Laya.SphereMesh; priv...

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

74. Sprite-切换纹理 [ 94%]

...ya.Browser; import WebGL = Laya.WebGL; export class Sprite_SwitchTexture { private texture1: string = "../../res/apes/monkey2.png"; private texture2: string = "../../res/apes/monkey3.png"; private flag: boolean = false; private ape: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas L...

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

75. 鼠标交互-双指缩放(多点触控) [ 94%]

...ort class Interaction_Scale { //上次记录的两个触模点之间距离 private lastDistance: number = 0; private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.a...

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

76. UI-CheckBox [ 94%]

...oader.load(this.skins, Handler.create(this, this.onCheckBoxSkinLoaded)); } private onCheckBoxSkinLoaded(): void { var cb: CheckBox; for (var i: number = 0; i < this.COL_AMOUNT; ++i) { for (var j: number = 0; j < this.ROW_AMOUNT; ++j) { cb = this.createCheckBox(this.skins[i * this.ROW_AMOUNT + j]); c...

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

77. 缓动-时间线 [ 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_...

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

78. UI-CheckBox [ 94%]

...oader.load(this.skins, Handler.create(this, this.onCheckBoxSkinLoaded)); } private onCheckBoxSkinLoaded(): void { var cb: CheckBox; for (var i: number = 0; i < this.COL_AMOUNT; ++i) { for (var j: number = 0; j < this.ROW_AMOUNT; ++j) { cb = this.createCheckBox(this.skins[i * this.ROW_AMOUNT + j]); c...

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

79. UI-Dialog [ 94%]

...andler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_Dialog { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number = 5; private assets: Array; constructor() { // 不支持WebGL时自动切换至C...

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

80. UI-Dialog [ 94%]

...andler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_Dialog { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number = 5; private assets: Array; constructor() { // 不支持WebGL时自动切换至C...

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