From e80dc4ca8d2bf17ed6b39473d6d40a74fb617491 Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Tue, 27 Aug 2024 14:00:46 +0100 Subject: [PATCH 1/6] Revert "Remove Google Poly integration" This reverts commit 4b1c762b72e1e86d27fd28bb007f37e872fcaa1f. --- src/config.js | 2 ++ src/editor/nodes/ModelNode.js | 2 +- src/ui/assets/sources/PolySource.js | 26 ++++++++++++++++++++++++++ src/ui/landing/LandingPage.js | 3 ++- src/ui/onboarding/Onboarding.js | 2 +- 5 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 src/ui/assets/sources/PolySource.js diff --git a/src/config.js b/src/config.js index ccc630671..96d57c031 100644 --- a/src/config.js +++ b/src/config.js @@ -57,6 +57,7 @@ import MediaFrameNode from "./editor/nodes/MediaFrameNode"; import MediaFrameNodeEditor from "./ui/properties/MediaFrameNodeEditor"; import SketchfabSource from "./ui/assets/sources/SketchfabSource"; +import PolySource from "./ui/assets/sources/PolySource"; import BingImagesSource from "./ui/assets/sources/BingImagesSource"; import BingVideosSource from "./ui/assets/sources/BingVideosSource"; import TenorSource from "./ui/assets/sources/TenorSource"; @@ -107,6 +108,7 @@ export function createEditor(api, settings) { editor.registerSource(new ArchitectureKitSource(api)); editor.registerSource(new RockKitSource(api)); editor.registerSource(new SketchfabSource(api)); + editor.registerSource(new PolySource(api)); editor.registerSource(new BingImagesSource(api)); editor.registerSource(new BingVideosSource(api)); editor.registerSource(new HubsSoundPackSource(editor)); diff --git a/src/editor/nodes/ModelNode.js b/src/editor/nodes/ModelNode.js index 289c13b5c..309dd1b12 100644 --- a/src/editor/nodes/ModelNode.js +++ b/src/editor/nodes/ModelNode.js @@ -270,7 +270,7 @@ export default class ModelNode extends EditorNodeMixin(Model) { getAttribution() { // Sketchfab models use an extra object inside the asset object - // Blender exporters add a copyright property to the asset object + // Blender & Google Poly exporters add a copyright property to the asset object const name = this.name.replace(/\.[^/.]+$/, ""); const assetDef = this.gltfJson.asset; const attributions = {}; diff --git a/src/ui/assets/sources/PolySource.js b/src/ui/assets/sources/PolySource.js new file mode 100644 index 000000000..c164875b3 --- /dev/null +++ b/src/ui/assets/sources/PolySource.js @@ -0,0 +1,26 @@ +import ModelMediaSource from "../ModelMediaSource"; +import { TransformPivot } from "../../../editor/controls/SpokeControls"; + +export default class PolySource extends ModelMediaSource { + constructor(api) { + super(api); + this.id = "poly"; + this.name = "Google Poly"; + this.tags = [ + { label: "Featured", value: "" }, + { label: "Animals", value: "animals" }, + { label: "Architecture", value: "architecture" }, + { label: "Art", value: "art" }, + { label: "Food", value: "food" }, + { label: "Nature", value: "nature" }, + { label: "Objects", value: "objects" }, + { label: "People", value: "people" }, + { label: "Scenes", value: "scenes" }, + { label: "Transport", value: "transport" } + ]; + + this.searchLegalCopy = "Search by Google"; + this.privacyPolicyUrl = "https://policies.google.com/privacy"; + this.transformPivot = TransformPivot.Bottom; + } +} diff --git a/src/ui/landing/LandingPage.js b/src/ui/landing/LandingPage.js index a2a624e2b..a42b0a67e 100644 --- a/src/ui/landing/LandingPage.js +++ b/src/ui/landing/LandingPage.js @@ -128,7 +128,8 @@ export default class LandingPage extends Component {

Discover

Explore images, videos, and 3D models from around the web, all without opening up a new tab. With - media integrations from Sketchfab, you'll be on your way to creating a scene in no time. + media integrations from Sketchfab and Google Poly, you'll be on your way to creating a scene in no + time.

diff --git a/src/ui/onboarding/Onboarding.js b/src/ui/onboarding/Onboarding.js index 7fd750015..3e5f255c1 100644 --- a/src/ui/onboarding/Onboarding.js +++ b/src/ui/onboarding/Onboarding.js @@ -21,7 +21,7 @@ import { Link } from "react-router-dom"; class CreateModelPopover extends Component { componentDidMount() { // TODO: Check if object was added - this.props.editor.setSource("sketchfab"); + this.props.editor.setSource("poly"); this.props.editor.addListener("sceneGraphChanged", this.onObjectAdded); } From fd86858cf993f960f17304297556864b45faf5a6 Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Fri, 30 Aug 2024 10:41:23 +0100 Subject: [PATCH 2/6] Poly to Icosa --- src/config.js | 4 ++-- .../assets/sources/{PolySource.js => IcosaSource.js} | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) rename src/ui/assets/sources/{PolySource.js => IcosaSource.js} (75%) diff --git a/src/config.js b/src/config.js index 96d57c031..93459b844 100644 --- a/src/config.js +++ b/src/config.js @@ -57,7 +57,7 @@ import MediaFrameNode from "./editor/nodes/MediaFrameNode"; import MediaFrameNodeEditor from "./ui/properties/MediaFrameNodeEditor"; import SketchfabSource from "./ui/assets/sources/SketchfabSource"; -import PolySource from "./ui/assets/sources/PolySource"; +import IcosaSource from "./ui/assets/sources/IcosaSource"; import BingImagesSource from "./ui/assets/sources/BingImagesSource"; import BingVideosSource from "./ui/assets/sources/BingVideosSource"; import TenorSource from "./ui/assets/sources/TenorSource"; @@ -108,7 +108,7 @@ export function createEditor(api, settings) { editor.registerSource(new ArchitectureKitSource(api)); editor.registerSource(new RockKitSource(api)); editor.registerSource(new SketchfabSource(api)); - editor.registerSource(new PolySource(api)); + editor.registerSource(new IcosaSource(api)); editor.registerSource(new BingImagesSource(api)); editor.registerSource(new BingVideosSource(api)); editor.registerSource(new HubsSoundPackSource(editor)); diff --git a/src/ui/assets/sources/PolySource.js b/src/ui/assets/sources/IcosaSource.js similarity index 75% rename from src/ui/assets/sources/PolySource.js rename to src/ui/assets/sources/IcosaSource.js index c164875b3..6eb32ccf0 100644 --- a/src/ui/assets/sources/PolySource.js +++ b/src/ui/assets/sources/IcosaSource.js @@ -1,11 +1,11 @@ import ModelMediaSource from "../ModelMediaSource"; import { TransformPivot } from "../../../editor/controls/SpokeControls"; -export default class PolySource extends ModelMediaSource { +export default class IcosaSource extends ModelMediaSource { constructor(api) { super(api); - this.id = "poly"; - this.name = "Google Poly"; + this.id = "icosa"; + this.name = "Icosa Gallery"; this.tags = [ { label: "Featured", value: "" }, { label: "Animals", value: "animals" }, @@ -19,8 +19,8 @@ export default class PolySource extends ModelMediaSource { { label: "Transport", value: "transport" } ]; - this.searchLegalCopy = "Search by Google"; - this.privacyPolicyUrl = "https://policies.google.com/privacy"; + this.searchLegalCopy = "Search by Icosa"; + this.privacyPolicyUrl = "https://icosa.gallery/privacy"; this.transformPivot = TransformPivot.Bottom; } -} +} \ No newline at end of file From 45a84b5aa66bd3704aba21f759588dde297c7cdf Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Fri, 13 Sep 2024 14:15:38 +0100 Subject: [PATCH 3/6] disable thumbnail proxy for now --- src/api/Api.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/api/Api.js b/src/api/Api.js index 2fade539e..e32baf916 100644 --- a/src/api/Api.js +++ b/src/api/Api.js @@ -69,8 +69,13 @@ export const scaledThumbnailUrlFor = (url, width, height) => { if (configs.RETICULUM_SERVER.includes("hubs.local") && url.includes("hubs.local")) { return url; } - - return `https://${configs.THUMBNAIL_SERVER}/thumbnail/${farsparkEncodeUrl(url)}?w=${width}&h=${height}`; + // Temporary workaround for lack of farspark thumbnail server + const disableThumbs = true; + if (disableThumbs) { + return url; + } else { + return `https://${configs.THUMBNAIL_SERVER}/thumbnail/${farsparkEncodeUrl(url)}?w=${width}&h=${height}`; + } }; const CommonKnownContentTypes = { From af9d2567bd96ab5fe120f0e490fd6522e6587af9 Mon Sep 17 00:00:00 2001 From: Craig Moore Date: Fri, 11 Oct 2024 16:02:54 +0100 Subject: [PATCH 4/6] Revert "disable thumbnail proxy for now" This reverts commit 45a84b5aa66bd3704aba21f759588dde297c7cdf. --- src/api/Api.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/api/Api.js b/src/api/Api.js index e32baf916..2fade539e 100644 --- a/src/api/Api.js +++ b/src/api/Api.js @@ -69,13 +69,8 @@ export const scaledThumbnailUrlFor = (url, width, height) => { if (configs.RETICULUM_SERVER.includes("hubs.local") && url.includes("hubs.local")) { return url; } - // Temporary workaround for lack of farspark thumbnail server - const disableThumbs = true; - if (disableThumbs) { - return url; - } else { - return `https://${configs.THUMBNAIL_SERVER}/thumbnail/${farsparkEncodeUrl(url)}?w=${width}&h=${height}`; - } + + return `https://${configs.THUMBNAIL_SERVER}/thumbnail/${farsparkEncodeUrl(url)}?w=${width}&h=${height}`; }; const CommonKnownContentTypes = { From 17f90a20fa1504626d1ccc79571c06bd8b5b95cf Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Wed, 13 Nov 2024 10:40:52 +0000 Subject: [PATCH 5/6] update privacy url --- src/ui/assets/sources/IcosaSource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/assets/sources/IcosaSource.js b/src/ui/assets/sources/IcosaSource.js index 6eb32ccf0..14d40ea81 100644 --- a/src/ui/assets/sources/IcosaSource.js +++ b/src/ui/assets/sources/IcosaSource.js @@ -20,7 +20,7 @@ export default class IcosaSource extends ModelMediaSource { ]; this.searchLegalCopy = "Search by Icosa"; - this.privacyPolicyUrl = "https://icosa.gallery/privacy"; + this.privacyPolicyUrl = "https://icosa.gallery/privacy-policy"; this.transformPivot = TransformPivot.Bottom; } } \ No newline at end of file From 4060ed85e0670f6513fc5b77a638f02aa4227568 Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Wed, 13 Nov 2024 10:41:29 +0000 Subject: [PATCH 6/6] Change text reference from Poly to Icosa --- src/ui/landing/LandingPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/landing/LandingPage.js b/src/ui/landing/LandingPage.js index 783d1c6d8..38a691828 100644 --- a/src/ui/landing/LandingPage.js +++ b/src/ui/landing/LandingPage.js @@ -128,7 +128,7 @@ export default class LandingPage extends Component {

Discover

Explore images, videos, and 3D models from around the web, all without opening up a new tab. With - media integrations from Sketchfab and Google Poly, you'll be on your way to creating a scene in no + media integrations from Sketchfab and Icosa Gallery, you'll be on your way to creating a scene in no time.