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

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

1031. 关于分包的问题,是否是编译器bug? [ 69%]

...dow,document,Laya){ var __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec; })(window,document,Laya); 如果代码中这样写: var module:Module =new modules.LoginModule(); module.run(); 编译后login.js是正常的,里面各个类...

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

1032. 动画-SWF动画 [ 69%]

...ya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Animation_SWF { private SWFPath: string = "../../res/swf/dragon.swf"; private MCWidth: number = 318; private MCHeight: number = 406; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidt...

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

1033. Laya ts版,使用jasmine进行单元测试 [ 69%]

...!'; } 一个是src/Library/ToolService.ts, 内容为module Library{ export class ToolService{ constructor(){ } public static sum(a:number, b:number):number { return a + b; } } }   一个是 src/Library/UserService.ts, 内容为module Library{ export class UserService{ constructor(){ } public multip...

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

1034. 绘制图形的BUG [ 69%]

...kage ui.test { import laya.display.Sprite; import laya.utils.Tween; public class MyBox extends Sprite { private var _shape:Sprite; public function MyBox() { super(); graphics.drawRect(0,0,200,200,"#00ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加...

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

1035. 加载-错误处理和进度 [ 69%]

...ader; import Texture = Laya.Texture; import Handler = Laya.Handler; export class Loader_ProgressAndErrorHandle { constructor() { Laya.init(550, 400); // 无加载失败重试 Laya.loader.retryNum = 0; var urls: Array = ["do not exist", "../../res/fighter/fighter.png", "../../res/legend/map.jpg"]; La...

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

1036. runTime使用(JavaScript-IDE篇(JS)-组件化开发相关) [ 69%]

...钮)的功能,全部代码如下所示: ```typescript export default class ImageRunTime extends Laya.Image{ constructor(){ super(); this.scaleTime = 100; //设置组件的中心点 this.anchorX = this.anchorY = 0.5; //添加鼠标按下事件侦听。按时时缩小按钮。 this.on(Laya.Event...

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

1037. 分享:改变图片皮肤,保持图片原样宽高显示 [ 69%]

...laya.events.Event; import laya.ui.Image; import laya.utils.Handler; public class LayaAirDemo { private var image:Image; public function LayaAirDemo() { Laya.init(800,600); Laya.loader.load(["bg.jpg","logo.png"],Handler.create(this,onLoaded)); } private function onLoaded():void { image=new Image(); i...

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

1038. 文本基础样式(TypeScript-LayaAir基础篇(TS)-文本) [ 69%]

...aya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class HelloLayabox { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya....

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

1039. laya.d3.graphics.VertexPositionNormalColorTexture0Texture1 [ 69%]

API DocumentationAll Packages | All Classes | Index | Frames No Frames VertexPositionNormalColorTexture0Texture1Properties | Methods Packagelaya.d3.graphicsClasspublic class VertexPositionNormalColorTexture0Texture1InheritanceVertexPositionNormalColorTexture0Texture1 ObjectImplements IVerte...

来源: laya_api 发布时间: 20170929

1040. laya.d3.math.BoundSphere [ 69%]

API DocumentationAll Packages | All Classes | Index | Frames No Frames BoundSphereProperties | Methods Packagelaya.d3.mathClasspublic class BoundSphereInheritanceBoundSphere ObjectImplements laya.d3.core.IClone BoundSphere 类用于创建包围球。 Public Properties PropertyDefined By ...

来源: Laya2.0_api 发布时间: 20190513