Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
add default arguement to add media node func (#9150)
Browse files Browse the repository at this point in the history
* add defautl arguement to add media node func

* fix check-errors errors

---------

Co-authored-by: Josh Field <[email protected]>
  • Loading branch information
SYBIOTE and HexaField authored Oct 28, 2023
1 parent 8ebb6b1 commit 689c87e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"@types/cli": "0.11.21",
"@types/mocha": "10.0.1",
"@types/primus": "^7.3.6",
"@types/three": "0.157.0",
"@typescript-eslint/eslint-plugin": "5.56.0",
"@typescript-eslint/parser": "5.56.0",
"concurrently": "7.6.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const ParticleSystemNodeEditor: EditorComponentType = (props) => {
value={burst.probability.value}
onChange={onSetState(burst.probability)}
/>
<Button onClick={onRemoveBurst(burst)}>Remove Burst</Button>
<Button onClick={onRemoveBurst(burst as any)}>Remove Burst</Button>
</div>
)
}}
Expand Down Expand Up @@ -329,7 +329,7 @@ const ParticleSystemNodeEditor: EditorComponentType = (props) => {
<ValueGenerator
value={particleSystem.systemParameters.rendererEmitterSettings.startLength as ValueGeneratorJSON}
scope={
particleSystemState.systemParameters.rendererEmitterSettings
(particleSystemState.systemParameters.rendererEmitterSettings as any)
.startLength as unknown as State<ValueGeneratorJSON>
}
onChange={onSetState}
Expand Down
4 changes: 3 additions & 1 deletion packages/editor/src/functions/addMediaNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import { VideoComponent } from '@etherealengine/engine/src/scene/components/Vide
import { VolumetricComponent } from '@etherealengine/engine/src/scene/components/VolumetricComponent'

import { ComponentJson } from '@etherealengine/common/src/interfaces/SceneInterface'
import { SceneState } from '@etherealengine/engine/src/ecs/classes/Scene'
import { getState } from '@etherealengine/hyperflux'
import { EditorControlFunctions } from './EditorControlFunctions'

/**
Expand All @@ -44,7 +46,7 @@ import { EditorControlFunctions } from './EditorControlFunctions'
*/
export async function addMediaNode(
url: string,
parent: Entity | null = null,
parent: Entity | null = getState(SceneState).sceneEntity,
before: Entity | null = null,
extraComponentJson: ComponentJson[] = []
) {
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/lightmapper/AutoUV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function convertGeometryToIndexed(buffer: THREE.BufferGeometry) {
groupIndexArray.fill(group.materialIndex, group.start, Math.min(posVertexCount, group.start + group.count))
}

const indexAttr = new THREE.Uint16BufferAttribute(faceCount * 3, 3)
const indexAttr = new THREE.Uint16BufferAttribute(faceCount * 3, 3) // should item siz not be one? internallly (array.length/ itemsize) =count
indexAttr.count = faceCount * 3 // @todo without this the mesh does not show all faces

for (let faceIndex = 0; faceIndex < faceCount; faceIndex += 1) {
Expand Down

0 comments on commit 689c87e

Please sign in to comment.