大约有 1,400 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0051 秒)
...x.cacheAsBitmap = true; Laya.stage.addChild(textBox); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Stat = Laya.Stat; import WebGL = Laya.WebGL; export class Sprite_Cache { constructor() { // 不支持WebGL时自动切换至Canvas Laya.i...
来源: Laya_示例 发布时间: 20251130
...简单的例子来看下它是如何使用的。 ```javascript package { import laya.net.LocalStorage; import laya.utils.Browser; public class LayaSample { public function LayaSample() { Laya.init(100,100); LocalStorage.setItem("key","hello"); LocalStorage.setItem("data","hello"); var data:Object = ...
来源: Laya2.0_文档 发布时间: 20210715
...明一个Socket的实例,声明一个Byte的实例: ```java package { import laya.events.Event; import laya.net.Socket; import laya.utils.Byte; import laya.webgl.WebGL; public class Game { private var socket:Socket; private var byte:Byte; public function Game() { //初始化引擎 Laya.init(600,...
来源: Laya2.0_文档 发布时间: 20210715
...sp, { "rotation": newAngle }, 1000, Ease.elasticOut); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import Ease = Laya.Ease; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class Interaction_CustomE...
来源: Laya_示例 发布时间: 20251130
...h.sin(scaleDelta); ape.scale(scaleValue, scaleValue); } })();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_RoateAndScale { private ape: Sprite; private scaleDelta: number ...
来源: Laya_示例 发布时间: 20251130
...; dialog.pos(165, 62.5); Laya.stage.addChild(dialog); } })();module laya { import Stage = Laya.Stage; import Image = Laya.Image; import WebGL = Laya.WebGL; export class UI_Image { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MI...
来源: Laya_示例 发布时间: 20251130
....pos(x, y); } tick += 0.1; } } new PerformanceTest_Maggots();module laya { import Sprite = Laya.Sprite; import Browser = Laya.Browser; import Handler = Laya.Handler; import Stat = Laya.Stat; import Rectangle = Laya.Rectangle; import WebGL = Laya.WebGL; export class PerformanceTest_Maggots { private ...
来源: Laya2.0_示例 发布时间: 20251130
....height - txt.height >> 1); Laya.stage.addChild(txt); } })();module laya { import BitmapFont = Laya.BitmapFont; import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Text_BitmapFont { private fontName...
来源: Laya_示例 发布时间: 20251130
...utText.fontSize = 20; Laya.stage.addChild(inputText); } })();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_InputSingleline { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.c...
来源: Laya_示例 发布时间: 20251130
...ntSize = 20; inputText.maxChars = 5; } } new Text_MaxChars();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_MaxChars { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWi...
来源: Laya2.0_示例 发布时间: 20251130