大约有 12 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0036 秒)
....value = "Hello OC!"; bridge.callWithBack(function(value) { var obj = JSON.parse(value) alert(obj.value); },"testAsyncCallback:", JSON.stringify(obj)); } else if (os == "Conch-android") { alert(bridge.call("testString","hello")); alert(bridge.call("testNumber",256.0)); alert(bridge.call("testBool",f...
来源: Laya2.0_文档 发布时间: 20210714
...画模板 templet=new Laya.Templet(); templet.on(Laya.Event.COMPLETE,this,parseComplete); templet.on(Laya.Event.ERROR,this,onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); function onError() { console.log("parse error"); } function parseComplete() { //创建第一个...
来源: Laya2.0_文档 发布时间: 20210715
...plet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError); this.templet.loadAni("res/spine/goblins/goblins.sk"); } onError() { console.log("parse error"); } parseComplete() { //创建第一个动画 var skeleton0:...
来源: Laya2.0_文档 发布时间: 20210715
...建动画模板 templet = new Templet(); templet.on(Event.COMPLETE, this, parseComplete); templet.on(Event.ERROR, this, onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); } private function onError():void { trace("parse error"); } private function parseComplete():void { ...
来源: Laya2.0_文档 发布时间: 20210715
...Market.recharge(json,function(jsonString) { var pJson = JSON.parse(jsonString); console.log("code:"+ pJson .code); console.log("product_id:"+ pJson.product_id); console.log("amount:"+ pJson.amount); console.log("order_id:"+ pJson.order_id); ...
来源: Laya2.0_文档 发布时间: 20210715
....templet.loadAni(this.aniPath); this.templet.on(Event.COMPLETE, this, this.parseComplete); this.templet.on(Event.ERROR, this, this.onError) } private parseComplete(): void { this.skeleton = this.templet.buildArmature(); Laya.stage.addChild(this.skeleton); this.skeleton.pos(Browser.width / 2, Browser...
来源: Laya2.0_文档 发布时间: 20210715
...,代码如下: ```javascript if( window.conch ) { var devInfo = JSON.parse(window.conch.config.getDeviceInfo()); if (devInfo.devicename === 'iPhone10,3' || devInfo.devicename === 'iPhone10,6') { // iPhone X适配 } } ``` ## 10. 线程模式 LayaNative2.0支持JavaScript脚本逻辑和渲染逻...
来源: Laya2.0_文档 发布时间: 20210715
...let.loadAni(this.aniPath); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError) } private parseComplete(): void { this.skeleton = this.templet.buildArmature(); Laya.stage.addChild(this.skeleton); this.skeleton.pos(Laya.Browser.width / ...
来源: Laya2.0_文档 发布时间: 20210715
....templet.loadAni(this.aniPath); this.templet.on(Event.COMPLETE, this, this.parseComplete); this.templet.on(Event.ERROR, this, this.onError) } private function parseComplete(): void { this.skeleton = this.templet.buildArmature(); Laya.stage.addChild(this.skeleton); this.skeleton.pos(Browser.width / 2...
来源: Laya2.0_文档 发布时间: 20210715
...ifests/vM7nH0Kl.m3u8'); hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED, function () { video.play(); }); } plyr.setup(video); ``` 编译运行代码,发现网页已经可以播放视频了。开发者可能注意到这里我们初始化引擎的时候是这样的: `Laya.init(0,0);//初...
来源: Laya2.0_文档 发布时间: 20210714