Import all files in src/
Specify a name and a script into effekseer_native.wasm
Add entities
Add EffekseerSystem to an entity. Set the Entity of the camera to the Camera attribute.
Add EffekseerEmitter to an entity
Specify efkefc file.
Effect can be played with this code
this.entity.script.effekseerEmitter.play();
Please look at PlayCanvas Project in a detail.
- Rename
effekseer.wasm -> effekseer_native.wasm
- Fix code
Get a module directly
var _initalize_wasm = function _initalize_wasm(url) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = "arraybuffer";
xhr.onload = function () {
var params = {};
params.wasmBinary = xhr.response;
// params.onRuntimeInitialized = _onRuntimeInitialized;
Module = window["effekseer_native"];
_onRuntimeInitialized();
};
xhr.onerror = function () {
_onerrorAssembly();
};
xhr.send(null);
};