11declare namespace effekseer {
22
33 /**
4- * Initialize Effekseer.js.
5- * This function must be called at first if use WebAssembly
6- * @param {string } path A file of webassembply
7- * @param {function= } onload A function that is called at loading complete
8- * @param {function= } onerror A function that is called at loading error.
9- */
4+ * Initialize Effekseer.js.
5+ * This function must be called at first if use WebAssembly
6+ * @param {string } path A file of webassembply
7+ * @param {function= } onload A function that is called at loading complete
8+ * @param {function= } onerror A function that is called at loading error.
9+ */
1010 export function initRuntime ( path , onload , onerror ) ;
1111
1212 /**
13- * Create a context to render in multiple scenes
14- * @returns {EffekseerContext } context
15- */
13+ * Create a context to render in multiple scenes
14+ * @returns {EffekseerContext } context
15+ */
1616 export function createContext ( ) : EffekseerContext ;
1717
1818 /**
19- * Release specified context. After that, don't touch a context
20- * @param {EffekseerContext } context context
21- */
19+ * Release specified context. After that, don't touch a context
20+ * @param {EffekseerContext } context context
21+ */
2222 export function releaseContext ( context : EffekseerContext ) ;
2323
2424 /**
25- * Initialize graphics system.
26- * @param {WebGLRenderingContext } webglContext WebGL Context
27- * @param {object } settings Some settings with Effekseer initialization
28- */
29- export function init ( webglContext , settings ?: object ) ;
25+ * Initialize graphics system.
26+ * @param {WebGLRenderingContext } webglContext WebGL Context
27+ * @param {object } settings Some settings with Effekseer initialization
28+ */
29+ export function init ( webglContext , settings ?: Record < string , unknown > ) ;
3030
3131 /**
3232 * Advance frames.
3333 * @param {number= } deltaFrames number of advance frames
3434 */
35- export function update ( deltaFrames ? : number ) ;
35+ export function update ( deltaFrames ? : number ) ;
3636
3737 /**
3838 * Main rendering.
@@ -109,12 +109,12 @@ declare namespace effekseer {
109109 * @param {function= } onerror A function that is called at loading error. First argument is a message. Second argument is an url.
110110 * @returns {EffekseerEffect } The effect data
111111 */
112- export function loadEffect ( path : string , scale ? : number , onload ? , onerror ? ) : EffekseerEffect ;
112+ export function loadEffect ( path : string , scale ? : number , onload ? , onerror ? ) : EffekseerEffect ;
113113
114114 /**
115- * Release the specified effect. Don't touch the instance of effect after released.
116- * @param {EffekseerEffect } effect The loaded effect
117- */
115+ * Release the specified effect. Don't touch the instance of effect after released.
116+ * @param {EffekseerEffect } effect The loaded effect
117+ */
118118 export function releaseEffect ( effect : EffekseerEffect ) ;
119119
120120 /**
@@ -139,23 +139,23 @@ declare namespace effekseer {
139139 export function setResourceLoader ( loader ) ;
140140
141141 /**
142- * Get whether VAO is supported
143- */
142+ * Get whether VAO is supported
143+ */
144144 export function isVertexArrayObjectSupported ( ) ;
145145
146146 export class EffekseerContext {
147147 /**
148- * Initialize graphics system.
149- * @param {WebGLRenderingContext } webglContext WebGL Context
150- * @param {object } settings Some settings with Effekseer initialization
151- */
152- init ( webglContext , settings ?: object ) ;
148+ * Initialize graphics system.
149+ * @param {WebGLRenderingContext } webglContext WebGL Context
150+ * @param {Record<string, unknown> } settings Some settings with Effekseer initialization
151+ */
152+ init ( webglContext : WebGLRenderingContextBase , settings ?: Record < string , unknown > ) : void ;
153153
154154 /**
155155 * Advance frames.
156156 * @param {number= } deltaFrames number of advance frames
157157 */
158- update ( deltaFrames ?: number ) ;
158+ update ( deltaFrames ?: number ) : void ;
159159
160160 /**
161161 * Main rendering.
@@ -233,12 +233,12 @@ declare namespace effekseer {
233233 * @param {function= } redirect A function to redirect a path. First argument is an url and return redirected url.
234234 * @returns {EffekseerEffect } The effect data
235235 */
236- loadEffect ( path : string , scale ? : number , onload ? , onerror ? , redirect ? ) : EffekseerEffect ;
236+ loadEffect ( path : string , scale ? : number , onload ? , onerror ? , redirect ? ) : EffekseerEffect ;
237237
238238 /**
239- * Release the specified effect. Don't touch the instance of effect after released.
240- * @param {EffekseerEffect } effect The loaded effect
241- */
239+ * Release the specified effect. Don't touch the instance of effect after released.
240+ * @param {EffekseerEffect } effect The loaded effect
241+ */
242242 releaseEffect ( effect : EffekseerEffect ) ;
243243
244244 /**
@@ -263,8 +263,8 @@ declare namespace effekseer {
263263 setResourceLoader ( loader ) ;
264264
265265 /**
266- * Get whether VAO is supported
267- */
266+ * Get whether VAO is supported
267+ */
268268 isVertexArrayObjectSupported ( ) ;
269269
270270 /**
@@ -280,7 +280,7 @@ declare namespace effekseer {
280280 * get paths to color images
281281 * @returns {Array<string> } paths to color images
282282 */
283- getColorImagePaths ( ) : Array < string > ;
283+ getColorImagePaths ( ) : Array < string > ;
284284 }
285285
286286 export class EffekseerHandle {
@@ -343,7 +343,7 @@ declare namespace effekseer {
343343 * @param {number } index slot index
344344 * @returns {number } value
345345 */
346- getDynamicInput ( index ) : number ;
346+ getDynamicInput ( index ) : number ;
347347
348348 /**
349349 * specfiy a dynamic parameter, which changes effect parameters dynamically while playing
@@ -375,4 +375,4 @@ declare namespace effekseer {
375375
376376declare module "effekseer" {
377377 export = effekseer ;
378- }
378+ }
0 commit comments