WebGL

Unity WebAssembly

三世轮回 提交于 2020-07-29 06:24:35
今天面试官问道对WebAssembly有没有了解,我印象中,WebAssembly是将C++代码转换成网页浏览器支持的代码,只有PC平台才支持。 Unity的WebGL就是WebAssembly了,来测试看看。 我这边是Unity2019. 导出后上传到服务器上测试。 PC上效果如下: 代码正常执行,打出Log。 从console信息来看,webGL对应的是OpenGL ES 3.0 . 然后另外的一个特点就是,在网络界面里面,看不到任何请求,这样或许可以避免被破解。 在手机上firefox提示不支持 但是点击ok之后就可以运行了。。 来源: oschina 链接: https://my.oschina.net/u/4299887/blog/4306984

前端学不动了怎么办?3年,5年,10年,都需要规划!

心已入冬 提交于 2020-07-28 19:02:43
前端学不动的根本原因是目标感不强或者根本就没有目标。在学习前端之前,我们需要先思考我们要成为一个什么样前端工程师。接下来我们以时间线的方式,来告诉我们什么时间该做什么事儿。本文以普通人为例,也是想给普通人一些思路,结合自己的情况走出自己的路,超人请自行退出。 一、 1-3年(p5-p6) 这个时候大多数是应届生学习知识的积累期,对于前端三剑客:HTML/Javascript/CSS基础的夯实阶段。必看的书有《Javascript权威指南》/《Head First HTML and CSS, XHTML》/HTML方面多看看官方文档或者w3c的标准就成。另外这时候一般的前端工程师,会掌握一门应用级别框架(比如:React/Vue/Angular等等)。虽然使用传统三剑客我们也可以把任务完成,但是使用应用级别的框架还是会提高我们的效率,而且公司在人才招聘的时候应用级别的框架是必问的。不做赘述这个阶段感觉推不动的前端朋友建议推出,做自己更喜欢的事儿去吧。 本阶段关键词:(前端基础、原始积累、HTML/CSS/Javascript、Vue/React/Angular) 二、3-6年(p6-p7) 熬过艰难的初期阶段,接下来2-3年是一个差异化的体验期,在这个时间段通常情况下,前端工程师已经能够胜任所有的业务需求。可能大项目的拆解能力有所欠缺,但是这种能力会通过经验的积累不断积累有所上升

Unity打包WebGL所遇到的坑!!!

被刻印的时光 ゝ 提交于 2020-07-28 09:25:46
WebGL打包过程可真是异常坎坷,开发过程中会有各种坑,大概总结了一下,记录下来。 网络请求问题: 1.Http请求使用C#中请求方式,是不支持的,必须使用Unity的Http请求UnityWebRequest/WWW方式。 using (var webRequest = UnityWebRequest.Get("https://www.baidu.com/")) { yield return webRequest.SendWebRequest(); if (!webRequest.isNetworkError && !webRequest.isHttpError) Debug.Log(webRequest.downloadHandler.text); } using (var webRequest = UnityWebRequest.Post("https://www.baidu.com/","参数")) { yield return webRequest.SendWebRequest(); if (!webRequest.isNetworkError && !webRequest.isHttpError) Debug.Log(webRequest.downloadHandler.text); } 2.经常出现的问题就是跨域问题,开发过Web的人员都知道怎么解决

基于3D-WebGL技术的城市空间信息模型管理系统

你。 提交于 2020-07-26 21:25:10
三维规划辅助审批系统自上线运行以来,辅助规划局建设项目审批1000余项,实现了规划审批从二维到三维的转变,广泛应用于规划编制业务、规划审批业务、证后抽查业务。但是,随着技术的不断发展,目前的三维规划辅助审批系统亟需优化完善,从系统架构、承载数据资源种类和数量、功能优化、效率提升等各方面亟需全面改造,尤其是成都五城区420平方公里实景三维数据的承载和展示效果,对三维平台改造提出了迫切需求。   为了更好的服务于城市规划编制、审批、证后抽查监督等工作,同时为城市管理和服务提供数据和技术支撑,中心拟开展城市空间信息模型管理系统(一期)”项目建设。利用超图三维平台,于2019年完成了城市空间信息模型管理系统的设计与开发工作。系统着眼于“看、查、用、管”四个方面,通过系统做到对成都市中心五城区三维实景数据进行统筹管理,实现城市空间信息模型管理系统与成都市公共平台之间房屋面、POI点、地铁现状及规划线路等各类专题数据信息的共建共享、动态更新,进而满足成都市规划信息技术中心对成都实景三维的日常展示与规划管理需求,为城市科学规划与决策提供支撑,对于提升城市规划管理软实力、增强可持续发展后劲起到了积极的推动作用。 支撑层: 支撑层运行支撑环境包括规划内部保密网运行的云服务器和互联网运行的华三云服务器。    数据层: 数据层包括基础地理信息库、规划专题数据库、业务管理数据库三大类数据库

Rendering NURBS surface in webGL

久未见 提交于 2020-07-15 09:11:05
问题 I need some help with rendering a NURBS surface in webGL. Some days ago our professor assigned us to draw with NURBS a flag and to animate it. We have to use webGL (and cannot trhee.js...). I have no idea on how to proceed (even though I know the theory about NURBS and tessellation more or less). Any hint? Disclaimer: I'm not asking for a solution. It's against the rules and I want to get it myself. I just need to be pointed on the right direction. Thanks in advance 回答1: Just because you can

How to display a locally selected image in three.js?

旧街凉风 提交于 2020-07-09 20:44:06
问题 I always get a cross-origin-error. how can I circumvent this, or better yet, fix it? I need the user to be able to pic a local image and let it be displayed in a PlaneGeometry. my code: this.reader.readAsDataURL(file); this.reader.onloadend = function( ev ) { var file = ev.target.result, //geometry = new THREE.CubeGeometry(1, 1, 0.1), geometry = new THREE.PlaneGeometry(1, 1, 1, 2), texture = THREE.ImageUtils.loadTexture(file), material = new THREE.MeshBasicMaterial({ map: texture }), mesh =

In WebGL - when instancing geometry, is it possible to pass per-vertex attribute information for each instance?

醉酒当歌 提交于 2020-07-07 11:32:06
问题 I am trying to recreate through raw WebGL the following three.js example with instanced geometry; though, after testing it looks like I may just have to draw multiple meshes like in the sample but I thought I would ask here first to double check. The question now is essentially - is it possible to pass per-vertex data for each instance of the geometry that gets rendered? Hopefully that makes sense but if it doesn't - The geometry I'm rendering has 4 vertices. For each instance of the geometry

what does instancing do in webgl

你离开我真会死。 提交于 2020-07-07 05:07:32
问题 I want to know is any way to understand how many times vertex shader will be called in a draw call in webgl? because I want to know what does instancing realy do, is it call every shared vertices for each instance? so it will call too many time vertex shader 回答1: Instancing calls your vertex shader one per vertex per instance. The difference is you can choose 1 or more attributes to only advance once per instance instead of once per vertex. Normally each attribute advances stride bytes for

How do I display <iframe>s as a texture in A-Frame?

◇◆丶佛笑我妖孽 提交于 2020-06-27 16:36:05
问题 I want to display webpages as 2D content with a VR scene. Can I use an <iframe> element as a source for a texture in WebGL/three.js in https://aframe.io? 回答1: You can't use iframes or any other HTML element inside WebGL as it would be a security risk. People could read passwords and other private info from the textures. you can however find creative solutions like this one which is the first hit of googling "iframe webgl". You do it by putting a iframe behind a webgl canvas, using 3d math cut

How can we draw 3D bulding structure from existing image Jquery,Css?

蹲街弑〆低调 提交于 2020-06-26 12:11:46
问题 Please see this site it was made in flash: Can we do it by jquery css? Go here And click on any building marked with "Release" You will see one building on hover animation effect. That i want to develop using jquery and css Or you can suggest for development 回答1: First you need to know there is nothing 3d here. These are pre-rendered images. You draw these highlighted areas in a software as different layer, photoshop for example. Then you need create an area that can detect mouse hover. The