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

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

171. 鼠标脚本(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 61%]

...猴都添加了脚本。 > **脚本类**: ```typescript export default class MouseScript extends Laya.Script3D{ private meshsp:Laya.MeshSprite3D; constructor(){super();} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwa...

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

172. 关于要自定shader的同学 [ 61%]

...= new_texture 其他的参照shader原文档 2.要修改shader里面的值 class ShaderValue extends Laya.Value2D {class ShaderValue extends Laya.Value2D { constructor () { super(0, 0) var _vlen = 8 * Laya.CONST3D2D.BYTES_PE this.position = [2, Laya.WebGLContext.FLOAT, false, _vlen, 0] this.texcoord...

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

173. 为什么hitTestPoint始终是false? [ 61%]

为什么hitTestPoint始终是false? class TestUI extends Laya.Sprite { private s:Laya.Sprite = new Laya.Sprite(); constructor() { super(); var img:Laya.Image = new Laya.Image("comp/bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } priv...

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

174. 输入文本组件 · LayaAir3.0文档 · LAYABOX [ 61%]

...下面给出一个示例代码,实现脚本控制TextInput: const { regClass, property } = Laya; @regClass() export class TextInputControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextInput } ) public txtin: Laya.TextInput; constructor() { super(); } /** * ...

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

175. 请问laya有没有类似翻页容器(pageView)的组件? [ 61%]

..."../data/ConfigInfo"; import { ui } from "../ui/layaMaxUI"; export default class RuleDialog extends ui.scene.RuleDialogUI { private m_index: number = -1; private m_downValue: number = -1; constructor() { super(); this.list_rule.hScrollBarSkin = ""; this.list_rule.renderHandler = new Laya.Handler(thi...

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

176. UI-Tree [ 61%]

...ript、TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class UI_Tree { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage....

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

177. RopeJoint代码动态创建 无法设置otherbody [ 61%]

...g * @ email:0110110110@qq.com * @ data: 2022-04-09 15:53 */ export default class fruit extends Laya.Script {     static Fru:fruit;     public rope:Laya.RopeJoint     constructor() {         super();        fruit.Fru=this;             }      onAwake() {         let rig:Laya...

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

178. 3D场景跳转到2D场景问题 [ 61%]

...from '../ui/layaMaxUI' import GameScene from './GameScene'; export default class VictoryScene extends VictorySceneUI {  constructor() { super();   } onAwake(){ let btnOnce=this.getChildByName("btnOnce"); btnOnce.on(Laya.Event.CLICK,this,this.onClick); } onClick(e){ this.removeSelf(); let gameScene...

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

179. 官方案例里摄像机绕物体旋转脚本的问题 [ 60%]

...ewer); modelViewer.AroundPos = plane.transform.position; */ export default class ModelViewer extends Laya.Script { // Text m_debugTip; public canRotation_X: boolean = true; public canRotation_Y: boolean = true; public canScale: boolean = true; /// <summary> /// Around center. /// </summary&...

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

180. 实例化 laya.ani.bone.Skeleton 对象报错 [ 60%]

实例化 laya.ani.bone.Skeleton 对象报错 export default class showSpine extends Laya.Script{ constructor() { super(); //创建一个Skeleton对象 //Laya let skeleton: laya.ani.bone.Skeleton = new laya.ani.bone.Skeleton(); } } 实例化报错 为啥 2018-09-28 添加评论 免费帖 --> 分享...

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