Skip to content

Commit c5a3abd

Browse files
committed
v.1.0.0
1 parent 44c56db commit c5a3abd

86 files changed

Lines changed: 4183 additions & 1944 deletions

Some content is hidden

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

api-reference.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

2-
### Pivot modifier
2+
### Pivot modifier
33

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

66
@author Bartek Drozdz
7-
7+
88

99

1010

@@ -17,122 +17,122 @@ Bends an object along an axis.
1717

1818

1919

20-
### Bloat modifier
20+
### Bloat modifier
2121

2222
Bloats a mesh by forcing vertices out of specified sphere
2323

2424
@author makc
25-
2625

2726

2827

29-
### Twist modifier
28+
29+
### Twist modifier
3030

3131
Twist mesh along an axis
3232
Adapted from the Twist modifier for PV3D
3333

3434

3535

3636

37-
### Skew modifier
37+
### Skew modifier
3838

3939
Skew mesh along an axis
4040

4141
@author Bartek Drozdz
42-
4342

4443

4544

46-
### Taper modifier
45+
46+
### Taper modifier
4747

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

5050
@author Bartek Drozdz
51-
5251

5352

5453

55-
### Wheel modifier
54+
55+
### Wheel modifier
5656

5757
Use it with vehicle models for wheels.
5858

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.
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.
6161
So, this code:
6262

6363
```javascript
6464
wheel.rotationY = 10; // Steer 10deg to the left
65-
wheel.rotationZ +- 5; // Roll with a speed of 5
65+
wheel.rotationZ += 5; // Roll with a speed of 5
6666
```
6767
This will make the wheel roll incorectly.
6868

69-
A usual way to solve this problem is to put the wheel in another DisplayObject3D/Mesh,
69+
A usual way to solve this problem is to put the wheel in another DisplayObject3D/Mesh,
7070
turn the parent and roll the child, like that:
7171
```javascript
7272
steer.rotationY = 10; // Steer 10deg to the left
73-
steer.wheel.rotationZ +- 5; // Roll with a speed of 5
73+
steer.wheel.rotationZ += 5; // Roll with a speed of 5
7474
```
7575
That will make the wheel behave correctly. But it can be uncomfortanble to apply, especially
7676
to imported complex Collada models.
7777

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
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
8080
roll vector - usually it will be 2 of the cardinal axes. The default value is:
8181

82-
* steer - along the Y axis / new Vector3(0, 1, 0)</li>
83-
* roll - along the Z axis / new Vector3(0, 0, 1)</li>
82+
* steer - along the Y axis / new Vector3(0, 1, 0)
83+
* roll - along the Z axis / new Vector3(0, 0, 1)
8484

8585

8686
It should work with most car models imported from 3D editors as this is the natural position of a wheel.
8787

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>
88+
*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).*
9090

9191
@author Bartek Drozdz
9292

9393

9494

9595

96-
### Break modifier
96+
### Break modifier
9797

9898
Allow to break a mesh
9999

100100
@author Bartek Drozdz
101-
102101

103102

104103

105-
### Noise modifier
104+
105+
### Noise modifier
106106

107107
Randomly displaces each vertex in all 3 axes
108108

109-
110109

111110

112111

113-
### DisplaceMap (BitmapDisplacement) Modifier
114112

115-
Displaces vertices based on RGB values of bitmapData pixels.
113+
### DisplaceMap (BitmapDisplacement) Modifier
114+
115+
Displaces vertices based on RGB values of bitmapData pixels.
116116

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

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

123123
@author Bartek Drozdz
124124

125125

126126

127127

128-
### Perlin modifier
128+
### Perlin modifier
129129

130130
Displaces vertices based on a perlin/simplex noise source.
131131

132132
Accepts a perlin/simplex noise data (with width and height information) and displaces vertices
133133
based on the value of each point of the noise map.
134-
134+
135135
@author Bartek Drozdz
136136

137137
@uses: https://github.com/josephg/noisejs for JavaScript
138-
138+

beeld.config

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
###################################################
77

88
settings ={}
9+
Xpresion = "Xpresion::"
910
RegExp = "RegExp::"
1011
@
1112

@@ -21,8 +22,7 @@ tasks =[{}]
2122
build =[{}]
2223

2324
src =[]
24-
25-
!tpl:umd-header-deps.tpl.js # include a umd-header template
25+
./src/header.js
2626

2727
# core
2828
./src/MOD3.js
@@ -74,21 +74,16 @@ tasks =[{}]
7474
## Support for Pre3D
7575
#./src/plugins/Pre3D/Pre3D.js
7676

77-
!tpl:umd-footer.tpl.js # include a umd-footer template
77+
./src/footer.js
7878

7979
@
8080

8181
# extract header from this file
82-
header = ./src/MOD3.js
82+
header = ./src/header.js
8383

8484
replace =[{}]
85-
86-
"@@ROOT@@" = "this"
87-
"@@MODULE@@" = "MOD3"
88-
"@@DEPS@@" = "Classy"
89-
"@@VERSION@@" = "0.6.0"
90-
"@@USE_STRICT@@" = '"use strict";'
91-
85+
"@@VERSION@@" = "1.0.0"
86+
"@@DATE@@" = Xpresion::date("Y-m-d H:i:s")
9287
@
9388

9489
# extract documentation
@@ -99,44 +94,33 @@ tasks =[{}]
9994
"output" = "./api-reference.md"
10095
@
10196

97+
out = ./build/mod3.js
98+
@
99+
100+
minify =[{}]
101+
102+
src =[]
103+
./build/mod3.js
104+
@
105+
102106
# Minify the Package (map of lists)
103107
minify ={}
104-
105108
# Options for Node UglifyJS Compiler (if used, default), (mangle and compress)
106109
uglifyjs =[]
107110
-m -c
108111
@
109-
112+
110113
# Options for Java Closure Compiler (if used)
111114
closure =[]
112115
"--language_in=ECMASCRIPT5_STRICT"
113116
@
114-
117+
115118
# Options for Java YUI Compressor Compiler (if used)
116119
yui =[]
117120
--preserve-semi
118121
@
119-
120122
@
121-
122-
out = ./build/mod3.min.js
123-
124-
@
125-
126-
127-
bundle =[{}]
128-
129-
bundle =[]
130-
131-
# bundle-in external dependencies
132-
./build/classy.js
133-
./build/mod3.min.js
134-
135-
@
136-
137-
138-
out = ./build/mod3.bundle.js
139123

124+
out = ./build/mod3.min.js
140125
@
141-
142126
@

build-bundle.bat renamed to build-min.bat

Lines changed: 3 additions & 3 deletions
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 ".\beeld.config" --tasks bundle
11+
REM python %BUILDTOOLS%\Beeld.py --config ".\beeld.config" --tasks minify
1212

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

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

build/MOD3.min.js

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/classy.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

build/mod3.bundle.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)