您好: 我就想问下: 能不能上传? 要怎么样才能上传? 能不能说得稍微明白点,没明白文档说的。谢谢。
忽略上传的文件[图片] 请问一下,这是我的场景文件必须要上传才能玩得起来,现在不让上传,请问,这些文件还能不能上传,如何才能上传?请稍微说明白下,先前说的,我理解有点问题,非常感谢。
2019-09-16你好,我就想问下,这两个文件还能不能上传,如何上传啊? 没有看明白,麻烦能不能简单说下,谢谢!
小游戏开发工具不能上传部分文件。[图片] 请问一下,这是我的场景文件必须要上传才能玩得起来,现在不让上传,请问我要怎么处理,才能上传呢?
2019-09-16感谢,我已经解决了,谢谢解答。
“Babylon.js 加载场景时报错?"我在利用Babylon.js接入微信时,遇到一个问题。无法加载场景。报如下错误。 [图片] [图片] 就是因为 调用了这一句导致的。[图片] 另外,我发面 source里没有 res目录。 请问,这是怎么导致的,有什么解决方案吗? 个人估计是 url地址需要 网络格式http://XXXXX.
2019-09-16楼主你好,我遇到一个问题,使用Babylon.js加载场景或其它资源时,会报[图片] 这个错误,只因我调用了加载场景。[图片] 请教下楼主,你是怎么处理的。
ios版本的微信小游戏加载babylonjs的shader报错经过测试,android版本运行正常,模拟器正常,ios版本的微信小游戏加载babylonjs的shader报错 BJS - [11:27:46]: Unable to compile effect: BJS - [11:27:46]: Uniforms: world, view, viewProjection, vEyePosition, vLightsType, vAmbientColor, vDiffuseColor, vSpecularColor, vEmissiveColor, vFogInfos, vFogColor, pointSize, vDiffuseInfos, vAmbientInfos, vOpacityInfos, vReflectionInfos, vEmissiveInfos, vSpecularInfos, vBumpInfos, vLightmapInfos, vRefractionInfos, mBones, vClipPlane, diffuseMatrix, ambientMatrix, opacityMatrix, reflectionMatrix, emissiveMatrix, specularMatrix, bumpMatrix, normalMatrix, lightmapMatrix, refractionMatrix, diffuseLeftColor, diffuseRightColor, opacityParts, reflectionLeftColor, reflectionRightColor, emissiveLeftColor, emissiveRightColor, refractionLeftColor, refractionRightColor, vReflectionPosition, vReflectionSize, logarithmicDepthConstant, vTangentSpaceParams, alphaCutOff, vLightData0, vLightDiffuse0, vLightSpecular0, vLightDirection0, vLightGround0, lightMatrix0, shadowsInfo0, depthValues0, diffuseSampler, ambientSampler, opacitySampler, reflectionCubeSampler, reflection2DSampler, emissiveSampler, specularSampler, bumpSampler, lightmapSampler, refractionCubeSampler, refraction2DSampler, shadowSampler0, depthSampler0
2019-09-14你好,请问你在微信中加载过场景吗?我加载时会报错。[图片]如您知道,求告知。谢谢。
Canvas的大小和真机实际的屏幕显示范围不一致。我创建了一个小游戏项目,在canvas.height、canvas.width得到的值和window.innerHeight、window.innerWidth、SystemInfo.windowHeight、SystemInfo.windowWidth是一样的,但是这些方法获得的屏幕尺寸和真机上的实际屏幕值不一致。,我用的是HuaWei M9 手机,真实屏幕尺寸是1920:1080,但是在小游戏环境下的到的永远是768:732,而且在Canvas上绘制东西显示的东西右侧和下侧面会被裁剪,这是为什么?但在模拟器中屏幕大小和选定的模拟器是一样的,也不会出现裁剪现象。 babylon.min.js可以在wx5952a4b12e404513这小程序的提交目录下得到。 [代码]import BABYLON from [代码][代码]'./libs/babylon.min'[代码][代码]// import Music from './runtime/music'[代码][代码]import GameInfo from [代码][代码]'./runtime/gameinfo'[代码][代码]var[代码] [代码]self;[代码][代码]/**[代码][代码] [代码][代码]* 游戏主函数[代码][代码] [代码][代码]*/[代码][代码]export [代码][代码]default[代码] [代码]class Main {[代码][代码] [代码][代码];[代码][代码] [代码][代码]scene;[代码][代码] [代码][代码]engine;[代码][代码] [代码][代码]camera;[代码][代码] [代码][代码]touchInput;[代码][代码] [代码][代码]gameinfo;[代码][代码] [代码][代码]dirCount;[代码][代码] [代码][代码]constructor() {[代码][代码] [代码][代码]self = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]var[代码] [代码]red, green, blue, yellow;[代码][代码] [代码][代码]var[代码] [代码]width = canvas.width;[代码][代码] [代码][代码]var[代码] [代码]height = canvas.height;[代码][代码] [代码][代码]console.log([代码][代码]'canvas size:'[代码] [代码]+ height + [代码][代码]' '[代码] [代码]+ width);[代码][代码] [代码][代码]console.log([代码][代码]'window size:'[代码] [代码]+ window.innerHeight + [代码][代码]' '[代码] [代码]+ window.innerWidth);[代码][代码] [代码] [代码] [代码][代码]var[代码] [代码]SystemInfo = wx.getSystemInfoSync();[代码][代码] [代码][代码]console.log([代码][代码]'SystemInfo:'[代码] [代码]+ SystemInfo);[代码][代码] [代码][代码]console.log([代码][代码]' .SDKVersion:'[代码] [代码]+ SystemInfo.SDKVersion);[代码][代码] [代码][代码]console.log([代码][代码]' .batteryLevel:'[代码] [代码]+ SystemInfo.batteryLevel);[代码][代码] [代码][代码]console.log([代码][代码]' .benchmarkLevel:'[代码] [代码]+ SystemInfo.benchmarkLevel);[代码][代码] [代码][代码]console.log([代码][代码]' .brand:'[代码] [代码]+ SystemInfo.brand);[代码][代码] [代码][代码]console.log([代码][代码]' .devicePixelRatio:'[代码] [代码]+ SystemInfo.devicePixelRatio);[代码][代码] [代码][代码]console.log([代码][代码]' .fontSizeSetting:'[代码] [代码]+ SystemInfo.fontSizeSetting);[代码][代码] [代码][代码]console.log([代码][代码]' .language:'[代码] [代码]+ SystemInfo.language);[代码][代码] [代码][代码]console.log([代码][代码]' .model:'[代码] [代码]+ SystemInfo.model);[代码][代码] [代码][代码]console.log([代码][代码]' .pixelRatio:'[代码] [代码]+ SystemInfo.pixelRatio);[代码][代码] [代码][代码]console.log([代码][代码]' .platform:'[代码] [代码]+ SystemInfo.platform);[代码][代码] [代码][代码]console.log([代码][代码]' .screenHeight:'[代码] [代码]+ SystemInfo.screenHeight);[代码][代码] [代码][代码]console.log([代码][代码]' .screenWidth:'[代码] [代码]+ SystemInfo.screenWidth);[代码][代码] [代码][代码]console.log([代码][代码]' .statusBarHeight:'[代码] [代码]+ SystemInfo.statusBarHeight);[代码][代码] [代码][代码]console.log([代码][代码]' .system:'[代码] [代码]+ SystemInfo.system);[代码][代码] [代码][代码]console.log([代码][代码]' .version:'[代码] [代码]+ SystemInfo.version);[代码][代码] [代码][代码]console.log([代码][代码]' .windowHeight:'[代码] [代码]+ SystemInfo.windowHeight);[代码][代码] [代码][代码]console.log([代码][代码]' .windowWidth:'[代码] [代码]+ SystemInfo.windowWidth);[代码] [代码] [代码][代码]//创建2DCanvas和2D上下文[代码][代码] [代码][代码]var[代码] [代码]canvas_2d = wx.createCanvas([代码][代码]'canvas_2d'[代码][代码]);[代码][代码] [代码][代码]var[代码] [代码]ctx = canvas_2d.getContext([代码][代码]'2d'[代码][代码]);[代码][代码] [代码][代码]//加载巴比伦3D引擎(使用默认的Canvas)[代码][代码] [代码][代码]var[代码] [代码]engine = self.engine = [代码][代码]new[代码] [代码]BABYLON.Engine(canvas, [代码][代码]true[代码][代码]);[代码] [代码] [代码][代码]canvas.width = width;[代码][代码] [代码][代码]canvas.height = height;[代码][代码] [代码][代码]canvas_2d.width = width;[代码][代码] [代码][代码]canvas_2d.height = height;[代码][代码] [代码][代码]console.log([代码][代码]'canvas_2d size:'[代码] [代码]+ canvas_2d.height + [代码][代码]' '[代码] [代码]+ canvas_2d.width);[代码][代码] [代码][代码]// 通过引擎创建基本场景[代码][代码] [代码][代码]var[代码] [代码]scene = self.scene = [代码][代码]new[代码] [代码]BABYLON.Scene(engine);[代码][代码] [代码][代码]scene.clearColor = [代码][代码]new[代码] [代码]BABYLON.Color3(0.5, 0.8, 0.9);[代码] [代码] [代码][代码]//设置场景的动力(G重力, 基于Y轴)[代码][代码] [代码][代码]scene.gravity = [代码][代码]new[代码] [代码]BABYLON.Vector3(0, -0.9, 0);[代码] [代码] [代码][代码]//设置场景碰撞[代码][代码] [代码][代码]scene.collisionsEnabled = [代码][代码]true[代码][代码];[代码][代码] [代码][代码]var[代码] [代码]gameinfo = self.gameinfo = [代码][代码]new[代码] [代码]GameInfo();[代码][代码] [代码][代码]// var music = new Music();[代码] [代码] [代码][代码]//创建天空盒(其实就是个box)[代码][代码] [代码][代码]var[代码] [代码]skybox = BABYLON.Mesh.CreateBox([代码][代码]"skyBox"[代码][代码], 100.0, scene);[代码][代码] [代码][代码]var[代码] [代码]skyboxMaterial = [代码][代码]new[代码] [代码]BABYLON.StandardMaterial([代码][代码]"skyBox"[代码][代码], scene);[代码][代码] [代码][代码]skybox.material = skyboxMaterial;[代码][代码] [代码][代码]skyboxMaterial.reflectionTexture = [代码][代码]new[代码] [代码]BABYLON.CubeTexture([代码][代码]"https://www.babylonjs.com/assets/skybox/nebula"[代码][代码], scene);[代码][代码] [代码][代码]//设置图片的坐标类型(天空盒)[代码][代码] [代码][代码]skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;[代码][代码] [代码][代码]//diffuseColor:漫反射颜色[代码][代码] [代码][代码]skyboxMaterial.diffuseColor = [代码][代码]new[代码] [代码]BABYLON.Color3(0, 0, 0);[代码][代码] [代码][代码]//specularColor:镜面反射颜色[代码][代码] [代码][代码]skyboxMaterial.specularColor = [代码][代码]new[代码] [代码]BABYLON.Color3(0, 0, 0);[代码][代码] [代码][代码]//不接受灯光渲染[代码][代码] [代码][代码]skyboxMaterial.disableLighting = [代码][代码]true[代码][代码];[代码][代码] [代码][代码]//反而不剔除[代码][代码] [代码][代码]skyboxMaterial.backFaceCulling = [代码][代码]false[代码][代码];[代码] [代码] [代码][代码]// BABYLON.SceneLoader.Append("https://www.babylonjs.com/Assets/DamagedHelmet/glTF/", "DamagedHelmet.gltf", scene, function (meshes) {[代码][代码] [代码][代码]// });[代码] [代码] [代码][代码]// 参数:名字,位置,所属场景[代码][代码] [代码][代码]var[代码] [代码]camera = self.camera = [代码][代码]new[代码] [代码]BABYLON.FreeCamera([代码][代码]"FreeCamera"[代码][代码], [代码][代码]new[代码] [代码]BABYLON.Vector3(0, 0, -10), scene);[代码][代码] [代码][代码]//给相机的目标设置特定的位置(相机总是朝向它的目标),在这个例子中设置为场景的原点[代码][代码] [代码][代码]camera.setTarget(BABYLON.Vector3.Zero());[代码][代码] [代码][代码]var[代码] [代码]touchInput = self.touchInput = [代码][代码]new[代码] [代码]BABYLON.FreeCameraTouchInput();[代码][代码] [代码][代码]camera.inputs.add(touchInput);[代码][代码] [代码][代码]touchInput.attachControl(canvas, [代码][代码]true[代码][代码]);[代码][代码] [代码][代码]//将相机和画布关联[代码][代码] [代码][代码]// camera.attachControl(canvas, true);[代码] [代码] [代码][代码]// 创建基本光源, 目标位于 x:0,y:1,z:0 -(由天空出现)[代码][代码] [代码][代码]var[代码] [代码]light = [代码][代码]new[代码] [代码]BABYLON.DirectionalLight([代码][代码]'light1'[代码][代码], [代码][代码]new[代码] [代码]BABYLON.Vector3(-5, -5, 5), scene);[代码] [代码] [代码][代码]// // 创建一个内置的“球”的形状,它的构造函数包括5个参数:名称、宽度、深度、细分,场景(例子中仅4个参数)[代码][代码] [代码][代码]var[代码] [代码]sphere1 = BABYLON.Mesh.CreateSphere([代码][代码]'sphere1'[代码][代码], 16, 1, scene);[代码] [代码] [代码][代码]red = [代码][代码]new[代码] [代码]BABYLON.StandardMaterial([代码][代码]"red"[代码][代码], scene);[代码][代码] [代码][代码]red.diffuseColor = [代码][代码]new[代码] [代码]BABYLON.Color3(1, 0, 0); [代码][代码]//红[代码] [代码] [代码][代码]sphere1.material = red;[代码] [代码] [代码][代码]var[代码] [代码]points = [];[代码][代码] [代码][代码]for[代码] [代码]([代码][代码]var[代码] [代码]i = 0; i < 1000; i++) {[代码][代码] [代码][代码]var[代码] [代码]point = [代码][代码]new[代码] [代码]BABYLON.Vector3();[代码][代码] [代码][代码]point.x = 5 * Math.cos(i * 0.01 * 2 * Math.PI);[代码][代码] [代码][代码]point.y = 1 * Math.cos(i * 0.05 * 2 * Math.PI);[代码][代码] [代码][代码]point.z = 3 * Math.cos(i * 0.1 * 2 * Math.PI);[代码][代码] [代码][代码]points.push(point);[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]var[代码] [代码]lines = BABYLON.Mesh.CreateLines([代码][代码]"lines"[代码][代码], points, scene);[代码][代码] [代码][代码]lines.color = [代码][代码]new[代码] [代码]BABYLON.Color3(1, 0, 0); [代码][代码]//红[代码] [代码] [代码][代码]wx.onTouchStart([代码][代码]this[代码][代码].onTouchStart);[代码][代码] [代码][代码]wx.onTouchEnd([代码][代码]this[代码][代码].onTouchEnd);[代码] [代码] [代码][代码]//一个特殊的顶点着色,没有任务矩阵变换[代码][代码] [代码][代码]BABYLON.Effect.ShadersStore[[代码][代码]"hudVertexShader"[代码][代码]] = `[代码][代码] [代码][代码]#ifdef GL_ES[代码][代码] [代码][代码]precision highp float;[代码][代码] [代码][代码]#endif[代码][代码] [代码][代码]// Attributes[代码][代码] [代码][代码]attribute vec3 position;[代码][代码] [代码][代码]attribute vec2 uv;[代码][代码] [代码][代码]// Normal[代码][代码] [代码][代码]varying vec2 vUV;[代码][代码] [代码][代码]void main(void) {[代码][代码] [代码][代码]gl_Position = vec4(position, 1.0);[代码][代码] [代码][代码]vUV = uv;[代码][代码] [代码][代码]} [代码][代码] [代码][代码]`;[代码][代码] [代码][代码]//最普通片元着色器,只有一个2D采样[代码][代码] [代码][代码]BABYLON.Effect.ShadersStore[[代码][代码]"hudFragmentShader"[代码][代码]] = `[代码][代码] [代码][代码]#ifdef GL_ES[代码][代码] [代码][代码]precision highp float;[代码][代码] [代码][代码]#endif[代码][代码] [代码][代码]varying vec2 vUV;[代码][代码] [代码][代码]// Refs[代码][代码] [代码][代码]uniform sampler2D textureSampler;[代码][代码] [代码][代码]void main(void) {[代码][代码] [代码][代码]gl_FragColor = texture2D(textureSampler, vUV);[代码][代码] [代码][代码]} [代码][代码] [代码][代码]`;[代码][代码] [代码][代码]var[代码] [代码]hudMaterial = [代码][代码]new[代码] [代码]BABYLON.ShaderMaterial([代码][代码]"hud"[代码][代码], scene, {[代码][代码] [代码][代码]vertexElement: [代码][代码]"hud"[代码][代码],[代码][代码] [代码][代码]fragmentElement: [代码][代码]"hud"[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]needAlphaBlending: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]attributes: [[代码][代码]"position"[代码][代码], [代码][代码]"uv"[代码][代码]],[代码][代码] [代码][代码]samplers: [[代码][代码]"textureSampler"[代码][代码]][代码][代码] [代码][代码]});[代码][代码] [代码][代码]var[代码] [代码]planeVertexData = BABYLON.VertexData.CreatePlane({ size: 2 });[代码][代码]//从-1,-1 到 1,1的简单平面覆盖整个3D空间[代码][代码] [代码][代码]// delete planeVertexData.normals; [代码][代码] [代码][代码]var[代码] [代码]hud = [代码][代码]new[代码] [代码]BABYLON.Mesh([代码][代码]"Hud"[代码][代码], scene);[代码][代码]//HUD网格对象[代码][代码] [代码][代码]planeVertexData.applyToMesh(hud);[代码] [代码] [代码][代码]//贴图大小和2D屏幕大小一致[代码][代码] [代码][代码]var[代码] [代码]hudTexture = [代码][代码]new[代码] [代码]BABYLON.DynamicTexture([代码][代码]"dynamic texture"[代码][代码], { width: canvas_2d.width, height: canvas_2d.height }, scene, [代码][代码]true[代码][代码]);[代码][代码] [代码][代码]var[代码] [代码]textureContext = hudTexture.getContext();[代码][代码]//贴图的绘制上下文[代码][代码] [代码][代码]hud.material = hudMaterial;[代码][代码] [代码][代码]hudMaterial.setTexture([代码][代码]"textureSampler"[代码][代码], hudTexture);[代码][代码] [代码][代码]hudMaterial.backFaceCulling = [代码][代码]false[代码][代码]; [代码][代码]//关闭背面裁剪[代码][代码] [代码][代码]hudMaterial.disableDepthWrite = [代码][代码]true[代码][代码];[代码][代码]//关闭写深度缓存[代码][代码] [代码][代码]hudTexture.update();[代码][代码]//贴图更新[代码] [代码] [代码][代码]window.onresize = (window, event)=>{[代码][代码] [代码][代码]console.log([代码][代码]'window:'[代码] [代码]+ window );[代码][代码] [代码][代码]console.log([代码][代码]'event:'[代码] [代码]+ event );[代码][代码] [代码][代码]};[代码] [代码] [代码][代码]// //在引擎中循环运行这个场景[代码][代码] [代码][代码]var[代码] [代码]isUp = [代码][代码]true[代码][代码];[代码][代码] [代码][代码]// var count = 0;[代码][代码] [代码][代码]// var hitCount = 0;[代码][代码] [代码][代码]// self.dirCount = 0;[代码][代码] [代码][代码]engine.runRenderLoop([代码][代码]function[代码] [代码]() {[代码] [代码] [代码][代码]// console.log('window size:' + window.innerHeight + ' ' + window.innerWidth);[代码][代码] [代码][代码]// //在2DCanvas上绘制两个矩形[代码][代码] [代码][代码]if[代码] [代码](isUp){[代码][代码] [代码][代码]ctx.clearRect(0, 0, canvas_2d.width, canvas_2d.height);[代码][代码] [代码][代码]ctx.fillStyle = [代码][代码]'blue'[代码][代码];[代码][代码] [代码][代码]ctx.fillRect(0, 0, 100, 100);[代码][代码] [代码][代码]ctx.fillStyle = [代码][代码]'red'[代码][代码];[代码][代码] [代码][代码]ctx.fillRect(canvas_2d.width - 100, canvas_2d.height - 100, 100, 100);[代码][代码] [代码][代码]// //将2DCanvas绘制贴图的上下文[代码][代码] [代码][代码]textureContext.drawImage(canvas_2d, 0, 0);[代码][代码] [代码][代码]//贴图更新[代码][代码] [代码][代码]hudTexture.update();[代码][代码] [代码][代码]//保证每一帧HUD都在[代码][代码] [代码][代码]hud.position = [代码][代码]new[代码] [代码]BABYLON.Vector3(camera._currentTarget.x, camera._currentTarget.y, camera._currentTarget.z);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]isUp = !isUp;[代码][代码] [代码][代码]scene.render();[代码] [代码] [代码][代码]});[代码][代码] [代码][代码]}[代码][代码] [代码][代码]offsetX;[代码][代码] [代码][代码]offsetY;[代码][代码] [代码][代码]onTouchStart(event) {[代码][代码] [代码][代码]console.log(event);[代码][代码] [代码][代码]let lastTouchPoint = event.changedTouches[0];[代码][代码] [代码][代码]self.offsetX = lastTouchPoint.screenX;[代码][代码] [代码][代码]self.offsetY = lastTouchPoint.screenY;[代码][代码] [代码][代码]let x = event.touches[0].clientX[代码][代码] [代码][代码]let y = event.touches[0].clientY[代码] [代码] [代码][代码]// let area = self.gameinfo.btnArea[代码] [代码] [代码][代码]// if (x >= area.startX[代码][代码] [代码][代码]// && x <= area.endX[代码][代码] [代码][代码]// && y >= area.startY[代码][代码] [代码][代码]// && y <= area.endY)[代码][代码] [代码][代码]// self.dirCount = 0;[代码][代码] [代码][代码]}[代码][代码] [代码][代码]onTouchEnd(event) {[代码][代码] [代码][代码]console.log(event);[代码][代码] [代码][代码]let lastTouchPoint = event.changedTouches[0];[代码][代码] [代码][代码]self.offsetX = lastTouchPoint.screenX - self.offsetX;[代码][代码] [代码][代码]self.offsetY = lastTouchPoint.screenY - self.offsetY;[代码][代码] [代码][代码]self.camera.inputs.attached.touch._offsetX = self.offsetX;[代码][代码] [代码][代码]self.camera.inputs.attached.touch._offsetY = self.offsetY;[代码] [代码] [代码][代码]self.camera.inputs.attached.touch.touchAngularSensibility = 50000;[代码][代码] [代码][代码]self.camera.inputs.attached.touch.touchMoveSensibility = 250;[代码] [代码] [代码][代码]// var target = camera.getTarget();[代码][代码] [代码][代码]// target.x += this.offsetX;[代码][代码] [代码][代码]// target.y += this.offsetY;[代码][代码] [代码][代码]// camera.setTarget(target);[代码][代码] [代码][代码]}[代码][代码]}[代码][图片] [图片] [图片]
2019-09-14https://developers.weixin.qq.com/community/develop/doc/0000a2f5444af85cd2e8e98d056800?from=tool&idescene=7
白屏卡loading100%loading100%无法进去,右上角的三个点点击无效果,4G,wifi一样,在调试工具上正常 备注:babylonjs引擎库压缩后2.4M无法上传代码片段 2019-6-4 20:28:39更新 用真机调试之后出现如下报错: [图片] 引擎中有两处: this._gl.HALF_FLOAT_OES=5131 this._gl.HALF_FLOAT_OES=36193 应该是这里爆的,提示HALF_FLOAT_OES是read only不能赋值 请问这里是引擎的问题还是小游戏这边的? 后面紧接着爆如下错误: [图片] 可能第一个解决了第二个就没了吧 2019-6-5 11:18:20更新 this._gl.HALF_FLOAT_OES=5131 this._gl.HALF_FLOAT_OES=36193 去掉了这两行的赋值之后,正常跑通,但是不清楚后续是否会引发其他问题
2019-07-30非常感谢您的解答,我大概知道了,可能是因为微信只支持webgl1,故将this._gl.HALF_FLOAT_OES=36193固定了,并且为只读属性,防止修改。而在Babylonjs里会做修改。因此出现卡在100%处,我看了下,去除赋值应该不会产生影响。感觉这个必须要修改Babylonjs,仅仅用外部开发适配好像解决不了问题。(当然,我没有试过。)这个也可以给别人提个醒,遇到这个问题可以参考下。 注:this._gl 是canvas,这是微信提供的canvas,里面的属性HALF_FLOAT_OES是只读的,故报错。这是因为它不支持webgl2的缘故导致的。
接入Babylon.js引擎,android无法显示,卡在加载100%处.你好, 我在使用babylon.js开发微信小游戏时,在ios环境下(亲测ipad)是正常显示没有问题的,(另问下,微信是不是只支持webgl1啊),但在android下会有问题,无法正常显示。我只是简单调用了下new Babylon.engine这句。就报错了。************this is test*************是调用new Babylon.engine之的输出调试信息。下面是输出canvas信息。接着就new Babylon.engine,就报错了。机型 华为荣耀 v8 android8.0 babylon.js版本 4.03 [图片]
2019-07-30