-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9be360f
commit 325415f
Showing
282 changed files
with
71,874 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
var concat = require('gulp-concat'); | ||
var gulp = require('gulp'); | ||
var changed = require('gulp-changed'); | ||
var glob = require('glob'); | ||
var path = require('path'); | ||
var browserify = require('browserify'); | ||
var source = require('vinyl-source-stream'); | ||
var map = require('vinyl-map'); | ||
var exorcist = require('exorcist'); | ||
var sourcemaps = require('gulp-sourcemaps'); | ||
|
||
var typescript = require('gulp-typescript'); | ||
|
||
gulp.task('compile', function() { | ||
var tsProject = typescript.createProject({ | ||
declarationFiles: true, | ||
noExternalResolve: true, | ||
target: 'ES5', | ||
module: 'commonjs', | ||
sourceRoot: './awayjs-display/lib' | ||
}); | ||
|
||
var ambientWrap = map(function(code, filename) { | ||
code = code.toString(); | ||
code = 'declare module "' + path.relative('../', filename.slice(0,-5)) + '" {\n\t' | ||
+ code.split('declare ').join('').split('\n').join('\n\t') + "\n" | ||
+ '}'; | ||
return code; | ||
}); | ||
|
||
var tsResult = gulp.src(['./lib/**/*.ts', './node_modules/awayjs-**/build/*.d.ts']) | ||
.pipe(sourcemaps.init()) | ||
.pipe(typescript(tsProject)); | ||
|
||
tsResult.dts | ||
.pipe(ambientWrap) | ||
.pipe(concat('awayjs-display.d.ts')) | ||
.pipe(gulp.dest('./build')); | ||
|
||
return tsResult.js | ||
.pipe(sourcemaps.write({sourceRoot: '../'})) | ||
.pipe(gulp.dest('./lib')); | ||
}); | ||
|
||
gulp.task('watch', ['package'], function() { | ||
gulp.watch('./lib/**/*.ts', ['package']); | ||
}); | ||
|
||
gulp.task('package', ['compile'], function(callback){ | ||
var b = browserify({ | ||
debug: true, | ||
paths: ['../'] | ||
}); | ||
|
||
glob('./node_modules/awayjs-**/lib/**/*.js', {}, function (error, files) { | ||
files.forEach(function (file) { | ||
b.external(file); | ||
}); | ||
}); | ||
|
||
glob('./lib/**/*.js', {}, function (error, files) { | ||
|
||
files.forEach(function (file) { | ||
b.require(file, {expose:path.relative('../', file.slice(0,-3))}); | ||
}); | ||
|
||
b.bundle() | ||
.pipe(exorcist('./build/awayjs-display.js.map')) | ||
.pipe(source('awayjs-display.js')) | ||
.pipe(gulp.dest('./build')) | ||
.on('end', callback); | ||
}); | ||
}); | ||
|
||
gulp.task('tests', function () { | ||
|
||
var tsProject = typescript.createProject({ | ||
declarationFiles: true, | ||
noExternalResolve: true, | ||
target: 'ES5', | ||
module: 'commonjs', | ||
sourceRoot: './' | ||
}); | ||
|
||
var tsResult = gulp.src(['./tests/**/*.ts', './node_modules/awayjs-**/build/*.d.ts', './build/awayjs-display.d.ts']) | ||
//.pipe(changed('./tests', {extension:'.js', hasChanged: changed.compareLastModifiedTime})) | ||
.pipe(sourcemaps.init()) | ||
.pipe(typescript(tsProject)); | ||
|
||
return tsResult.js | ||
.pipe(sourcemaps.write({sourceRoot: './tests'})) | ||
.pipe(gulp.dest('./tests')); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import IAsset = require("awayjs-core/lib/library/IAsset"); | ||
|
||
import AnimationNodeBase = require("awayjs-display/lib/animators/nodes/AnimationNodeBase"); | ||
|
||
/** | ||
* Provides an interface for data set classes that hold animation data for use in animator classes. | ||
* | ||
* @see away.animators.AnimatorBase | ||
*/ | ||
interface IAnimationSet extends IAsset | ||
{ | ||
/** | ||
* Check to determine whether a state is registered in the animation set under the given name. | ||
* | ||
* @param stateName The name of the animation state object to be checked. | ||
*/ | ||
hasAnimation(name:string):boolean; | ||
|
||
/** | ||
* Retrieves the animation state object registered in the animation data set under the given name. | ||
* | ||
* @param stateName The name of the animation state object to be retrieved. | ||
*/ | ||
getAnimation(name:string):AnimationNodeBase; | ||
|
||
/** | ||
* Indicates whether the properties of the animation data contained within the set combined with | ||
* the vertex registers aslready in use on shading materials allows the animation data to utilise | ||
* GPU calls. | ||
*/ | ||
usesCPU:boolean; // GET | ||
|
||
/** | ||
* Called by the material to reset the GPU indicator before testing whether register space in the shader | ||
* is available for running GPU-based animation code. | ||
* | ||
* @private | ||
*/ | ||
resetGPUCompatibility(); | ||
|
||
/** | ||
* Called by the animator to void the GPU indicator when register space in the shader | ||
* is no longer available for running GPU-based animation code. | ||
* | ||
* @private | ||
*/ | ||
cancelGPUCompatibility(); | ||
} | ||
|
||
export = IAnimationSet; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import IAsset = require("awayjs-core/lib/library/IAsset"); | ||
|
||
import IAnimationSet = require("awayjs-display/lib/animators/IAnimationSet"); | ||
import SubGeometryBase = require("awayjs-display/lib/base/SubGeometryBase"); | ||
import IRenderable = require("awayjs-display/lib/pool/IRenderable"); | ||
import IEntity = require("awayjs-display/lib/entities/IEntity"); | ||
import IMaterialPass = require("awayjs-display/lib/materials/passes/IMaterialPass"); | ||
|
||
/** | ||
* Provides an interface for animator classes that control animation output from a data set subtype of <code>AnimationSetBase</code>. | ||
* | ||
* @see away.animators.IAnimationSet | ||
*/ | ||
interface IAnimator extends IAsset | ||
{ | ||
/** | ||
* | ||
*/ | ||
animationSet:IAnimationSet; | ||
|
||
/** | ||
* | ||
*/ | ||
clone():IAnimator; | ||
|
||
/** | ||
* | ||
*/ | ||
dispose(); | ||
|
||
/** | ||
* Used by the entity object to which the animator is applied, registers the owner for internal use. | ||
* | ||
* @private | ||
*/ | ||
addOwner(mesh:IEntity); | ||
|
||
/** | ||
* Used by the mesh object from which the animator is removed, unregisters the owner for internal use. | ||
* | ||
* @private | ||
*/ | ||
removeOwner(mesh:IEntity); | ||
|
||
/** | ||
* //TODO | ||
* | ||
* @param sourceSubGeometry | ||
*/ | ||
getRenderableSubGeometry(renderable:IRenderable, sourceSubGeometry:SubGeometryBase):SubGeometryBase; | ||
} | ||
|
||
export = IAnimator; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import AssetType = require("awayjs-core/lib/library/AssetType"); | ||
import IAsset = require("awayjs-core/lib/library/IAsset"); | ||
import NamedAssetBase = require("awayjs-core/lib/library/NamedAssetBase"); | ||
|
||
/** | ||
* Provides an abstract base class for nodes in an animation blend tree. | ||
*/ | ||
class AnimationNodeBase extends NamedAssetBase implements IAsset | ||
{ | ||
public _pStateClass:any; | ||
|
||
public get stateClass():any | ||
{ | ||
return this._pStateClass; | ||
} | ||
|
||
/** | ||
* Creates a new <code>AnimationNodeBase</code> object. | ||
*/ | ||
constructor() | ||
{ | ||
super(); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public dispose() | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public get assetType():string | ||
{ | ||
return AssetType.ANIMATION_NODE; | ||
} | ||
} | ||
|
||
export = AnimationNodeBase; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* | ||
*/ | ||
class AlignmentMode | ||
{ | ||
/** | ||
* | ||
*/ | ||
public static REGISTRATION_POINT:string = "registrationPoint"; | ||
|
||
/** | ||
* | ||
*/ | ||
public static PIVOT_POINT:string = "pivot"; | ||
} | ||
|
||
export = AlignmentMode; |
Oops, something went wrong.