diff --git a/packages/behavior/src/traits/behaved.js b/packages/behavior/src/traits/behaved.js index d39a2ba..8a7d7fd 100644 --- a/packages/behavior/src/traits/behaved.js +++ b/packages/behavior/src/traits/behaved.js @@ -99,7 +99,7 @@ export default (flecks) => class Behaved extends decorate(Trait) { this.#daemons = Object.values(await this.constructor.loadScripts(daemons, this.#context)); this.#routines = await this.constructor.loadScripts(this.params.routines, this.#context); this.updateCurrentRoutine(this.state.currentRoutine); - super.isBehaving = 'http' !== process.env.FLECKS_CORE_BUILD_TARGET; + super.isBehaving = 'web' !== process.env.FLECKS_CORE_BUILD_TARGET; } methods() { diff --git a/packages/dialog/src/traits/decorators/initiator.js b/packages/dialog/src/traits/decorators/initiator.js index 211ccd2..2bd33d4 100644 --- a/packages/dialog/src/traits/decorators/initiator.js +++ b/packages/dialog/src/traits/decorators/initiator.js @@ -37,7 +37,7 @@ export default (Trait, flecks) => class DialogInitiator extends Trait { ...super.methods(), openDialog: async (text) => { - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { const {Entity} = flecks.get('$avocado/resource.resources'); if (!this.entity.list) { return; diff --git a/packages/dialog/src/traits/dialog.js b/packages/dialog/src/traits/dialog.js index 867eba8..3987ec4 100644 --- a/packages/dialog/src/traits/dialog.js +++ b/packages/dialog/src/traits/dialog.js @@ -36,7 +36,7 @@ export default (flecks) => { async load(json) { await super.load(json); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { this.entity.node.className = 'dialog'; const {text} = this.entity; if (text) { @@ -81,7 +81,7 @@ export default (flecks) => { } tick(elapsed) { - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { this.#nextLetter -= elapsed; if (this.#nextLetter <= 0) { this.#thisLetter += 1; diff --git a/packages/entity/src/resources/entity-list.js b/packages/entity/src/resources/entity-list.js index b76233d..2e36187 100644 --- a/packages/entity/src/resources/entity-list.js +++ b/packages/entity/src/resources/entity-list.js @@ -51,7 +51,7 @@ export default (flecks) => { entity.emit('addedToList'); entity.once('destroying', () => this.onEntityDestroying(entity)); this.emit('entityAdded', entity); - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { this.#informedEntities.set(entity, []); } this.startSynchronizing(entity); @@ -158,7 +158,7 @@ export default (flecks) => { return; } this.stopSynchronizing(entity); - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { this.#informedEntities.delete(entity); } // eslint-disable-next-line no-param-reassign diff --git a/packages/entity/src/resources/entity.js b/packages/entity/src/resources/entity.js index 606be6e..8b37edb 100644 --- a/packages/entity/src/resources/entity.js +++ b/packages/entity/src/resources/entity.js @@ -15,7 +15,7 @@ import hotEntities from '../hot-entities'; const debug = D('@avocado/entity'); -let numericUid = 'http' !== process.env.FLECKS_CORE_BUILD_TARGET ? 1 : 1000000000; +let numericUid = 'web' !== process.env.FLECKS_CORE_BUILD_TARGET ? 1 : 1000000000; export default (flecks) => { const decorate = compose( diff --git a/packages/entity/src/traits/alive.js b/packages/entity/src/traits/alive.js index 7b08559..44774e2 100644 --- a/packages/entity/src/traits/alive.js +++ b/packages/entity/src/traits/alive.js @@ -42,7 +42,7 @@ export default (flecks) => class Alive extends decorate(Trait) { static defaultParams() { return { deathCheck: 'return entity.life <= 0', - deathScript: `if ('http' === FLECKS_CORE_BUILD_TARGET) { + deathScript: `if ('web' === FLECKS_CORE_BUILD_TARGET) { await TickingPromise.all([ entity.playSound("deathSound"), entity.transition( @@ -159,7 +159,7 @@ export default (flecks) => class Alive extends decorate(Trait) { } tick() { - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { if (!this.#isDying) { this.#deathCheck.evaluate(({value: died}) => { if (died) { diff --git a/packages/entity/src/traits/dom-node.js b/packages/entity/src/traits/dom-node.js index 1705fe3..daabc70 100644 --- a/packages/entity/src/traits/dom-node.js +++ b/packages/entity/src/traits/dom-node.js @@ -90,7 +90,7 @@ export default () => class DomNode extends decorate(Trait) { async load(json) { await super.load(json); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { this.entity.node = window.document.createElement('entity'); Object.entries(this.params.style).forEach(([key, value]) => { this.entity.node.style[key] = value; @@ -100,7 +100,7 @@ export default () => class DomNode extends decorate(Trait) { } tick() { - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET && this.#scheduledRuleApplication) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET && this.#scheduledRuleApplication) { this.#scheduledRuleApplication = false; this.applyStyleRules(); } diff --git a/packages/entity/src/traits/dom-text.js b/packages/entity/src/traits/dom-text.js index ac24d40..16c7d3c 100644 --- a/packages/entity/src/traits/dom-text.js +++ b/packages/entity/src/traits/dom-text.js @@ -6,7 +6,7 @@ export default () => class DomText extends Trait { constructor() { super(); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { this.#text = window.document.createElement('span'); } } diff --git a/packages/entity/src/traits/positioned.js b/packages/entity/src/traits/positioned.js index e170a6e..b7ecfae 100644 --- a/packages/entity/src/traits/positioned.js +++ b/packages/entity/src/traits/positioned.js @@ -50,7 +50,7 @@ export default () => class Positioned extends decorate(Trait) { this.trackedPosition = [x, y]; this.entity.position[0] = x; this.entity.position[1] = y; - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { this.serverPosition = this.trackedPosition; this.serverPositionDirty = false; } @@ -59,7 +59,7 @@ export default () => class Positioned extends decorate(Trait) { // eslint-disable-next-line camelcase onTrackedPositionChanged(oldPosition, newPosition) { [this.entity.position[0], this.entity.position[1]] = newPosition; - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { [this.state.x, this.state.y] = newPosition; this.markAsDirty(); } diff --git a/packages/entity/test/alive.js b/packages/entity/test/alive.js index 7754a40..369903b 100644 --- a/packages/entity/test/alive.js +++ b/packages/entity/test/alive.js @@ -36,7 +36,7 @@ describe('Alive', () => { it('exists', async () => { expect(entity.is('Alive')).to.be.true; }); - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { it('can die', async () => { let isDying = false; entity.once('startedDying', () => { @@ -53,7 +53,7 @@ describe('Alive', () => { entity.maxLife = 50; expect(entity.life).to.equal(50); }); - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { it('can have a custom death condition', async () => { const entity = await Entity.load({ traits: { @@ -116,7 +116,7 @@ describe('Alive', () => { expect(entity2.life).to.equal(80); expect(entity2.maxLife).to.equal(90); }); - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { it('generates and accepts death packets', async () => { entity.life = 0; entity.tick(); diff --git a/packages/entity/test/positioned.js b/packages/entity/test/positioned.js index 23a7e1d..780ca60 100644 --- a/packages/entity/test/positioned.js +++ b/packages/entity/test/positioned.js @@ -35,7 +35,7 @@ describe('Positioned', () => { it('exists', async () => { expect(entity.is('Positioned')).to.be.true; }); - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { it('generates and accepts movement packets', async () => { entity.setPosition([1, 1]); const packets = entity.trait('Positioned').packetsFor(); diff --git a/packages/graphics/src/canvas.js b/packages/graphics/src/canvas.js index 6e49852..7ba5cef 100644 --- a/packages/graphics/src/canvas.js +++ b/packages/graphics/src/canvas.js @@ -13,7 +13,7 @@ export default class Canvas extends decorate(Class) { constructor(size = [0, 0]) { super(); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { // eslint-disable-next-line global-require const {RenderTexture, Texture} = require('@pixi/core'); this.renderTexture = RenderTexture.create(); diff --git a/packages/graphics/src/container.js b/packages/graphics/src/container.js index 2a5811a..5206418 100644 --- a/packages/graphics/src/container.js +++ b/packages/graphics/src/container.js @@ -12,7 +12,7 @@ export default class Container extends Renderable { constructor() { super(); this.$$children = []; - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { // eslint-disable-next-line global-require const {Container: PIXIContainer} = require('@pixi/display'); this.container = new PIXIContainer(); diff --git a/packages/graphics/src/image.js b/packages/graphics/src/image.js index 3cb1a16..dd99172 100644 --- a/packages/graphics/src/image.js +++ b/packages/graphics/src/image.js @@ -40,7 +40,7 @@ export default class Image extends Resource { async load(buffer, uri) { if (buffer) { - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { const {height, width} = imageSize(Buffer.from(buffer)); this.texture = { height, diff --git a/packages/graphics/src/init.js b/packages/graphics/src/init.js index b5bdb40..e939a03 100644 --- a/packages/graphics/src/init.js +++ b/packages/graphics/src/init.js @@ -1,4 +1,4 @@ -if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { +if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { const [ {SCALE_MODES}, {Renderer, BatchRenderer}, {settings}, ] = [ diff --git a/packages/graphics/src/primitives.js b/packages/graphics/src/primitives.js index ad3848a..924a91a 100644 --- a/packages/graphics/src/primitives.js +++ b/packages/graphics/src/primitives.js @@ -14,7 +14,7 @@ export default class Primitives extends Renderable { constructor() { super(); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { // eslint-disable-next-line global-require const {Graphics} = require('@pixi/graphics'); this.primitives = new Graphics(); diff --git a/packages/graphics/src/renderer.js b/packages/graphics/src/renderer.js index 5051816..5c09839 100644 --- a/packages/graphics/src/renderer.js +++ b/packages/graphics/src/renderer.js @@ -3,7 +3,7 @@ import {Vector} from '@avocado/math'; export default class Renderer { constructor(size = [0, 0]) { - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { // eslint-disable-next-line global-require const {Renderer: PIXIRenderer} = require('@pixi/core'); this.renderer = new PIXIRenderer({ diff --git a/packages/graphics/src/sprite.js b/packages/graphics/src/sprite.js index acaf069..0a36ee2 100644 --- a/packages/graphics/src/sprite.js +++ b/packages/graphics/src/sprite.js @@ -5,7 +5,7 @@ export default class Sprite extends Renderable { constructor(image) { super(); this.$$image = image; - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { // eslint-disable-next-line global-require const {Sprite: PIXISprite} = require('@pixi/sprite'); this.sprite = new PIXISprite(image.texture); diff --git a/packages/graphics/src/text.js b/packages/graphics/src/text.js index 35e9c86..df1d71b 100644 --- a/packages/graphics/src/text.js +++ b/packages/graphics/src/text.js @@ -6,7 +6,7 @@ export default class Text extends Renderable { constructor(text, style) { super(); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { // eslint-disable-next-line global-require const {Text: PIXIText} = require('@pixi/text'); const pixiText = new PIXIText(text, style); diff --git a/packages/graphics/src/traits/rastered.js b/packages/graphics/src/traits/rastered.js index 22b7697..e770b20 100644 --- a/packages/graphics/src/traits/rastered.js +++ b/packages/graphics/src/traits/rastered.js @@ -18,7 +18,7 @@ export default (flecks) => { constructor() { super(); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { this.#container = new Container(); this.#container.on('parentChanged', this.onParentChanged, this); } @@ -91,7 +91,7 @@ export default (flecks) => { async load(json) { await super.load(json); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { if (this.#container) { this.#container.alpha = this.entity.opacity; this.#container.rotation = this.entity.rotation; diff --git a/packages/input/src/client/normalizer.js b/packages/input/src/client/normalizer.js index d72f9bd..c0e8453 100644 --- a/packages/input/src/client/normalizer.js +++ b/packages/input/src/client/normalizer.js @@ -46,7 +46,7 @@ export default class InputNormalizer extends decorate(Class) { if (this.target) { return; } - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { Gamepads.start(); Gamepads.addEventListener('connect', this.onGamepadConnect); Gamepads.addEventListener('disconnect', this.onGamepadDisconnect); diff --git a/packages/input/src/traits/controllable.js b/packages/input/src/traits/controllable.js index 49fca96..5489e38 100644 --- a/packages/input/src/traits/controllable.js +++ b/packages/input/src/traits/controllable.js @@ -62,7 +62,7 @@ export default () => class Controllable extends decorate(Trait) { .invokeHookFlat('acceptAction', actionStream[i]) .every((result) => false !== result) ) { - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { this.#queued.push(actionStream[i]); } } @@ -83,7 +83,7 @@ export default () => class Controllable extends decorate(Trait) { } tick() { - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { const drained = this.#actionRegistry.drain(); this.entity.acceptActionStream(drained); } diff --git a/packages/input/src/traits/initiator.js b/packages/input/src/traits/initiator.js index 963a061..485b2b1 100644 --- a/packages/input/src/traits/initiator.js +++ b/packages/input/src/traits/initiator.js @@ -16,7 +16,7 @@ export default () => class Initiator extends Trait { constructor() { super(); this.#ticker.on('tick', this.determineTarget, this); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { this.#adjustmentThrobber = {brightness: 1.5}; this.#adjustmentThrobber.lfo = new LfoResult( this.#adjustmentThrobber, @@ -93,7 +93,7 @@ export default () => class Initiator extends Trait { return { acceptAction: ({action, value}) => { - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { if ('Interact' === action && value) { if (this.#target) { this.#target.interact(this.entity); @@ -109,7 +109,7 @@ export default () => class Initiator extends Trait { targetChanged(oldTarget) { oldTarget?.container?.removeFilter('interactive', 'adjustment'); oldTarget?.container?.removeFilter('interactive', 'glow'); - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { this.#adjustmentThrobber.lfo.properties.brightness.location = 0; this.#adjustmentThrobber.lfo.tick(0); this.#glowThrobber.lfo.properties.outerStrength.location = 0; diff --git a/packages/physics/src/traits/collider.js b/packages/physics/src/traits/collider.js index 9821997..9b16216 100644 --- a/packages/physics/src/traits/collider.js +++ b/packages/physics/src/traits/collider.js @@ -235,7 +235,7 @@ export default (flecks) => class Collider extends decorate(Trait) { } tick() { - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { this.checkActiveCollision(); } } diff --git a/packages/physics/src/traits/emitter.js b/packages/physics/src/traits/emitter.js index 62f5a80..7e3ff96 100644 --- a/packages/physics/src/traits/emitter.js +++ b/packages/physics/src/traits/emitter.js @@ -187,7 +187,7 @@ export default (flecks) => class Emitter extends decorate(Trait) { }, json, ); - if (transmit && 'http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if (transmit && 'web' !== process.env.FLECKS_CORE_BUILD_TARGET) { this.#emitting.push(augmentedJson); this.markAsDirty(); } diff --git a/packages/physics/src/traits/physical.js b/packages/physics/src/traits/physical.js index 55d1dac..ff41749 100644 --- a/packages/physics/src/traits/physical.js +++ b/packages/physics/src/traits/physical.js @@ -27,7 +27,7 @@ export default () => class Physical extends decorate(Trait) { body.setCollisionForEntity(this.entity); world.addBody(body); this.#body = body; - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { if (this.entity.is('Visible') && this.params.isDebugging) { this.#bodyView = new BodyView(body); this.#bodyView.position = Vector.scale(this.entity.position, -1); diff --git a/packages/physics/src/traits/shaped.js b/packages/physics/src/traits/shaped.js index a2e1ad7..4b51655 100644 --- a/packages/physics/src/traits/shaped.js +++ b/packages/physics/src/traits/shaped.js @@ -38,7 +38,7 @@ export default () => class Shaped extends decorate(Trait) { return { traitAdded: () => { - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { if (this.entity.is('Visible') && this.params.isDebugging) { if (!this.#shapeView) { this.#shapeView = new ShapeView(this.entity.shape); diff --git a/packages/resource/src/jsonb.js b/packages/resource/src/jsonb.js index f288747..b13bdb2 100644 --- a/packages/resource/src/jsonb.js +++ b/packages/resource/src/jsonb.js @@ -2,7 +2,7 @@ export const bufferify = (value) => Buffer.from(JSON.stringify(value)); export const parse = (buffer) => { let string; - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { const decoder = new TextDecoder(); string = decoder.decode(buffer); } diff --git a/packages/resource/src/resource.js b/packages/resource/src/resource.js index 34f9bc7..31992e8 100644 --- a/packages/resource/src/resource.js +++ b/packages/resource/src/resource.js @@ -54,7 +54,7 @@ export default class Resource extends decorate(Class) { } try { let resource; - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { const response = await window.fetch(join('/', this.root, uri)); if (!response.ok) { throw new Error('Not found'); diff --git a/packages/s13n/src/synchronized/index.js b/packages/s13n/src/synchronized/index.js index 897e9fe..3461e8c 100644 --- a/packages/s13n/src/synchronized/index.js +++ b/packages/s13n/src/synchronized/index.js @@ -1,4 +1,4 @@ import Client from './client'; import Server from './server'; -export default process.env.FLECKS_CORE_BUILD_TARGET === 'http' ? Client : Server; +export default process.env.FLECKS_CORE_BUILD_TARGET === 'web' ? Client : Server; diff --git a/packages/sound/src/sound.js b/packages/sound/src/sound.js index d03fe6a..705fbb5 100644 --- a/packages/sound/src/sound.js +++ b/packages/sound/src/sound.js @@ -45,7 +45,7 @@ const pull = () => { setTimeout(pull, Math.max(20, hmi + hmi * (Math.random() - 0.5))); }; -if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { +if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { setTimeout(pull, MAX_INTERVAL); } @@ -57,7 +57,7 @@ export default class Sound extends JsonResource { await super.load(json); const {volume = 1} = json; const src = json.src || json.uri.replace('.sound.json', '.wav'); - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { this.#audio = new FakeAudio(); return; } @@ -91,7 +91,7 @@ export default class Sound extends JsonResource { } play() { - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { play(this.#audio, this.uri); } } diff --git a/packages/sound/src/traits/audible.js b/packages/sound/src/traits/audible.js index 48ef619..a0ca446 100644 --- a/packages/sound/src/traits/audible.js +++ b/packages/sound/src/traits/audible.js @@ -88,7 +88,7 @@ export default () => class Audible extends Trait { // eslint-disable-next-line no-empty catch (error) {} } - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { Promise.resolve(this.#sounds[key]).then((sound) => { debug('Playing %s', key); sound.play(); diff --git a/packages/timing/src/animation-view.js b/packages/timing/src/animation-view.js index 5e89973..e77e3f6 100644 --- a/packages/timing/src/animation-view.js +++ b/packages/timing/src/animation-view.js @@ -9,7 +9,7 @@ export default class AnimationView extends Container { constructor(animation) { super(); this.animation = animation; - if ('http' === process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) { if (this.animation.imageUri) { Image.load(this.animation.imageUri).then((image) => { this.sprite = new Sprite(image); diff --git a/packages/topdown/src/resources/tiles.js b/packages/topdown/src/resources/tiles.js index c91c284..57d1740 100644 --- a/packages/topdown/src/resources/tiles.js +++ b/packages/topdown/src/resources/tiles.js @@ -209,7 +209,7 @@ export default (flecks) => { return; } this.#data[index] = tile; - if ('http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if ('web' !== process.env.FLECKS_CORE_BUILD_TARGET) { this.#updates.push([[x, y], [1, 1], [tile]]); this.#hasUpdates = true; } @@ -268,7 +268,7 @@ export default (flecks) => { sx -= w; sy += 1; } - if (isDirty && 'http' !== process.env.FLECKS_CORE_BUILD_TARGET) { + if (isDirty && 'web' !== process.env.FLECKS_CORE_BUILD_TARGET) { this.#updates.push([[x, y], [w, h], tiles]); this.#hasUpdates = true; }