<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hasan Ali</title>
    <description>The latest articles on DEV Community by Hasan Ali (@hasanaliqureshi).</description>
    <link>https://dev.to/hasanaliqureshi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F101901%2Fce117afe-803e-4019-b19c-7e2aebb1db67.png</url>
      <title>DEV Community: Hasan Ali</title>
      <link>https://dev.to/hasanaliqureshi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hasanaliqureshi"/>
    <language>en</language>
    <item>
      <title>The Killer Framework to Generate SaaS Ideas for Martech</title>
      <dc:creator>Hasan Ali</dc:creator>
      <pubDate>Tue, 09 Feb 2021 12:38:34 +0000</pubDate>
      <link>https://dev.to/hasanaliqureshi/the-killer-framework-to-generate-saas-ideas-for-martech-2pf4</link>
      <guid>https://dev.to/hasanaliqureshi/the-killer-framework-to-generate-saas-ideas-for-martech-2pf4</guid>
      <description>&lt;p&gt;When it comes to building SaaS products, every tool out there is a solution to a problem that an audience is facing.&lt;br&gt;
The biggest problem that marketing companies and agencies are facing is where to spend their next dollar for their marketing campaign.&lt;/p&gt;

&lt;p&gt;The only reason why the Martech landscape has grown exponentially in the past couple of years is that marketing companies are always looking forward to upgrading themselves through technology, replacing their existing processes with automation, and to build effective and efficient strategies for their campaigns.&lt;/p&gt;

&lt;p&gt;While working in a growth marketing agency I have followed a framework to come up with ideas and build Martech solutions for different industries.&lt;/p&gt;

&lt;h3&gt;
  
  
  Analytics
&lt;/h3&gt;

&lt;p&gt;Analytics is one of the basic components of marketing, where you record and analyze events. It gives a holistic view of a marketing campaign, giving insights about how an audience is reacting towards a campaign, what actions they're taking, and from which platform the campaign is getting a positive response. &lt;/p&gt;

&lt;p&gt;Based on the data from analytics, marketing teams predict and pivot marketing strategies to get effective results.&lt;br&gt;
Analytics tools do a very basic job, that is they track campaigns, users, and events, then report them on a dashboard. Now by using Data Science and Artificial Intelligence, analytics tools are also predicting the upcoming reports to give marketers a chance to adjust their campaigns for better results.&lt;/p&gt;

&lt;h3&gt;
  
  
  Intelligence
&lt;/h3&gt;

&lt;p&gt;Beauty may be dangerous, but intelligence is lethal. &lt;br&gt;
In the era of social media, marketing companies don't rely on surveys and estimations, they exactly need to know the audience they're targeting, what are their sentiments about a topic, how they will react towards a campaign, what are they interested in, what type of content they consume, etc.&lt;br&gt;
Technologies like AI, ML, and Data Science have made a profound change in marketing. The whole point of marketing intelligence is to collect data from different sources and conclude results using different algorithms like behavioral and pattern recognition.&lt;/p&gt;

&lt;p&gt;Social listening tools are the best example of Marketing Intelligence. It grabs the data from different social networks and using Artificial Intelligence predicts in-depth audience insights.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automation
&lt;/h3&gt;

&lt;p&gt;The world of marketing is moving towards automation. From programmatic advertisements to No-Code tools, automation in marketing is a need of today.&lt;/p&gt;

&lt;p&gt;Marketing companies and agencies are always in search of tools to automate their repetitive processes, allowing teams to do what they do best and bring more sales.&lt;/p&gt;

&lt;p&gt;There are already many marketing automation tools available as it's easy to create some scripts to automate any task. Marketing automation is not limited to just lead generation, now everything is getting automated by a tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  Customer Relationship Management
&lt;/h3&gt;

&lt;p&gt;Whether it's a small e-commerce business or a multinational brand, everyone is marketing on multiple channels to capture audiences of all kinds, and keeping track of all marketing stats. Giving the right service to customers requires an intense amount of effort and time.&lt;/p&gt;

&lt;p&gt;That's where CRM comes in, it tracks all the stats and metrics of marketing and sales and provides options to provide support to customers to maintain a good relationship.&lt;/p&gt;

&lt;p&gt;CRMs that are already in the market are extensively built to cater all the problems, but small and medium enterprises are always in search of easy to use and affordable solutions and that's your sweet spot to build a tool for this market. &lt;br&gt;
It's a general-purpose frame that can apply to any industry. Let's say you want to build tools for the e-commerce market then this framework would be changed into&lt;/p&gt;

&lt;p&gt;Analytics tools for e-commerce&lt;br&gt;
Intelligence tools for e-commerce&lt;br&gt;
Automation tools for e-commerce&lt;br&gt;
CRM/Support tools for e-commerce&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Words
&lt;/h3&gt;

&lt;p&gt;The future belongs to those who learn more skills and combine them in creative ways. - Robert Greene&lt;/p&gt;

&lt;p&gt;Whether you're looking for an idea for a startup to pursue your entrepreneur journey or for a side project to build your brand and polish your skills, this stack can help you to come up with sure-fire Martech ideas for any market.&lt;/p&gt;

</description>
      <category>development</category>
      <category>martech</category>
      <category>marketing</category>
      <category>career</category>
    </item>
    <item>
      <title>How to become MarTech Developer in 2021</title>
      <dc:creator>Hasan Ali</dc:creator>
      <pubDate>Fri, 01 Jan 2021 12:12:47 +0000</pubDate>
      <link>https://dev.to/hasanaliqureshi/how-to-become-martech-developer-in-2021-h75</link>
      <guid>https://dev.to/hasanaliqureshi/how-to-become-martech-developer-in-2021-h75</guid>
      <description>&lt;p&gt;You've heard of different job titles, like frontend developer, backend developer, full-stack developer, etc. Have you heard of MarTech developer?&lt;/p&gt;

&lt;p&gt;MarTech is not something new, it's here for quite some time, but the way it exploded and grow over the past few years is phenomenal. &lt;/p&gt;

&lt;p&gt;I haven't heard of it, until working before in a growth marketing agency, where I learn marketing concepts and principles and how a developer can play a part in marketing.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Martech?
&lt;/h3&gt;

&lt;p&gt;Any tool or software that can help you to automate, optimize, or even enable you to do your marketing efforts is Martech or Marketing Technology. &lt;/p&gt;

&lt;p&gt;Martech rides on the back of any technological advancement, whether it's artificial intelligence or blockchain, every technology effects and opens new doors of opportunity in martech.&lt;/p&gt;

&lt;p&gt;Before becoming a martech developer you should know why to become a martech developer?&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Martech?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1608527035209%2FvcpJ-KFFb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1608527035209%2FvcpJ-KFFb.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Due to the boom of martech, marketing, and advertising agencies around the world are hiring developers to automate their existing processes and build automation tools.&lt;/p&gt;

&lt;p&gt;Not just that Martech jobs are ranked #3 in Linkedin's 2020 emerging jobs report. This clearly shows how Martech landscape is growing and there is an enormous need for developers.&lt;/p&gt;

&lt;p&gt;Now let's discuss what you exactly need to become a martech developer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Marketing Knowledge
&lt;/h3&gt;

&lt;p&gt;Most developers think that martech is only for marketeers, but that's not true. You don't have to be a marketeer to become a martech developer. &lt;/p&gt;

&lt;p&gt;Marketing knowledge totally depends on the job you're looking for. For example, if a company wants to automate Facebook or Google Ads reporting or advertising then you need to learn Google Ads and Facebook Ads APIs. &lt;/p&gt;

&lt;p&gt;It's all about how familiar you're with the marketing tools and their APIs.&lt;/p&gt;

&lt;p&gt;However, most companies give starter training but it's still good to have good basic knowledge before going for a job. &lt;/p&gt;

&lt;p&gt;I will explain below which basic APIs and tools you need to learn to get started.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which programming language I need to learn?
&lt;/h3&gt;

&lt;p&gt;There is no perfect or preferred programming language you need to learn to become a martech developer.&lt;/p&gt;

&lt;p&gt;A language that can be used for anything is what you need.&lt;/p&gt;

&lt;p&gt;Having a good command of a general purpose language like JavaScript, Python, PHP, etc is all you need. &lt;/p&gt;

&lt;p&gt;I would prefer Javascript, because whether you want to create a web app or a mobile app, or even a desktop application, JS is all you need to know. &lt;/p&gt;

&lt;p&gt;Of course strong skills in HTML, CSS is also required, if you're aiming to build tools for the web.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tools you should know
&lt;/h3&gt;

&lt;p&gt;The martech landscape is growing like never before every day new tools are coming, but don't worry you don't need to learn every single tool. &lt;/p&gt;

&lt;p&gt;Get yourself familiar with popular tools that are used by marketing agencies every day. Beginner to intermediate knowledge is enough to build solutions on top of these tools.&lt;/p&gt;

&lt;p&gt;I am listing down the categories of tools with some examples, all you need is to search for top tools in these categories to get yourself familiar with them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ads Manager (Facebook Business Manager, Google Ads Manager)&lt;/li&gt;
&lt;li&gt;Analytics (Google Analytics, Facebook Pixel)&lt;/li&gt;
&lt;li&gt;Email Marketing tools (MailChimp, Aweber, HubSpot)&lt;/li&gt;
&lt;li&gt;Integrations tools (Zapier)&lt;/li&gt;
&lt;li&gt;CRM (Hubspot, Salesforce)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keeping in mind that these tools are made for marketeers, that's why your focus should be to have a technical understanding of the tool and its APIs. As a martech developer, you'll be making solutions on top of these tools to make things easier for marketeers.&lt;/p&gt;

&lt;h3&gt;
  
  
  From where should I learn all these things?
&lt;/h3&gt;

&lt;p&gt;Well, that's simple, Youtube!&lt;/p&gt;

&lt;p&gt;Whenever I want to learn something new, youtube is the best way to get some basics to get started. &lt;/p&gt;

&lt;p&gt;But that's not enough always to give some time to official documentation or tutorials of the tools for a complete in-depth understanding of concepts.&lt;/p&gt;

&lt;p&gt;Facebook and Google have official resources where you can get started.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thought
&lt;/h3&gt;

&lt;p&gt;Marketing agencies need developers who are creative and agile enough to play with data and pull out results and reports to empower the marketing teams to make effective strategies.&lt;/p&gt;

&lt;p&gt;Now marketeers are exploring technologies like Machine Learning, Blockchain, Virtual Reality, etc to come up with out of the box ideas for their clients, and that's where a martech developer comes to help them to find the right technology.&lt;/p&gt;

&lt;p&gt;If you're planning to give your career a shift in 2021 then martech is definitely an option to think about.&lt;/p&gt;

</description>
      <category>development</category>
      <category>martech</category>
      <category>marketing</category>
      <category>career</category>
    </item>
    <item>
      <title>Learning Ethereum/Solidity Smart Contract Development – Week # 1</title>
      <dc:creator>Hasan Ali</dc:creator>
      <pubDate>Sat, 25 May 2019 13:21:52 +0000</pubDate>
      <link>https://dev.to/hasanaliqureshi/learning-ethereum-solidity-smart-contract-development-week-1-4f30</link>
      <guid>https://dev.to/hasanaliqureshi/learning-ethereum-solidity-smart-contract-development-week-1-4f30</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DobnPddw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2019/05/vr-cOVER-1024x534.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DobnPddw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2019/05/vr-cOVER-1024x534.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’ve started working with blockchain by playing around with block explorers and RPC APIs. Setting up RPC APIs and connecting them to a frontend web was all that I know to do. But what I really wanted is to learn the core of blockchains and wanted to know how to become a blockchain developer. I was confused too at that time because the blockchain ecosystem was booming expeditiously and new development tools were coming, so it was making more difficulty for me to decide where to start.&lt;/p&gt;

&lt;p&gt;I found this course on Udemy about “Ethereum and Solidity: The Complete Developer’s Guide” which laid down first steps of my journey of blockchain development.   &lt;/p&gt;

&lt;p&gt;Now being a blockchain developer, I’ve been asked this question more frequently, so I think I should write detailed notes of my solidity development course, from which anyone who wants to start blockchain development can start learning just like I did.&lt;/p&gt;

&lt;p&gt;The first week is the introduction to Ethereum blockchain and kind of list of terminologies and their explanations but after that, we’ll dive into coding smart contracts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You should have a basic understanding of blockchain, just a basic knowledge of addresses, wallets and how blockchain works in a nutshell. If you don’t know about basics of blockchain don’t worry check out Anders playlist &lt;/li&gt;
&lt;/ol&gt;

Blockchain 101 – A Visual Demo

Blockchain 101 – Part 2 – Public / Private Keys and Signing

&lt;ol&gt;
&lt;li&gt;If you know React.js, it will be a plus point because in future we’ll be developing frontend for smart contracts in it. If you don’t know react don’t worry check out this free React.js course&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;History of Ethereum:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In December 2013 after the release of bitcoin whitepaper, Vatalik Buterin visions the idea to use the blockchain technology not just as a mode of payment transfer but also as a virtual machine which can run programs and codes and thus the idea of smart contracts was introduced. Vatalik wasn’t the first one to introduce the idea of smart contracts, it was proposed before by Nick Szabo too, but this was the first successful implementation of that idea.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blockchain:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Blockchain is a database which keeps a record of all transactions and anyone can keep and maintain this database so its decentralized (not controlled by a authority)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ethereum:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Ethereum is a special type of blockchain, instead of only keeping a record of transactions it also provides storage to host programming code on it which is executed by Ethereum Virtual Machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Metamask:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Metamask is a chrome browser extension allows user to interact with Ethereum applications in browser. Install it and explore it. (&lt;a href="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en"&gt;https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Smart Contract:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Smart Contract is a special account in Ethereum blockchain which has 3 things in it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Balance : Amount of Ethereum in this account&lt;/li&gt;
&lt;li&gt;Storage : Data store for this contract&lt;/li&gt;
&lt;li&gt;Code : Smart contract code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Solidity:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Solidity is the programming language introduced by Ethereum to write smart contracts. It’s a strongly typed language very similar to javascript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Smart Contract Lifecycle:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a smart contract is programmed in solidity it’s then compiled by Solidity Compiler which gives us two things.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Bytecode: This is the code which is deployed on Ethereum network&lt;/li&gt;
&lt;li&gt;Application Binary Interface (ABI): ABI is a long JSON object contain smart contract methods and information from which we can interact with smart contract.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>blockchaindevelopme</category>
      <category>blockchain</category>
      <category>ethereum</category>
      <category>ethereumdevelopment</category>
    </item>
    <item>
      <title>Create 360° Image Viewer – A-Frame VR Development Part 3</title>
      <dc:creator>Hasan Ali</dc:creator>
      <pubDate>Tue, 23 Oct 2018 09:00:34 +0000</pubDate>
      <link>https://dev.to/hasanaliqureshi/create-360-image-viewer-a-frame-vr-development-part-3-bji</link>
      <guid>https://dev.to/hasanaliqureshi/create-360-image-viewer-a-frame-vr-development-part-3-bji</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PqUuK788--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/360-image-viewer.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PqUuK788--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/360-image-viewer.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is our first virtual reality project using A-Frame VR Framework. I’ll be making a 360° image or photosphere viewer using A-Frame. It will be super easy and we’ll also add interactive elements to it. So lets started&lt;/p&gt;

&lt;p&gt;360° Image Viewer in A-Frame&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First, create an HTML file with basic Doctype code and add the a-frame.js file to it&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u2vPOSR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/01-2-1024x559.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u2vPOSR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/01-2-1024x559.png" alt="360-image-viewer-a-frame-vr"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now download any 360 images or photosphere from Google or anywhere. I am using this image (&lt;a href="https://drive.google.com/drive/folders/0Bx2k1bqMoviiWW9hQ2ktM05zVk0"&gt;https://drive.google.com/drive/folders/0Bx2k1bqMoviiWW9hQ2ktM05zVk0&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now to view this image in A-Frame we’ll create a scene and add ‘’ primitive with an attribute src link to that image&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now if you open the HTML file you’ll see your 360 image, which you can move around by dragging the mouse.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--megoargJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/02-1-1024x522.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--megoargJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/02-1-1024x522.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s how easy in A-Frame to view 360 image. Now let’s add text to the 360 image.&lt;/p&gt;

&lt;p&gt;To add text we’ll use  primitive. I will add the following code in the scene.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;
rotation=”0 5 0″&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now after refresh, you will text with the 360 image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vW2z6RaA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/04-1-1024x522.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vW2z6RaA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/04-1-1024x522.png" alt="360-image-viewer-a-frame-vr"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the next tutorial, I’ll show you how you can make a virtual tour experience using A-Frame and make interactive points which can change 360 images by click on them.&lt;/p&gt;

&lt;p&gt;Source code on Github : &lt;a href="https://github.com/hasanaliqureshi/A-Frame-VR-Development/blob/master/A-Frame-VR-Development-Part-3.html"&gt;https://github.com/hasanaliqureshi/A-Frame-VR-Development/blob/master/A-Frame-VR-Development-Part-3.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>virtualreality</category>
      <category>360imageviewer</category>
      <category>aframe</category>
      <category>panorama</category>
    </item>
    <item>
      <title>Camera, Lights &amp; Animations – A-Frame VR Development Part 2</title>
      <dc:creator>Hasan Ali</dc:creator>
      <pubDate>Thu, 11 Oct 2018 21:41:47 +0000</pubDate>
      <link>https://dev.to/hasanaliqureshi/camera-lights--animations--a-frame-vr-development-part-2-4m3n</link>
      <guid>https://dev.to/hasanaliqureshi/camera-lights--animations--a-frame-vr-development-part-2-4m3n</guid>
      <description>

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VUaBKNM1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/a-frame-vr-development-part2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VUaBKNM1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/a-frame-vr-development-part2.png" alt="a-frame-vr-development-part-2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Welcome to the second part of A-Frame Virtual Reality Framework for web tutorial series. In the first part, we learned basic A-Frame syntax, created a scene, added a box in it and set up the environment/skybox in it.&lt;/p&gt;

&lt;p&gt;Now we’ll continue working on our file index.html. which we create in the first part and toggle camera settings, see how lighting affects the scene and animate our object.&lt;/p&gt;

&lt;h2&gt;Camera&lt;/h2&gt;

&lt;p&gt;A-Frame by default creates a camera element automatically with default settings if you don’t create it like in &lt;a href="https://dev.to/hasanaliqureshi/getting-started--a-frame-vr-development-part-1-2ce7-temp-slug-284076"&gt;Part 1&lt;/a&gt; we didn’t create the camera entity but A-Frame created it for us and we could see the elements in the scene.&lt;/p&gt;

&lt;p&gt;But if you want a camera with custom settings then you can create a camera element with desired properties.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;lt;a-entity&amp;gt;&amp;lt;a-camera&amp;gt;&amp;lt;/a-camera&amp;gt;&amp;lt;/a-entity&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Add the above tag just before the closing tag of &amp;lt;a-scene&amp;gt;. The reason I encapsulate the &amp;lt;a-camera&amp;gt; tag inside &amp;lt;a-entity&amp;gt; is that if we want to change the position of the camera we will define property attributes of &amp;lt;a-entity&amp;gt; because if we directly set the property attributes on &amp;lt;a-camera&amp;gt;, controls will override them.&lt;/p&gt;

&lt;p&gt;See camera attributes here: &lt;a href="https://aframe.io/docs/0.8.0/primitives/a-camera.html#attributes"&gt;https://aframe.io/docs/0.8.0/primitives/a-camera.html#attributes&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Changing Camera Position&lt;/h2&gt;

&lt;p&gt;To change the camera simply set the position attribute in ‘&amp;lt;a-entity&amp;gt;’ primitive.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;lt;a-entity position = “0 0 5”&amp;gt;&amp;lt;a-camera&amp;gt;&amp;lt;/a-camera&amp;gt;&amp;lt;/a-entity&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;Adding Cursor to the Camera&lt;/h2&gt;

&lt;p&gt;One of the most crucial elements in any virtual reality environment is the cursor, it is the main element which allows interaction in the virtual reality world if there is no hand controller. Google Cardboard games used the cursor to interact with the virtual environment.&lt;/p&gt;

&lt;p&gt;To add cursor to the camera simply put the &amp;lt;a-cursor&amp;gt; tag inside the &amp;lt;a-camera&amp;gt; tag&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;lt;a-entity position = “0 0 5”&amp;gt;&amp;lt;a-camera&amp;gt;&amp;lt;a-cursor&amp;gt;&amp;lt;/a-cursor&amp;gt;&amp;lt;/a-camera&amp;gt;&amp;lt;/a-entity&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now you will see a circle at the center of the screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CPPCIF14--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/01-1-1024x586.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CPPCIF14--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/01-1-1024x586.png" alt="a-frame-vr-development-part-2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the future tutorials when we’ll create fully interactive Virtual Reality environments, I’ll show you how to make cursor gaze effect and interacting with the objects.&lt;/p&gt;

&lt;h2&gt;Adding Lights&lt;/h2&gt;

&lt;p&gt;Lights make a 3d environment more realistic.&lt;/p&gt;

&lt;p&gt;Add the &amp;lt;a-light&amp;gt; primitive inside the &amp;lt;a-scene&amp;gt;. The light we’re adding is directional, its color is white (#FFF), its intensity is 0.5 and it is at the position of -1 1 2 .&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;lt;a-light&lt;br&gt;&lt;br&gt;
type=”directional”&lt;br&gt;&lt;br&gt;
color=”#FFF”&lt;br&gt;&lt;br&gt;
intensity=”0.5″&lt;br&gt;&lt;br&gt;
position=”-1 1 2″&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;/a-light&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You will see how box’s color changed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--stYc165j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/02-1024x586.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--stYc165j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/02-1024x586.png" alt="a-frame-vr-developmet-part-2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Animating Objects&lt;/h2&gt;

&lt;p&gt;To animate an object on the screen put the &amp;lt;a-animation&amp;gt; tag inside that object tag. An &amp;lt;a-animation&amp;gt; tag has different attributes from which you can configure the animation. Let’s animate our box. Replace the &amp;lt;a-box&amp;gt; tag with the following code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;lt;a-box position=”0 2 -5″ rotation=”0 45 45″ scale=”2 2 2″ color=”red”&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;a-animation&lt;br&gt;&lt;br&gt;
attribute=”rotation”&lt;br&gt;&lt;br&gt;
from=”0 45 45″ to=”0 410 410″&lt;br&gt;&lt;br&gt;
direction=”alternative” dur=”4000″&lt;br&gt;&lt;br&gt;
repeat=”indefinite” easing=”ease”&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;/a-animation&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;/a-box&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4UFOOd1g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/03.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4UFOOd1g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/03.gif" alt="a-frame-vr-development-part-3"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not just rotation you can also animate the position and size/scale of the object. Check out animation attributes and play around with it &lt;a href="https://aframe.io/docs/0.8.0/core/animations.html#attributes"&gt;https://aframe.io/docs/0.8.0/core/animations.html#attributes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We’ve covered the basics of A-Frame framework. Now from the next tutorial we will start making virtual reality projects, in which we’ll learn advanced concepts and look into the WebVR Development in-depth.&lt;/p&gt;


</description>
      <category>virtualreality</category>
      <category>vr</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Getting Started – A-Frame VR Development Part 1</title>
      <dc:creator>Hasan Ali</dc:creator>
      <pubDate>Wed, 10 Oct 2018 18:24:18 +0000</pubDate>
      <link>https://dev.to/hasanaliqureshi/getting-started--a-frame-vr-development-part-1-1i1i</link>
      <guid>https://dev.to/hasanaliqureshi/getting-started--a-frame-vr-development-part-1-1i1i</guid>
      <description>

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mmxtaxJv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/Copy-of-Rufus-Strikes-Wins1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mmxtaxJv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/Copy-of-Rufus-Strikes-Wins1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the first part of A-Frame Virtual Reality Development series, in this part I will explain the basic components and syntax of the A-Frame framework and will create a simple Hello World Virtual Reality project using A-Frame.&lt;/p&gt;

&lt;p&gt;Before getting started, if you don’t know basic web development technologies and never worked in the web then please first learn some HTML, CSS, and Javascript basic skills, then follow this tutorial.&lt;/p&gt;

&lt;p&gt;Throughout the tutorial, I will be sharing the code with pictures step by step so you can understand easily. So lets get started.&lt;/p&gt;

&lt;p&gt;Create an &lt;em&gt;index.html&lt;/em&gt; file and write basic HTML DOCTYPE syntax in it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Puupk9f0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/01-1024x586.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Puupk9f0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/01-1024x586.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Insert the A-Frame framework script inside &lt;code&gt;\&amp;lt;head\&amp;gt;\&amp;lt;/head\&amp;gt;&lt;/code&gt; container&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\&amp;lt;script src="https://aframe.io/releases/0.8.0/aframe.min.js"\&amp;gt;\&amp;lt;/script\&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Note : You can also install A-Frame using NPM. Use&lt;/code&gt;$ npm install aframe&lt;code&gt;command.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now let’s explore the A-Frame syntax. A-Frame is based on custom created HTML elements. As you can is in the picture below every object is represented by a custom HTML element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kypl-U0U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/02-1024x579.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kypl-U0U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/02-1024x579.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Creating a Scene&lt;/h2&gt;

&lt;p&gt;First, we have to create a scene, which will configure the basic components for us like canvas, rendered, camera, lights etc. It’s a container where all the elements of VR environment will come inside it.&lt;/p&gt;

&lt;p&gt;Add the &lt;code&gt;_\&amp;lt;a-scene\&amp;gt;\&amp;lt;/a-scene\&amp;gt;_&lt;/code&gt; tag inside the body to initialize the scene.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3llPcKSU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/03-1024x586.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3llPcKSU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/03-1024x586.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you open &lt;em&gt;the index.html&lt;/em&gt; file in your browser you will notice that after initializing the scene a small VR icon can be seen on the page.&lt;/p&gt;

&lt;h2&gt;Adding a Cube/Box&lt;/h2&gt;

&lt;p&gt;Let’s insert a 3d box in it.&lt;/p&gt;

&lt;p&gt;Add &lt;code&gt;_\&amp;lt;a-box color=”red”\&amp;gt;\&amp;lt;/a-box\&amp;gt;_&lt;/code&gt; &lt;code&gt;inside the&lt;/code&gt;&lt;em&gt;&amp;lt;a-scene&amp;gt;&lt;/em&gt;` tag.&lt;/p&gt;

&lt;p&gt;Now if you refresh &lt;em&gt;index.html&lt;/em&gt; you’ll see nothing. But if your press S key on your keyboard, the camera will start moving backward and you’ll see a red box. The reason that you didn’t see the box in the first place is that the position of the camera and the box is same, both are placed at the same point (origin [0,0,0]) in the screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2_soqMbM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/04-1024x586.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2_soqMbM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/04-1024x586.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now before adding more elements let me tell you what are Primitives and Entities in A-Frame.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;_\&amp;lt;a-scene\&amp;gt;_&lt;/code&gt;,&lt;code&gt; _\&amp;lt;a-box\&amp;gt;_&lt;/code&gt;,&lt;code&gt; _\&amp;lt;a-sphere\&amp;gt;_&lt;/code&gt; etc all are pre-defined custom HTML tags by A-Frame, which are easy to use tags and are called Primitives.&lt;/p&gt;

&lt;p&gt;On the hand &lt;code&gt;\&amp;lt;a-entity\&amp;gt;&lt;/code&gt; can by any element. It can be a box, a scene, a sphere, a light or camera. All the &lt;code&gt;_\&amp;lt;a-scene\&amp;gt;_&lt;/code&gt;,&lt;code&gt; _\&amp;lt;a-box\&amp;gt;&lt;/code&gt;&lt;em&gt;,` _&amp;lt;a-cube&amp;gt;&lt;/em&gt;&lt;code&gt;etc are the pre-defined entities for ease of use. However, if you want custom shapes and advanced features like sound in your VR environment&lt;/code&gt;&amp;lt;a-entity&amp;gt;` will help you there.&lt;/p&gt;

&lt;p&gt;For example underneath a &lt;code&gt;_\&amp;lt;a-box\&amp;gt;_&lt;/code&gt; tag there is an &lt;code&gt;_\&amp;lt;a-entity\&amp;gt;_&lt;/code&gt; tag with pre-defined position and geometry :&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&amp;lt;a-entity id=”box” geometry=”primitive: box” material=”color: red”&amp;gt;&amp;lt;/a-entity&amp;gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I hope you got the different between the Primitives and Entities. Don’t worry if you’re still confused, you’ll understand it much better once we’ll use &amp;lt;a-entity&amp;gt; tags.&lt;/p&gt;

&lt;h2&gt;Changing Properties&lt;/h2&gt;

&lt;p&gt;Changing the properties of Primitives is also very easy. Lets put our box in front of our camera.&lt;/p&gt;

&lt;p&gt;Add a position attribute in the &lt;code&gt;a-box&lt;/code&gt; tag. Position attribute specifies the position on X, Y and Z axis of the element.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&amp;lt;a-box position=”0 2 -5″ color=”red”&amp;gt;&amp;lt;/a-box&amp;gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Add a rotation attribute in the &lt;code&gt;a-box&lt;/code&gt; tag. Rotation attribute specifies the rotation on X, Y and Z axis of the element.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&amp;lt;a-box position=”0 2 -5″ rotation=”0 45 45″ color=”red”&amp;gt;&amp;lt;/a-box&amp;gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And add scale attribute to scale the element on X, Y and Z axis.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&amp;lt;a-box position=”0 2 -5″ rotation=”0 45 45″ scale=”2 2 2″ color=”red”&amp;gt;&amp;lt;/a-box&amp;gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now your box will look like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hf9nf91d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/05-1024x586.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hf9nf91d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/05-1024x586.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Play around with the properties of the box all are listed here: &lt;a href="https://aframe.io/docs/0.8.0/primitives/a-box.html#attributes"&gt;https://aframe.io/docs/0.8.0/primitives/a-box.html#attributes&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Adding background / Skybox&lt;/h2&gt;

&lt;p&gt;Skybox is the background of the 3D world. &lt;code&gt;_\&amp;lt;a-sky\&amp;gt;\&amp;lt;/a-sky\&amp;gt;_&lt;/code&gt; is used to put background in the scene.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&amp;lt;a-sky color=”#94c5d6″&amp;gt;&amp;lt;/a-sky&amp;gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Add the &lt;code&gt;_\&amp;lt;a-sky\&amp;gt;_&lt;/code&gt; tag inside the &lt;code&gt;_\&amp;lt;a-scene\&amp;gt;_&lt;/code&gt; container. I have used simple hex-coded color for the sky color, but you can also use an image for the sky background. After adding the sky your scene will look like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BpvrNpWi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/06-1024x586.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BpvrNpWi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://hasanali.me/wp-content/uploads/2018/10/06-1024x586.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this part, we’ve covered the basic syntax of A-Frame framework, made a simple scene with a box and add properties to it. In the next tutorial, we’ll look into the camera, lights and animations with their respective properties.&lt;/p&gt;

&lt;p&gt;Complete code available on Github : &lt;a href="https://github.com/hasanaliqureshi/A-Frame-VR-Development/blob/master/A-Frame-VR-Development-Part-1.html"&gt;https://github.com/hasanaliqureshi/A-Frame-VR-Development/blob/master/A-Frame-VR-Development-Part-1.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Virtual Reality Pakistan Medium Publication : &lt;a href="https://medium.com/vr-pakistan"&gt;https://medium.com/vr-pakistan&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Virtual Realiy Pakistan Facebook Group : &lt;a href="https://www.facebook.com/groups/VirtualRealityPK/"&gt;https://www.facebook.com/groups/VirtualRealityPK/&lt;/a&gt;&lt;/p&gt;


</description>
      <category>virtualreality</category>
      <category>aframe</category>
      <category>javascriptvr</category>
      <category>opensourcevr</category>
    </item>
  </channel>
</rss>
