Permalink
Browse files

Major refactoring

  • Loading branch information...
Etienne
Etienne committed Jul 10, 2017
1 parent b35ad52 commit ff825f724320f41b4f5c7c64cc056bec182cacb8
Showing with 923 additions and 1,543 deletions.
  1. +2 −2 .gitignore
  2. +7 −0 LICENSE
  3. +4 −4 Makefile
  4. +8 −0 build/Version.coffee
  5. +18 −0 config.coffee
  6. +63 −0 docs/1_Intro.md
  7. +36 −70 docs/{Animations.md → Animation.md}
  8. +4 −12 docs/Assets.md
  9. +17 −17 docs/Box.md
  10. +10 −8 docs/Camera.md
  11. +13 −13 docs/Circle.md
  12. +0 −29 docs/ColladaModel.md
  13. +17 −17 docs/Cone.md
  14. +6 −6 docs/Cursor.md
  15. +16 −15 docs/CurvedImage.md
  16. +18 −18 docs/Cylinder.md
  17. +16 −16 docs/Dodecahedron.md
  18. +29 −29 docs/Effects.md
  19. +26 −61 docs/Entity.md
  20. +0 −28 docs/GltfModel.md
  21. +12 −12 docs/HandControls.md
  22. +3 −3 docs/Icosahedron.md
  23. +5 −5 docs/Image.md
  24. +15 −31 docs/Light.md
  25. +4 −4 docs/Line.md
  26. +3 −3 docs/Link.md
  27. +36 −0 docs/Model.md
  28. +0 −42 docs/ObjectModel.md
  29. +3 −3 docs/Octahedron.md
  30. +0 −80 docs/Particles.md
  31. +0 −107 docs/Physics.md
  32. +13 −13 docs/Plane.md
  33. +0 −20 docs/Raycaster.md
  34. +16 −16 docs/Ring.md
  35. +16 −42 docs/Scene.md
  36. +6 −6 docs/Screenshots.md
  37. +3 −23 docs/Sky.md
  38. +4 −4 docs/Sound.md
  39. +19 −19 docs/Sphere.md
  40. +3 −3 docs/Tetrahedron.md
  41. +23 −40 docs/Text.md
  42. +7 −7 docs/Torus.md
  43. +8 −8 docs/TorusKnot.md
  44. +4 −4 docs/Triangle.md
  45. +12 −24 docs/Utils.md
  46. +6 −6 docs/Video.md
  47. +4 −4 docs/VideoSphere.md
  48. +43 −71 gulpfile.coffee
  49. +0 −60 hologram/GradientSky.coffee
  50. +0 −13 hologram/Line.coffee
  51. +0 −14 hologram/Link.coffee
  52. +2 −0 package.json
  53. 0 {hologram → src}/Animation.coffee
  54. 0 {hologram → src}/Assets.coffee
  55. 0 {hologram → src}/BaseClass.coffee
  56. 0 {hologram → src}/Box.coffee
  57. 0 {hologram → src}/Camera.coffee
  58. 0 {hologram → src}/Circle.coffee
  59. +1 −1 {hologram → src}/ColladaModel.coffee
  60. 0 {hologram → src}/Color.coffee
  61. 0 {hologram → src}/Cone.coffee
  62. 0 {hologram → src}/Config.coffee
  63. +5 −2 {hologram → src}/Context.coffee
  64. 0 {hologram → src}/Cursor.coffee
  65. 0 {hologram → src}/CurvedImage.coffee
  66. 0 {hologram → src}/Cylinder.coffee
  67. 0 {hologram → src}/DOMEventManager.coffee
  68. 0 {hologram → src}/Dodecahedron.coffee
  69. +14 −23 {hologram → src}/Entity.coffee
  70. 0 {hologram → src}/EventBuffer.coffee
  71. 0 {hologram → src}/EventEmitter.coffee
  72. +1 −0 {hologram → src}/Events.coffee
  73. +1 −1 {hologram → src}/GltfModel.coffee
  74. 0 {hologram → src}/HandControls.coffee
  75. +4 −11 {hologram → src}/Hologram.coffee
  76. 0 {hologram → src}/Icosahedron.coffee
  77. 0 {hologram → src}/Image.coffee
  78. 0 {hologram → src}/Light.coffee
  79. +41 −0 src/Line.coffee
  80. +29 −0 src/Link.coffee
  81. +20 −0 src/Model.coffee
  82. +8 −5 {hologram → src}/ObjectModel.coffee
  83. 0 {hologram → src}/Octahedron.coffee
  84. 0 {hologram → src}/Plane.coffee
  85. 0 {hologram → src}/Print.coffee
  86. 0 {hologram → src}/Ring.coffee
  87. 0 {hologram → src}/Scene.coffee
  88. +4 −0 {hologram → src}/Sky.coffee
  89. 0 {hologram → src}/Sound.coffee
  90. 0 {hologram → src}/Sphere.coffee
  91. 0 {hologram → src}/Tetrahedron.coffee
  92. +5 −0 {hologram → src}/Text.coffee
  93. 0 {hologram → src}/Torus.coffee
  94. 0 {hologram → src}/TorusKnot.coffee
  95. 0 {hologram → src}/Triangle.coffee
  96. +9 −0 {hologram → src}/Utils.coffee
  97. 0 {hologram → src}/Values.coffee
  98. 0 {hologram → src}/Version.coffee.template
  99. 0 {hologram → src}/Video.coffee
  100. 0 {hologram → src}/VideoSphere.coffee
  101. +0 −237 test/default/app.js
  102. +0 −25 test/default/index.html
  103. +198 −193 vendors/aframe.js
  104. +2 −2 vendors/aframe_effects.js
  105. +1 −1 vendors/aframe_look_at.js
  106. +0 −2 vendors/aframe_particles.js
  107. +0 −8 vendors/aframe_physics.js
@@ -26,5 +26,5 @@ _projects
# Dev
node_modules
build/
lib/
dist/
vendors/
@@ -19,3 +19,10 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
ACKNOWLEDGMENT:
* A-Frame (https://github.com/aframevr/aframe/)
* FramerJS (https://github.com/koenbok/Framer)
* A-Frame Slack and its amazing community.
@@ -2,7 +2,7 @@
BIN = $(CURDIR)/node_modules/.bin
.PHONY: bootstrap unbootstrap clean watch build debug lint release
.PHONY: bootstrap unbootstrap clean watch build debug lint release docs vendors
default: build
@@ -15,13 +15,13 @@ bootstrap:
unbootstrap:
rm -Rf node_modules
clean: clearvendors
clean:
rm -rf vendors
rm -rf build
rm -Rf node_modules
clearvendors: SHELL:=/bin/bash
clearvendors:
bash -c "rm -R ./vendors"
rm -rf vendors
#-------------------------------------------------------
# Build
@@ -0,0 +1,8 @@
# This gets automatically populated bij gulp
exports.date = 1499687481
exports.branch = "master"
exports.hash = "b35ad52-dirty"
exports.build = 4
exports.version = "#{exports.branch}/#{exports.hash}"
@@ -0,0 +1,18 @@
module.exports =
VENDORS: [
name: 'aframe'
path: 'https://raw.githubusercontent.com/aframevr/aframe/master/dist/aframe-master.min.js'
,
name: 'aframe_gif_shader'
path: 'https://rawgit.com/mayognaise/aframe-gif-shader/master/dist/aframe-gif-shader.min.js'
,
name: 'aframe_effects'
path: 'https://wizgrav.github.io/aframe-effects/dist/aframe-effects.min.js'
,
name: 'aframe_look_at'
path: 'https://raw.githubusercontent.com/ngokevin/kframe/master/components/look-at/dist/aframe-look-at-component.min.js'
,
name: 'aframe_mouse_cursor'
path: 'https://rawgit.com/mayognaise/aframe-mouse-cursor-component/master/dist/aframe-mouse-cursor-component.min.js'
]
VENDORS_PATH: './vendors'
@@ -0,0 +1,63 @@
# Docs
Hologram allow you to building virtual reality (VR) experiences. It is focus on simplicity and fun.
It is easy to get started with Hologram. With the scene editor, you don't even need a single line of code to create your first scene!
Hologram supports most VR headsets such as Vive, Rift, Daydream, GearVR, Cardboard.
## [Get started](#getstarted)
1. Entities
Entities can be Box, Sphere, Plane, Sky and more. They have a hierachy and properties defining their position, rotation, scale, appearance and interactivity.
[More on Entities](#entity)
2. Animation
Animate states or layer properties like scale and color with various easing or spring curves, repeat and delay options and more.
[More on Animation](#animation)
4. Events
Events are used to detect and respond to user interactions in VR when clicking or gazing, animations that start or end, repond to physics events and more.
[More on Events](#entity-events)
3. Assets
Assets can be images, sounds, video, 3D models. The asset management system allows you to place your assets in one place and to preload and cache assets for better performance.
[More on Assets](#assets)
### [Simple example](#getstarted-example)
Here is a simple example to get you started!
myBox = new Box
position: "-1 0.5 -3"
rotation: "0 45 0"
color: "#4CC3D9"
mySphere = new Sphere
position: "0 1.25 -5"
radius: 1.25
color: "#EF2D5E"
myCylinder = new Cylinder
position: "1 0.75 -3"
radius: 0.5
color: "#EF2D5E"
myPlane = new Plane
position: "0 0 -4"
rotation: "-90 0 0"
width: 4
height: 4
color: "#7BC8A4"
mySky = new Sky
color: "#ECECEC"
@@ -1,4 +1,4 @@
## [Animations](#animations)
## [Animation](#animation)
Animate entities is fairly simple, here is a first example:
@@ -30,7 +30,7 @@ Alternatively you can also use the Animation object which allow you to start the
-------------------------------------------------------
#### [animate.time](#animate-time) *<float>*
#### [animate.time](#animation-time) *float*
Duration in seconds of the animation. Default is 1.
@@ -42,7 +42,7 @@ Duration in seconds of the animation. Default is 1.
-------------------------------------------------------
#### [animate.delay](#animate-delay) *<float>*
#### [animate.delay](#animation-delay) *float*
Delay in seconds before starting the animation. Default is 0.
@@ -55,7 +55,7 @@ Delay in seconds before starting the animation. Default is 0.
-------------------------------------------------------
#### [animate.direction](#animate-direction) *<string>*
#### [animate.direction](#animation-direction) *string*
The direction attribute defines which way to animate between the starting value and the final value.
When we define an alternating direction, the animation will go back and forth between the from and to values like a yo-yo. Alternating directions only take affect when we repeat the animation.
@@ -68,22 +68,15 @@ When we define an alternating direction, the animation will go back and forth be
direction: reverse
##### Direction available:
*
Direction.alternate
On even-numbered cycles, animate from from to to. On odd-numbered cycles, animation from to to from
*
Direction.alternateReverse
On odd-numbered cycles, animate from from to to. On even-numbered cycles, animation from to to from
*
Direction.normal
Animate from from to to.
*
Direction.reverse
Animate from to to from.
* `Direction.alternate`
* `Direction.alternateReverse`
* `Direction.normal`
* `Direction.reverse`
-------------------------------------------------------
#### [animate.repeat](#animate-repeat) *<float>*
#### [animate.repeat](#animation-repeat) *float*
The repeat attribute defines how often the animation repeats. Default is 0.
@@ -96,73 +89,46 @@ The repeat attribute defines how often the animation repeats. Default is 0.
-------------------------------------------------------
#### [animate.curve](#animate-curve) *<string>*
#### [animate.curve](#animation-curve) *string*
Easing function of the animation. There are very many to choose from. Default is ease.
##### Curves available:
###### Basic effects
*
Curve.linear
*
Curve.ease
*
Curve.easeIn
*
Curve.easeOut
*
Curve.easeInOut
* `Curve.linear`
* `Curve.ease`
* `Curve.easeIn`
* `Curve.easeOut`
* `Curve.easeInOut`
###### More effects
*
cubic
Curve.easeCubic, Curve.easeInCubic, Curve.easeOutCubic, Curve.easeInOutCubic.
*
quad
Curve.easeQuad, Curve.easeInQuad, Curve.easeOutQuad, Curve.easeInOutQuad.
*
quart
Curve.easeQuart, Curve.easeInQuart, Curve.easeOutQuart, Curve.easeInOutQuart.
*
quint
Curve.easeQuint, Curve.easeInQuint, Curve.easeOutQuint, Curve.easeInOutQuint.
*
sine
Curve.easeSine, Curve.easeInSine, Curve.easeOutSine, Curve.easeInOutSine.
*
expo
Curve.easeExpo, Curve.easeInExpo, Curve.easeOutExpo, Curve.easeInOutExpo.
*
circ
Curve.easeCirc, Curve.easeInCirc, Curve.easeOutCirc, Curve.easeInOutCirc.
*
elastic
Curve.easeElastic, Curve.easeInElastic, Curve.easeOutElastic, Curve.easeInOutElastic.
*
back
Curve.easeBack, Curve.easeInBack, Curve.easeOutBack, Curve.easeInOutBack.
*
bounce
Curve.easeBounce, Curve.easeInBounce, Curve.easeOutBounce, Curve.easeInOutBounce.
####[animate.fill](#animate-fill) *<string>*
* `Curve.easeCubic Curve.easeInCubic Curve.easeOutCubic Curve.easeInOutCubic`
* `Curve.easeQuad Curve.easeInQuad Curve.easeOutQuad Curve.easeInOutQuad`
* `Curve.easeQuart Curve.easeInQuart Curve.easeOutQuart Curve.easeInOutQuart`
* `Curve.easeQuint Curve.easeInQuint Curve.easeOutQuint Curve.easeInOutQuint`
* `Curve.easeSine Curve.easeInSine Curve.easeOutSine Curve.easeInOutSine`
* `Curve.easeExpo Curve.easeInExpo Curve.easeOutExpo Curve.easeInOutExpo`
* `Curve.easeCirc Curve.easeInCirc Curve.easeOutCirc Curve.easeInOutCirc`
* `Curve.easeElastic Curve.easeInElastic Curve.easeOutElastic Curve.easeInOutElastic`
* `Curve.easeBack Curve.easeInBack Curve.easeOutBack Curve.easeInOutBack`
* `Curve.easeBounce Curve.easeInBounce Curve.easeOutBounce Curve.easeInOutBounce`
#### [animate.fill](#animation-fill) *string*
The fill attribute defines the effect of animation when not actively in play. Think of fill as what values the animation sets on the entity before and/or after each animation cycle. Below are the possible values for fill and their effects. Default is forwards.
*
Fill.backwards
*
Fill.both
*
Fill.forwards
*
Fill.none
* `Fill.backwards`
* `Fill.both`
* `Fill.forwards`
* `Fill.none`
-------------------------------------------------------
#### [animate.then](#animate-then) *<function>*
#### [animate.then](#animation-then) *function*
Called when the animation finishes. In case of repeats, emitted when the repeat count reaches 0. Not emitted for indefinite repeats.
@@ -6,18 +6,10 @@ Games and rich 3D experiences traditionally preload their assets, such as models
Assets include:
*
AssetModel, AssetItem
3D models, textures
*
AssetAudio
Sound files
*
AssetImage
Image textures
*
AssetVideo
Video textures
* `AssetModel, AssetItem: 3D models, textures`
* `AssetAudio: Sound files`
* `AssetImage: Image textures`
* `AssetVideo: Video textures`
Note: The scene won’t render or initialize until the browser fetches (or errors out) all the assets or the asset system reaches the timeout.
Oops, something went wrong.

0 comments on commit ff825f7

Please sign in to comment.