File tree 21 files changed +45
-40
lines changed 21 files changed +45
-40
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " planck " : patch
3
+ ---
4
+
5
+ Mark serialize and deserialize functions as @hidden instead of @internal
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export class ChainShape extends Shape {
82
82
}
83
83
}
84
84
85
- /** @internal */
85
+ /** @hidden */
86
86
_serialize ( ) : object {
87
87
const data = {
88
88
type : this . m_type ,
@@ -102,7 +102,7 @@ export class ChainShape extends Shape {
102
102
return data ;
103
103
}
104
104
105
- /** @internal */
105
+ /** @hidden */
106
106
static _deserialize ( data : any , fixture : any , restore : any ) : ChainShape {
107
107
const vertices : Vec2 [ ] = [ ] ;
108
108
if ( data . vertices ) {
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export class CircleShape extends Shape {
68
68
}
69
69
}
70
70
71
- /** @internal */
71
+ /** @hidden */
72
72
_serialize ( ) : object {
73
73
return {
74
74
type : this . m_type ,
@@ -78,7 +78,7 @@ export class CircleShape extends Shape {
78
78
} ;
79
79
}
80
80
81
- /** @internal */
81
+ /** @hidden */
82
82
static _deserialize ( data : any ) : CircleShape {
83
83
return new CircleShape ( data . p , data . radius ) ;
84
84
}
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export class EdgeShape extends Shape {
73
73
this . m_hasVertex3 = false ;
74
74
}
75
75
76
- /** @internal */
76
+ /** @hidden */
77
77
_serialize ( ) : object {
78
78
return {
79
79
type : this . m_type ,
@@ -88,7 +88,7 @@ export class EdgeShape extends Shape {
88
88
} ;
89
89
}
90
90
91
- /** @internal */
91
+ /** @hidden */
92
92
static _deserialize ( data : any ) : EdgeShape {
93
93
const shape = new EdgeShape ( data . vertex1 , data . vertex2 ) ;
94
94
if ( shape . m_hasVertex0 ) {
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export class PolygonShape extends Shape {
74
74
}
75
75
}
76
76
77
- /** @internal */
77
+ /** @hidden */
78
78
_serialize ( ) : object {
79
79
return {
80
80
type : this . m_type ,
@@ -83,7 +83,7 @@ export class PolygonShape extends Shape {
83
83
} ;
84
84
}
85
85
86
- /** @internal */
86
+ /** @hidden */
87
87
static _deserialize ( data : any , fixture : any , restore : any ) : PolygonShape {
88
88
const vertices : Vec2 [ ] = [ ] ;
89
89
if ( data . vertices ) {
Original file line number Diff line number Diff line change @@ -63,15 +63,15 @@ export class Vec2 {
63
63
if ( _ASSERT ) Vec2 . assert ( this ) ;
64
64
}
65
65
66
- /** @internal */
66
+ /** @hidden */
67
67
_serialize ( ) : object {
68
68
return {
69
69
x : this . x ,
70
70
y : this . y
71
71
} ;
72
72
}
73
73
74
- /** @internal */
74
+ /** @hidden */
75
75
static _deserialize ( data : any ) : Vec2 {
76
76
const obj = Object . create ( Vec2 . prototype ) ;
77
77
obj . x = data . x ;
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export class Vec3 {
61
61
if ( _ASSERT ) Vec3 . assert ( this ) ;
62
62
}
63
63
64
- /** @internal */
64
+ /** @hidden */
65
65
_serialize ( ) : object {
66
66
return {
67
67
x : this . x ,
@@ -70,7 +70,7 @@ export class Vec3 {
70
70
} ;
71
71
}
72
72
73
- /** @internal */
73
+ /** @hidden */
74
74
static _deserialize ( data : any ) : Vec3 {
75
75
const obj = Object . create ( Vec3 . prototype ) ;
76
76
obj . x = data . x ;
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ export class Body {
288
288
}
289
289
}
290
290
291
- /** @internal */
291
+ /** @hidden */
292
292
_serialize ( ) : object {
293
293
const fixtures = [ ] ;
294
294
for ( let f = this . m_fixtureList ; f ; f = f . m_next ) {
@@ -305,7 +305,7 @@ export class Body {
305
305
} ;
306
306
}
307
307
308
- /** @internal */
308
+ /** @hidden */
309
309
static _deserialize ( data : any , world : any , restore : any ) : Body {
310
310
const body = new Body ( world , data ) ;
311
311
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ export class Fixture {
190
190
body . resetMassData ( ) ;
191
191
}
192
192
193
- /** @internal */
193
+ /** @hidden */
194
194
_serialize ( ) : object {
195
195
return {
196
196
friction : this . m_friction ,
@@ -206,7 +206,7 @@ export class Fixture {
206
206
} ;
207
207
}
208
208
209
- /** @internal */
209
+ /** @hidden */
210
210
static _deserialize ( data : any , body : any , restore : any ) : Fixture {
211
211
const shape = restore ( Shape , data . shape ) ;
212
212
const fixture = shape && new Fixture ( body , shape , data ) ;
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ export class World {
190
190
this . m_step_callback = [ ] ;
191
191
}
192
192
193
- /** @internal */
193
+ /** @hidden */
194
194
_serialize ( ) : object {
195
195
const bodies = [ ] ;
196
196
const joints = [ ] ;
@@ -213,7 +213,7 @@ export class World {
213
213
} ;
214
214
}
215
215
216
- /** @internal */
216
+ /** @hidden */
217
217
static _deserialize ( data : any , context : any , restore : any ) : World {
218
218
if ( ! data ) {
219
219
return new World ( ) ;
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export class DistanceJoint extends Joint {
164
164
// = invMass1 + invI1 * cross(r1, u)^2 + invMass2 + invI2 * cross(r2, u)^2
165
165
}
166
166
167
- /** @internal */
167
+ /** @hidden */
168
168
_serialize ( ) : object {
169
169
return {
170
170
type : this . m_type ,
@@ -185,7 +185,7 @@ export class DistanceJoint extends Joint {
185
185
} ;
186
186
}
187
187
188
- /** @internal */
188
+ /** @hidden */
189
189
static _deserialize ( data : any , world : any , restore : any ) : DistanceJoint {
190
190
data = { ...data } ;
191
191
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ export class FrictionJoint extends Joint {
137
137
// K = invI1 + invI2
138
138
}
139
139
140
- /** @internal */
140
+ /** @hidden */
141
141
_serialize ( ) : object {
142
142
return {
143
143
type : this . m_type ,
@@ -153,7 +153,7 @@ export class FrictionJoint extends Joint {
153
153
} ;
154
154
}
155
155
156
- /** @internal */
156
+ /** @hidden */
157
157
static _deserialize ( data : any , world : any , restore : any ) : FrictionJoint {
158
158
data = { ...data } ;
159
159
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -232,7 +232,7 @@ export class GearJoint extends Joint {
232
232
// K = J * invM * JT = invMass + invI * cross(r, ug)^2
233
233
}
234
234
235
- /** @internal */
235
+ /** @hidden */
236
236
_serialize ( ) : object {
237
237
return {
238
238
type : this . m_type ,
@@ -248,7 +248,7 @@ export class GearJoint extends Joint {
248
248
} ;
249
249
}
250
250
251
- /** @internal */
251
+ /** @hidden */
252
252
static _deserialize ( data : any , world : any , restore : any ) : GearJoint {
253
253
data = { ...data } ;
254
254
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ export class MotorJoint extends Joint {
141
141
// K = invI1 + invI2
142
142
}
143
143
144
- /** @internal */
144
+ /** @hidden */
145
145
_serialize ( ) : object {
146
146
return {
147
147
type : this . m_type ,
@@ -158,7 +158,7 @@ export class MotorJoint extends Joint {
158
158
} ;
159
159
}
160
160
161
- /** @internal */
161
+ /** @hidden */
162
162
static _deserialize ( data : any , world : any , restore : any ) : MotorJoint {
163
163
data = { ...data } ;
164
164
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ export class MouseJoint extends Joint {
160
160
// w k % (rx i + ry j) = w * (-ry i + rx j)
161
161
}
162
162
163
- /** @internal */
163
+ /** @hidden */
164
164
_serialize ( ) : object {
165
165
return {
166
166
type : this . m_type ,
@@ -177,7 +177,7 @@ export class MouseJoint extends Joint {
177
177
} ;
178
178
}
179
179
180
- /** @internal */
180
+ /** @hidden */
181
181
static _deserialize ( data : any , world : any , restore : any ) : MouseJoint {
182
182
data = { ...data } ;
183
183
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ export class PrismaticJoint extends Joint {
272
272
// df = f2 - f1
273
273
}
274
274
275
- /** @internal */
275
+ /** @hidden */
276
276
_serialize ( ) : object {
277
277
return {
278
278
type : this . m_type ,
@@ -294,7 +294,7 @@ export class PrismaticJoint extends Joint {
294
294
} ;
295
295
}
296
296
297
- /** @internal */
297
+ /** @hidden */
298
298
static _deserialize ( data : any , world : any , restore : any ) : PrismaticJoint {
299
299
data = { ...data } ;
300
300
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export class PulleyJoint extends Joint {
163
163
// cross(r2, u2)^2)
164
164
}
165
165
166
- /** @internal */
166
+ /** @hidden */
167
167
_serialize ( ) : object {
168
168
return {
169
169
type : this . m_type ,
@@ -181,7 +181,7 @@ export class PulleyJoint extends Joint {
181
181
} ;
182
182
}
183
183
184
- /** @internal */
184
+ /** @hidden */
185
185
static _deserialize ( data : any , world : any , restore : any ) : PulleyJoint {
186
186
data = { ...data } ;
187
187
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ export class RevoluteJoint extends Joint {
224
224
// K = invI1 + invI2
225
225
}
226
226
227
- /** @internal */
227
+ /** @hidden */
228
228
_serialize ( ) : object {
229
229
return {
230
230
type : this . m_type ,
@@ -245,7 +245,7 @@ export class RevoluteJoint extends Joint {
245
245
} ;
246
246
}
247
247
248
- /** @internal */
248
+ /** @hidden */
249
249
static _deserialize ( data : any , world : any , restore : any ) :RevoluteJoint {
250
250
data = { ...data } ;
251
251
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ export class RopeJoint extends Joint {
139
139
// = invMassA + invIA * cross(rA, u)^2 + invMassB + invIB * cross(rB, u)^2
140
140
}
141
141
142
- /** @internal */
142
+ /** @hidden */
143
143
_serialize ( ) : object {
144
144
return {
145
145
type : this . m_type ,
@@ -153,7 +153,7 @@ export class RopeJoint extends Joint {
153
153
} ;
154
154
}
155
155
156
- /** @internal */
156
+ /** @hidden */
157
157
static _deserialize ( data : any , world : any , restore : any ) : RopeJoint {
158
158
data = { ...data } ;
159
159
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export class WeldJoint extends Joint {
163
163
// K = invI1 + invI2
164
164
}
165
165
166
- /** @internal */
166
+ /** @hidden */
167
167
_serialize ( ) : object {
168
168
return {
169
169
type : this . m_type ,
@@ -180,7 +180,7 @@ export class WeldJoint extends Joint {
180
180
} ;
181
181
}
182
182
183
- /** @internal */
183
+ /** @hidden */
184
184
static _deserialize ( data : any , world : any , restore : any ) : WeldJoint {
185
185
data = { ...data } ;
186
186
data . bodyA = restore ( Body , data . bodyA , world ) ;
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ export class WheelJoint extends Joint {
218
218
// J = [0 0 -1 0 0 1]
219
219
}
220
220
221
- /** @internal */
221
+ /** @hidden */
222
222
_serialize ( ) : object {
223
223
return {
224
224
type : this . m_type ,
@@ -238,7 +238,7 @@ export class WheelJoint extends Joint {
238
238
} ;
239
239
}
240
240
241
- /** @internal */
241
+ /** @hidden */
242
242
static _deserialize ( data : any , world : any , restore : any ) : WheelJoint {
243
243
data = { ...data } ;
244
244
data . bodyA = restore ( Body , data . bodyA , world ) ;
You can’t perform that action at this time.
0 commit comments