Skip to content

Commit

Permalink
Adding Link, Triangle, Line, Shadows
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne committed Jul 3, 2017
1 parent ffe783f commit b35ad52
Show file tree
Hide file tree
Showing 15 changed files with 269 additions and 99 deletions.
6 changes: 3 additions & 3 deletions docs/Assets.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Games and rich 3D experiences traditionally preload their assets, such as models
Assets include: Assets include:


* *
AssetItem AssetModel, AssetItem
Miscellaneous assets such as 3D models and materials 3D models, textures
* *
AssetAudio AssetAudio
Sound files Sound files
Expand All @@ -24,7 +24,7 @@ Note: The scene won’t render or initialize until the browser fetches (or error
myCat = AssetImage 'assets/cat.jpg' myCat = AssetImage 'assets/cat.jpg'
mySong = AssetAudio 'assets/song.mp3' mySong = AssetAudio 'assets/song.mp3'
myVideo = AssetVideo 'assets/coolMovie.mp4' myVideo = AssetVideo 'assets/coolMovie.mp4'
myObject = AssetItem 'assets/object.obj' myObject = AssetModel 'assets/object.obj'
myTexture = AssetItem 'assets/object.mlt' myTexture = AssetItem 'assets/object.mlt'
myVideo = AssetVideo 'assets/coolMovie.mp4' myVideo = AssetVideo 'assets/coolMovie.mp4'


Expand Down
67 changes: 67 additions & 0 deletions docs/Entity.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ Whether to render an entity. If true the entity will be rendered and visible. De
text: "Hello, World!" text: "Hello, World!"
visible: no visible: no


-------------------------------------------------------

#### [entity.lookAt](#entity-lookat) *<entity>* #### [entity.lookAt](#entity-lookat) *<entity>*


Tell an entity to face towards another entity or position. Tell an entity to face towards another entity or position.
Expand All @@ -158,6 +160,59 @@ Tell an entity to face towards another entity or position.
myOtherBox = new Box myOtherBox = new Box
lookAt: myBox 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) ### [Events](#entity-events)


Expand All @@ -170,6 +225,8 @@ Emitted on both cursor and intersected entity if a currently intersected entity
myBox.onClick -> myBox.onClick ->
print "clicked!" print "clicked!"


-------------------------------------------------------

#### [entity.onFusing(*callback*)](#entity-onfusing) #### [entity.onFusing(*callback*)](#entity-onfusing)


Emitted on both cursor and intersected entity when fuse-based cursor starts counting down. Emitted on both cursor and intersected entity when fuse-based cursor starts counting down.
Expand All @@ -179,6 +236,8 @@ Emitted on both cursor and intersected entity when fuse-based cursor starts coun
myBox.onFusing -> myBox.onFusing ->
print "fuse!" print "fuse!"


-------------------------------------------------------

#### [entity.onMouseDown(*callback*)](#entity-onmousedown) #### [entity.onMouseDown(*callback*)](#entity-onmousedown)


Emitted on both cursor and intersected entity (if any) on mousedown on the canvas element. Emitted on both cursor and intersected entity (if any) on mousedown on the canvas element.
Expand All @@ -188,6 +247,8 @@ Emitted on both cursor and intersected entity (if any) on mousedown on the canva
myBox.onMouseDown -> myBox.onMouseDown ->
print "mouse down on me!" print "mouse down on me!"


-------------------------------------------------------

#### [entity.onMouseUp(*callback*)](#entity-onmouseup) #### [entity.onMouseUp(*callback*)](#entity-onmouseup)


Emitted on both cursor and intersected entity (if any) on mouseup on the canvas element. Emitted on both cursor and intersected entity (if any) on mouseup on the canvas element.
Expand All @@ -197,6 +258,8 @@ Emitted on both cursor and intersected entity (if any) on mouseup on the canvas
myBox.onMouseUp -> myBox.onMouseUp ->
print "mouse up!" print "mouse up!"


-------------------------------------------------------

#### [entity.onMouseIn(*callback*)](#entity-onmousein) #### [entity.onMouseIn(*callback*)](#entity-onmousein)


Emitted on both cursor and intersected entity (if any) when cursor intersects with an entity. Emitted on both cursor and intersected entity (if any) when cursor intersects with an entity.
Expand All @@ -206,6 +269,8 @@ Emitted on both cursor and intersected entity (if any) when cursor intersects wi
myBox.onMouseUp -> myBox.onMouseUp ->
print "mouse in!" print "mouse in!"


-------------------------------------------------------

#### [entity.onMouseOut(*callback*)](#entity-onmouseout) #### [entity.onMouseOut(*callback*)](#entity-onmouseout)


Emitted on both cursor and intersected entity (if any) when cursor no longer intersects with previously intersected entity. Emitted on both cursor and intersected entity (if any) when cursor no longer intersects with previously intersected entity.
Expand All @@ -215,6 +280,8 @@ Emitted on both cursor and intersected entity (if any) when cursor no longer int
myBox.onMouseOut -> myBox.onMouseOut ->
print "mouse out!" print "mouse out!"


-------------------------------------------------------

#### [entity.onCollide(*callback*)](#entity-onCollide) #### [entity.onCollide(*callback*)](#entity-onCollide)


Emitted when an entity collide another that both have physics enabled. Read [the physics section](#physics) for more info. Emitted when an entity collide another that both have physics enabled. Read [the physics section](#physics) for more info.
Expand Down
9 changes: 9 additions & 0 deletions docs/Light.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -123,3 +123,12 @@ Defines the intensity of the light. Default is 1.0.


myLight = new Light myLight = new Light
intensity: 2.0 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
46 changes: 46 additions & 0 deletions docs/Line.md
Original file line number Original file line Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions docs/Link.md
Original file line number Original file line Diff line number Diff line change
@@ -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"
44 changes: 44 additions & 0 deletions docs/Triangle.md
Original file line number Original file line Diff line number Diff line change
@@ -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"
90 changes: 0 additions & 90 deletions effects.md

This file was deleted.

4 changes: 2 additions & 2 deletions gulpfile.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ importVendors = ->
path: 'https://wizgrav.github.io/aframe-effects/dist/aframe-effects.min.js' path: 'https://wizgrav.github.io/aframe-effects/dist/aframe-effects.min.js'
, ,
name: 'aframe_physics' 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' 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' name: 'aframe_look_at'
path: 'https://raw.githubusercontent.com/ngokevin/kframe/master/components/look-at/dist/aframe-look-at-component.min.js' path: 'https://raw.githubusercontent.com/ngokevin/kframe/master/components/look-at/dist/aframe-look-at-component.min.js'
Expand Down
Loading

0 comments on commit b35ad52

Please sign in to comment.