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

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

671. 屏幕适配-屏幕适配 [ 36%]

...ge大小 console.log("size:", Laya.stage.width, Laya.stage.height); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import Image = Laya.Image; import WebGL = Laya.WebGL; export class SmartScale_T { //所有适配模式 ...

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

672. 屏幕适配-屏幕适配 [ 36%]

....log("size:", Laya.stage.width, Laya.stage.height); } } new SmartScale_T();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import Image = Laya.Image; import WebGL = Laya.WebGL; export class SmartScale_T { //所有适配模式 ...

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

673. 混合模式-Lighter [ 36%]

...tring(16); b = b.length == 2 ? b : "0" + b; return "#" + r + g + b; } })();module laya { import Animation = Laya.Animation; import Stage = Laya.Stage; import Browser = Laya.Browser; import Handler = Laya.Handler; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class BlendMode_Lighter { ...

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

674. 混合模式-Lighter [ 36%]

...th == 2 ? b : "0" + b; return "#" + r + g + b; } } new BlendMode_Lighter();module laya { import Animation = Laya.Animation; import Stage = Laya.Stage; import Browser = Laya.Browser; import Handler = Laya.Handler; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class BlendMode_Lighter { ...

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

675. 鼠标交互-滑动 [ 35%]

...DIST) targetX = endPosition; Tween.to(button, { x: targetX }, 100); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class Interaction_Swipe { //swipe滚...

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

676. 有关Laya3D碰撞检测疑问 [ 35%]

有关Laya3D碰撞检测疑问 module test { export class Test { 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 _outHitAllInfo: Array<Laya.RaycastHit>;  private camera: Laya.Camera; private...

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

677. 鼠标交互-滑动 [ 34%]

... } Tween.to(this.button, { x: targetX }, 100); } } new Interaction_Swipe();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class Interaction_Swipe { //swipe滚...

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

678. 文本-滚动文本 [ 34%]

...vX - nowX; txt.scrollY += prevY - nowY; prevX = nowX; prevY = nowY; } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_Scroll { private txt: Text; private prevX: number = 0; p...

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

679. 文本-滚动文本 [ 34%]

...scrollY += prevY - nowY; prevX = nowX; prevY = nowY; } } new Text_Scroll();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_Scroll { private txt: Text; private prevX: number = 0; p...

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

680. 输入设备-指南针 [ 33%]

...nIndicator.y = -1 * Math.floor(info.beta) / 90 * 70 + compassImg.y; } })() module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Gyroscope = Laya.Gyroscope; import RotationInfo = Laya.RotationInfo; import Browser = Laya.Browser; import Handler = Laya.H...

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