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

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

121. 怎么修改sprite的颜色 [ 71%]

怎么修改sprite的颜色 怎么修改sprite的颜色,想把sprite的颜色在代码中调整.但是没有color这个属性.有回答说有颜色滤镜,但是文档里面都找不到颜色滤镜这东西,想用shader,api文档里面又缺少.麻烦能好好的完善下文档不 2018-04-10 添...

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

122. 3D性能优化 · LayaAir3.4 · 引擎文档 · LAYABOX [ 71%]

....Material; //颜色数目 private _colorNums = 20; //精灵数目 private _spriteNums = 200; private _createColorBufferData() { //随机给20个颜色值 let colorBuffer = new Float32Array(20 * 4); for (var i = 0; i < this._colorNums; i++) { let offset = i * 4; colorBuffer[offset] = Math.random()...

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

123. Laya3D 中如何解决3D模型上添加文本的问题,类似Unity中的3DText [ 71%]

...ic title: string; constructor(){ super(); } public _initialize(owner: Laya.Sprite3D): void { super._initialize(owner); var sprite3D = this.owner as Laya.MeshSprite3D; var sprite3DMat = new Laya.StandardMaterial(); sprite3DMat.cull = Laya.BaseMaterial.CULL_NONE; var imageData = this.canvasWrapText({c...

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

124. 输入设备-指南针 [ 71%]

...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Text = Laya.Text; var Gyroscope = Laya.Gyroscope; var RotationInfo = Laya.RotationInfo; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var Event...

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

125. Text的中划线(删除线) [ 70%]

...nt.color; var lineWidth = options.lineWidth || 2; //中划线 var sp = new Sprite(); element.addChild(sp); //画线 sp.graphics.drawLine(0, element.height / 2, element.width, element.height / 2, lineColor, lineWidth); } 2018-05-31 1 0 分享 微博 QZONE 微信 Monica - 知识达人 赞同来自: ...

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

126. LayaAir开发笔记(1)五十音图连连看 [ 70%]

...会跳转到我的个人网站。// 设定背景 var background = new Laya.Sprite(); background.loadImage("linkgame_back.jpg"); background.cacheAsBitmap = true; Laya.stage.addChild(background); // 设定标题 var title = new laya.display.Text(); title.text = g_game_title; title.font = "Arial"; titl...

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

127. 2D物理-桥 [ 70%]

...teBridge() { const startPosX = 250, startPosY = 450; let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addComponentIntance(groundBody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider...

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

128. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 70%]

...泄漏。 用的引擎版本是1.7.16beta。package { import laya.display.Sprite; import laya.events.Event; import laya.maths.Point; import laya.resource.HTMLCanvas; import laya.resource.Texture; import laya.utils.Handler; import laya.utils.Stat; import laya.webgl.WebGL; public class Main { private ...

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

129. layanative安卓端需要怎么添加ttf字体,需要增加两种字体? [ 70%]

...ONE 微信 helloworldlv 赞同来自: package test  { import laya.display.Sprite; import laya.display.Text; import laya.utils.Handler; /** * ... * @author ww */ public class TestTTFLoader  {   public function TestTTFLoader()  { Laya.init(1000, 900);   Laya.loader.load("res/remember.ttf",new Han...

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

130. 报错:找不到基类,按照laya社区的解答做了,但是导致了另外一个类和接口出现一样的错 [ 69%]

... xiaozhibin 赞同来自: package com.demo1 {     import laya.display.Sprite;     import laya.display.Text;     /**      * @date 2017-10-25 下午12:28:23      * @author xiaozhibin      */      public class HelloLayaBox extends Sprite     {         public function Hell...

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