Permalink
Browse files

Adding Link, Triangle, Line, Shadows

  • Loading branch information...
Etienne
Etienne committed Jul 3, 2017
1 parent ffe783f commit b35ad528c53ba4f0ccc9e4f211af7bcc16b12c7a
View
@@ -7,8 +7,8 @@ Games and rich 3D experiences traditionally preload their assets, such as models
Assets include:
*
AssetItem
Miscellaneous assets such as 3D models and materials
AssetModel, AssetItem
3D models, textures
*
AssetAudio
Sound files
@@ -24,7 +24,7 @@ Note: The scene won’t render or initialize until the browser fetches (or error
myCat = AssetImage 'assets/cat.jpg'
mySong = AssetAudio 'assets/song.mp3'
myVideo = AssetVideo 'assets/coolMovie.mp4'
myObject = AssetItem 'assets/object.obj'
myObject = AssetModel 'assets/object.obj'
myTexture = AssetItem 'assets/object.mlt'
myVideo = AssetVideo 'assets/coolMovie.mp4'
View
@@ -147,6 +147,8 @@ Whether to render an entity. If true the entity will be rendered and visible. De
text: "Hello, World!"
visible: no
-------------------------------------------------------
#### [entity.lookAt](#entity-lookat) *<entity>*
Tell an entity to face towards another entity or position.
@@ -158,6 +160,59 @@ Tell an entity to face towards another entity or position.
myOtherBox = new Box
lookAt: myBox
-------------------------------------------------------
#### [entity.link](#entity-link) *<entity>*
Add an hyperlink to your entity.
myBox = new Box
link:
href: "index.html"
title: "My Homepage"
image: "assets/homeThumbnail.png"
visualAspectEnabled: no
position: "3 0 3"
##### Values:
*
color
Background color of the portal. Default #FFF
*
highlighted
Boolean to toggle link highlight color. Default is false.
*
highlightedColor
Border color when highlighted. Default is #24CAFF
*
href
Destiantion URL where the link points to.
*
image
360° image used as scene preview in the portal.
*
peekMode
Whether the 360° image is fully expanded for preview. Default is false.
*
title
Text displayed on the link. The href or page URL is used if not defined.
*
visualAspectEnabled
Whether to enable the default visual appearance of a portal. Set to false if we want to implement our own pattern or form of link traversal. Default is true.
-------------------------------------------------------
#### [entity.shadow](#entity-shadow) *<entity>*
Enable shadows to your entity.
myBox = new Box
shadow: yes
position: "3 0 3"
-------------------------------------------------------
### [Events](#entity-events)
@@ -170,6 +225,8 @@ Emitted on both cursor and intersected entity if a currently intersected entity
myBox.onClick ->
print "clicked!"
-------------------------------------------------------
#### [entity.onFusing(*callback*)](#entity-onfusing)
Emitted on both cursor and intersected entity when fuse-based cursor starts counting down.
@@ -179,6 +236,8 @@ Emitted on both cursor and intersected entity when fuse-based cursor starts coun
myBox.onFusing ->
print "fuse!"
-------------------------------------------------------
#### [entity.onMouseDown(*callback*)](#entity-onmousedown)
Emitted on both cursor and intersected entity (if any) on mousedown on the canvas element.
@@ -188,6 +247,8 @@ Emitted on both cursor and intersected entity (if any) on mousedown on the canva
myBox.onMouseDown ->
print "mouse down on me!"
-------------------------------------------------------
#### [entity.onMouseUp(*callback*)](#entity-onmouseup)
Emitted on both cursor and intersected entity (if any) on mouseup on the canvas element.
@@ -197,6 +258,8 @@ Emitted on both cursor and intersected entity (if any) on mouseup on the canvas
myBox.onMouseUp ->
print "mouse up!"
-------------------------------------------------------
#### [entity.onMouseIn(*callback*)](#entity-onmousein)
Emitted on both cursor and intersected entity (if any) when cursor intersects with an entity.
@@ -206,6 +269,8 @@ Emitted on both cursor and intersected entity (if any) when cursor intersects wi
myBox.onMouseUp ->
print "mouse in!"
-------------------------------------------------------
#### [entity.onMouseOut(*callback*)](#entity-onmouseout)
Emitted on both cursor and intersected entity (if any) when cursor no longer intersects with previously intersected entity.
@@ -215,6 +280,8 @@ Emitted on both cursor and intersected entity (if any) when cursor no longer int
myBox.onMouseOut ->
print "mouse out!"
-------------------------------------------------------
#### [entity.onCollide(*callback*)](#entity-onCollide)
Emitted when an entity collide another that both have physics enabled. Read [the physics section](#physics) for more info.
View
@@ -123,3 +123,12 @@ Defines the intensity of the light. Default is 1.0.
myLight = new Light
intensity: 2.0
#### [light.castShadow](#light-castShadow) *<float>*
Whether this light casts shadows on the scene. Default is false.
Note that shadows are supported by Point, Spot and Directional lights.
myLight = new Light
castShadow: yes
View
@@ -0,0 +1,46 @@
## [Line](#line)
### Extends: [Entity](#entity)
The line component draws a line given a start coordinate and end coordinate.
myLine = new Line
start: '0 1 0'
end: '2 0 -5'
color: Color.red
-------------------------------------------------------
### [line.start](#line-start) *<string>*
Set the start point coordinate. Default is 0 0 0
myLine = new Line
start: '0 1 0'
-------------------------------------------------------
### [link.end](#link-end) *<string>*
Set the end coordinate. Default is 0 0 0
myLine = new Line
end: '0 1 0'
-------------------------------------------------------
### [link.color](#link-color) *<string>*
Set the color of the line. Default is #74BEC1.
myLine = new Line
color: "#FF00CC"
-------------------------------------------------------
### [link.visible](#link-visible) *<string>*
Whether the material visible. Default is true.
myLine = new Line
visible: no
View
@@ -0,0 +1,38 @@
## [Link](#link)
### Extends: [Entity](#entity)
A link in VR can be anything such as grabbing onto an object, placing something on our head, clicking something, even eating something! The default implementation of links are portals or windows, using a 360° image thumbnail to preview the destination.
myLink = new Link
position: '0 0 1'
href: "index.html"
title: "My Homepage"
image: "assets/homeThumbnail.png"
-------------------------------------------------------
### [link.href](#link-href) *<string>*
Set the destiantion URL where the link points to.
myLink = new Link
href: "cool.html"
-------------------------------------------------------
### [link.title](#link-title) *<string>*
Set the text displayed on the link. The href or page URL is used if not defined.
myLink = new Link
title: "Hahaha"
-------------------------------------------------------
### [link.href](#link-href) *<string>*
Set the link preview, a 360° image used as scene preview in the portal.
myLink = new Link
image: "assets/homeThumbnail.png"
View
@@ -0,0 +1,44 @@
## [Triangle](#triangle)
### Extends: [Entity](#entity)
Time to creates a triangle.
myTriangle = new Triangle
color: "#FF926B"
-------------------------------------------------------
### [triangle.width](#triangle-width) *<float>*
Set the width of the triangle. Default is 1.
myTriangle = new Triangle
width: 2
-------------------------------------------------------
### [triangle.height](#triangle-height) *<float>*
Set the height of the triangle. Default is 1.
myTriangle = new Triangle
height: 5
-------------------------------------------------------
#### [triangle.color](#triangle-color) *<color>*
Defines the color of the triangle. Default is white.
myTriangle = new Triangle
color: Color.blue
-------------------------------------------------------
#### [triangle.src](#triangle-src) *<string/AssetImage>*
Defines the material used when rendering the triangle.
myTriangle = new Triangle
src: "assets/texture.png"
View

This file was deleted.

Oops, something went wrong.
View
@@ -153,10 +153,10 @@ importVendors = ->
path: 'https://wizgrav.github.io/aframe-effects/dist/aframe-effects.min.js'
,
name: 'aframe_physics'
path: 'https://cdn.rawgit.com/donmccurdy/aframe-physics-system/v1.4.0/dist/aframe-physics-system.min.js'
path: 'https://raw.githubusercontent.com/donmccurdy/aframe-physics-system/master/dist/aframe-physics-system.min.js'
,
name: 'aframe_particles'
path: 'https://unpkg.com/aframe-particle-system-component@1.0.9/dist/aframe-particle-system-component.min.js'
path: 'https://raw.githubusercontent.com/IdeaSpaceVR/aframe-particle-system-component/master/dist/aframe-particle-system-component.min.js'
,
name: 'aframe_look_at'
path: 'https://raw.githubusercontent.com/ngokevin/kframe/master/components/look-at/dist/aframe-look-at-component.min.js'
Oops, something went wrong.

0 comments on commit b35ad52

Please sign in to comment.