Skip to content

Commit

Permalink
Fix XRUI package having wrong github org (#7653)
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField authored Mar 1, 2023
1 parent 0d8a3ed commit 7e6cb93
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/client-core/src/systems/LoadingUISystem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { WebLayer3D } from '@xrfoundation/xrui'
import { useEffect } from 'react'
import { DoubleSide, Mesh, MeshBasicMaterial, SphereGeometry, Texture } from 'three'

Expand All @@ -25,6 +24,7 @@ import { XRUIComponent } from '@xrengine/engine/src/xrui/components/XRUIComponen
import { createTransitionState } from '@xrengine/engine/src/xrui/functions/createTransitionState'
import { ObjectFitFunctions } from '@xrengine/engine/src/xrui/functions/ObjectFitFunctions'
import { createActionQueue, getState, removeActionQueue, startReactor, useHookstate } from '@xrengine/hyperflux'
import type { WebLayer3D } from '@xrengine/xrui'

import { AppLoadingState, AppLoadingStates, useLoadingState } from '../common/services/AppLoadingService'
import { SceneActions } from '../world/services/SceneService'
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@xrengine/common": "^1.1.0",
"@xrengine/hyperflux": "^1.1.0",
"@xrfoundation/volumetric": "1.0.11",
"@xrfoundation/xrui": "^1.1.0",
"@xrengine/xrui": "^1.1.0",
"behave-graph": "^0.9.10",
"bitecs": "git://github.com/NateTheGreatt/bitECS.git#056c637e05327aab8e355ebf25e9ff202b67e495",
"comlink": "4.3.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ImageDataType } from '@loaders.gl/images'
import { KTX2Encoder } from '@xrfoundation/xrui/core/textures/KTX2Encoder'
import { CompressedTexture, Texture } from 'three'

import { KTX2Encoder } from '@xrengine/xrui/core/textures/KTX2Encoder'

import createReadableTexture from '../../../functions/createReadableTexture'
import { GLTFExporterPlugin, GLTFWriter } from '../GLTFExporter'
import { ExporterExtension } from './ExporterExtension'
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/interaction/functions/interactUI.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WebLayer3D } from '@xrfoundation/xrui'
import { WebLayer3D } from '@xrengine/xrui'

import { Engine } from '../../ecs/classes/Engine'
import { Entity } from '../../ecs/classes/Entity'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WebLayer3D } from '@xrfoundation/xrui'
import { WebLayer3D } from '@xrengine/xrui'

import { Entity } from '../../ecs/classes/Entity'
import { addComponent, getComponent, setComponent } from '../../ecs/functions/ComponentFunctions'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { WebLayer3D } from '@xrfoundation/xrui'
import { Not } from 'bitecs'
import { Vector3 } from 'three'

import { defineState, getState } from '@xrengine/hyperflux'
import { WebLayer3D } from '@xrengine/xrui'

import { AvatarComponent } from '../../avatar/components/AvatarComponent'
import { getAvatarBoneWorldPosition } from '../../avatar/functions/avatarFunctions'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WebLayer3D } from '@xrfoundation/xrui'
import { WebLayer3D } from '@xrengine/xrui'

import { Engine } from '../../ecs/classes/Engine'
import { Entity } from '../../ecs/classes/Entity'
Expand Down
4 changes: 2 additions & 2 deletions packages/engine/src/xrui/classes/XRUIManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export class XRUIManager {

interactionRays = [] as Array<Ray | Object3D>

constructor(public WebLayerModule: typeof import('@xrfoundation/xrui')) {}
constructor(public WebLayerModule: typeof import('@xrengine/xrui')) {}

// layoutSystem: import('@xrfoundation/xrui').EtherealLayoutSystem
// layoutSystem: import('@xrengine/xrui').EtherealLayoutSystem
}
2 changes: 1 addition & 1 deletion packages/engine/src/xrui/components/XRUIComponent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { WebContainer3D } from '@xrfoundation/xrui'
import type { WebContainer3D } from '@xrengine/xrui'

import { defineComponent } from '../../ecs/functions/ComponentFunctions'
import { XRUIManager } from '../classes/XRUIManager'
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/xrui/functions/ObjectFitFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { WebContainer3D } from '@xrfoundation/xrui'
import { Matrix4, Object3D, PerspectiveCamera, Quaternion, Vector2, Vector3 } from 'three'

import { getState } from '@xrengine/hyperflux'
import type { WebContainer3D } from '@xrengine/xrui'

import { AvatarAnimationComponent, AvatarRigComponent } from '../../avatar/components/AvatarAnimationComponent'
import { Object3DUtils } from '../../common/functions/Object3DUtils'
Expand Down
7 changes: 4 additions & 3 deletions packages/engine/src/xrui/functions/createXRUI.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { State } from '@hookstate/core'
import type { WebContainer3D } from '@xrfoundation/xrui'
import React from 'react'
import { createRoot } from 'react-dom/client'
import { Group } from 'three'

import type { WebContainer3D } from '@xrengine/xrui'

import { isNode } from '../../common/functions/getEnvironment'
import { Entity } from '../../ecs/classes/Entity'
import { addComponent, getComponent, getComponentState, setComponent } from '../../ecs/functions/ComponentFunctions'
Expand All @@ -17,10 +18,10 @@ import { setTransformComponent } from '../../transform/components/TransformCompo
import { XRUIComponent } from '../components/XRUIComponent'
import { XRUIStateContext } from '../XRUIStateContext'

let Ethereal: typeof import('@xrfoundation/xrui')
let Ethereal: typeof import('@xrengine/xrui')

export async function loadXRUIDeps() {
Ethereal = await import('@xrfoundation/xrui')
Ethereal = await import('@xrengine/xrui')
}

export function createXRUI<S extends State<any> | null>(UIFunc: React.FC, state = null as S): XRUI<S> {
Expand Down
4 changes: 2 additions & 2 deletions packages/engine/src/xrui/systems/XRUISystem.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { WebContainer3D } from '@xrfoundation/xrui'
import {
AdditiveBlending,
BufferGeometry,
Expand All @@ -17,6 +16,7 @@ import {
} from 'three'

import { getState } from '@xrengine/hyperflux'
import { WebContainer3D } from '@xrengine/xrui'

import { Engine } from '../../ecs/classes/Engine'
import { Entity } from '../../ecs/classes/Entity'
Expand Down Expand Up @@ -79,7 +79,7 @@ export default async function XRUISystem(world: World) {
// todo - hoist to hyperflux state
const maxXruiPointerDistanceSqr = 3 * 3

const xrui = (XRUIManager.instance = new XRUIManager(await import('@xrfoundation/xrui')))
const xrui = (XRUIManager.instance = new XRUIManager(await import('@xrengine/xrui')))
xrui.WebLayerModule.WebLayerManager.initialize(renderer)
xrui.WebLayerModule.WebLayerManager.instance.ktx2Encoder.pool.setWorkerLimit(1)

Expand Down
2 changes: 1 addition & 1 deletion packages/xrui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline



**Note:** Version bump only for package @xrfoundation/xrui
**Note:** Version bump only for package @xrengine/xrui
2 changes: 1 addition & 1 deletion packages/xrui/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@xrfoundation/xrui",
"name": "@xrengine/xrui",
"version": "1.1.0",
"main": "index.ts",
"description": "A set of utilities for using DOM elements to create immerive user interfaces",
Expand Down
2 changes: 1 addition & 1 deletion packages/xrui/scripts/update-name-gh-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ const fs = require('fs');

(() => {
const packageContents = JSON.parse(fs.readFileSync('./package.json').toString());
packageContents.name = '@xrfoundation/xrui';
packageContents.name = '@xrengine/xrui';
fs.writeFileSync('./package.json', Buffer.from(JSON.stringify(packageContents)));
})();

0 comments on commit 7e6cb93

Please sign in to comment.