Skip to content

Commit 0307db3

Browse files
author
Nikos M
committed
v. 0.5.0
1 parent 8e4a811 commit 0307db3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+68419
-5878
lines changed

api-reference.md

+138-138
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,138 @@
1-
2-
###Pivot modifier
3-
4-
Allows to move the pivot point of a 3D mesh.
5-
6-
@author Bartek Drozdz
7-
8-
9-
10-
11-
###Bend modifier
12-
13-
Bends an object along an axis.
14-
15-
@author Bartek Drozdz
16-
17-
18-
19-
20-
###Bloat modifier
21-
22-
Bloats a mesh by forcing vertices out of specified sphere
23-
24-
@author makc
25-
26-
27-
28-
29-
###Twist modifier
30-
31-
Twist mesh along an axis
32-
Adapted from the Twist modifier for PV3D
33-
34-
35-
36-
37-
###Skew modifier
38-
39-
Skew mesh along an axis
40-
41-
@author Bartek Drozdz
42-
43-
44-
45-
46-
###Taper modifier
47-
48-
The taper modifier displaces the vertices on two axes proportionally to their position on the third axis.
49-
50-
@author Bartek Drozdz
51-
52-
53-
54-
55-
###Wheel modifier
56-
57-
Use it with vehicle models for wheels.
58-
59-
The usual problem with a 3d wheel in a vahicle is that it is
60-
supposed to turn (steer) and roll in the same time.
61-
So, this code:
62-
63-
```javascript
64-
wheel.rotationY = 10; // Steer 10deg to the left
65-
wheel.rotationZ +- 5; // Roll with a speed of 5
66-
```
67-
This will make the wheel roll incorectly.
68-
69-
A usual way to solve this problem is to put the wheel in another DisplayObject3D/Mesh,
70-
turn the parent and roll the child, like that:
71-
```javascript
72-
steer.rotationY = 10; // Steer 10deg to the left
73-
steer.wheel.rotationZ +- 5; // Roll with a speed of 5
74-
```
75-
That will make the wheel behave correctly. But it can be uncomfortanble to apply, especially
76-
to imported complex Collada models.
77-
78-
The Wheel modifier elegantly solves this problem by doind the proper math in order to steer and roll
79-
a single mesh at the same time. The only thing you need to do is to specify a steer vector and
80-
roll vector - usually it will be 2 of the cardinal axes. The default value is:
81-
82-
* steer - along the Y axis / new Vector3(0, 1, 0)</li>
83-
* roll - along the Z axis / new Vector3(0, 0, 1)</li>
84-
85-
86-
It should work with most car models imported from 3D editors as this is the natural position of a wheel.
87-
88-
<i>Please note, that Papervision primitive cylinder, which may also be used as wheel, will require different axes
89-
(Y for roll and Z or X for steer).</i>
90-
91-
@author Bartek Drozdz
92-
93-
94-
95-
96-
###Break modifier
97-
98-
Allow to break a mesh
99-
100-
@author Bartek Drozdz
101-
102-
103-
104-
105-
###Noise modifier
106-
107-
Randomly displaces each vertex in all 3 axes
108-
109-
110-
111-
112-
113-
###DisplaceMap (BitmapDisplacement) Modifier
114-
115-
Displaces vertices based on RGB values of bitmapData pixels.
116-
117-
BitmapDisplacement is inspired by both the AS3 built-in DisplacementMapFilter. It allows
118-
to use color values for each channels of a bitmap to modify the position of vertices in a mesh.
119-
120-
The displacement takes place along the cardinal axes, and each axis is mapped to a
121-
channel in the bitmap: X for Red, Y for Green and Z for Blue.
122-
123-
@author Bartek Drozdz
124-
125-
126-
127-
128-
###Perlin modifier
129-
130-
Displaces vertices based on a perlin/simplex noise source.
131-
132-
Generates perlin/simplex noise source and displaces vertices
133-
based on the value of each point of the noise map.
134-
135-
@author Bartek Drozdz
136-
137-
@uses: https://github.com/josephg/noisejs for JavaScript
138-
1+
2+
* ###Pivot modifier
3+
*
4+
* Allows to move the pivot point of a 3D mesh.
5+
*
6+
* @author Bartek Drozdz
7+
*
8+
9+
10+
11+
* ###Bend modifier
12+
*
13+
* Bends an object along an axis.
14+
*
15+
* @author Bartek Drozdz
16+
*
17+
18+
19+
20+
* ###Bloat modifier
21+
*
22+
* Bloats a mesh by forcing vertices out of specified sphere
23+
*
24+
* @author makc
25+
*
26+
27+
28+
29+
* ###Twist modifier
30+
*
31+
* Twist mesh along an axis
32+
* Adapted from the Twist modifier for PV3D
33+
*
34+
35+
36+
37+
* ###Skew modifier
38+
*
39+
* Skew mesh along an axis
40+
*
41+
* @author Bartek Drozdz
42+
*
43+
44+
45+
46+
* ###Taper modifier
47+
*
48+
* The taper modifier displaces the vertices on two axes proportionally to their position on the third axis.
49+
*
50+
* @author Bartek Drozdz
51+
*
52+
53+
54+
55+
* ###Wheel modifier
56+
*
57+
* Use it with vehicle models for wheels.
58+
*
59+
* The usual problem with a 3d wheel in a vahicle is that it is
60+
* supposed to turn (steer) and roll in the same time.
61+
* So, this code:
62+
*
63+
* ```javascript
64+
* wheel.rotationY = 10; // Steer 10deg to the left
65+
* wheel.rotationZ +- 5; // Roll with a speed of 5
66+
* ```
67+
* This will make the wheel roll incorectly.
68+
*
69+
* A usual way to solve this problem is to put the wheel in another DisplayObject3D/Mesh,
70+
* turn the parent and roll the child, like that:
71+
* ```javascript
72+
* steer.rotationY = 10; // Steer 10deg to the left
73+
* steer.wheel.rotationZ +- 5; // Roll with a speed of 5
74+
* ```
75+
* That will make the wheel behave correctly. But it can be uncomfortanble to apply, especially
76+
* to imported complex Collada models.
77+
*
78+
* The Wheel modifier elegantly solves this problem by doind the proper math in order to steer and roll
79+
* a single mesh at the same time. The only thing you need to do is to specify a steer vector and
80+
* roll vector - usually it will be 2 of the cardinal axes. The default value is:
81+
*
82+
* * steer - along the Y axis / new Vector3(0, 1, 0)</li>
83+
* * roll - along the Z axis / new Vector3(0, 0, 1)</li>
84+
*
85+
*
86+
* It should work with most car models imported from 3D editors as this is the natural position of a wheel.
87+
*
88+
* <i>Please note, that Papervision primitive cylinder, which may also be used as wheel, will require different axes
89+
* (Y for roll and Z or X for steer).</i>
90+
*
91+
* @author Bartek Drozdz
92+
*
93+
94+
95+
96+
* ###Break modifier
97+
*
98+
* Allow to break a mesh
99+
*
100+
* @author Bartek Drozdz
101+
*
102+
103+
104+
105+
* ###Noise modifier
106+
*
107+
* Randomly displaces each vertex in all 3 axes
108+
*
109+
*
110+
111+
112+
113+
* ###DisplaceMap (BitmapDisplacement) Modifier
114+
*
115+
* Displaces vertices based on RGB values of bitmapData pixels.
116+
*
117+
* BitmapDisplacement is inspired by both the AS3 built-in DisplacementMapFilter. It allows
118+
* to use color values for each channels of a bitmap to modify the position of vertices in a mesh.
119+
*
120+
* The displacement takes place along the cardinal axes, and each axis is mapped to a
121+
* channel in the bitmap: X for Red, Y for Green and Z for Blue.
122+
*
123+
* @author Bartek Drozdz
124+
*
125+
126+
127+
128+
* ###Perlin modifier
129+
*
130+
* Displaces vertices based on a perlin/simplex noise source.
131+
*
132+
* Accepts a perlin/simplex noise data (with width and height information) and displaces vertices
133+
* based on the value of each point of the noise map.
134+
*
135+
* @author Bartek Drozdz
136+
*
137+
* @uses: https://github.com/josephg/noisejs for JavaScript
138+
*

config.custom beeld.config

+11-12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
###################################################
77

88
plugins =[{}]
9+
# include 'minify' plugin from plugins folder
10+
"minify" = "!plg:minify"
911
# include 'doc' plugin from plugins folder
1012
"doc" = "!plg:doc"
1113
@
@@ -29,19 +31,15 @@ tasks =[{}]
2931
./src/math/Matrix.js
3032
./src/math/Vector3.js
3133
./src/math/Matrix4.js
34+
./src/math/List.js
3235

33-
./src/core/WorkerInterface.js
3436
./src/core/VertexProxy.js
3537
./src/core/FaceProxy.js
3638
./src/core/MeshProxy.js
3739
./src/core/Modifier.js
3840
./src/core/Factory.js
3941
./src/core/ModifierStack.js
4042

41-
# 3rd-party
42-
# https://github.com/josephg/noisejs
43-
./src/3rd-party/perlin.js
44-
4543
# modifiers
4644
./src/modifiers/Pivot.js
4745
./src/modifiers/Bend.js
@@ -60,6 +58,11 @@ tasks =[{}]
6058
./src/plugins/Three/Mesh.js
6159
./src/plugins/Three/Library.js
6260

61+
# Support for OSG.js
62+
./src/plugins/OSG/Vertex.js
63+
./src/plugins/OSG/Mesh.js
64+
./src/plugins/OSG/Library.js
65+
6366
# Support for J3D
6467
./src/plugins/J3D/Vertex.js
6568
./src/plugins/J3D/Mesh.js
@@ -94,7 +97,7 @@ tasks =[{}]
9497
"@@MODULE_NAME@@" = "MOD3"
9598
"@@MODULE_DEPENDENCIES@@" = "[ ['Classy'], ['./classy.js'] ]"
9699
"@@MODULE_ARGUMENTS@@" = "Classy"
97-
"@@VERSION@@" = "0.4.1"
100+
"@@VERSION@@" = "0.5.0"
98101
"@@DEPENDENCIES@@" = "@dependencies: Classy.js"
99102
"@@USE_STRICT@@" = '"use strict";'
100103

@@ -150,19 +153,15 @@ tasks =[{}]
150153
./src/math/Matrix.js
151154
./src/math/Vector3.js
152155
./src/math/Matrix4.js
156+
./src/math/List.js
153157

154-
./src/core/WorkerInterface.js
155158
./src/core/VertexProxy.js
156159
./src/core/FaceProxy.js
157160
./src/core/MeshProxy.js
158161
./src/core/Modifier.js
159162
./src/core/Factory.js
160163
./src/core/ModifierStack.js
161164

162-
# 3rd-party
163-
# https://github.com/josephg/noisejs
164-
./src/3rd-party/perlin.js
165-
166165
# modifiers
167166
./src/modifiers/Pivot.js
168167
./src/modifiers/Bend.js
@@ -195,7 +194,7 @@ tasks =[{}]
195194
"@@MODULE_NAME@@" = "MOD3"
196195
"@@MODULE_DEPENDENCIES@@" = "[ ['Classy'], ['./classy.js'] ]"
197196
"@@MODULE_ARGUMENTS@@" = "Classy"
198-
"@@VERSION@@" = "0.4.1"
197+
"@@VERSION@@" = "0.5.0"
199198
"@@DEPENDENCIES@@" = "@dependencies: Classy.js"
200199
"@@USE_STRICT@@" = '"use strict";'
201200

build-bundle.bat

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ REM #
88
REM ###################################################
99

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

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

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

build-three.bat

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ REM #
88
REM ###################################################
99

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

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

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

build.bat

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ REM #
88
REM ###################################################
99

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

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

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

0 commit comments

Comments
 (0)