Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing google poly integration with Icosa integration #1301

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import MediaFrameNode from "./editor/nodes/MediaFrameNode";
import MediaFrameNodeEditor from "./ui/properties/MediaFrameNodeEditor";

import SketchfabSource from "./ui/assets/sources/SketchfabSource";
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";
Expand Down Expand Up @@ -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 IcosaSource(api));
editor.registerSource(new BingImagesSource(api));
editor.registerSource(new BingVideosSource(api));
editor.registerSource(new HubsSoundPackSource(editor));
Expand Down
2 changes: 1 addition & 1 deletion src/editor/nodes/ModelNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down
26 changes: 26 additions & 0 deletions src/ui/assets/sources/IcosaSource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import ModelMediaSource from "../ModelMediaSource";
import { TransformPivot } from "../../../editor/controls/SpokeControls";

export default class IcosaSource extends ModelMediaSource {
constructor(api) {
super(api);
this.id = "icosa";
this.name = "Icosa Gallery";
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 Icosa";
this.privacyPolicyUrl = "https://icosa.gallery/privacy-policy";
this.transformPivot = TransformPivot.Bottom;
}
}
3 changes: 2 additions & 1 deletion src/ui/landing/LandingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ export default class LandingPage extends Component {
<h3>Discover</h3>
<p>
Explore images, videos, and 3D models from around the web, all without opening up a new tab. With
media integrations from Sketchfab, you&#39;ll be on your way to creating a scene in no time.
media integrations from Sketchfab and Icosa Gallery, you&#39;ll be on your way to creating a scene in no
time.
</p>
</Callout>
<Callout imageSrc={editor}>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/onboarding/Onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down