@@ -63,22 +63,14 @@ function App() {
63
63
64
64
useEffect ( ( ) => {
65
65
if ( isRendering ) {
66
- console . log ( isRendering ) ;
67
66
collectingRenderData ( ) ;
68
67
}
69
68
} , [ videoCurrentTime , isRendering ] ) ;
70
69
71
70
useEffect ( ( ) => {
72
71
const newTimeline = [ ] ;
73
72
74
- // console.log("INSIDE USE EFFECTS")
75
- // console.log(textElements)
76
-
77
73
if ( animations ) {
78
-
79
- // console.log(animations)
80
-
81
-
82
74
animations . forEach ( ( animeObj ) => {
83
75
84
76
// Wrapper to get React variables, which is out of Anime.js scope
@@ -104,7 +96,6 @@ function App() {
104
96
const newTextElements = [ ...textElements ] ;
105
97
newTextElements . push ( newTextElement ) ;
106
98
setTextElements ( newTextElements ) ;
107
- // console.log(newTextElements)
108
99
} ;
109
100
110
101
// Hidden flag for TextInspector
@@ -114,7 +105,6 @@ function App() {
114
105
115
106
const onHandleTextElementsChange = ( newValue ) => {
116
107
setTextElements ( newValue ) ;
117
- // console.log(textElements)
118
108
} ;
119
109
120
110
// Getting pointer to text object
@@ -132,11 +122,8 @@ function App() {
132
122
const handleTextPosChange = ( event , data , id ) => {
133
123
const index = textElements . findIndex ( ( element ) => element . id === id ) ;
134
124
const newTextElements = [ ...textElements ] ;
135
- // console.log(data);
136
125
newTextElements [ index ] . posX = data . x ;
137
126
newTextElements [ index ] . posY = data . y ;
138
- // console.log(newTextElements[index].posX);
139
- // console.log(data);
140
127
141
128
setTextElements ( newTextElements ) ;
142
129
} ;
@@ -158,7 +145,6 @@ function App() {
158
145
const newTime = ( timelineRange . current . value / 100 ) * videoDuration . current ;
159
146
setVideoCurrentTime ( newTime ) ;
160
147
video . current . currentTime = newTime ;
161
- // console.log(convertTime(videoCurrentTime));
162
148
animationTimeline . forEach ( animation => {
163
149
animation . seek ( newTime * MILLISECONDS_PER_SECOND ) ;
164
150
} ) ;
@@ -194,7 +180,6 @@ function App() {
194
180
const textElement = textElements [ textElementIndex ] ;
195
181
const id = textElement . id ;
196
182
const keyframes = textElement . keyframes ;
197
- // console.log(keyframes);
198
183
const newAnimations = [ ...animations ] ;
199
184
let animationIndex = newAnimations . findIndex ( ( animation ) => animation . animeElementId === id ) ;
200
185
if ( animationIndex !== - 1 ) {
@@ -259,9 +244,6 @@ function App() {
259
244
260
245
const changeTextObjectProperties = ( textElementId , properties , latestTextElements ) => {
261
246
262
- // console.log("INSIDE CHANGE FUNC:");
263
- // console.log(latestTextElements);
264
-
265
247
const index = textElements . findIndex ( ( element ) => element . id === textElementId ) ;
266
248
const newTextElements = [ ...latestTextElements ] ;
267
249
@@ -291,11 +273,7 @@ function App() {
291
273
newTextElements [ index ] . strokeColor = strokeColor ;
292
274
newTextElements [ index ] . strokeThickness = strokeThickness ;
293
275
294
- // console.log(textColor);
295
-
296
276
setTextElements ( newTextElements ) ;
297
- // console.log("UPDATED TEXT ELEMENTS:");
298
- // console.log(newTextElements);
299
277
} ;
300
278
301
279
const onHandleFileChange = ( event ) => {
@@ -308,8 +286,6 @@ function App() {
308
286
309
287
const convertTime = ( timeInSeconds ) => {
310
288
311
- // console.log(timeInSeconds)
312
-
313
289
const milliseconds = ( timeInSeconds % 1 ) . toFixed ( 3 ) * 1000 ;
314
290
const seconds = Math . floor ( timeInSeconds % 60 ) ;
315
291
const minutes = Math . floor ( timeInSeconds / 60 ) ;
@@ -326,28 +302,16 @@ function App() {
326
302
} ;
327
303
328
304
const collectingRenderData = ( ) => {
329
- // console.log("INSIDE collecting render data");
330
305
setIsLoading ( true ) ;
331
306
332
- // console.log(video.current.videoWidth);
333
- // console.log(video.current.videoHeight);
334
-
335
307
const timeStep = 1 / VIDEO_FPS ;
336
308
337
- // console.log(textElements);
338
- //
339
- // console.log("VIDEO CURRENT TIME");
340
- // console.log(videoCurrentTime);
341
-
342
309
const nextRenderTime = Number ( ( videoCurrentTime + timeStep ) . toFixed ( 3 ) ) >= Number ( videoDuration . current . toFixed ( 3 ) ) ? videoDuration . current : Number ( ( videoCurrentTime + timeStep ) . toFixed ( 3 ) ) ; //Operations for correct float calculation
343
310
344
311
// Using for instead of forEach, because of eslint warning
345
312
for ( let i = 0 ; i < textElements . length ; i ++ ) {
346
313
const textElement = textElements [ i ] ;
347
314
348
- // console.log(textElement.posX);
349
- // console.log(textElement.posY);
350
-
351
315
framesData . current . push ( {
352
316
id : textElement . id ,
353
317
startTime : convertTime ( videoCurrentTime ) ,
@@ -370,8 +334,6 @@ function App() {
370
334
371
335
if ( Number ( videoCurrentTime ) === Number ( videoDuration . current ) ) {
372
336
setIsRender ( false ) ;
373
- console . log ( "START GENERATE app.js" ) ;
374
- console . log ( framesData . current ) ;
375
337
if ( framesData . current ) {
376
338
const downloadBlob = ASSGenerator ( video . current , framesData . current ) ;
377
339
tempDownloadLink . current . href = URL . createObjectURL ( downloadBlob ) ;
@@ -387,8 +349,6 @@ function App() {
387
349
const onHandleDownload = ( ) => {
388
350
tempDownloadLink . current . click ( ) ;
389
351
setIsLoading ( false ) ;
390
- console . log ( isLoading ) ;
391
- console . log ( isRendering ) ;
392
352
} ;
393
353
394
354
@@ -443,7 +403,6 @@ function App() {
443
403
onHandleTimeUpdate = { onHandleTimeUpdate }
444
404
onLoadedMetadata = { ( ) => {
445
405
videoDuration . current = video . current . duration
446
- console . log ( video . current . duration )
447
406
} }
448
407
videoSource = { videoSource }
449
408
/>
0 commit comments