├── .gitattributes
├── .gitignore
├── README.md
├── build.xml
└── src
├── com
└── adobe
│ └── utils
│ ├── AGALMacroAssembler.as
│ ├── AGALMiniAssembler.as
│ ├── extended
│ └── AGALMiniAssembler.as
│ └── macro
│ ├── AGALPreAssembler.as
│ ├── AGALVar.as
│ ├── BinaryExpression.as
│ ├── Expression.as
│ ├── ExpressionParser.as
│ ├── NumberExpression.as
│ ├── UnaryExpression.as
│ ├── VM.as
│ └── VariableExpression.as
└── zest3d
├── applications
├── AGALApplication.as
├── Application.as
├── WindowApplication.as
└── Zest3DApplication.as
├── controllers
├── BlendTransformController.as
├── ControlledObject.as
├── Controller.as
├── KeyInfo.as
├── KeyframeController.as
├── ParticleController.as
├── PointController.as
├── SkinController.as
├── TransformController.as
└── enum
│ └── RepeatType.as
├── datatypes
├── Bound.as
└── Transform.as
├── detail
├── BillboardNode.as
├── ClodMesh.as
├── CollapseRecord.as
├── CollapseRecordArray.as
├── DlodNode.as
└── SwitchNode.as
├── geometry
├── ParticleGeometry.as
└── SkyboxGeometry.as
├── globaleffects
├── GlobalEffect.as
└── PlanarReflectionEffect.as
├── localeffects
├── CartoonEffect.as
├── DepthEffect.as
├── DiffuseNormalSpecularEffect.as
├── FlatMaterialEffect.as
├── GlassEffect.as
├── LambertEffect.as
├── MRTEffect.as
├── NormalEffect.as
├── PhongEffect.as
├── ReflectionEffect.as
├── ScreenTargetEffect.as
├── SkyboxEffect.as
├── TextureEffect.as
└── WireframeEffect.as
├── primitives
├── CubePrimitive.as
├── CylinderPrimitive.as
├── PlanePrimitive.as
├── Primitive.as
├── SpherePrimitive.as
├── StandardMesh.as
└── TorusPrimitive.as
├── renderers
├── Renderer.as
├── agal
│ ├── AGALMapping.as
│ ├── AGALRenderState.as
│ ├── AGALRenderer.as
│ ├── AGALRendererData.as
│ ├── AGALRendererInput.as
│ ├── AGALSamplerState.as
│ └── pdr
│ │ ├── AGALIndexBuffer.as
│ │ ├── AGALPixelShader.as
│ │ ├── AGALRenderTarget.as
│ │ ├── AGALShader.as
│ │ ├── AGALTexture2D.as
│ │ ├── AGALTexture3D.as
│ │ ├── AGALTextureCube.as
│ │ ├── AGALTextureRectangle.as
│ │ ├── AGALVertexBuffer.as
│ │ ├── AGALVertexFormat.as
│ │ └── AGALVertexShader.as
└── interfaces
│ ├── IIndexBuffer.as
│ ├── IPixelShader.as
│ ├── IRenderTarget.as
│ ├── ITexture1D.as
│ ├── ITexture2D.as
│ ├── ITexture3D.as
│ ├── ITextureCube.as
│ ├── ITextureRectangle.as
│ ├── IVertexBuffer.as
│ ├── IVertexFormat.as
│ └── IVertexShader.as
├── resources
├── Buffer.as
├── IndexBuffer.as
├── RenderTarget.as
├── Texture.as
├── Texture2D.as
├── Texture3D.as
├── TextureBase.as
├── TextureCube.as
├── TextureRectangle.as
├── VertexBuffer.as
├── VertexBufferAccessor.as
├── VertexElement.as
├── VertexFormat.as
└── enum
│ ├── AttributeType.as
│ ├── AttributeUsageType.as
│ ├── BufferLockingType.as
│ ├── BufferUsageType.as
│ ├── TextureFormat.as
│ └── TextureType.as
├── scenegraph
├── Camera.as
├── CameraNode.as
├── Culler.as
├── Frustum.as
├── Light.as
├── LightNode.as
├── Material.as
├── Node.as
├── Particles.as
├── PickRecord.as
├── Picker.as
├── Polypoint.as
├── ScreenTarget.as
├── Spatial.as
├── TriFan.as
├── TriMesh.as
├── TriStrip.as
├── Triangles.as
├── VisibleSet.as
├── Visual.as
└── enum
│ ├── CullingType.as
│ ├── LightType.as
│ ├── PrimitiveType.as
│ └── UpdateType.as
├── shaderfloats
├── ShaderFloat.as
├── camera
│ ├── CameraModelDVectorConstant.as
│ ├── CameraModelPositionConstant.as
│ ├── CameraWorldDVectorConstant.as
│ └── CameraWorldPositionConstant.as
├── light
│ ├── LightAmbientConstant.as
│ ├── LightAttenuationConstant.as
│ ├── LightDiffuseConstant.as
│ ├── LightModelDVectorConstant.as
│ ├── LightModelPositionConstant.as
│ ├── LightSpecularConstant.as
│ ├── LightSpecularExponentConstant.as
│ ├── LightSpotConstant.as
│ ├── LightWorldDVectorConstant.as
│ └── LightWorldPositionConstant.as
├── material
│ ├── MaterialAmbientConstant.as
│ ├── MaterialDiffuseConstant.as
│ ├── MaterialEmissiveConstant.as
│ └── MatrialSpecularConstant.as
└── matrix
│ ├── PMatrixConstant.as
│ ├── PVMatrixConstant.as
│ ├── PVWMatrixConstant.as
│ ├── VMatrixConstant.as
│ ├── VWMatrixConstant.as
│ └── WMatrixConstant.as
├── shaders
├── PixelShader.as
├── Shader.as
├── ShaderParameters.as
├── VertexShader.as
├── VisualEffect.as
├── VisualEffectInstance.as
├── VisualPass.as
├── VisualTechnique.as
├── enum
│ ├── CompareMode.as
│ ├── DstBlendMode.as
│ ├── OperationType.as
│ ├── PixelShaderProfileType.as
│ ├── SamplerCoordinateType.as
│ ├── SamplerFilterType.as
│ ├── SamplerType.as
│ ├── SrcBlendMode.as
│ ├── VariableSemanticType.as
│ ├── VariableType.as
│ └── VertexShaderProfileType.as
└── states
│ ├── AlphaState.as
│ ├── CullState.as
│ ├── DepthState.as
│ ├── OffsetState.as
│ ├── StencilState.as
│ └── WireState.as
└── terrain
├── Terrain.as
└── TerrainPage.as
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 |
32 | #################
33 | ## Visual Studio
34 | #################
35 |
36 | ## Ignore Visual Studio temporary files, build results, and
37 | ## files generated by popular Visual Studio add-ons.
38 |
39 | # User-specific files
40 | *.suo
41 | *.user
42 | *.sln.docstates
43 |
44 | # Build results
45 | [Dd]ebug/
46 | [Rr]elease/
47 | *_i.c
48 | *_p.c
49 | *.ilk
50 | *.meta
51 | *.obj
52 | *.pch
53 | *.pdb
54 | *.pgc
55 | *.pgd
56 | *.rsp
57 | *.sbr
58 | *.tlb
59 | *.tli
60 | *.tlh
61 | *.tmp
62 | *.vspscc
63 | .builds
64 | *.dotCover
65 |
66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this
67 | #packages/
68 |
69 | # Visual C++ cache files
70 | ipch/
71 | *.aps
72 | *.ncb
73 | *.opensdf
74 | *.sdf
75 |
76 | # Visual Studio profiler
77 | *.psess
78 | *.vsp
79 |
80 | # ReSharper is a .NET coding add-in
81 | _ReSharper*
82 |
83 | # Installshield output folder
84 | [Ee]xpress
85 |
86 | # DocProject is a documentation generator add-in
87 | DocProject/buildhelp/
88 | DocProject/Help/*.HxT
89 | DocProject/Help/*.HxC
90 | DocProject/Help/*.hhc
91 | DocProject/Help/*.hhk
92 | DocProject/Help/*.hhp
93 | DocProject/Help/Html2
94 | DocProject/Help/html
95 |
96 | # Click-Once directory
97 | publish
98 |
99 | # Others
100 | [Bb]in
101 | [Oo]bj
102 | sql
103 | TestResults
104 | *.Cache
105 | ClientBin
106 | stylecop.*
107 | ~$*
108 | *.dbmdl
109 | Generated_Code #added for RIA/Silverlight projects
110 |
111 | # Backup & report files from converting an old project file to a newer
112 | # Visual Studio version. Backup files are not needed, because we have git ;-)
113 | _UpgradeReport_Files/
114 | Backup*/
115 | UpgradeLog*.XML
116 |
117 |
118 |
119 | ############
120 | ## Windows
121 | ############
122 |
123 | # Windows image file caches
124 | Thumbs.db
125 |
126 | # Folder config file
127 | Desktop.ini
128 |
129 |
130 | #############
131 | ## Python
132 | #############
133 |
134 | *.py[co]
135 |
136 | # Packages
137 | *.egg
138 | *.egg-info
139 | dist
140 | build
141 | eggs
142 | parts
143 | bin
144 | var
145 | sdist
146 | develop-eggs
147 | .installed.cfg
148 |
149 | # Installer logs
150 | pip-log.txt
151 |
152 | # Unit test / coverage reports
153 | .coverage
154 | .tox
155 |
156 | #Translations
157 | *.mo
158 |
159 | #Mr Developer
160 | .mr.developer.cfg
161 |
162 | # Mac crap
163 | .DS_Store
164 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | zest3d-core
2 | ===========
3 |
4 | Zest3D
5 |
6 | Distributed under the Boost Software License, Version 1.0.
7 |
8 | http://www.boost.org/LICENSE_1_0.txt
9 |
10 | ;)
11 |
--------------------------------------------------------------------------------
/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Running target Build
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/com/adobe/utils/macro/AGALVar.as:
--------------------------------------------------------------------------------
1 | package com.adobe.utils.macro
2 | {
3 | /**
4 | * Class to record information about all the aliases in an AGAL
5 | * shader. Typically a program is interested in making sure all
6 | * the needed constants are set in the constant pool. If isConstant()
7 | * return true, then the x,y,z,w members contain the values required
8 | * for the shader to run correctly.
9 | */
10 | public class AGALVar
11 | {
12 | public function AGALVar() { };
13 | public var name:String; // transform
14 | public var target:String; // "vc3", "va2.x"
15 | public var x:Number = Number.NaN;
16 | public var y:Number = Number.NaN;
17 | public var z:Number = Number.NaN;
18 | public var w:Number = Number.NaN;
19 |
20 | public function isConstant():Boolean { return !isNaN( x ); }
21 | public function toString():String {
22 | if ( this.isConstant() )
23 | return "alias " + target + ", " + name + "( " + x + ", " + y + ", " + z + ", " + w + " )";
24 | else
25 | return "alias " + target + ", " + name;
26 | }
27 |
28 | }
29 | }
--------------------------------------------------------------------------------
/src/com/adobe/utils/macro/BinaryExpression.as:
--------------------------------------------------------------------------------
1 | package com.adobe.utils.macro
2 | {
3 | internal class BinaryExpression extends com.adobe.utils.macro.Expression
4 | {
5 | public function BinaryExpression() { };
6 | public var op:String;
7 | public var left:Expression;
8 | public var right:Expression;
9 | override public function print( depth:int ):void {
10 | if ( AGALPreAssembler.TRACE_VM ) {
11 | trace( spaces( depth ) + "binary op " + op );
12 | }
13 | left.print( depth+1 );
14 | right.print( depth+1 );
15 | }
16 |
17 | override public function exec( vm:VM ):void {
18 | var varLeft:Number = Number.NaN;
19 | var varRight:Number = Number.NaN;
20 |
21 | left.exec( vm );
22 | varLeft = vm.stack.pop();
23 | right.exec( vm );
24 | varRight = vm.stack.pop();
25 |
26 | if ( isNaN( varLeft ) ) throw new Error( "Left side of binary expression (" + op + ") is NaN" );
27 | if ( isNaN( varRight ) ) throw new Error( "Right side of binary expression (" + op + ") is NaN" );
28 |
29 | switch( op ) {
30 | case "*":
31 | vm.stack.push( varLeft * varRight );
32 | break;
33 | case "/":
34 | vm.stack.push( varLeft / varRight );
35 | break;
36 | case "+":
37 | vm.stack.push( varLeft + varRight );
38 | break;
39 | case "-":
40 | vm.stack.push( varLeft - varRight );
41 | break;
42 | case ">":
43 | vm.stack.push( (varLeft > varRight) ? 1 : 0 );
44 | break;
45 | case "<":
46 | vm.stack.push( (varLeft < varRight) ? 1 : 0 );
47 | break;
48 | case ">=":
49 | vm.stack.push( (varLeft >= varRight) ? 1 : 0 );
50 | break;
51 | case ">=":
52 | vm.stack.push( (varLeft <= varRight) ? 1 : 0 );
53 | break;
54 | case "==":
55 | vm.stack.push( (varLeft==varRight) ? 1 : 0 );
56 | break;
57 | case "!=":
58 | vm.stack.push( (varLeft!=varRight) ? 1 : 0 );
59 | break;
60 | case "&&":
61 | vm.stack.push( (Boolean(varLeft) && Boolean(varRight)) ? 1 : 0 );
62 | break;
63 | case "||":
64 | vm.stack.push( (Boolean(varLeft) || Boolean(varRight)) ? 1 : 0 );
65 | break;
66 |
67 | default:
68 | throw new Error( "unimplemented BinaryExpression exec" );
69 | break;
70 | }
71 | if ( AGALPreAssembler.TRACE_VM ) {
72 | trace( "::BinaryExpression op" + op + " left=" + varLeft + " right=" +varRight + " push " + vm.stack[vm.stack.length-1] );
73 | }
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/src/com/adobe/utils/macro/Expression.as:
--------------------------------------------------------------------------------
1 | package com.adobe.utils.macro
2 | {
3 | import com.adobe.utils.macro.VM;
4 |
5 | public class Expression
6 | {
7 | public function print( depth:int ):void { trace( "top" ); }
8 | public function exec( vm:VM ):void {
9 | trace( "WTF" );
10 | }
11 |
12 | protected function spaces( depth:int ):String
13 | {
14 | // Must be a clever way to do this...
15 | var str:String = "";
16 | for( var i:int=0; i = new Vector.();
51 | private var m_ifWasTrue:Vector. = new Vector.();
52 | }
53 | }
--------------------------------------------------------------------------------
/src/com/adobe/utils/macro/VariableExpression.as:
--------------------------------------------------------------------------------
1 | package com.adobe.utils.macro
2 | {
3 | internal class VariableExpression extends com.adobe.utils.macro.Expression
4 | {
5 | public function VariableExpression( n:String )
6 | {
7 | name = n;
8 | }
9 | public var name:String;
10 | override public function print( depth:int ):void { trace( spaces( depth ) + "variable=" + name ); }
11 |
12 | override public function exec( vm:VM ):void {
13 | if ( AGALPreAssembler.TRACE_VM ) {
14 | trace( "::VariableExpression push var " + name + " value " + vm.vars[ name] );
15 | }
16 | if ( isNaN( vm.vars[ name] ) ) throw new Error( "VariableExpression NaN. name=" + name );
17 | vm.stack.push( vm.vars[ name] );
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/zest3d/applications/Application.as:
--------------------------------------------------------------------------------
1 | /**
2 | * Plugin.IO - http://www.plugin.io
3 | * Copyright (c) 2013-2014
4 | *
5 | * Geometric Tools, LLC
6 | * Copyright (c) 1998-2012
7 | *
8 | * Distributed under the Boost Software License, Version 1.0.
9 | * http://www.boost.org/LICENSE_1_0.txt
10 | */
11 | package zest3d.applications
12 | {
13 | import io.plugin.core.interfaces.IDisposable;
14 |
15 | /**
16 | * ...
17 | * @author Gary Paluk
18 | */
19 | public class Application implements IDisposable
20 | {
21 |
22 | public static const ZEST3D_PATH: String = "";
23 | public static const PROJECT_PATH: String = "";
24 |
25 | public function Application()
26 | {
27 |
28 | }
29 |
30 | public function dispose(): void
31 | {
32 |
33 | }
34 |
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/src/zest3d/controllers/Controller.as:
--------------------------------------------------------------------------------
1 | /**
2 | * Plugin.IO - http://www.plugin.io
3 | * Copyright (c) 2013
4 | *
5 | * Geometric Tools, LLC
6 | * Copyright (c) 1998-2012
7 | *
8 | * Distributed under the Boost Software License, Version 1.0.
9 | * http://www.boost.org/LICENSE_1_0.txt
10 | */
11 | package zest3d.controllers
12 | {
13 | import io.plugin.core.interfaces.IDisposable;
14 | import io.plugin.core.system.object.PluginObject;
15 | import zest3d.controllers.enum.RepeatType;
16 | /**
17 | * ...
18 | * @author Gary Paluk
19 | */
20 | public class Controller extends PluginObject implements IDisposable
21 | {
22 |
23 | public var repeat: RepeatType;
24 | public var minTime: Number;
25 | public var maxTime: Number;
26 | public var phase: Number;
27 | public var frequency: Number;
28 | public var active: Boolean;
29 |
30 | protected var _object: ControlledObject;
31 | protected var _applicationTime: Number;
32 |
33 | public function Controller()
34 | {
35 | repeat = RepeatType.CLAMP;
36 | minTime = 0;
37 | maxTime = 0;
38 | phase = 0;
39 | frequency = 1;
40 | active = true;
41 | _object = null;
42 | _applicationTime = -Number.MAX_VALUE;
43 | }
44 |
45 | public function dispose(): void
46 | {
47 | //TODO
48 | }
49 |
50 |
51 | [Inline]
52 | public function get object(): ControlledObject
53 | {
54 | return _object;
55 | }
56 |
57 | [Inline]
58 | public function get applicationTime(): Number
59 | {
60 | return _applicationTime;
61 | }
62 |
63 | [Inline]
64 | public function set applicationTime( applicationTime: Number ): void
65 | {
66 | _applicationTime = applicationTime;
67 | }
68 |
69 | // virtual
70 | public function update( applicationTime: Number ): Boolean
71 | {
72 | if ( active )
73 | {
74 | _applicationTime = applicationTime;
75 | return true;
76 | }
77 | return false;
78 | }
79 |
80 | // internal use
81 | public function set object( object: ControlledObject ): void
82 | {
83 | _object = object;
84 | }
85 |
86 | protected function getControlTime( applicationTime: Number ): Number
87 | {
88 | var controlTime: Number = frequency * applicationTime + phase;
89 |
90 | if ( repeat == RepeatType.CLAMP )
91 | {
92 | if ( controlTime < minTime )
93 | {
94 | return minTime;
95 | }
96 | if ( controlTime > maxTime )
97 | {
98 | return maxTime;
99 | }
100 | return controlTime;
101 | }
102 |
103 | var timeRange: Number = maxTime - minTime;
104 | if ( timeRange > 0 )
105 | {
106 | var multples: Number = ( controlTime - minTime ) / timeRange;
107 | var integerTime: Number = Math.floor( multples );
108 | var fractionTime: Number = multples - integerTime;
109 |
110 | if ( repeat == RepeatType.WRAP )
111 | {
112 | return minTime + fractionTime * timeRange;
113 | }
114 |
115 | if ( (int( integerTime ) & 1) )
116 | {
117 | return maxTime - fractionTime * timeRange;
118 | }
119 | else
120 | {
121 | return minTime + fractionTime * timeRange;
122 | }
123 | }
124 |
125 | return minTime;
126 | }
127 |
128 | //{ NAME SUPPORT
129 | override public function getObjectByName( name: String ): Object
130 | {
131 | return super.getObjectByName( name );
132 | }
133 |
134 | override public function getAllObjectsByName(name:String, objects:Vector.