Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristian Sons committed Apr 22, 2013
2 parents 20ee415 + fad0b8a commit 8d8e8cf
Show file tree
Hide file tree
Showing 137 changed files with 14,739 additions and 6,599 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
test
.idea/
.metadata/
.settings/
7 changes: 0 additions & 7 deletions .settings/.jsdtscope

This file was deleted.

1 change: 0 additions & 1 deletion .settings/org.eclipse.wst.jsdt.ui.superType.container

This file was deleted.

1 change: 0 additions & 1 deletion .settings/org.eclipse.wst.jsdt.ui.superType.name

This file was deleted.

14 changes: 14 additions & 0 deletions build/build-xflip.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

buildDir = ${basedir}/output
modulesBuildDir = ${buildDir}/modules
srcDir = ${basedir}/../src
toolsDir = ${basedir}/../tools
script.start = xflip-worker
version = 0.4.6

physicsDir=${srcDir}/physics
physicsScriptName = xml3d_physics.js

continuous.extension = dev
# curl.path = C:/Program Files (x86)/Git/bin/curl.exe
# git.cmd = C:/Program Files (x86)/Git/bin/git.exe
117 changes: 117 additions & 0 deletions build/build-xflip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
project xml3d.js
description
Deploy script that prepares a single xml3d.js script file
Author: Kristian Sons
====================================================================== -->
<project name="xflip-merge" default="develop">
<description>
Build the xflip script
</description>

<import file="build-master.xml" />
<property file="build-xflip.properties" />

<filelist dir="${modulesBuildDir}" id="xflip-worker">
<file name="../../../src/xflip/base.js" />
<file name="../../../src/utils/array.js" />
<file name="../../../src/contrib/glMatrix.js" />
<file name="xml3d-xflow-module.js" />
<file name="../../../src/xflip/worker.js" />
</filelist>

<target name="lastTag" depends="init, modules-concat, windowsGit, linuxGit">
<tstamp />
<git command="describe">
<args>
<arg value="--tags" />
<arg value="--abbrev=0" />
</args>
</git>
<echo message="${git.output}" />
<concatScripts version="${git.output}" extension="-${git.output}" source="modules"/>
<compileScripts version="${git.output}" extension="-${git.output}-min" source="modules"/>
</target>

<target name="continuous" depends="init, modules-concat, windowsGit, linuxGit">
<tstamp />
<git command="log">
<args>
<arg value="-1" />
<arg value="--format=%h / %ci" />
</args>
</git>
<echo message="${git.output}" />
<concatScripts version="CONTINUOUS BUILD / sha: ${git.output}" extension="-${continuous.extension}" source="modules"/>
<compileScripts version="CONTINUOUS BUILD / sha: ${git.output}" extension="-${continuous.extension}-min" source="modules"/>
<upload extension="-${continuous.extension}" />
<upload extension="-${continuous.extension}-min" />
</target>

<target name="develop" depends="init, modules-concat">
<concatScripts version="DEVELOPMENT SNAPSHOT (${build.time})" source="xflip-worker" />
<concat destfile="${buildDir}/xflip.js">
<fileset file="${srcDir}/xflip/client.js" />
</concat>
<concat destfile="${buildDir}/xflip-operators.js">
<fileset file="${srcDir}/xflip/operators.js" />
</concat>
</target>

<!-- - - - - - - - - - - - - - - - - -
Tools
- - - - - - - - - - - - - - - - - -->
<filelist dir="${modulesBuildDir}" id="tools-modules">
<file name="xml3d-tools-module.js" />
</filelist>

<target name="build-tools" depends="init, tools-modules-concat">
<concatScripts extension="-tools" source="tools-modules"
version="DEVELOPMENT SNAPSHOT (${build.time})" />
</target>

<target name="build-tools-min" depends="init, tools-modules-compile">
<compileScripts extension="-tools" source="tools-modules"
version="DEVELOPMENT SNAPSHOT (${build.time})" />
</target>

<target name="upload-tools">
<fail unless="upload.url" />
<post-file file="${buildDir}/xml3d-tools.js" url="${upload.url}/" />
</target>

<!-- - - - - - - - - - - - - - - - - -
Module building targets
- - - - - - - - - - - - - - - - - -->
<target name="modules-concat">
<subant target="concat">
<property name="build.path" value="${modulesBuildDir}" />
<fileset dir="${srcDir}" includes="*/build.xml" />
</subant>
</target>

<target name="modules-compile">
<subant target="compile">
<property name="build.path" value="${modulesBuildDir}" />
<fileset dir="${srcDir}" includes="*/build.xml" />
</subant>
</target>

<!-- There's no easy way to get around these duplicated targets.
target's don't have parameters and macrodefs don't support subant tasks -->
<target name="tools-modules-concat">
<subant target="concat">
<property name="build.path" value="${modulesBuildDir}" />
<fileset dir="${toolsDir}" includes="**/build.xml" />
</subant>
</target>

<target name="tools-modules-compile">
<subant target="compile">
<property name="build.path" value="${modulesBuildDir}" />
<fileset dir="${toolsDir}" includes="**/build.xml" />
</subant>
</target>
</project>
17 changes: 12 additions & 5 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Author: Kristian Sons
====================================================================== -->
<project name="script-merge" default="develop">
<project name="script-merge" default="all">
<description>
Merge all the single scripts to one global xml3d.js
</description>
Expand Down Expand Up @@ -70,12 +70,12 @@
</filelist>

<target name="build-tools" depends="init, tools-modules-concat">
<concatScripts extension="-tools" source="tools-modules"
version="DEVELOPMENT SNAPSHOT (${build.time})" />
<concatScripts extension="-tools" source="tools-modules"
version="DEVELOPMENT SNAPSHOT (${build.time})" />
</target>

<target name="build-tools-min" depends="init, tools-modules-compile">
<compileScripts extension="-tools" source="tools-modules"
<compileScripts extension="-tools" source="tools-modules"
version="DEVELOPMENT SNAPSHOT (${build.time})" />
</target>

Expand All @@ -101,7 +101,7 @@
</subant>
</target>

<!-- There's no easy way to get around these duplicated targets.
<!-- There's no easy way to get around these duplicated targets.
target's don't have parameters and macrodefs don't support subant tasks -->
<target name="tools-modules-concat">
<subant target="concat">
Expand All @@ -116,4 +116,11 @@
<fileset dir="${toolsDir}" includes="**/build.xml" />
</subant>
</target>

<target name="all">
<subant target="develop">
<fileset dir="." includes="build.xml"/>
<fileset dir="." includes="build-xflip.xml"/>
</subant>
</target>
</project>
21 changes: 19 additions & 2 deletions src/base/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ XML3D.base.Adapter.prototype.getConnectedAdapter = function(key){
return handle && handle.getAdapter();
};

/**
* This function is called, when the adapater is detached from the node.
* At this point, the adapater should disconnect from any other adapter and prepare to be properly garbage collected
*/
XML3D.base.Adapter.prototype.onDispose = function(){
this.clearAdapterHandles();
}


/**
* Internal function that converts an AdapterHandleNotification to a ConnectedAdapterNotification
Expand Down Expand Up @@ -184,6 +192,15 @@ XML3D.base.AdapterFactory.prototype.createAdapter = function(obj) {
return null;
};

/**
* Checks if the adapter factory supports specified mimetype. Can be overridden by subclass.
* @param {String} mimetype
* @return {Boolean} true if the adapter factory supports specified mimetype
*/
XML3D.base.AdapterFactory.prototype.supportsMimetype = function(mimetype) {
return this.mimetypes.indexOf(mimetype) != -1;
};

/**
* A NodeAdaperFactory is a AdapterFactory, that works specifically for DOM nodes / elements.
* @constructor
Expand Down Expand Up @@ -249,8 +266,8 @@ XML3D.base.callAdapterFunc = function(node, funcs) {
}
return result;
};
/**

/**
* This function sends single or multiple adapter events by calling functions
* specified in events parameter for each adapter associated with the node.
*
Expand Down
1 change: 1 addition & 0 deletions src/base/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<file name="./adapter.js" />
<file name="./adapterhandle.js" />
<file name="./resourcemanager.js" />
<file name="./formathandler.js" />
</filelist>

<target name="concat">
Expand Down
Loading

0 comments on commit 8d8e8cf

Please sign in to comment.