2019-02-06

Feb 6 In-Class Exercise Thread .

Hi Everyone,

Post your solutions to the Feb 6 In-Class Exercise to this thread.

Best,

Chris

Hi Everyone, Post your solutions to the Feb 6 In-Class Exercise to this thread. Best, Chris

-- Feb 6 In-Class Exercise Thread

Hi!

So these are the interesting parts:

<a-link class="link" href="index.html" title="Run counter-clockwise" on="click" position="-2 3 -4"></a-link> <a-link class="link" href="index.html" title="Run clockwise" on="click" position="2 3 -4"></a-link> <!-- Camera + cursor. --> <a-entity camera position="0 4 0" look-controls> ... </a-entity>

Hi! So these are the interesting parts: <a-link class="link" href="index.html" title="Run counter-clockwise" on="click" position="-2 3 -4"></a-link> <a-link class="link" href="index.html" title="Run clockwise" on="click" position="2 3 -4"></a-link> <!-- Camera + cursor. --> <a-entity camera position="0 4 0" look-controls> ... </a-entity>

-- Feb 6 In-Class Exercise Thread

&lt;a-link class=&quot;link&quot; href=&quot;https://www.cs.sjsu.edu/~pollett/185c.1.19s/first_aframe.html&quot; title=&quot;First Aframe&quot; on=&quot;click&quot; position=&quot;1.5 -1 -4&quot;&gt;&lt;/a-link&gt;

&lt;a-link class=&quot;link&quot; href=&quot;https://www.cs.sjsu.edu/~pollett/185c.1.19s/first_aframe.html&quot; title=&quot;Hello page&quot; on=&quot;click&quot; position=&quot;-1.5 -1 -4&quot;&gt;&lt;/a-link&gt;

&lt;!-- Camera + cursor. --&gt; &lt;a-entity camera look-controls&gt; &lt;a-cursor id=&quot;cursor&quot; animation__click=&quot;property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150&quot; animation__fusing=&quot;property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500&quot; event-set__1=&quot;_event: mouseenter; color: springgreen&quot; event-set__2=&quot;_event: mouseleave; color: black &quot; fuse=&quot;true&quot; raycaster=&quot;objects: .link&quot;&gt; &lt;/a-cursor&gt; &lt;/a-entity&gt;

<a-link class="link" href="https://www.cs.sjsu.edu/~pollett/185c.1.19s/first_aframe.html" title="First Aframe" on="click" position="1.5 -1 -4"></a-link> <a-link class="link" href="https://www.cs.sjsu.edu/~pollett/185c.1.19s/first_aframe.html" title="Hello page" on="click" position="-1.5 -1 -4"></a-link> <!-- Camera + cursor. --> <a-entity camera look-controls> <a-cursor id="cursor" animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150" animation__fusing="property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500" event-set__1="_event: mouseenter; color: springgreen" event-set__2="_event: mouseleave; color: black " fuse="true" raycaster="objects: .link"> </a-cursor> </a-entity>

-- Feb 6 In-Class Exercise Thread

&lt;nowiki&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Sky Camera Controls&lt;/title&gt; &lt;script src=&quot;https://aframe.io/releases/0.8.2/aframe.min.js&quot;&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;a-scene&gt; &lt;a-assets&gt; &lt;img id=&quot;city&quot; crossorigin=&quot;anonymous&quot; src=&quot;https://cdn.aframe.io/360-image-gallery-boilerplate/img/city.jpg&quot;&gt; &lt;img id=&quot;city-thumb&quot; crossorigin=&quot;anonymous&quot; src=&quot;https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-city.jpg&quot;&gt; &lt;/a-assets&gt;; &lt;!-- 360-degree image. --&gt; &lt;a-sky id=&quot;image-360&quot; radius=&quot;10&quot; src=&quot;#city&quot;&gt;&lt;/a-sky&gt; &lt;!-- Image links. --&gt; &lt;a-link class=&quot;link&quot; href=&quot;hello.html&quot; title=&quot;Hello Page&quot; on=&quot;click&quot; position=&quot;0 -1 -4&quot;&gt;&lt;/a-link&gt; &lt;a-link class=&quot;link&quot; href=&quot;bye.html&quot; title=&quot;Goodbye!&quot; on=&quot;click&quot; position=&quot;0 5 6&quot;&gt;&lt;/a-link&gt; &lt;!-- Camera + cursor. --&gt; &lt;a-entity camera=&quot;active: true&quot; look-controls position=&quot;0 20 0&quot;&gt; &lt;a-cursor id=&quot;cursor&quot; animation__click=&quot;property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 2 2 2; dur: 150&quot; animation__fusing=&quot;property: fusing; startEvents: fusing; from: 2 2 2; to: 0.1 0.1 0.1; dur: 1500&quot; event-set__1=&quot;_event: mouseenter; color: springgreen&quot; event-set__2=&quot;_event: mouseleave; color: black &quot; fuse=&quot;true&quot; raycaster=&quot;objects: .link&quot;&gt; &lt;/a-cursor&gt; &lt;/a-entity&gt; &lt;/a-scene&gt; &lt;/body&gt; &lt;/html&gt; &lt;/nowiki&gt;

<nowiki> <!DOCTYPE html> <html> <head> <title>Sky Camera Controls</title> <script src="https://aframe.io/releases/0.8.2/aframe.min.js"></script> </head> <body> <a-scene> <a-assets> <img id="city" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/city.jpg"> <img id="city-thumb" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-city.jpg"> </a-assets>; <!-- 360-degree image. --> <a-sky id="image-360" radius="10" src="#city"></a-sky> <!-- Image links. --> <a-link class="link" href="hello.html" title="Hello Page" on="click" position="0 -1 -4"></a-link> <a-link class="link" href="bye.html" title="Goodbye!" on="click" position="0 5 6"></a-link> <!-- Camera + cursor. --> <a-entity camera="active: true" look-controls position="0 20 0"> <a-cursor id="cursor" animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 2 2 2; dur: 150" animation__fusing="property: fusing; startEvents: fusing; from: 2 2 2; to: 0.1 0.1 0.1; dur: 1500" event-set__1="_event: mouseenter; color: springgreen" event-set__2="_event: mouseleave; color: black " fuse="true" raycaster="objects: .link"> </a-cursor> </a-entity> </a-scene> </body> </html> </nowiki>

-- Feb 6 In-Class Exercise Thread

&lt;a-link class=&quot;link&quot; href=&quot;https://www.google.com/&quot; title=&quot;Google&quot; on=&quot;click&quot; position=&quot;0 -1 -4&quot;&gt;&lt;/a-link&gt; &lt;a-link class=&quot;link&quot; href=&quot;https://one.sjsu.edu/&quot; title=&quot;SJSU&quot; on=&quot;click&quot; position=&quot;2 2 2&quot;&gt;&lt;/a-link&gt;

. . .

&lt;a-entity camera=&quot;active: true&quot; look-controls wasd-controls position=&quot;0 5 5&quot; data-aframe-default-camera&gt; &lt;a-cursor id=&quot;cursor&quot; animation__click=&quot;property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150&quot; animation__fusing=&quot;property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 2500&quot; event-set__1=&quot;_event: mouseenter; color: red&quot; event-set__2=&quot;_event: mouseleave; color: blue &quot; fuse=&quot;true&quot; raycaster=&quot;objects: .link&quot;&gt; &lt;/a-cursor&gt; &lt;/a-entity&gt;

<a-link class="link" href="https://www.google.com/" title="Google" on="click" position="0 -1 -4"></a-link> <a-link class="link" href="https://one.sjsu.edu/" title="SJSU" on="click" position="2 2 2"></a-link> . . . <a-entity camera="active: true" look-controls wasd-controls position="0 5 5" data-aframe-default-camera> <a-cursor id="cursor" animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150" animation__fusing="property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 2500" event-set__1="_event: mouseenter; color: red" event-set__2="_event: mouseleave; color: blue " fuse="true" raycaster="objects: .link"> </a-cursor> </a-entity>

-- Feb 6 In-Class Exercise Thread

&lt;html&gt; &lt;head&gt; &lt;script src=&quot;https://aframe.io/releases/0.8.0/aframe.min.js&quot;&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;a-scene&gt; &lt;a-box position=&quot;-1 0.5 -3&quot; rotation=&quot;0 45 0&quot; color=&quot;#4CC3D9&quot;&gt;&lt;/a-box&gt; &lt;a-sphere position=&quot;0 1.25 -5&quot; radius=&quot;1.25&quot; color=&quot;#EF2D5E&quot;&gt;&lt;/a-sphere&gt; &lt;a-cylinder position=&quot;1 0.75 -3&quot; radius=&quot;0.5&quot; height=&quot;1.5&quot; color=&quot;#FFC65D&quot;&gt;&lt;/a-cylinder&gt; &lt;a-plane position=&quot;0 0 -4&quot; rotation=&quot;-90 0 0&quot; width=&quot;4&quot; height=&quot;4&quot; color=&quot;#7BC8A4&quot;&gt;&lt;/a-plane&gt; &lt;a-sky color=&quot;#ECECEC&quot;&gt;&lt;/a-sky&gt;

  <a-link class="link" href="index.html" title="hello" on="click" position="-2 3 -4"></a-link>
  <a-link class="link" href="index.html" title="bye" on="click" position="2 3 -4"></a-link>
  <a-entity camera="active: true" look-controls position="0 2 0">
  <a-cursor raycaster="objects: .link"></a-cursor>
</a-entity>
</a-scene>

&lt;/body&gt; &lt;/html&gt;

<html> <head> <script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script> </head> <body> <a-scene> <a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box> <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere> <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder> <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane> <a-sky color="#ECECEC"></a-sky> <a-link class="link" href="index.html" title="hello" on="click" position="-2 3 -4"></a-link> <a-link class="link" href="index.html" title="bye" on="click" position="2 3 -4"></a-link> <a-entity camera="active: true" look-controls position="0 2 0"> <a-cursor raycaster="objects: .link"></a-cursor> </a-entity> </a-scene> </body> </html>

-- Feb 6 In-Class Exercise Thread

these would go in the body &lt;a-link class=&quot;link&quot; href=&quot;cool_recipes.html&quot; title=&quot;Chick out these cool recipes&quot; on=&quot;click&quot; position=&quot;0 -11 -4&quot;&gt;&lt;/a-link&gt; &lt;a-link class=&quot;link&quot; href=&quot;wow.html&quot; title=&quot;Please do not click this it would be illegal to do so.&quot; on=&quot;click&quot; position=&quot;0 -1 -99&quot;&gt;&lt;/a-link&gt; &lt;a-entity camera=&quot;active: true&quot; look-controls position=&quot;3 10 20&quot;&gt;&lt;/a-entity&gt;

these would go in the body <a-link class="link" href="cool_recipes.html" title="Chick out these cool recipes" on="click" position="0 -11 -4"></a-link> <a-link class="link" href="wow.html" title="Please do not click this it would be illegal to do so." on="click" position="0 -1 -99"></a-link> <a-entity camera="active: true" look-controls position="3 10 20"></a-entity>

-- Feb 6 In-Class Exercise Thread

&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Sky Camera Controls&lt;/title&gt; &lt;script src=&quot;https://aframe.io/releases/0.8.2/aframe.min.js&quot;&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;a-scene&gt; &lt;a-assets&gt; &lt;img id=&quot;city&quot; crossorigin=&quot;anonymous&quot; src=&quot;https://cdn.aframe.io/360-image-gallery-boilerplate/img/city.jpg&quot;&gt; &lt;img id=&quot;city-thumb&quot; crossorigin=&quot;anonymous&quot; src=&quot;https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-city.jpg&quot;&gt; &lt;/a-assets&gt;; &lt;!-- 360-degree image. --&gt; &lt;a-sky id=&quot;image-360&quot; radius=&quot;10&quot; src=&quot;#city&quot;&gt;&lt;/a-sky&gt; &lt;!-- Image links. --&gt; &lt;a-link class=&quot;link&quot; href=&quot;hello.html&quot; title=&quot;Hello Page&quot; on=&quot;click&quot; position=&quot;0 5 -4&quot;&gt;&lt;/a-link&gt; &lt;a-link class=&quot;link&quot; href=&quot;bye.html&quot; title=&quot;Bye Page&quot; on=&quot;click&quot; position=&quot;0 8 -4&quot;&gt;&lt;/a-link&gt; &lt;!-- Camera + cursor. --&gt; &lt;a-entity camera look-controls&gt; &lt;a-cursor id=&quot;cursor&quot; animation__click=&quot;property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150&quot; animation__fusing=&quot;property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500&quot; event-set__1=&quot;_event: mouseenter; color: springgreen&quot; event-set__2=&quot;_event: mouseleave; color: black &quot; fuse=&quot;true&quot; raycaster=&quot;objects: .link&quot;&gt; &lt;/a-cursor&gt; &lt;/a-entity&gt; &lt;/a-scene&gt; &lt;/body&gt; &lt;/html&gt;

<!DOCTYPE html> <html> <head> <title>Sky Camera Controls</title> <script src="https://aframe.io/releases/0.8.2/aframe.min.js"></script> </head> <body> <a-scene> <a-assets> <img id="city" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/city.jpg"> <img id="city-thumb" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-city.jpg"> </a-assets>; <!-- 360-degree image. --> <a-sky id="image-360" radius="10" src="#city"></a-sky> <!-- Image links. --> <a-link class="link" href="hello.html" title="Hello Page" on="click" position="0 5 -4"></a-link> <a-link class="link" href="bye.html" title="Bye Page" on="click" position="0 8 -4"></a-link> <!-- Camera + cursor. --> <a-entity camera look-controls> <a-cursor id="cursor" animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150" animation__fusing="property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500" event-set__1="_event: mouseenter; color: springgreen" event-set__2="_event: mouseleave; color: black " fuse="true" raycaster="objects: .link"> </a-cursor> </a-entity> </a-scene> </body> </html>
2019-02-11

-- Feb 6 In-Class Exercise Thread

&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Sky Camera Controls&lt;/title&gt; &lt;script src=&quot;https://aframe.io/releases/0.8.2/aframe.min.js&quot;&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;a-scene&gt; &lt;a-assets&gt; &lt;img id=&quot;city&quot; crossorigin=&quot;anonymous&quot; src=&quot;https://cdn.aframe.io/360-image-gallery-boilerplate/img/city.jpg&quot;&gt; &lt;img id=&quot;city-thumb&quot; crossorigin=&quot;anonymous&quot; src=&quot;https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-city.jpg&quot;&gt; &lt;/a-assets&gt;; &lt;!-- 360-degree image. --&gt; &lt;a-sky id=&quot;image-360&quot; radius=&quot;10&quot; src=&quot;#city&quot;&gt;&lt;/a-sky&gt; &lt;!-- Image links. --&gt; &lt;a-link class=&quot;link&quot; href=&quot;hello.html&quot; title=&quot;Hello Page&quot; on=&quot;click&quot; position=&quot;0 -1 -4&quot;&gt;&lt;/a-link&gt; &lt;a-link class=&quot;link&quot; href=&quot;index.html&quot; title=&quot;Click Here!&quot; on=&quot;click&quot; position=&quot;0 -1 4&quot;&gt;&lt;/a-link&gt; &lt;a-link class=&quot;link&quot; href=&quot;index.html&quot; title=&quot;Don&#039;t Click Here!&quot; on=&quot;click&quot; position=&quot;0 1 -4&quot;&gt;&lt;/a-link&gt; &lt;!-- Camera + cursor. --&gt; &lt;a-entity camera look-controls position=&quot;0 5 0&quot;&gt; &lt;a-cursor id=&quot;cursor&quot; animation__click=&quot;property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150&quot; animation__fusing=&quot;property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500&quot; fuse=&quot;true&quot; raycaster=&quot;objects: .link&quot;&gt; &lt;/a-cursor&gt; &lt;/a-entity&gt; &lt;/a-scene&gt; &lt;/body&gt; &lt;/html&gt;

<!DOCTYPE html> <html> <head> <title>Sky Camera Controls</title> <script src="https://aframe.io/releases/0.8.2/aframe.min.js"></script> </head> <body> <a-scene> <a-assets> <img id="city" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/city.jpg"> <img id="city-thumb" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-city.jpg"> </a-assets>; <!-- 360-degree image. --> <a-sky id="image-360" radius="10" src="#city"></a-sky> <!-- Image links. --> <a-link class="link" href="hello.html" title="Hello Page" on="click" position="0 -1 -4"></a-link> <a-link class="link" href="index.html" title="Click Here!" on="click" position="0 -1 4"></a-link> <a-link class="link" href="index.html" title="Don't Click Here!" on="click" position="0 1 -4"></a-link> <!-- Camera + cursor. --> <a-entity camera look-controls position="0 5 0"> <a-cursor id="cursor" animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150" animation__fusing="property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500" fuse="true" raycaster="objects: .link"> </a-cursor> </a-entity> </a-scene> </body> </html>
X