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

大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0075 秒)

1691. Sprite-根据数据绘制路径 [ 65%]

...tage.bgColor = "#232628"; this.drawPentagram(); } private drawPentagram(): void { var canvas: Sprite = new Sprite(); Laya.stage.addChild(canvas); var path: Array = []; path.push(0, -130); path.push(33, -33); path.push(137, -30); path.push(55, 32); path.push(85, 130); path.push(0, 73); path.push(-85,...

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

1692. 绘制圆形与扇形(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 65%]

...         }            private function drawSomething():void         {             sp = new Sprite();             Laya.stage.addChild(sp);             //画圆             sp.graphics.drawCircle(80,80,50,"#ff0000");    ...

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

1693. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 65%]

...t var rotation=0, scale=1, position=0; private function setRotation(value):void { this.rotation=value; update(); } private function setScale(value):void { this.scale = value; update(); } private function setPosition(value):void { this.position = value; update(); } public function update() { console....

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

1694. UI-TextArea [ 65%]

...n, Handler.create(this, this.onLoadComplete)); } private onLoadComplete(): void { var ta: TextArea = new TextArea(""); ta.skin = this.skin; ta.font = "Arial"; ta.fontSize = 18; ta.bold = true; ta.color = "#3d3d3d"; ta.pos(100, 15); ta.size(375, 355); ta.padding = "70,8,8,8"; var scaleFactor: Number ...

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

1695. 绘制圆形与扇形(TypeScript-LayaAir基础篇(TS)-矢量图) [ 65%]

...thing();         }            private drawSomething(): void {             this.sp = new Sprite();             Laya.stage.addChild(this.sp);             //画圆             this.sp.graphics.drawCircle(80,80,50,"#ff0000");    ...

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

1696. 文本-自动换行 [ 65%]

...Laya.stage.bgColor = "#232628"; this.createText(); } private createText(): void { var txt: Text = new Text(); txt.text = "Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!"; txt.width = 300; txt.fontSize = 40; txt.color = "#ffff...

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

1697. Sprite-根据数据绘制路径 [ 65%]

...tage.bgColor = "#232628"; this.drawPentagram(); } private drawPentagram(): void { var canvas: Sprite = new Sprite(); Laya.stage.addChild(canvas); var path: Array = []; path.push(0, -130); path.push(33, -33); path.push(137, -30); path.push(55, 32); path.push(85, 130); path.push(0, 73); path.push(-85,...

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

1698. 内置骨骼动画 · LayaAir3.4 · 引擎文档 · LAYABOX [ 65%]

...this, this.completeHandler); this.play(); }); } private completeHandler(): void { this.play(); } //播放骨骼动画 private play(): void { //每次到下一个动画 this.mCurrIndex++; if (this.mCurrIndex >= this.mArmature.getAnimNum()) { this.mCurrIndex = 0; } this.mArmature.play(this.mCurrInd...

来源: Laya3.0_文档 发布时间: 20251010

1699. 一个简单的bug请官方人自己测试一下_带示例代码 [ 65%]

...试一下_带示例代码 在laya1.0示例里面  private onBtnClick(): void { //测试崩溃代码 var a = undefined; var b = a.id; //点击按钮执行到这里肯定是报错的TypeError: Cannot read property 'id' of undefined . 如果继续运行整个layaair调试器就会停止响应.整个...

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

1700. ShaderPass介绍(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 65%]

...ute vec3 a_Normal; uniform mat4 u_MvpMatrix; uniform float u_OutlineWidth; void main() { vec4 position = vec4(a_Position.xyz + a_Normal * u_OutlineWidth, 1.0); gl_Position = u_MvpMatrix * position; } ``` 片元着色器 `outline.fs` 代码如下: ```c++ #ifdef FSHIGHPRECISION precision highp float; ...

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