如果您是JavaScript开发人员,为什么要进行增强现实-以及如何开始

by Evaristo Caraballo

通过Evaristo Caraballo

如果您是JavaScript开发人员,为什么要进行增强现实-以及如何开始 (Why you should do Augmented Reality if you are a JavaScript developer — and how to start)

If you are a JavaScript coder who is still late to making up a definitive list of resolutions for 2019, let me give you a hand: Start figuring out how to get into Augmented Reality (AR).

如果您是一位JavaScript编码人员,但仍迟迟无法确定2019年的分辨率,请让我帮助您:开始弄清楚如何进入增强现实(AR)。

The Augmented/Mixed/Virtual Reality (AR/MR/VR) combo has enjoyed frenetic growth since 2016, coming from a marginal market value of bit more than $6 Billion to one that might reach the $210 Billion in sales (including hardware) by 2022. Of all, Augmented Reality is the one experiencing steady growth.

自2016年以来,增强/混合/虚拟现实(AR / MR / VR)组合一直获得疯狂增长,其边际市场价值略高于60亿美元,到2022年的销售额(包括硬件)可能达到2100亿美元总而言之, 增强现实是经历稳定增长的领域。

At first, a JavaScript (web) developer wanting to get into the AR boat might feel discouraged when finding the usual required skills; and then there is who ask Machine Learning or Internet of Things. However if you are mainly a JavaScript developer, consider yourself blessed: the language is recurrently mentioned as one you should know to enter this sector. The reason? Right now a lot of AR development goes on the web. And this is where JavaScript reigns.

刚开始,想要进入AR之旅JavaScript(网络)开发人员在找到通常所需的技能时可能会灰心丧气。 然后有人问机器学习或物联网。 但是,如果您主要是JavaScript开发人员,请认为自己很幸运: 经常提到该语言,这是您应该进入该领域的知识。 原因? 现在,许多AR开发都在网络上进行 。 这就是JavaScript统治的地方。

JavaScript爱好者的增强工作-真的吗? (Augmented Jobs for the JavaScript-fan — Really?)

Maybe not too fast. There are many examples where AR/MR/VR shines on its own, specially in niche markets, but the industry hasn’t completely figured out the full value of the technology for the general consumer. Once that it solved, the industry would be certainly making more AR/MR/VR products, which would translate into more jobs.

也许不太快。 有很多例子表明,AR / MR / VR能够独树一帜,特别是在小众市场上,但业界尚未完全了解该技术对普通消费者的全部价值。 一旦解决,行业肯定会制造更多的AR / MR / VR产品,这将转化为更多的工作。

For some analysts AR is expected to have the most pervasive impact, in part because it doesn't require specific devices and conditions to be implemented as VR does.

对于某些分析师而言,AR有望产生最广泛的影响,部分原因是它不需要像VR一样实现特定的设备和条件 。

AR has utility for almost everything, overlaying useful and relevant information on the world around you. AR can be pervasive in a way that VR cannot.
AR具有几乎所有功能,可以将您周围的有用信息和相关信息重叠。 AR可以以VR无法实现的方式普及。

- David McQueen -Strategy Analytics- from an interview on Twice

-David McQueen-策略分析- 两次采访中

It rests on the industry to find how to make AR a more every day life tech. According to some companies, particularly within the mobile phone realm, exploiting better the AR potential reduces to a well-known rule: SIMPLICITY.

寻找如何使AR成为日常生活中的更多技术,取决于行业。 根据一些公司的说法,尤其是在手机领域,更好地利用AR潜力会降低到一个众所周知的规则: SIMPLICITY

While Unity has become the default path for building AR apps, an increasing number need only a sprinkling of AR.
虽然Unity已成为构建AR应用程序的默认路径,但越来越多的数量只需要少量AR。

- from an article by Benjamin Devine, Homestory AR

-摘自Homestory AR的Benjamin Devine的文章

In many cases, resourcing onto the leading AR tools could be an overkill. Instead, a bunch of good UX-driven features over some 2D/3D assets could be more than enough to make striking products. Something a JavaScript developer regularly does.

在许多情况下,将资源配置到领先的AR工具上可能是过大的选择。 取而代之的是,在某些2D / 3D资产上具有许多由UX驱动的良好功能,足以制造出引人注目的产品。 JavaScript开发人员经常做的事情。

It is then possible that any JavaScript developer will be embedding (non)standard AR/VR features as an extension of their traditional duties in the future. And if required, JavaScript is robust enough for more complex tasks. The sky is the limit.

这样,将来任何JavaScript开发人员都可能会嵌入(非)标准的AR / VR功能,作为其传统职责的扩展。 而且,如果需要,JavaScript足够强大,可以执行更复杂的任务。 天空才是极限。

成为JavaScript增强版 (Becoming JavaScript-Augmented)

Before starting, I would suggest to have a look at the several AR platforms and standards. The same technical constraints affecting the industry are also reflected in the AR world.

在开始之前,我建议先看一下几种AR平台和标准。 影响行业的相同技术限制也反映在AR世界中。

For example, there are several platforms, one for each Big Tech (Google = ARCode, Apple = ARKit, MS = ChakraCore, Facebook = AR Studio, React 360, Mozilla = aframe).

例如,有多个平台,每个适用于每个Big Tech(Google = ARCode ,Apple = ARKit ,MS = ChakraCore ,Facebook = AR Studio , React 360 ,Mozilla = aframe )。

After having a quick look at the options, starting fully JavaScript’ed Augmented Reality projects is relatively easy. You can begin by taking any web/app dev framework like Cordova, Ionic, React Native or Vue Native to embed the AR framework of your choice — and deploy 3D assets on top of the real world.

快速浏览选项之后,相对容易地启动完全JavaScript的Augmented Reality项目。 您可以首先使用任何Web /应用程序开发框架(例如Cordova , Ionic , React Native或Vue Native)嵌入您选择的AR框架-并在现实世界中部署3D资产。

If what you want is to deploy on the web using mostly marker-based AR, you could use GitHub repos like AR.js (free), argon.js (free but limited) or awe.js (paid PaaS but with an old GitHub repository still available). There are a few tailored ones that are harder for the novice, many of them focused on things like facial/head recognition (such as tracking.js and headtrackr).

如果您想要使用主要基于标记的AR在Web上进行部署,则可以使用GitHub存储库,例如AR.js (免费), argon.js (免费但有限)或awe.js (付费PaaS,但带有旧的GitHub)存储库仍然可用)。 有一些量身定制的产品对于新手来说比较难,其中许多产品专注于面部/头部识别之类的东西(例如tracking.js和headtrackr )。

Or you can boost your project capabilities if you are able to port available SDKs made by AR-related companies. There are many APIs that render as AR on browser too. For example, Mapbox follows that path and it is developed on JavaScript.

或者,如果您能够移植AR相关公司提供的可用SDK,则可以提高项目功能。 在浏览器中也有许多API可以将其呈现为AR。 例如, Mapbox遵循该路径,并且是在JavaScript上开发的。

I would suggest you to keep it simple but interactive.

我建议您保持简单但互动。

However if your ambitions point to also mastering design and animation in JavaScript, you definitively have to learn at least one 3D Javascript package, and THREE.js the most popular. Wait, though, until you have gained a good base of JavaScript and OpenGl as well as geometry, trigonometry, linear algebra or physics. And don’t expect more help from the existing 3D JS GUIs; in particular, THREE.js has none. Challenging but exciting!

但是,如果您的雄心勃勃还希望掌握JavaScript的设计和动画,那么您肯定必须学习至少一个3D Javascript包 ,其中THREE.js最流行。 但是,请等待,直到您掌握了JavaScript和OpenGl以及几何,三角学,线性代数或物理学的良好基础。 并且不要期望现有3D JS GUI会提供更多帮助。 特别是THREE.js没有。 充满挑战但令人兴奋!

奖金示例 (Bonus Example)

I wanted to prepare a quick demo just to explore the technology, so I took a nice CodePen and modified it to fit a marker-based web-rendered AR animation ported within a clone of Stemkoski's great work with AR.js.

我想准备一个快速演示来探索该技术,因此我使用了一个不错的CodePen并对其进行了修改,以适应在Stemkoski与AR.js 的 出色合作中移植的基于标记的Web渲染AR动画。

For you to see the example you need a mobile device with a camera and internet (phone or tablet), and either a printed copy of the marker or another device to show it on screen.

为了让您看到示例,您需要一个带有照相机和互联网的移动设备 (电话或平板电脑),以及标记的打印副本或其他设备以将其显示在屏幕上。

Ready? Now open this link using a browser in your mobile device:

准备? 现在,使用移动设备中的浏览器打开此链接 :

https://evaristoc.github.io/ARexample/

https://evaristoc.github.io/ARexample/

Give authorization to use your camera, and point the camera to a marker like below, either printed or in another screen.

授权使用您的相机,然后将相机指向如下所示的标记 (已打印或在另一个屏幕中)。

NOTE: works on Android and Chrome — it might not work for other devices and browsers ?.

注意:可在Android和Chrome上使用-可能不适用于其他设备和浏览器?

Happy New Year!

新年快乐!

I hope you will find this technology as fascinating as I do. If so, don't stay alone: contact us at the freeCodeCamp forum and share your questions and ideas.

我希望您会发现这项技术像我一样引人入胜。 如果是这样,请不要孤单:在freeCodeCamp论坛上与我们联系,并分享您的问题和想法。

And if you liked this article, don't forget to give it a ? and to share it on social media.

如果您喜欢这篇文章,请别忘了给它一个? 并在社交媒体上分享。

Thanks for reading, enjoy AR and Happy Coding!!

感谢您的阅读,享受AR和快乐编码!!

翻译自: https://www.freecodecamp.org/news/an-intro-to-augmented-reality-for-the-javascript-developer-with-an-example-71875ab184ee/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/392705.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[Java 安全]加密算法

Base64编码 算法简述 定义 Base64内容传送编码是一种以任意8位字节序列组合的描述形式,这种形式不易被人直接识别。 Base64是一种很常见的编码规范,其作用是将二进制序列转换为人类可读的ASCII字符序列,常用在需用通过文本协议(比…

hdu5299 Circles Game

题意是这样。给出非常多圆,要么两两相离,要么包括,若删掉一个圆,那被他包括的都要删除,若某人没有圆给他删,那么他就赢了。 。。。知道树上博弈的话。就非常easy。。。不知道的话。这确实是个神题…… 按半…

leetcode 1356. 根据数字二进制下 1 的数目排序(排序)

给你一个整数数组 arr 。请你将数组中的元素按照其二进制表示中数字 1 的数目升序排序。 如果存在多个数字二进制中 1 的数目相同,则必须将它们按照数值大小升序排列。 请你返回排序后的数组。 示例 1: 输入:arr [0,1,2,3,4,5,6,7,8] 输…

oracle java认证_如何通过Oracle的Java认证-开发人员实用指南

oracle java认证by javinpaul由javinpaul 如何通过Oracle的Java认证-开发人员实用指南 (How to Pass Oracle’s Java Certifications — a Practical Guide for Developers) A Java certification is highly regarded in the IT Industry and provides a Java developer with …

Oracle中exists与in的效率探讨

in 与 exist 的语法比较: select from 数据表 t where t.x in (...) 括号内可以是符合t.x字段类型的值集合,如(1,2,3),但如果t.x是number类型的时候,似乎这样的写法会出问题;也可以是通 过另外的sele…

log日志轮转--logrotate

服务器上的日志包括系统日志和服务日志每天都会产生n多log,好多人会自己写脚本来进行日志的切割、压缩等,而忽略了系统自带的服务--logrotate。 简介 logrotate是个十分有用的工具,它可以自动对日志进行截断(或轮循)、压缩以及删除…

2个字段并在一次插入一个字段里面_elasticsearch外用与内观(二)-当插入文档时,elasticsearch都在做什么...

Previous: elasticsearch外用与内观(一)-常用功能与使用方法 在了解了es的基本用法之后,我们再来看看当插入文档数据时,elasticsearch都在做什么。首先,es的索引只是一个逻辑概念,实际上是由一个个物理分片组成的,每个分片就是一个…

学习Spring Data JPA

简介 Spring Data 是spring的一个子项目,在官网上是这样解释的: Spring Data 是为数据访问提供一种熟悉且一致的基于Spring的编程模型,同时仍然保留底层数据存储的特​​殊特性。它可以轻松使用数据访问技术,可以访问关系和非关系…

azure多功能成像好用吗_Azure持久功能简介:模式和最佳实践

azure多功能成像好用吗Authored with Steef-Jan Wiggers at Microsoft Azure由Microsoft Azure的Steef-Jan Wiggers撰写 With Durable Functions, you can program a workflow and instantiate tasks in sequential or parallel order, or you can build a watch or support a…

leetcode 327. 区间和的个数(treemap)

给定一个整数数组 nums,返回区间和在 [lower, upper] 之间的个数,包含 lower 和 upper。 区间和 S(i, j) 表示在 nums 中,位置从 i 到 j 的元素之和,包含 i 和 j (i ≤ j)。 说明: 最直观的算法复杂度是 O(n2) ,请在此…

常用的工具函数

得到两个数组的并集, 两个数组的元素为数值或字符串//tools.js export const getUnion (arr1, arr2) > {return Array.from(new Set([...arr1, ...arr2])) }//调用页面 import { getUnion } from /libs/toolsthis.getUnion getUnion([1,2,3,5],[1,4,6]) //(6) [1, 2, 3,…

git 常用commands(转)

常用 Git 命令清单 作者: 阮一峰 日期: 2015年12月 9日 我每天使用 Git ,但是很多命令记不住。 一般来说,日常使用只要记住下图6个命令,就可以了。但是熟练使用,恐怕要记住60~100个命令。 下面是…

Win2003磁盘分区调整

引用如下: 可能大家都知道,在Windows Server 2003下,普通版本的分区魔术师是无法运行的,而Windows内置的命令行工具Diskpart则能胜任分区魔术师的大部分工作,它的功能非常强大。输入Diskpart后,将显示如图所…

检查集群状态命令_轻松管理Kubernetes集群的7个工具

Kubernetes正在不断加快在云原生环境的应用,但如何以统一、安全的方式对运行于任何地方的Kubernetes集群进行管理面临着挑战,而有效的管理工具能够大大降低管理的难度。K9sk9s是基于终端的资源仪表板。它只有一个命令行界面。无论在Kubernetes仪表板Web …

leetcode 122. 买卖股票的最佳时机 II(贪心算法)

给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格。 设计一个算法来计算你所能获取的最大利润。你可以尽可能地完成更多的交易(多次买卖一支股票)。 注意:你不能同时参与多笔交易(你必须在再次购买前出售掉…

前端绘制绘制图表_绘制图表(第2页):JavaScript图表库的比较

前端绘制绘制图表by Mandi Cai蔡曼迪 绘制图表(第2页):JavaScript图表库的比较 (Charting the waters (pt. 2): a comparison of JavaScript charting libraries) 深入研究D3.js,Dygraphs,Chart.js和Google Charts (A deep dive into D3.js,…

python 3.6.5 pip_在Windows 10 + Python 3.6.5 中用 pip 安装最新版 TensorFlow v1.8 for GPU

声明什么cuDNN之类的安装,应该是毫无难度的,按照官网的教程来即可,除非。。。像我一样踩了狗屎运。咳咳,这些问题不是本文的关键。本文的关键是解决pip安装tensorflow gpu版的问题。安装环境操作系统:64位的Windows 10…

模板进阶——模板实参推断

一、关键点 模板实参:模板参数T的实例类型,如int、string等 模板实参推断:从函数实参来确定模板实参的过程 模板类型参数与类型转换:const的转换、数组/函数到指针的转换 显式模板实参:当模板参数类型并未出现在函数参…

leetcode 973. 最接近原点的 K 个点(排序)

我们有一个由平面上的点组成的列表 points。需要从中找出 K 个距离原点 (0, 0) 最近的点。 (这里,平面上两点之间的距离是欧几里德距离。) 你可以按任何顺序返回答案。除了点坐标的顺序之外,答案确保是唯一的。 示例 1&#xf…

ios 打开扬声器

[[UIDevice currentDevice] setProximityMonitoringEnabled:YES]; AVAudioSession *audioSession [AVAudioSession sharedInstance]; //默认情况下扬声器播放 [audioSession setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthe…