Skip to content

Commit

Permalink
fix: engine api with sdk6 deprecated apis, and add isServer (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuruk-mm authored Oct 4, 2023
1 parent 7a53cd6 commit 95c8cfc
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions rust/decentraland-godot-lib/src/dcl/js/js_modules/EngineApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,37 @@ module.exports.crdtSendToRenderer = async function (messages) {
};
}

module.exports.sendBatch = async function () {
return { events: [] }
}

module.exports.crdtGetState = async function () {
const data = (await Deno.core.opAsync("op_crdt_recv_from_renderer")).map((item) => new Uint8Array(item))

return {
data: data
};
}


module.exports.isServer = async function() {
return {
isServer: false
}
}

/**
* @deprecated this is an SDK6 API.
* This function subscribe to an event from the renderer
*/
module.exports.subscribe = async function(message) {}

/**
* @deprecated this is an SDK6 API.
* This function unsubscribe to an event from the renderer
*/
module.exports.unsubscribe = async function(message) {}

/**
* @deprecated this is an SDK6 API.
* This function polls events from the renderer
*/
module.exports.sendBatch = async function() {
return { events: [] }
}

0 comments on commit 95c8cfc

Please sign in to comment.