Giter Site home page Giter Site logo

elm-aframe's Introduction

Elm integration for A-Frame Build Status

This module brings declarative WebVR framework A-Frame to Elm.

โš ๏ธ Highly experimental, since it depends on external JavaScript library.

Tutorials

Simple VR with Elm and A-Frame by @tilmans

Running examples

cd examples/HelloWorld
elm-make Main.elm --output index.js

Running webpack example

The webpack configuration includes a webserver and will automatically reload your code when you make changes. Error message during build will be shown in the browser console.

cd examples/webpack
npm install
elm-make
npm run start

elm-aframe's People

Contributors

amitaibu avatar gabrielperales avatar halfzebra avatar sebastianmuszynski avatar tilmans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

elm-aframe's Issues

Publish aframe to elm packages

What is still needed to publish the elm-aframe lib? Since the DOM updates work now to me it seems to be useful already.

Components / Primitives left

Components

  • blend-model
  • camera
  • collada-model
  • cursor
  • daydream-controls
  • debug
  • fog
  • gearvr-controls
  • geometry
  • gltf-model
  • hand-controls
  • keyboard-shortcuts
  • laser-controls
  • light
  • line
  • link
  • look-controls
  • material
  • obj-model
  • oculus-touch-controls
  • pool
  • position
  • raycaster
  • rotation
  • scale
  • screenshot
  • shadow
  • sound
  • stats
  • text
  • tracked-controls
  • visible
  • vive-controls
  • vr-mode-ui
  • wasd-controls

Primitives

  • <a-box>
  • <a-camera>
  • <a-circle>
  • <a-collada-model>
  • <a-cone>
  • <a-cursor>
  • <a-curvedimage>
  • <a-cilinder>
  • <a-dodecahedron>
  • <a-gltf-model>
  • <a-icosahedron>
  • <a-image>
  • <a-light>
  • <a-link>
  • <a-obj-model>
  • <a-octahedron>
  • <a-plane>
  • <a-ring>
  • <a-sky>
  • <a-sound>
  • <a-sphere>
  • <a-tetrahedron>
  • <a-text>
  • <a-torus-knot>
  • <a-torus>
  • <a-triangle>
  • <a-video>
  • <a-videosphere>

Error in Webpack example

ERROR in ./src/elm/Main.elm
Module build failed: Error: Compiler process exited with error Compilation failed
-- TYPE MISMATCH ------------------------------------------ ././src/elm/Geom.elm

The argument to function `repeat` is causing a mismatch.

66|               repeat 10000
                         ^^^^^
Function `repeat` is expecting the argument to be:

    String

But it is:

    number

Detected errors in 1 module.

    at ChildProcess.<anonymous> (/Library/WebServer/Documents/elm-learn/elm-aframe/examples/webpack/node_modules/node-elm-compiler/index.js:141:27)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:192:7)
    at maybeClose (internal/child_process.js:890:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
 @ ./src/static/index.js 2:10-34

Use Create Elm App in the examples

We want to deploy the examples to GitHub Pages and have a consistent build setup.

Convert the examples to use Create Elm App, if possible and prepare them to be deployed as live examples.

Updating DOM is not working

Maybe this is a known limitation: https://github.com/tilmans/elm-aframe/tree/update_error_example

I have create an Elm App which uses the Logo example to render the elm logo. In addition it has a cursor which will trigger an onClick event. If one of the blue triangles is "clicked" by looking at it the color of the triangle is supposed to turn to red.

In the browser this is not working, the DOM update fails at applyAttrs in applyFacts (hot-update.js). The patch has the correct value changes (color:"#ff0000") but the domNode is "undefined".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.