Skip to content

Latest commit

 

History

History
94 lines (63 loc) · 2.98 KB

README.md

File metadata and controls

94 lines (63 loc) · 2.98 KB

Mindspace is a Content Management System (CMS) that allows you to build a world using a standard GUI much like WordPress or Joomla. It is made to be standalone or integrated into your own project (it is designed to be integrated into other PHP frameworks such as Zend, Code Igniter, Yii, Kohana, etc.).

Here is the default scene:

And the CMS:

The goals of Mindspace are as follows:

  • Provide a toolkit so even beginning coders can create 3D worlds with Mindspace
  • Make it easy to launch a server using Mindspace or simply use the library in your own code
  • Code is licensed with the MIT license so it can be used for almost any use: commercial or open source.

Getting Started - Standalone

Starting a Mindscape server is easy:

  • Clone the source code to a web-accessible directory git clone git@github.com:drahmel/mindspace.git
  • Access in a browser http://localhost
  • Use the mouse to change the view of the world
  • Access the admin in a browser http://localhost/admin

Getting Started - Framework integration

  • Add this repository as a submodule to your project
  • Create symbolic links to the individual directories.
  • For example, if your web accessible directory for images is myproject/docs/myimages and your vendor directory where you added mindspace is myproject/vendor/mindspace, then you can add this symlink:
cd myproject/docs/myimages
ln -s ../vendor/mindspace/images/mindspace myimages
  • Now in your browser, you can access:
http://localhost/myimages/mindspace/sample.png
  • Do the same for the js/ and spaces/ directories and then you can easily create your own views in the framework of your choice.

Designing Your Own Views

  • Add the JavaScript to the headers:
    <script src="/js/mindspace/babylon.js?v=1" ></script>
    <script src="/js/mindspace/hand.js"></script>
    <script src="/js/mindspace/core.js"></script>
  • Initialize a new scene:
    <div id="rootDiv">

        <!-- Main Canvas -->
        <canvas id="renderCanvas"></canvas>
    </div>
    <script type="text/javascript">
    init("renderCanvas");
    addSphere({name:'MySphere'});

    </script>
    </body>

Requirements

  • PHP-enabled server
  • WebGL capable browser -- Modern versions of Chrome, Firefox, and IE 11
  • Babylon.js (included)

Notes

  • Examples will use the KISS-MVC framework since it has a single file implementation. This simplicity means that the code can be easily adapted to any PHP framework of choice (Zend, Code Igniter, Yii, etc.).
  • File format will be JSON-based and extensible -- custom properties can be easily added

Data can be stored to a file (for simple static worlds) or Redis.

Roadmap

  • Make rendering all JavaScript
  • Create Node version that is compatible
  • Add live update of changes via Ajax interface
  • Create a few sample worlds with animation