Avoid cycle in schema modules
This commit is contained in:
parent
70436ffb01
commit
cfefa8d39a
|
@ -8,12 +8,7 @@ PortalDestination =
|
|||
|
||||
Gravity = <gravity @direction shapes.Vector3> .
|
||||
|
||||
AmbientSound = <ambient-sound @name string @spec SoundSpec> .
|
||||
|
||||
SoundSpec =
|
||||
/ @stream <stream @url string>
|
||||
/ @loop <loop @url string>
|
||||
.
|
||||
AmbientSound = <ambient-sound @name string @spec shapes.SoundSpec> .
|
||||
|
||||
; Message
|
||||
Touch = <touch @subject string @object string> .
|
||||
|
|
|
@ -34,7 +34,11 @@ Color =
|
|||
/ @transparent <color @r double @g double @b double @alpha double @shape Shape>
|
||||
.
|
||||
|
||||
Sound = <sound @spec scene.SoundSpec @shape Shape> .
|
||||
Sound = <sound @spec SoundSpec @shape Shape> .
|
||||
SoundSpec =
|
||||
/ @stream <stream @url string>
|
||||
/ @loop <loop @url string>
|
||||
.
|
||||
|
||||
Name = <name @base string @shape Shape> .
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ function interpretScene(myId: string, runningEngine: RunningEngine, rootMesh: Me
|
|||
|
||||
during SceneProtocol.AmbientSound({
|
||||
"name": $name: string,
|
||||
"spec": $spec: SceneProtocol.SoundSpec
|
||||
"spec": $spec: Shapes.SoundSpec
|
||||
}) => spawn named `sound:${name}` {
|
||||
const sound = buildSound(name, runningEngine.scene, spec, false);
|
||||
on stop sound.dispose();
|
||||
|
|
|
@ -191,7 +191,7 @@ export function buildMesh(
|
|||
}
|
||||
}
|
||||
|
||||
export function buildSound(name: string, scene: Scene, spec: SceneProtocol.SoundSpec, spatial: boolean): Sound {
|
||||
export function buildSound(name: string, scene: Scene, spec: Shapes.SoundSpec, spatial: boolean): Sound {
|
||||
const options: ISoundOptions = {
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
|
|
Loading…
Reference in New Issue