Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Away Builder Integration #11

Closed
JoelProminic opened this issue Sep 15, 2017 · 14 comments
Closed

Away Builder Integration #11

JoelProminic opened this issue Sep 15, 2017 · 14 comments

Comments

@JoelProminic
Copy link
Contributor

Original Request:

In keeping with our mission to bring together the best of the remaining AIR features and FlexJS into Moonshine, please bundle into a soon upcoming release of Moonshine (both app store and win/mac versions).

Then please integrate a launcher button into Moonshine IDE, and do NOT embed the entire Away Builder SWF into Moonshine. Instead, launch it as a separate program only upon request by the user by clicking a "Build an Away3D model" button.

We should then ship Moonshine with a default Away 3D project, which we will do so.

Walker has been working on one that we can probably use.

The URLs are below, and nothing I see about the license would prevent us from including it.

In time, we will start adding other 3D functions to import models from other (more "modern" environments), but we will worry about that later.

Please schedule Away 3D Builder to be included in Moonshine within at most 4 weeks from today, unless it proves to be a big technical challenge.

Away Builder is open source, and licensed under the Apache License 2.0: https://github.com/awaytools/AwayBuilder/blob/master/awaybuilder-license.txt
http://away3d.com/awaybuilder/

Some clarification:

I've downloaded the Away Builder application from the given URL.

I discussed this with Piotr. Since we both have no knowledge about Away 3D, here's a few queries/thoughts for you to review, please correct them as requires.

  • First thing which confused me is the phrase "Build an Away 3D model". Based on Moonshine terminology by 'build' we thought something about compilation (with some SDK, maybe of Away 3D). When I ran the Away Builder I noticed there's no option or concept of build or compilation. So does this means by "Build an Away 3D model" button you envisioned to have a button somewhere in Moonshine which shall open the 3rd party (Away Builder) application only? Of course user shall need to locate the application to a prior step to do this.

  • You also mentioned that we should ship Moonshine with a basic Away 3D project; Will that also be listed as a new template project in Moonshine splash screen, and upon creation Moonshine will create the project to user's system and therefore trigger Away Builder with the newly created project?

Response:

The word "build" in the context of Away3D Builder has nothing to do with code compilation or package assembly in the sense that "build" means like Bamboo, ANT, etc.

Away3D builder is like Photoshop for 3D models. Think of it that way. And the word "build" related to Away3D means more like "draw a photo" in Photoshop.

So "Build a 3D model" button in Moonshine really can be "Launch Away 3D Builder separate executable."

@JoelProminic
Copy link
Contributor Author

JoelProminic commented Sep 15, 2017

If we want to launch Away Builder as an external application, we may encounter issues with the Apple Sandbox. We should make sure that we can make this work before we spend too much time with the rest of the design.

If we need to use a special entitlement, make sure that it is reported in this issue and added to the ITunesConnect page.

@rat-moonshine
Copy link
Collaborator

Piotr and I was discussing on an upcoming release by the end of this month (per our initial goal to release between 1/2 months). This issue may requires investigation and may not be go in this next upcoming release. I'm removing the 'nextrelease' tag for now, we can add this again later if we need to.

@rat-moonshine
Copy link
Collaborator

Command-line option to open a file to Away Builder:

C:\Program Files (x86)\Away Builder>"Away Builder.exe" "c:\Users\Devsena\Documen
ts\Untitled Library 1.awd"

@rat-moonshine rat-moonshine self-assigned this Sep 20, 2017
@rat-moonshine rat-moonshine moved this from To Do to In Progress in Moonshine-IDE - Features Sep 20, 2017
@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Sep 21, 2017

  • New project template option created for Away3D
  • Opening new project creation dialog and creating project with demo Away3D file
  • New plugin file
  • Away3D setup section in Moonshine > Settings

@rat-moonshine
Copy link
Collaborator

  • Plugin file changed location to desktop project
  • Moonshine opens the .awd file after new project been created
  • Moonshine opens Away3D Builder without file parameter as well

@rat-moonshine
Copy link
Collaborator

  • Project now also opens from recent opened project lists well

@piotrzarzycki21
Copy link
Collaborator

@rat-moonshine ,

Quick question - it will be committed into some separate branch, or you will commit it to the master after release 1.6.0 ?

@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Sep 22, 2017

Here's the complete list of the implementation:

  • A new menu option introduced - Others > Build an Away 3D model, which shall opens the Away3D builder standalone
  • A new template option introduced - Away3D Project; User shall go through usual create project dialog and create a project with a demo .awd file to his/her system (at this moment its an any awd file - this shall needs to update as a proper template file)
  • In both above steps, if Away3D Builder not already setup, Moonshine will take the user to new section Moonshine > Settings > Away3D, where s/he can setup the path for Away3D Builder
  • Once opened an Away3D file it'll get added to recent opened section as well; User can open the file/project from the recent opened section also

@rat-moonshine
Copy link
Collaborator

Quick question - it will be committed into some separate branch, or you will commit it to the master after release 1.6.0 ?

I'm working on a different branch. Once 1.6.0 released it shall be merged to master.

@rat-moonshine
Copy link
Collaborator

Codes were taken to 'master' after fixing initial conflicts.

@rat-moonshine
Copy link
Collaborator

We need project file from Walker to bundle within Moonshine as default template for Away3D project.

piotrzarzycki21 added a commit that referenced this issue Oct 12, 2017
@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Nov 30, 2017

Walker provided the following Away3D project zip for integration in Moonshine:
Away3DExample.zip

This zip is consists of many other files and this involves compilation of the project (which was out of scope in the previous requirement), Walker explained how this project is suppose to work:

Based on the comment-block in the main source file (Away3DExample.as), you can find all the necessary dependencies and configurations to make the source file able to be run:

Author: Walker Dalton
Version: 1.0
Description:
    Away3D Example implementation of loading an AWD model (model built with Away Builder)
Dependencies:
    - AIR SDK v26.0
    - Away3D v4.0
Notes:
    - The 'wmode' param MUST be set to direct to make use of 3D API
    - Check the Application Descriptor file for necessary & recommended params for Away3D (Away3DExample-app.xml)

Away3DExample.iml is used by IntelliJ to define the SDKs that the project relies on, which are two SDKs mentioned above. (This can be removed in opt for your Moonshine configuration)
Away3DExample-app.xml is necessary to define an essential param (As described in the comment-block above), which is the wmode param of 'direct'.

src/Away3DExample.as is the main source file which contains all the code to make this a working example.
src/assets/Away3DExample.awd is the model file created by Away3D Builder and used by the main source file to render a model. Note: It can be opened and loaded directly into Away3D Builder with no additional steps needed.

@JoelProminic is able to give the project a run after some changes in Moonshine, following was his findings:

I talked to Walker about his demo project, and I was able to convert this to a Moonshine project:
2017_11_29__Away3DExample.zip
I used the .as3proj file from a Actionscript AIR project. You may want to do some cleanup for this.

The "out" directory was the compiled output from IntelliJ. ".idea" and "Away3DExample.imi" were project files from IntelliJ.

The away3d-core-fp11_4_1_6.swc library is required. I added it to my project in the lib directory.

I also moved the application descriptor file and made some minor updates to match the Actionscript AIR project.

After these changes the project can be compiled and launched like a normal AIR project. I think this is how we will want the Away3D project template to work.

However, the AWD files are generated using Away Builder. Generating these files are outside of the scope of Moonshine, but I see you have some logic to open the AWD file in Away Builder (after the application path is configured). You could continue using this logic if the user double-clicks to open a .awd file in the sidebar.

Note that the src/assets/Away3DExample.awd is an asset created specifically for this example project. This will probably not be useful for users creating a new application, but it is helpful to show where the new assets should be placed.

@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Nov 30, 2017

I've done integration of the template project for Away3D (thank you @JoelProminic for investigation on running inside Moonshine, this help to boost the integration faster).

However, even there are identical codes between the template project and the demo project supplied by Joel, one runs and one not. Project created through the new template completes its compilation, but is throwing error while run on AIR window. I'm not clear yet why it's happening, I'm still looking for a reason:

image

rat-moonshine added a commit that referenced this issue Dec 1, 2017
- .awd files now opens by Away3D builder
(reference #11)
@rat-moonshine
Copy link
Collaborator

  • Away3D project template now runs in AIR window as well
  • File with extension .awd opens by Away3D Builder (if configured in Settings/Away3D section)

@rat-moonshine rat-moonshine added this to the v1.7.0 milestone Dec 1, 2017
@rat-moonshine rat-moonshine moved this from In Progress to Done in Moonshine-IDE - Features Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants