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

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

241. 屏幕适配-自动横屏 [ 78%]

...height - text.height >> 1; Laya.stage.addChild(text); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; export class SmartScale_Landscape { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stag...

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

242. 屏幕适配-自动竖屏 [ 78%]

...height - text.height >> 1; Laya.stage.addChild(text); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; export class SmartScale_Portrait { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage...

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

243. 骨骼动画-换装 [ 78%]

...{ mCurrIndex = 0; } mArmature.play(mCurrIndex,false); } })();module laya { import Skeleton = Laya.Skeleton; import Templet = Laya.Templet; import Event = Laya.Event; import Browser = Laya.Browser; import Stat = Laya.Stat; import WebGL = Laya.WebGL; export class ChangeSkin { private mAniPath:string; ...

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

244. 网络和格式-POST [ 78%]

....text += "收到数据:" + hr.data; } } new Network_POST();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import HttpRequest = Laya.HttpRequest; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Network_POST { private hr: HttpReque...

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

245. 网络和格式-GET [ 78%]

...r.text += "收到数据:" + hr.data; } } new Network_GET();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import HttpRequest = Laya.HttpRequest; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Network_GET { private hr: HttpReques...

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

246. Sprite-切换纹理 [ 78%]

...monkey.width, monkey.height); } } new Sprite_SwitchTexture();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Texture = Laya.Texture; import Handler = Laya.Handler; import Browser= Laya.Browser; import WebGL = Laya.WebGL; export class Sprite_SwitchTexture { private textur...

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

247. 区块地图-等角地图 [ 78%]

...age.addChild(this.sprite); } } new TiledMap_IsometricWorld();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import MapLayer = Laya.MapLayer; import TiledMap = Laya.TiledMap; import Point = Laya.Point; import Rectangle = Laya.Rectangle; import Handler = Laya.Handler; import Web...

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

248. Sprite-节点控制 [ 78%]

... animate(e) { ape1.rotation += 2; ape2.rotation -= 4; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Sprite_NodeControl { private ape1: Sprite; private ape2: Sprite; constr...

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

249. 2D物理-仿生机器人 [ 78%]

...return [a[0] - b[0], a[1] - b[1]]; } } new Physics_Physics_Strandbeests(); import { Config } from "Config"; import { Laya } from "Laya"; import { Sprite } from "laya/display/Sprite"; import { Stage } from "laya/display/Stage"; import { Event } from "laya/events/Event"; import { BoxCollider } from "l...

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

250. Sprite-轴心点 [ 78%]

...on animate(e) { sp1.rotation += 2; sp2.rotation += 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Sprite_Pivot { private sp1: Sprite; private sp2: Sprite; constructor() ...

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