Transaction ef3ece3b95edc2924de7045b3be9fe519527687e33f77716635b08a2bb0a58fb

1 Input
  • a2f29dbf829a7db5138a632c798b1e91421cdb43d24add79a0de38deeb1b2922:0
    OP_DATA_32(32) 117f692257b2331233b5705ce9c682be8719ff1b2b64cbca290bd6faeb54423e
    OP_CHECKSIG(172)
    OP_DATA_6(6) ä5EŠ
    OP_DROP(117)
    OP_0(0)
    OP_IF(99)
    OP_DATA_3(3) ord
    OP_DATA_1(1) 
    OP_DATA_15(15) text/javascript
    OP_0(0)
    OP_PUSHDATA2(77) function loadWorld() { document.getElementById('status').innerText = "Building.."; let assetsChunk = `const assets = [ new pc.Asset('base', 'texture', { url: '/content/dbb64a250ef86a6aa338a08d9fbf659b9e17119d6e30f8dc5c15aa274926bf5bi0' }), new pc.Asset('arrow', 'texture', { url: '/content/8656d26a274a3f0ec7ff46afe903accc15bab3e6df09400a16df472cbad82ac8i0' }), new pc.Asset('touch', 'script', { url: '/content/b4256950771021306e8bf82ec96d6980a58e62b0293face0173aad532108a4cfi0' }), new pc.Asset('pix
    OP_PUSHDATA2(77) elfont', 'font', { url: '/content/a1f5a259aab4651425b7e6869435fd6747eaf4d6b063d1971466d966841dd7b4i0|/content/f240d09b2f6177f1dcad189132e8c2ed64df38b0d2f381f70b8304e2850d3bf2i0' }), new pc.Asset('movement', 'script', { url: '/content/365e4365eeb315d9b5a6fdb2bfd75f49342a6512da2fea523dbb6bbc88b2ed17i0' }), new pc.Asset('colliders', 'script', { url: '/content/9e98f0c366464e6dec8c5069d8de83c938db9bc7c8e963b9e52189778da7f2c7i0' }), new pc.Asset('sky', 'script', { url: '/content/7b381ffe78f4f111820466fc5a9ae
    OP_PUSHDATA2(77) d554208ac7719f71431fefa78469ad85f18i0' }), new pc.Asset('shadowControl', 'script', { url: '/content/20a87bbf36f66a19710f19497290ff94c3aae87b893eb4c13b4da7ea1d8618a3i0' }), new pc.Asset('collisionPatch', 'script', { url: '/content/3c32abc7d6fd1cfeccbe6d70f436756f783d99ebbb02a8f09f4249b266da6985i0' }), new pc.Asset('renderer', 'script', { url: '/content/a2567e8733a1ca275c9128bb866f9786c3e1774514bce119d0dcb6ac74f85e29i0' }), new pc.Asset('screen', 'script', { url: '/content/f1dd37a1561d6593
    OP_PUSHDATA2(77) 5d052cc5da7a0d14a6db0a6242b8724d55d849a354fcace7i0' }), `; appTextures.forEach((asset) => { const { a, u } = asset; assetsChunk += ` new pc.Asset('${a}', 'texture', { url: '${u}' }),`; }); appModels.forEach((asset) => { const { a, u } = asset; assetsChunk += ` new pc.Asset('${a}', 'container', { url: '${u}' }),`; }); assetsChunk += "\n];"; let colorsChunk = ""; appColors.forEach(([materialName, color]) => { colorsChunk += ` const ${materialName} = new pc.StandardMateri
    OP_PUSHDATA2(77) al(); ${materialName}.diffuse = new pc.Color().fromString('${color}');`; }); let texturesChunk = ""; appMaterials.forEach(([textureName, assetName, tilingX, tilingY]) => { texturesChunk += ` const ${textureName} = new pc.StandardMaterial(); ${textureName}.diffuseMap = pc.app.assets.find('${assetName}').resource; ${textureName}.diffuseMapTiling = new pc.Vec2(${tilingX},${tilingY});`; }); let entitiesChunk = ""; appObjects.forEach((entityData) => { const [entityName, materialOrAsset, entityT
    OP_PUSHDATA2(77) ype, shape, posX, posY, posZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, cType, cFriction, cRestitution, cMass, cLinear, cAngular] = entityData; entitiesChunk += ` const ${entityName} = new pc.Entity(); ${entityName}.setPosition(${posX},${posY},${posZ}); ${entityName}.setLocalEulerAngles(${rotX},${rotY},${rotZ}); ${entityName}.setLocalScale(${scaleX},${scaleY},${scaleZ}); `; if (entityType === "r") { entitiesChunk += ` ${entityName}.addComponent('render', { type: '${shape}', }); ${e
    OP_PUSHDATA2(77) ntityName}.render.material = ${materialOrAsset}; `; } else if (entityType === "m") { entitiesChunk += ` ${entityName}.addComponent('model', { type: 'asset', asset: pc.app.assets.find('${materialOrAsset}').resource.model }); ${entityName}.cAsset = '${materialOrAsset}'; `; } entitiesChunk += ` ${entityName}.cType = '${cType}'; `; if (entityType === "r" && cType === "d") { entitiesChunk += ` ${entityName}.cFriction = ${cFriction}; ${entityName}.cRestitution = ${
    OP_PUSHDATA2(77) cRestitution}; ${entityName}.cMass = ${cMass}; ${entityName}.cLinear = ${cLinear}; ${entityName}.cAngular = ${cAngular}; `; } entitiesChunk += ` app.root.addChild(${entityName}); `; }); let textsChunk = ""; for (var i = 0; i < appTexts.length; i++) { var entityData = appTexts[i]; var textChunk = ` var ${entityData[0]} = new pc.Entity(); ${entityData[0]}.setPosition(${entityData[1]}, ${entityData[2]}, ${entityData[3]}); ${entityData[0]}.setLocalEulerAngles(${entityData
    OP_PUSHDATA2(77) [4]}, ${entityData[5]}, ${entityData[6]}); ${entityData[0]}.addComponent("element", { type: pc.ELEMENTTYPE_TEXT, anchor: new pc.Vec4(0.5, 0.5, 0.5, 0.5), pivot: new pc.Vec2(0.5, 0.5), alignment: new pc.Vec2(0.5, 0.5), autoWidth: true, autoHeight: true, fontAsset: pc.app.assets.find('pixelfont'), fontSize: ${entityData[9]}, color: new pc.Color().fromString('${entityData[8]}'), }); ${entityData[0]}.element.text = '${entityData[7]}'; app.root.addChild(${entityData[0]});
    OP_PUSHDATA2(77) `; textsChunk += textChunk; } let screensChunk = ""; for (var i = 0; i < appScreens.length; i++) { var entityData = appScreens[i]; var screenChunk = ` var ${entityData[0]} = new pc.Entity(); ${entityData[0]}.setPosition(${entityData[1]}, ${entityData[2]}, ${entityData[3]}); ${entityData[0]}.setLocalEulerAngles(${entityData[4]}, ${entityData[5]}, ${entityData[6]}); ${entityData[0]}.setLocalScale(${entityData[7]}, ${entityData[8]}, ${entityData[9]}); ${entityData[0]}.addCompon
    OP_PUSHDATA2(77) ent("render", { type: 'plane', }); ${entityData[0]}.screenType = "${entityData[10]}"; ${entityData[0]}.screenUrl = "${entityData[11]}"; ${entityData[0]}.addComponent("script"); ${entityData[0]}.script.create("screen"); app.root.addChild(${entityData[0]}); `; screensChunk += screenChunk; } const startChunk = ` const canvas = document.getElementById("application"); document.body.style.overscrollBehavior = "none"; const app = new pc.Application(canvas, { m
    OP_PUSHDATA2(77) ouse: new pc.Mouse(canvas), keyboard: new pc.Keyboard(window), touch: new pc.TouchDevice(canvas), elementInput: new pc.ElementInput(canvas), graphicsDeviceOptions: { antialias: true, powerPreference: 'high-performance', alpha: true } }); app.graphicsDevice.maxPixelRatio = window.devicePixelRatio; app.setCanvasFillMode(pc.FILLMODE_FILL_WINDOW); app.setCanvasResolution(pc.RESOLUTION_AUTO); app.scene.ambientLight = new pc.Color().fromStri
    OP_PUSHDATA2(77) ng('#AAAAAA'); app.scene.toneMapping = pc.TONEMAP_ACES; app.scene.exposure = 1; app.scene.gammaCorrection = pc.GAMMA_SRGB; window.addEventListener('resize', () => app.resizeCanvas()); pc.WasmModule.setConfig("DracoDecoderModule", { glueUrl: \`data:text/javascript;base64,\${dracoJs}\`, wasmUrl: \`data:application/wasm;base64,\${dracoWasm}\`, fallbackUrl: 'Nope', }); var FontHandlerPatch = function(url, callback, asset) { function upgr
    OP_PUSHDATA2(77) adeDataSchema(data) { if (data.version < 3) { if (data.version < 2) { data.info.maps = data.info.maps || [{ width: data.info.width, height: data.info.height }]; } data.chars = Object.keys(data.chars || {}).reduce(function (newChars, key) { var existing = data.chars[key]; var newKey = existing.letter !== undefined ? existing.letter : string.fromCodePoint(key); if (data.version < 2) { existing.map = existing.map || 0; } newChars[newKey] = existing;
    OP_PUSHDATA2(77) return newChars; }, {}); data.version = 3; } return data; } var parts = url.load.split("|"); var jsonUrl = parts[0]; var pngUrl = parts[1]; var self = this; pc.http.get(jsonUrl, { retry: this.maxRetries > 0, maxRetries: this.maxRetries }, function (err, response) { if (!err) { var data = upgradeDataSchema(response); self._loadTextures(pngUrl, data, function (err, textures) { if (err) return callback(err); callback(null, {
    OP_PUSHDATA2(77) data: data, textures: textures }); }); } else { callback("Error loading font resource " + err); } }); }; var originalFontHandler = Object.create(pc.FontHandler.prototype); originalFontHandler.load = FontHandlerPatch; Object.assign(pc.FontHandler.prototype, originalFontHandler); `; const afterAssetsChunk = ` const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets); let loadedCount = 0; function onAssetsLoaded
    OP_PUSHDATA2(77) () { document.getElementById('status').innerText = "Starting.."; } assetListLoader.on('progress', function (progress) { loadedCount += 1; document.getElementById('status').innerText = 'Loading assets: ' + loadedCount + '/' + Object.keys(assets).length; }); assetListLoader.ready(onAssetsLoaded); assetListLoader.load(() => { pc.WasmModule.setConfig('Ammo', { glueUrl: \`data:text/javascript;base64,\${ammoJs}\`, wasmUrl: 'Nope', fallbackUrl: 'Nope' });
    OP_PUSHDATA2(77) pc.WasmModule.getInstance('Ammo', startWorld); function startWorld() { app.start(); document.getElementById('status').style.display = "none"; app.root.addComponent('script'); app.root.script.create('collisionPatch'); `; const preEndChunk = ` app.root.script.create('autoColliders'); app.root.script.create('touchJoystick'); const player = new pc.Entity('Player');
    OP_PUSHDATA2(77) player.setPosition(${appData[0]},${appData[1]},${appData[2]}); player.addComponent("collision", { axis: 1, height: 2, radius: 0.5, type: "capsule", }); player.addComponent("rigidbody", { angularDamping: 0, angularFactor: pc.Vec3.ZERO, friction: 0, linearDamping: 0.99, linearFactor: pc.Vec3.ONE, mass: 100,
    OP_PUSHDATA2(77) restitution: 0, type: "dynamic", }); player.addComponent("script"); app.root.addChild(player); const sky = new pc.Entity('Sky'); sky.setLocalScale(75110,75110,75110); sky.addComponent('render', { type: 'box', castShadows: false, receiveShadows: false, }); sky.horizonColor = [${appData[3]}]; sky.zenithColor = [${appData[4]}]; sky.addComponent("script");
    OP_PUSHDATA2(77) sky.script.create('sky'); app.root.addChild(sky); const camera = new pc.Entity('Camera'); camera.addComponent('camera', { clearColor: new pc.Color().fromString('#00000000'), fov: 60, frustumCulling: true, }); player.addChild(camera); camera.setLocalPosition(0, 0.5, 0); player.script.create('movement'); const light = new pc.Entity(); light.addComponent("light", { color: new pc.Color().fromString('#ffffff')
    OP_PUSHDATA2(77) , type: "directional", intensity: 1, affectDynamic: true, castShadows: false, shadowUpdateMode: pc.SHADOWUPDATE_REALTIME, numCascades: 1, shadowDistance: 20, shadowIntensity: 0.5, shadowType: pc.SHADOW_PCF5, shadowBias: 1, normalOffsetBias: 0 }); light.addComponent("script"); light.script.create('sha
    OP_PUSHDATA2(77) dowControl'); app.root.addChild(light); light.setLocalEulerAngles(-25,90,0); const watermark = Array.from(document.querySelectorAll('div')).find(div => div.textContent.includes("Built with Inscribed.space")); watermark.style.visibility = "hidden"; `; const endChunk = ` } }); `; const combinedChunks = startChunk + assetsChunk + afterAssetsChunk + colorsChunk + texturesChunk + entitiesChunk + textsChunk + preEndChunk + screensChunk + endChunk; co
    OP_PUSHDATA1(76) nst script = document.createElement('script'); script.textContent = combinedChunks; document.body.appendChild(script); }
    OP_ENDIF(104)
2 Outputs
  • ef3ece3b95edc2924de7045b3be9fe519527687e33f77716635b08a2bb0a58fb:0
  • value  546
    address  bc1pvlhrdze7vltj7q04ml2crnx7l3lh2w7gldxnch09vptten36mupswcsmm4
  • ef3ece3b95edc2924de7045b3be9fe519527687e33f77716635b08a2bb0a58fb:1
  • value  3364
    address  bc1qnsxp3axcartjdlvly8jk9nayfvet8kpxj38m7u