- Joined
- Oct 11, 2015
- Messages
- 424
- Reaction score
- 171
- First Language
- Dutch
- Primarily Uses
- RMMV
function cloneObject(x){ return Object.create( x ); // still doesn't work...// return Object.assign({}, x); // does not work...// Afaik JQuery is not supported in RPG Maker so all those solutions are a no-go anyway.};I also found this:
Object.extend = function(destination, source) { for (var property in source) destination[property] = source[property]; return destination;};// ERROR: caller, callee and arguments may not be accessed on strict mode.Object.deepExtend = function(destination, source) { for (var property in source) { if (typeof source[property] === "object" && source[property] !== null ) { destination[property] = destination[property] || {}; arguments.callee(destination[property], source[property]); } else { destination[property] = source[property]; } } return destination;};// ERROR: caller, callee and arguments may not be accessed on strict mode.But that one throws an error when writing in strict mode...
How can I clone a bitmap...
Object.extend = function(destination, source) { for (var property in source) destination[property] = source[property]; return destination;};// ERROR: caller, callee and arguments may not be accessed on strict mode.Object.deepExtend = function(destination, source) { for (var property in source) { if (typeof source[property] === "object" && source[property] !== null ) { destination[property] = destination[property] || {}; arguments.callee(destination[property], source[property]); } else { destination[property] = source[property]; } } return destination;};// ERROR: caller, callee and arguments may not be accessed on strict mode.But that one throws an error when writing in strict mode...
How can I clone a bitmap...
Last edited by a moderator:
