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

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

521. 加载-单一类型资源加载 [ 48%]

...etRes("res/apes/monkey2.png"); // 使用资源 } } new Loader_SingleType();module laya { import Loader = Laya.Loader; import Texture = Laya.Texture; import Handler = Laya.Handler; export class Loader_SingleType { constructor() { Laya.init(550, 400); // 加载一张png类型资源 Laya.loader.load("r...

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

522. 滤镜-模糊滤镜 [ 48%]

... BlurFilter(); blurFilter.strength = 5; ape.filters = [blurFilter]; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import BlurFilter = Laya.BlurFilter; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Filters_Blur { p...

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

523. Sprite-缓存为静态图像 [ 47%]

...图像 textBox.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时自动切换至...

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

524. Sprite-旋转缩放 [ 47%]

...aleValue = Math.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 scale...

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

525. Sprite-显示图片 [ 47%]

...awTexture(t, 0, 0); Laya.stage.addChild(ape); ape.pos(200, 0); })); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Texture = Laya.Texture; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Sprite_DisplayImage { ...

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

526. Label属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 47%]

...查看2D基础篇中的文本部分。 **示例代码:** ```javascript module laya { import Stage = Laya.Stage; import Label = Laya.Label; import WebGL = Laya.WebGL; export class UI_Label { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = St...

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

527. 计时器-延迟调用 [ 47%]

...ext.align = "center"; Laya.stage.addChild(text); } } new Timer_CallLater();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Timer_CallLater { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Br...

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

528. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 47%]

...s方法内存都会增加 我使用的版本是1.7.12 测试代码如下:module Main { import Sprite = Laya.Sprite import Texture = Laya.Texture import Handler = Laya.Handler export class MaskDemo { private Res: string; private img: Laya.Image; constructor() { //Laya.init(400, 640, Laya.WebGL); //...

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

529. 关于项目分包的问题?? [ 47%]

...统一放在h5文件夹下的js文件夹内) 2、修改源路径下homeModule和库路径下SWC文件的位置。 3、根据你的最新目录修改module.def的内容  4、如上代码所示,调整你的代码 2、如果第一步操作没有问题,建议直接在fb中通过宏命令的方式...

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

530. Sprite-缓存为静态图像 [ 47%]

...//缓存为静态图像 textBox.cacheAs = "bitmap"; } } new Sprite_Cache();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时自动切换...

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