Repository: playcanvas/engine
Pull request #4710 (2022-10-10 08:43:10)

Moved /net, /audio and /sound folders to /platform/
- in order to reorganize the engine folder structure to layered approach
- no other changes other than move + automated import paths fixed up


Patch:
diff --git a/src/asset/asset.js b/src/asset/asset.js
index e09811016..1a256770b 100644
--- a/src/asset/asset.js
+++ b/src/asset/asset.js
@@ -8,7 +8,7 @@ import { findAvailableLocale } from '../i18n/utils.js';
 import { ABSOLUTE_URL } from './constants.js';
 import { AssetFile } from './asset-file.js';
 import { getApplication } from '../framework/globals.js';
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 /** @typedef {import('./asset-registry.js').AssetRegistry} AssetRegistry */
 /** @typedef {import('../resources/loader.js').ResourceLoaderCallback} ResourceLoaderCallback */
diff --git a/src/deprecated/deprecated.js b/src/deprecated/deprecated.js
index 1ba53ffb9..fb537b64d 100644
--- a/src/deprecated/deprecated.js
+++ b/src/deprecated/deprecated.js
@@ -75,11 +75,11 @@ import { getDefaultMaterial } from '../scene/materials/default-material.js';
 import { Animation, Key, Node } from '../animation/animation.js';
 import { Skeleton } from '../animation/skeleton.js';
 
-import { Channel } from '../audio/channel.js';
-import { Channel3d } from '../audio/channel3d.js';
-import { Listener } from '../sound/listener.js';
-import { Sound } from '../sound/sound.js';
-import { SoundManager } from '../sound/manager.js';
+import { Channel } from '../platform/audio/channel.js';
+import { Channel3d } from '../platform/audio/channel3d.js';
+import { Listener } from '../platform/sound/listener.js';
+import { Sound } from '../platform/sound/sound.js';
+import { SoundManager } from '../platform/sound/manager.js';
 
 import { AssetRegistry } from '../asset/asset-registry.js';
 
diff --git a/src/framework/app-base.js b/src/framework/app-base.js
index 8e2b4c881..edcd262c9 100644
--- a/src/framework/app-base.js
+++ b/src/framework/app-base.js
@@ -15,7 +15,7 @@ import { Vec3 } from '../core/math/vec3.js';
 import { Mat4 } from '../core/math/mat4.js';
 import { Quat } from '../core/math/quat.js';
 
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 import {
     PRIMITIVE_TRIANGLES, PRIMITIVE_TRIFAN, PRIMITIVE_TRISTRIP
@@ -81,7 +81,7 @@ import {
 /** @typedef {import('../scene/batching/batch-manager.js').BatchManager} BatchManager */
 /** @typedef {import('./app-options.js').AppOptions} AppOptions */
 /** @typedef {import('../xr/xr-manager.js').XrManager} XrManager */
-/** @typedef {import('../sound/manager.js').SoundManager} SoundManager */
+/** @typedef {import('../platform/sound/manager.js').SoundManager} SoundManager */
 
 // Mini-object used to measure progress of loading sets
 class Progress {
diff --git a/src/framework/app-options.js b/src/framework/app-options.js
index ad7d29441..7b435e971 100644
--- a/src/framework/app-options.js
+++ b/src/framework/app-options.js
@@ -5,7 +5,7 @@
 /** @typedef {import('../platform/input/keyboard.js').Keyboard} Keyboard */
 /** @typedef {import('../platform/input/mouse.js').Mouse} Mouse */
 /** @typedef {import('../platform/input/touch-device.js').TouchDevice} TouchDevice */
-/** @typedef {import('../sound/manager.js').SoundManager} SoundManager */
+/** @typedef {import('../platform/sound/manager.js').SoundManager} SoundManager */
 /** @typedef {import('../scene/lightmapper/lightmapper.js').Lightmapper} Lightmapper */
 /** @typedef {import('../scene/batching/batch-manager.js').BatchManager} BatchManager */
 /** @typedef {import('./components/system.js').ComponentSystem} ComponentSystem */
diff --git a/src/framework/application.js b/src/framework/application.js
index 63b454884..d33eb2a53 100644
--- a/src/framework/application.js
+++ b/src/framework/application.js
@@ -2,7 +2,7 @@ import { platform } from '../core/platform.js';
 
 import { WebglGraphicsDevice } from '../graphics/webgl/webgl-graphics-device.js';
 
-import { SoundManager } from '../sound/manager.js';
+import { SoundManager } from '../platform/sound/manager.js';
 
 import { Lightmapper } from '../scene/lightmapper/lightmapper.js';
 import { BatchManager } from '../scene/batching/batch-manager.js';
diff --git a/src/framework/components/audio-listener/system.js b/src/framework/components/audio-listener/system.js
index 809e293c5..853a5f278 100644
--- a/src/framework/components/audio-listener/system.js
+++ b/src/framework/components/audio-listener/system.js
@@ -6,7 +6,7 @@ import { ComponentSystem } from '../system.js';
 import { AudioListenerComponent } from './component.js';
 import { AudioListenerComponentData } from './data.js';
 
-/** @typedef {import('../../../sound/manager.js').SoundManager} SoundManager */
+/** @typedef {import('../../../platform/sound/manager.js').SoundManager} SoundManager */
 /** @typedef {import('../../app-base.js').AppBase} AppBase */
 
 const _schema = ['enabled'];
diff --git a/src/framework/components/audio-source/component.js b/src/framework/components/audio-source/component.js
index f2ab45441..c99cb620d 100644
--- a/src/framework/components/audio-source/component.js
+++ b/src/framework/components/audio-source/component.js
@@ -1,6 +1,6 @@
 import { Asset } from '../../../asset/asset.js';
 
-import { Channel3d } from '../../../audio/channel3d.js';
+import { Channel3d } from '../../../platform/audio/channel3d.js';
 
 import { Component } from '../component.js';
 
diff --git a/src/framework/components/audio-source/data.js b/src/framework/components/audio-source/data.js
index 66a34672b..b1155c5be 100644
--- a/src/framework/components/audio-source/data.js
+++ b/src/framework/components/audio-source/data.js
@@ -1,4 +1,4 @@
-import { DISTANCE_INVERSE } from '../../../audio/constants.js';
+import { DISTANCE_INVERSE } from '../../../platform/audio/constants.js';
 
 class AudioSourceComponentData {
     constructor() {
diff --git a/src/framework/components/audio-source/system.js b/src/framework/components/audio-source/system.js
index 159802171..c8b7a639e 100644
--- a/src/framework/components/audio-source/system.js
+++ b/src/framework/components/audio-source/system.js
@@ -1,4 +1,4 @@
-import { Channel3d } from '../../../audio/channel3d.js';
+import { Channel3d } from '../../../platform/audio/channel3d.js';
 import { Debug } from '../../../core/debug.js';
 
 import { Entity } from '../../entity.js';
@@ -10,7 +10,7 @@ import { AudioSourceComponent } from './component.js';
 import { AudioSourceComponentData } from './data.js';
 
 /** @typedef {import('../../app-base.js').AppBase} AppBase */
-/** @typedef {import('../../../sound/manager.js').SoundManager} SoundManager */
+/** @typedef {import('../../../platform/sound/manager.js').SoundManager} SoundManager */
 
 const _schema = [
     'enabled',
diff --git a/src/framework/components/sound/component.js b/src/framework/components/sound/component.js
index ce9d26191..bd8383430 100644
--- a/src/framework/components/sound/component.js
+++ b/src/framework/components/sound/component.js
@@ -1,13 +1,13 @@
 import { Debug } from '../../../core/debug.js';
 
-import { DISTANCE_LINEAR } from '../../../audio/constants.js';
+import { DISTANCE_LINEAR } from '../../../platform/audio/constants.js';
 
 import { Component } from '../component.js';
 
 import { SoundSlot } from './slot.js';
 
 /** @typedef {import('../../entity.js').Entity} Entity */
-/** @typedef {import('../../../sound/instance.js').SoundInstance} SoundInstance */
+/** @typedef {import('../../../platform/sound/instance.js').SoundInstance} SoundInstance */
 /** @typedef {import('./system.js').SoundComponentSystem} SoundComponentSystem */
 
 /**
diff --git a/src/framework/components/sound/slot.js b/src/framework/components/sound/slot.js
index f8a8e7dfc..21735911d 100644
--- a/src/framework/components/sound/slot.js
+++ b/src/framework/components/sound/slot.js
@@ -6,8 +6,8 @@ import { Vec3 } from '../../../core/math/vec3.js';
 
 import { Asset } from '../../../asset/asset.js';
 
-import { SoundInstance } from '../../../sound/instance.js';
-import { SoundInstance3d } from '../../../sound/instance3d.js';
+import { SoundInstance } from '../../../platform/sound/instance.js';
+import { SoundInstance3d } from '../../../platform/sound/instance3d.js';
 
 /** @typedef {import('./component.js').SoundComponent} SoundComponent */
 
diff --git a/src/framework/components/sound/system.js b/src/framework/components/sound/system.js
index 475a91f91..a20671d62 100644
--- a/src/framework/components/sound/system.js
+++ b/src/framework/components/sound/system.js
@@ -1,6 +1,6 @@
 import { Debug } from '../../../core/debug.js';
 
-import { hasAudioContext } from '../../../audio/capabilities.js';
+import { hasAudioContext } from '../../../platform/audio/capabilities.js';
 
 import { Component } from '../component.js';
 import { ComponentSystem } from '../system.js';
@@ -8,7 +8,7 @@ import { ComponentSystem } from '../system.js';
 import { SoundComponent } from './component.js';
 import { SoundComponentData } from './data.js';
 
-/** @typedef {import('../../../sound/manager.js').SoundManager} SoundManager */
+/** @typedef {import('../../../platform/sound/manager.js').SoundManager} SoundManager */
 /** @typedef {import('../../app-base.js').AppBase} AppBase */
 
 const _schema = ['enabled'];
diff --git a/src/index.js b/src/index.js
index 6fe648e9f..cbdd25526 100644
--- a/src/index.js
+++ b/src/index.js
@@ -32,7 +32,7 @@ export { URI, createURI } from './core/uri.js';
 export { Tracing } from './core/tracing.js';
 
 // NET
-export { http, Http } from './net/http.js';
+export { http, Http } from './platform/net/http.js';
 
 // MATH
 export * from './core/math/constants.js';
@@ -141,12 +141,12 @@ export { Font } from './font/font.js';
 export { CanvasFont } from './font/canvas-font.js';
 
 // SOUND
-export * from './audio/constants.js';
+export * from './platform/audio/constants.js';
 
-export { SoundManager } from './sound/manager.js';
-export { Sound } from './sound/sound.js';
-export { SoundInstance } from './sound/instance.js';
-export { SoundInstance3d } from './sound/instance3d.js';
+export { SoundManager } from './platform/sound/manager.js';
+export { Sound } from './platform/sound/sound.js';
+export { SoundInstance } from './platform/sound/instance.js';
+export { SoundInstance3d } from './platform/sound/instance3d.js';
 
 // BUNDLES
 export { Bundle } from './bundles/bundle.js';
diff --git a/src/audio/capabilities.js b/src/platform/audio/capabilities.js
similarity index 100%
rename from src/audio/capabilities.js
rename to src/platform/audio/capabilities.js
diff --git a/src/audio/channel.js b/src/platform/audio/channel.js
similarity index 99%
rename from src/audio/channel.js
rename to src/platform/audio/channel.js
index 57e81540c..51c251701 100644
--- a/src/audio/channel.js
+++ b/src/platform/audio/channel.js
@@ -1,4 +1,4 @@
-import { math } from '../core/math/math.js';
+import { math } from '../../core/math/math.js';
 
 import { hasAudioContext } from './capabilities.js';
 
diff --git a/src/audio/channel3d.js b/src/platform/audio/channel3d.js
similarity index 97%
rename from src/audio/channel3d.js
rename to src/platform/audio/channel3d.js
index bc2b69d01..f0731386a 100644
--- a/src/audio/channel3d.js
+++ b/src/platform/audio/channel3d.js
@@ -1,7 +1,7 @@
-import { Debug } from '../core/debug.js';
+import { Debug } from '../../core/debug.js';
 
-import { math } from '../core/math/math.js';
-import { Vec3 } from '../core/math/vec3.js';
+import { math } from '../../core/math/math.js';
+import { Vec3 } from '../../core/math/vec3.js';
 
 import { DISTANCE_EXPONENTIAL, DISTANCE_INVERSE, DISTANCE_LINEAR } from './constants.js';
 import { hasAudioContext } from './capabilities.js';
diff --git a/src/audio/constants.js b/src/platform/audio/constants.js
similarity index 100%
rename from src/audio/constants.js
rename to src/platform/audio/constants.js
diff --git a/src/net/http.js b/src/platform/net/http.js
similarity index 99%
rename from src/net/http.js
rename to src/platform/net/http.js
index 643c79771..52e1d1c70 100644
--- a/src/net/http.js
+++ b/src/platform/net/http.js
@@ -1,9 +1,9 @@
-import { extend } from '../core/core.js';
-import { now } from '../core/time.js';
-import { path } from '../core/path.js';
-import { URI } from '../core/uri.js';
+import { extend } from '../../core/core.js';
+import { now } from '../../core/time.js';
+import { path } from '../../core/path.js';
+import { URI } from '../../core/uri.js';
 
-import { math } from '../core/math/math.js';
+import { math } from '../../core/math/math.js';
 
 /**
  * Callback used by {@link Http#get}, {@link Http#post}, {@link Http#put}, {@link Http#del}, and
diff --git a/src/sound/instance.js b/src/platform/sound/instance.js
similarity index 99%
rename from src/sound/instance.js
rename to src/platform/sound/instance.js
index 60dcebea5..506b9aef6 100644
--- a/src/sound/instance.js
+++ b/src/platform/sound/instance.js
@@ -1,6 +1,6 @@
-import { EventHandler } from '../core/event-handler.js';
+import { EventHandler } from '../../core/event-handler.js';
 
-import { math } from '../core/math/math.js';
+import { math } from '../../core/math/math.js';
 
 import { hasAudioContext } from '../audio/capabilities.js';
 
diff --git a/src/sound/instance3d.js b/src/platform/sound/instance3d.js
similarity index 98%
rename from src/sound/instance3d.js
rename to src/platform/sound/instance3d.js
index 6298accef..bb4b8e204 100644
--- a/src/sound/instance3d.js
+++ b/src/platform/sound/instance3d.js
@@ -1,7 +1,7 @@
-import { Debug } from '../core/debug.js';
+import { Debug } from '../../core/debug.js';
 
-import { math } from '../core/math/math.js';
-import { Vec3 } from '../core/math/vec3.js';
+import { math } from '../../core/math/math.js';
+import { Vec3 } from '../../core/math/vec3.js';
 
 import { DISTANCE_EXPONENTIAL, DISTANCE_INVERSE, DISTANCE_LINEAR } from '../audio/constants.js';
 import { hasAudioContext } from '../audio/capabilities.js';
diff --git a/src/sound/listener.js b/src/platform/sound/listener.js
similarity index 95%
rename from src/sound/listener.js
rename to src/platform/sound/listener.js
index 38a1e0d3d..da706719b 100644
--- a/src/sound/listener.js
+++ b/src/platform/sound/listener.js
@@ -1,7 +1,7 @@
-import { Debug } from '../core/debug.js';
+import { Debug } from '../../core/debug.js';
 
-import { Vec3 } from '../core/math/vec3.js';
-import { Mat4 } from '../core/math/mat4.js';
+import { Vec3 } from '../../core/math/vec3.js';
+import { Mat4 } from '../../core/math/mat4.js';
 
 /** @typedef {import('./manager.js').SoundManager} SoundManager */
 
diff --git a/src/sound/manager.js b/src/platform/sound/manager.js
similarity index 98%
rename from src/sound/manager.js
rename to src/platform/sound/manager.js
index 5e92c4c7c..6b8bbed97 100644
--- a/src/sound/manager.js
+++ b/src/platform/sound/manager.js
@@ -1,8 +1,8 @@
-import { Debug } from '../core/debug.js';
+import { Debug } from '../../core/debug.js';
 
-import { EventHandler } from '../core/event-handler.js';
+import { EventHandler } from '../../core/event-handler.js';
 
-import { math } from '../core/math/math.js';
+import { math } from '../../core/math/math.js';
 
 import { hasAudioContext } from '../audio/capabilities.js';
 import { Channel } from '../audio/channel.js';
diff --git a/src/sound/sound.js b/src/platform/sound/sound.js
similarity index 100%
rename from src/sound/sound.js
rename to src/platform/sound/sound.js
diff --git a/src/resources/anim-clip.js b/src/resources/anim-clip.js
index 4dae5de7c..41017cfbb 100644
--- a/src/resources/anim-clip.js
+++ b/src/resources/anim-clip.js
@@ -1,4 +1,4 @@
-import { http, Http } from '../net/http.js';
+import { http, Http } from '../platform/net/http.js';
 
 import { AnimCurve } from '../anim/evaluator/anim-curve.js';
 import { AnimData } from '../anim/evaluator/anim-data.js';
diff --git a/src/resources/anim-state-graph.js b/src/resources/anim-state-graph.js
index 24e6e7c19..ffbbcb12c 100644
--- a/src/resources/anim-state-graph.js
+++ b/src/resources/anim-state-graph.js
@@ -1,4 +1,4 @@
-import { http, Http } from '../net/http.js';
+import { http, Http } from '../platform/net/http.js';
 import { AnimStateGraph } from '../anim/state-graph/anim-state-graph.js';
 
 /** @typedef {import('./handler.js').ResourceHandler} ResourceHandler */
diff --git a/src/resources/animation.js b/src/resources/animation.js
index 4d9502aa0..c87013e21 100644
--- a/src/resources/animation.js
+++ b/src/resources/animation.js
@@ -3,7 +3,7 @@ import { path } from '../core/path.js';
 import { Quat } from '../core/math/quat.js';
 import { Vec3 } from '../core/math/vec3.js';
 
-import { http, Http } from '../net/http.js';
+import { http, Http } from '../platform/net/http.js';
 
 import { Animation, Key, Node } from '../animation/animation.js';
 import { AnimEvents } from '../anim/evaluator/anim-events.js';
diff --git a/src/resources/audio.js b/src/resources/audio.js
index 1fe72984f..e26e155ac 100644
--- a/src/resources/audio.js
+++ b/src/resources/audio.js
@@ -1,11 +1,11 @@
 import { path } from '../core/path.js';
 import { Debug } from '../core/debug.js';
 
-import { http, Http } from '../net/http.js';
+import { http, Http } from '../platform/net/http.js';
 
-import { hasAudioContext } from '../audio/capabilities.js';
+import { hasAudioContext } from '../platform/audio/capabilities.js';
 
-import { Sound } from '../sound/sound.js';
+import { Sound } from '../platform/sound/sound.js';
 
 /** @typedef {import('../framework/app-base.js').AppBase} AppBase */
 /** @typedef {import('./handler.js').ResourceHandler} ResourceHandler */
diff --git a/src/resources/basis.js b/src/resources/basis.js
index 3de60bbc9..34c473f31 100644
--- a/src/resources/basis.js
+++ b/src/resources/basis.js
@@ -1,7 +1,7 @@
 import { Debug } from '../core/debug.js';
 import { PIXELFORMAT_R5_G6_B5, PIXELFORMAT_R4_G4_B4_A4 } from '../graphics/constants.js';
 import { BasisWorker } from './basis-worker.js';
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 /** @typedef {import('../graphics/graphics-device.js').GraphicsDevice} GraphicsDevice */
 
diff --git a/src/resources/binary.js b/src/resources/binary.js
index 9a39555ea..067b19c6c 100644
--- a/src/resources/binary.js
+++ b/src/resources/binary.js
@@ -1,4 +1,4 @@
-import { http, Http } from '../net/http.js';
+import { http, Http } from '../platform/net/http.js';
 
 class BinaryHandler {
     /**
diff --git a/src/resources/bundle.js b/src/resources/bundle.js
index 6455e4895..25a543263 100644
--- a/src/resources/bundle.js
+++ b/src/resources/bundle.js
@@ -1,6 +1,6 @@
 import { platform } from '../core/platform.js';
 
-import { http, Http } from '../net/http.js';
+import { http, Http } from '../platform/net/http.js';
 
 import { Bundle } from '../bundles/bundle.js';
 
diff --git a/src/resources/css.js b/src/resources/css.js
index 40e149045..c2324cd24 100644
--- a/src/resources/css.js
+++ b/src/resources/css.js
@@ -1,4 +1,4 @@
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 class CssHandler {
     /**
diff --git a/src/resources/font.js b/src/resources/font.js
index 52f3e3408..3f67faa3d 100644
--- a/src/resources/font.js
+++ b/src/resources/font.js
@@ -1,7 +1,7 @@
 import { path } from '../core/path.js';
 import { string } from '../core/string.js';
 
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 import { Font } from '../font/font.js';
 
diff --git a/src/resources/html.js b/src/resources/html.js
index a94835e3f..ee0bb549f 100644
--- a/src/resources/html.js
+++ b/src/resources/html.js
@@ -1,4 +1,4 @@
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 class HtmlHandler {
     /**
diff --git a/src/resources/json.js b/src/resources/json.js
index 5e3113212..c2b509818 100644
--- a/src/resources/json.js
+++ b/src/resources/json.js
@@ -1,4 +1,4 @@
-import { http, Http } from '../net/http.js';
+import { http, Http } from '../platform/net/http.js';
 
 class JsonHandler {
     /**
diff --git a/src/resources/material.js b/src/resources/material.js
index 33d9eba26..227b4ee10 100644
--- a/src/resources/material.js
+++ b/src/resources/material.js
@@ -1,4 +1,4 @@
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 import { PIXELFORMAT_R8_G8_B8_A8 } from '../graphics/constants.js';
 import { Texture } from '../graphics/texture.js';
diff --git a/src/resources/model.js b/src/resources/model.js
index bc8ccc262..2fb0f5021 100644
--- a/src/resources/model.js
+++ b/src/resources/model.js
@@ -1,7 +1,7 @@
 import { path } from '../core/path.js';
 import { Debug } from '../core/debug.js';
 
-import { http, Http } from '../net/http.js';
+import { http, Http } from '../platform/net/http.js';
 
 import { GlbModelParser } from './parser/glb-model.js';
 import { JsonModelParser } from './parser/json-model.js';
diff --git a/src/resources/parser/glb-parser.js b/src/resources/parser/glb-parser.js
index c551d65c7..dd9334ae3 100644
--- a/src/resources/parser/glb-parser.js
+++ b/src/resources/parser/glb-parser.js
@@ -1,7 +1,7 @@
 import { path } from '../../core/path.js';
 import { Debug } from '../../core/debug.js';
 
-import { http } from '../../net/http.js';
+import { http } from '../../platform/net/http.js';
 
 import { math } from '../../core/math/math.js';
 import { Mat4 } from '../../core/math/mat4.js';
diff --git a/src/resources/parser/texture/img.js b/src/resources/parser/texture/img.js
index ed6441d0f..f1990dfa0 100644
--- a/src/resources/parser/texture/img.js
+++ b/src/resources/parser/texture/img.js
@@ -1,5 +1,5 @@
 import { path } from '../../../core/path.js';
-import { http } from '../../../net/http.js';
+import { http } from '../../../platform/net/http.js';
 
 import {
     PIXELFORMAT_R8_G8_B8, PIXELFORMAT_R8_G8_B8_A8, TEXHINT_ASSET
diff --git a/src/resources/scene-utils.js b/src/resources/scene-utils.js
index 603850525..6d93ea995 100644
--- a/src/resources/scene-utils.js
+++ b/src/resources/scene-utils.js
@@ -1,4 +1,4 @@
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 const SceneUtils = {
     /**
diff --git a/src/resources/shader.js b/src/resources/shader.js
index a2dd93f18..b3bea9842 100644
--- a/src/resources/shader.js
+++ b/src/resources/shader.js
@@ -1,4 +1,4 @@
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 class ShaderHandler {
     /**
diff --git a/src/resources/sprite.js b/src/resources/sprite.js
index bf70dd1f2..b4aad265f 100644
--- a/src/resources/sprite.js
+++ b/src/resources/sprite.js
@@ -1,6 +1,6 @@
 import { path } from '../core/path.js';
 
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 import { Sprite } from '../scene/sprite.js';
 
diff --git a/src/resources/template.js b/src/resources/template.js
index 54974f015..c03d15f67 100644
--- a/src/resources/template.js
+++ b/src/resources/template.js
@@ -1,4 +1,4 @@
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 import { Template } from '../framework/template.js';
 
diff --git a/src/resources/text.js b/src/resources/text.js
index c80aebf52..844066ef1 100644
--- a/src/resources/text.js
+++ b/src/resources/text.js
@@ -1,4 +1,4 @@
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 class TextHandler {
     /**
diff --git a/src/resources/texture-atlas.js b/src/resources/texture-atlas.js
index aa451de85..cd70825ff 100644
--- a/src/resources/texture-atlas.js
+++ b/src/resources/texture-atlas.js
@@ -1,6 +1,6 @@
 import { path } from '../core/path.js';
 
-import { http } from '../net/http.js';
+import { http } from '../platform/net/http.js';
 
 import { Vec2 } from '../core/math/vec2.js';
 import { Vec4 } from '../core/math/vec4.js';


Test patch:
diff --git a/test/asset/asset-registry.test.mjs b/test/asset/asset-registry.test.mjs
index 6ee8bec2c..dcacb07e7 100644
--- a/test/asset/asset-registry.test.mjs
+++ b/test/asset/asset-registry.test.mjs
@@ -3,7 +3,7 @@ import { Asset } from '../../src/asset/asset.js';
 import { AssetRegistry } from '../../src/asset/asset-registry.js';
 import { GlbContainerResource } from '../../src/resources/parser/glb-container-resource.js';
 import { ResourceLoader } from '../../src/resources/loader.js';
-import { http, Http } from '../../src/net/http.js';
+import { http, Http } from '../../src/platform/net/http.js';
 
 import { HTMLCanvasElement } from '@playcanvas/canvas-mock';
 
diff --git a/test/net/http.test.mjs b/test/net/http.test.mjs
index b1a614137..cc39e7b08 100644
--- a/test/net/http.test.mjs
+++ b/test/net/http.test.mjs
@@ -1,4 +1,4 @@
-import { http, Http } from '../../src/net/http.js';
+import { http, Http } from '../../src/platform/net/http.js';
 
 import { expect } from 'chai';
 import { restore, spy } from 'sinon';