Skip to content

Commit

Permalink
v. 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikos M committed Jul 14, 2016
1 parent 8e4a811 commit 0307db3
Show file tree
Hide file tree
Showing 82 changed files with 68,419 additions and 5,878 deletions.
276 changes: 138 additions & 138 deletions api-reference.md
Original file line number Diff line number Diff line change
@@ -1,138 +1,138 @@

###Pivot modifier

Allows to move the pivot point of a 3D mesh.

@author Bartek Drozdz




###Bend modifier

Bends an object along an axis.

@author Bartek Drozdz




###Bloat modifier

Bloats a mesh by forcing vertices out of specified sphere

@author makc




###Twist modifier

Twist mesh along an axis
Adapted from the Twist modifier for PV3D




###Skew modifier

Skew mesh along an axis

@author Bartek Drozdz




###Taper modifier

The taper modifier displaces the vertices on two axes proportionally to their position on the third axis.

@author Bartek Drozdz




###Wheel modifier

Use it with vehicle models for wheels.

The usual problem with a 3d wheel in a vahicle is that it is
supposed to turn (steer) and roll in the same time.
So, this code:
```javascript
wheel.rotationY = 10; // Steer 10deg to the left
wheel.rotationZ +- 5; // Roll with a speed of 5
```
This will make the wheel roll incorectly.
A usual way to solve this problem is to put the wheel in another DisplayObject3D/Mesh,
turn the parent and roll the child, like that:
```javascript
steer.rotationY = 10; // Steer 10deg to the left
steer.wheel.rotationZ +- 5; // Roll with a speed of 5
```
That will make the wheel behave correctly. But it can be uncomfortanble to apply, especially
to imported complex Collada models.
The Wheel modifier elegantly solves this problem by doind the proper math in order to steer and roll
a single mesh at the same time. The only thing you need to do is to specify a steer vector and
roll vector - usually it will be 2 of the cardinal axes. The default value is:
* steer - along the Y axis / new Vector3(0, 1, 0)</li>
* roll - along the Z axis / new Vector3(0, 0, 1)</li>
It should work with most car models imported from 3D editors as this is the natural position of a wheel.
<i>Please note, that Papervision primitive cylinder, which may also be used as wheel, will require different axes
(Y for roll and Z or X for steer).</i>

@author Bartek Drozdz




###Break modifier

Allow to break a mesh

@author Bartek Drozdz




###Noise modifier

Randomly displaces each vertex in all 3 axes





###DisplaceMap (BitmapDisplacement) Modifier

Displaces vertices based on RGB values of bitmapData pixels.

BitmapDisplacement is inspired by both the AS3 built-in DisplacementMapFilter. It allows
to use color values for each channels of a bitmap to modify the position of vertices in a mesh.

The displacement takes place along the cardinal axes, and each axis is mapped to a
channel in the bitmap: X for Red, Y for Green and Z for Blue.

@author Bartek Drozdz




###Perlin modifier

Displaces vertices based on a perlin/simplex noise source.

Generates perlin/simplex noise source and displaces vertices
based on the value of each point of the noise map.

@author Bartek Drozdz

@uses: https://github.com/josephg/noisejs for JavaScript


* ###Pivot modifier
*
* Allows to move the pivot point of a 3D mesh.
*
* @author Bartek Drozdz
*



* ###Bend modifier
*
* Bends an object along an axis.
*
* @author Bartek Drozdz
*



* ###Bloat modifier
*
* Bloats a mesh by forcing vertices out of specified sphere
*
* @author makc
*



* ###Twist modifier
*
* Twist mesh along an axis
* Adapted from the Twist modifier for PV3D
*



* ###Skew modifier
*
* Skew mesh along an axis
*
* @author Bartek Drozdz
*



* ###Taper modifier
*
* The taper modifier displaces the vertices on two axes proportionally to their position on the third axis.
*
* @author Bartek Drozdz
*



* ###Wheel modifier
*
* Use it with vehicle models for wheels.
*
* The usual problem with a 3d wheel in a vahicle is that it is
* supposed to turn (steer) and roll in the same time.
* So, this code:
*
* ```javascript
* wheel.rotationY = 10; // Steer 10deg to the left
* wheel.rotationZ +- 5; // Roll with a speed of 5
* ```
* This will make the wheel roll incorectly.
*
* A usual way to solve this problem is to put the wheel in another DisplayObject3D/Mesh,
* turn the parent and roll the child, like that:
* ```javascript
* steer.rotationY = 10; // Steer 10deg to the left
* steer.wheel.rotationZ +- 5; // Roll with a speed of 5
* ```
* That will make the wheel behave correctly. But it can be uncomfortanble to apply, especially
* to imported complex Collada models.
*
* The Wheel modifier elegantly solves this problem by doind the proper math in order to steer and roll
* a single mesh at the same time. The only thing you need to do is to specify a steer vector and
* roll vector - usually it will be 2 of the cardinal axes. The default value is:
*
* * steer - along the Y axis / new Vector3(0, 1, 0)</li>
* * roll - along the Z axis / new Vector3(0, 0, 1)</li>
*
*
* It should work with most car models imported from 3D editors as this is the natural position of a wheel.
*
* <i>Please note, that Papervision primitive cylinder, which may also be used as wheel, will require different axes
* (Y for roll and Z or X for steer).</i>
*
* @author Bartek Drozdz
*



* ###Break modifier
*
* Allow to break a mesh
*
* @author Bartek Drozdz
*



* ###Noise modifier
*
* Randomly displaces each vertex in all 3 axes
*
*



* ###DisplaceMap (BitmapDisplacement) Modifier
*
* Displaces vertices based on RGB values of bitmapData pixels.
*
* BitmapDisplacement is inspired by both the AS3 built-in DisplacementMapFilter. It allows
* to use color values for each channels of a bitmap to modify the position of vertices in a mesh.
*
* The displacement takes place along the cardinal axes, and each axis is mapped to a
* channel in the bitmap: X for Red, Y for Green and Z for Blue.
*
* @author Bartek Drozdz
*



* ###Perlin modifier
*
* Displaces vertices based on a perlin/simplex noise source.
*
* Accepts a perlin/simplex noise data (with width and height information) and displaces vertices
* based on the value of each point of the noise map.
*
* @author Bartek Drozdz
*
* @uses: https://github.com/josephg/noisejs for JavaScript
*
23 changes: 11 additions & 12 deletions config.custom → beeld.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
###################################################

plugins =[{}]
# include 'minify' plugin from plugins folder
"minify" = "!plg:minify"
# include 'doc' plugin from plugins folder
"doc" = "!plg:doc"
@
Expand All @@ -29,19 +31,15 @@ tasks =[{}]
./src/math/Matrix.js
./src/math/Vector3.js
./src/math/Matrix4.js
./src/math/List.js

./src/core/WorkerInterface.js
./src/core/VertexProxy.js
./src/core/FaceProxy.js
./src/core/MeshProxy.js
./src/core/Modifier.js
./src/core/Factory.js
./src/core/ModifierStack.js

# 3rd-party
# https://github.com/josephg/noisejs
./src/3rd-party/perlin.js

# modifiers
./src/modifiers/Pivot.js
./src/modifiers/Bend.js
Expand All @@ -60,6 +58,11 @@ tasks =[{}]
./src/plugins/Three/Mesh.js
./src/plugins/Three/Library.js

# Support for OSG.js
./src/plugins/OSG/Vertex.js
./src/plugins/OSG/Mesh.js
./src/plugins/OSG/Library.js

# Support for J3D
./src/plugins/J3D/Vertex.js
./src/plugins/J3D/Mesh.js
Expand Down Expand Up @@ -94,7 +97,7 @@ tasks =[{}]
"@@MODULE_NAME@@" = "MOD3"
"@@MODULE_DEPENDENCIES@@" = "[ ['Classy'], ['./classy.js'] ]"
"@@MODULE_ARGUMENTS@@" = "Classy"
"@@VERSION@@" = "0.4.1"
"@@VERSION@@" = "0.5.0"
"@@DEPENDENCIES@@" = "@dependencies: Classy.js"
"@@USE_STRICT@@" = '"use strict";'

Expand Down Expand Up @@ -150,19 +153,15 @@ tasks =[{}]
./src/math/Matrix.js
./src/math/Vector3.js
./src/math/Matrix4.js
./src/math/List.js

./src/core/WorkerInterface.js
./src/core/VertexProxy.js
./src/core/FaceProxy.js
./src/core/MeshProxy.js
./src/core/Modifier.js
./src/core/Factory.js
./src/core/ModifierStack.js

# 3rd-party
# https://github.com/josephg/noisejs
./src/3rd-party/perlin.js

# modifiers
./src/modifiers/Pivot.js
./src/modifiers/Bend.js
Expand Down Expand Up @@ -195,7 +194,7 @@ tasks =[{}]
"@@MODULE_NAME@@" = "MOD3"
"@@MODULE_DEPENDENCIES@@" = "[ ['Classy'], ['./classy.js'] ]"
"@@MODULE_ARGUMENTS@@" = "Classy"
"@@VERSION@@" = "0.4.1"
"@@VERSION@@" = "0.5.0"
"@@DEPENDENCIES@@" = "@dependencies: Classy.js"
"@@USE_STRICT@@" = '"use strict";'

Expand Down
6 changes: 3 additions & 3 deletions build-bundle.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ REM #
REM ###################################################

REM to use the python build tool do:
REM python %BUILDTOOLS%\Beeld.py --config ".\config.custom" --tasks bundle
REM python %BUILDTOOLS%\Beeld.py --config ".\beeld.config" --tasks bundle

REM to use the php build tool do:
REM php -f %BUILDTOOLS%\Beeld.php -- --config=".\config.custom" --tasks=bundle
REM php -f %BUILDTOOLS%\Beeld.php -- --config=".\beeld.config" --tasks=bundle

REM to use the node build tool do:
node %BUILDTOOLS%\Beeld.js --config ".\config.custom" --tasks bundle
node %BUILDTOOLS%\Beeld.js --config ".\beeld.config" --tasks bundle
6 changes: 3 additions & 3 deletions build-three.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ REM #
REM ###################################################

REM to use the python build tool do:
REM python %BUILDTOOLS%\Beeld.py --config ".\config.custom" --tasks build_three
REM python %BUILDTOOLS%\Beeld.py --config ".\beeld.config" --tasks build_three

REM to use the php build tool do:
REM php -f %BUILDTOOLS%\Beeld.php -- --config=".\config.custom" --tasks=build_three
REM php -f %BUILDTOOLS%\Beeld.php -- --config=".\beeld.config" --tasks=build_three

REM to use the node build tool do:
node %BUILDTOOLS%\Beeld.js --config ".\config.custom" --tasks build_three
node %BUILDTOOLS%\Beeld.js --config ".\beeld.config" --tasks build_three
6 changes: 3 additions & 3 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ REM #
REM ###################################################

REM to use the python build tool do:
REM python %BUILDTOOLS%\Beeld.py --config ".\config.custom" --tasks build
REM python %BUILDTOOLS%\Beeld.py --config ".\beeld.config" --tasks build

REM to use the php build tool do:
REM php -f %BUILDTOOLS%\Beeld.php -- --config=".\config.custom" --tasks=build
REM php -f %BUILDTOOLS%\Beeld.php -- --config=".\beeld.config" --tasks=build

REM to use the node build tool do:
node %BUILDTOOLS%\Beeld.js --config ".\config.custom" --tasks build
node %BUILDTOOLS%\Beeld.js --config ".\beeld.config" --tasks build
Loading

0 comments on commit 0307db3

Please sign in to comment.